MEMORYTOUCH (i64 only)

General Compiler Directive: Ensures that a specific memory location is updated dynamically.

Syntax

cDEC$ MEMORYTOUCH (array[, schedule-type [(chunk-size)]] [,init-type])

c

Is a c, C, !, or *. (See Syntax Rules for Compiler Directives.)

array

Is an array of type INTEGER(4), INTEGER(8), REAL(4) or REAL(8).

schedule-type

Is STATIC, GUIDED, RUNTIME or DYNAMIC, whichever is consistent with the OpenMP conforming processing of the subsequent parallel loops.

chunk-size

Is an integer expression.

init-type

Is LOAD or STORE. If init-type is LOAD, the compiler generates an OpenMP loop which fetches elements of array into a temporary variable. If init-type is STORE, the compiler generates an OpenMP loop which sets elements of array to zero.

The MEMORYTOUCH directive ensures that a specific memory location is updated dynamically. This prevents the possibility of multiple, simultaneous writing threads.

This directive supports correctly distributed memory initialization and NUMA pre-fetching.

To use this directive, OpenMP must be enabled.

Example

c$DEC memorytouch (ARRAY_A)c$DEC memorytouch (ARRAY_A, LOAD)c$DEC memorytouch (ARRAY_A, STATIC (load+jf(3)) )c$DEC memorytouch (ARRAY_A, GUIDED (20), STORE)

See Also