3.21 Vectorization and struct member lengths

NEON structure loads require that all members of a structure are of the same length.

In the example code below, the compiler does not attempt to use vector loads because of the inconsistent structure member lengths.

struct foo
    short a;
    int b;
    short c;
} n[10];

This code 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.

Related concepts
3.6 Automatic vectorization
3.20 Grouping structure accesses for vectorization
Related reference
8.189 --vectorize, --no_vectorize
Non-ConfidentialPDF file icon PDF versionARM DUI0472J
Copyright © 2010-2013 ARM. All rights reserved.