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.

Show/hideSee also

Copyright © 2010-2011 ARM. All rights reserved.ARM DUI 0472E
Non-ConfidentialID071611