| |||
| Home > Using the NEON Vectorizing Compiler > struct member lengths and vectorization | |||
NEON structure loads require that all members of a structure are of the same length. Therefore, the compiler does not attempt to use vector loads for the code shown in Example 14.
Example 14. Nonvectorizable code caused by inconsistent structure member lengths
struct foo
{
short a;
int b;
short c;
} n[10];
The code in Example 14 could
be rewritten for vectorization by using the same data type throughout
the structure. For example, if the variable b is
to be of type int, consider making variables a and c of
type int rather than short.
Compiler Reference: