1. Introduction to neon
Neon is a common SIMD (single command and multiple data) engine. Neon can accelerate multimedia and signal processing algorithms. Neon can process current and future multimedia formats to improve user experience.
Ii. Neon principles
O neon command can execute "packaged SIMD" processing: N registers are considered to be the same
Data TypeOf
ElementOf
VectorN data types can be: Signed/unsigned 8-bit, 16-bit, 32-bit, 64-Bit Single-precision floating point
The N schematic diagram is as follows: through the comparison of sisd (single command and single data) and SIMD (single command and multiple data), we can describe the working principle of neon: as shown in the figure, for sisd, each command can only process one data, while a SIMD command can process multiple data, because the processing of multiple data is parallel, so in terms of time, the time when a command is executed, sisd is similar to SIMD. Since SIMD can process n data at a time, the processing time is reduced to 1/N of sisd. It should be pointed out that neon requires hardware support and a register should be placed on the hardware to handle this. Iii. Use of neon
O neon functions are in the C language style, but are compiled into Assembly statements, which improves the execution efficiency.
O 4. The neon example is an algorithm that converts GRB into a grayscale image in C.
The following is an algorithm that uses neon to convert GRB into a grayscale image. The above functions are described as follows: add weights to the neon register.
Load 8 pixles to three noen registers at a time, which indicates the efficiency of neon.
Calculation Result
Neontracing refers to the neon section in the gcc.pdf in the gcc.pdf tool.
Command in allChannelRun the sameOperation