Visible to Intel only — GUID: GUID-D7567BCD-EC77-4093-9000-402605E207A0
Visible to Intel only — GUID: GUID-D7567BCD-EC77-4093-9000-402605E207A0
ompx prefetch data
Issues a prefetch to pre-load the data in the array sections specified.
#pragma ompx prefetch data( [prefetch-hint-modifier:] arrsect [, arrsect] ) [if (condition)] |
arrsect |
A contiguous array section, where contiguous means stride is either not specified, or is constant 1, as defined in OpenMP 5.1. |
prefetch-hint-modifier |
An optional, implementation defined, positive constant literal integer between 0 and 7, inclusive. When not specified, it is assumed to be 0. Possible values:
|
if |
An optional condition for the prefetch. The same as the existing if clause for the parallel construct specified in OpenMP 5.1. |
The ompx prefetch data pragma issues a prefetch to pre-load the data specified in the array sections. If the if clause is specified, then the prefetch is done only if condition is true.
The ompx prefetch data pragma is supported for Intel® Iris® Xe MAX GPU only.
Example
Use the ompx prefetch data pragma:
int x[1024]; float y[1024]; float z[1024]; ... for (m = 0; m < 1024; m++) { // 4: Prefetch to L1 cache and L3 cache #pragma ompx prefetch data(4: y[m+16], z[m+16]) if(m%16==0 && (m+16) < 1024) x[m] = y[m] + z[m]; } ...