
This statement level construct takes no clauses and has no associated statement, and simply labels a number of array elements as valid for caching. The implementation here is pretty simple, but it is a touch of a special case for parsing, so the parsing code reflects that.
10 lines
302 B
C++
10 lines
302 B
C++
// RUN: %clang_cc1 -fopenacc -ast-print %s -o - | FileCheck %s
|
|
|
|
void foo() {
|
|
int Array[5];
|
|
// CHECK: #pragma acc cache(readonly: Array[1], Array[1:2])
|
|
#pragma acc cache(readonly:Array[1], Array[1:2])
|
|
// CHECK: #pragma acc cache(Array[1], Array[1:2])
|
|
#pragma acc cache(Array[1], Array[1:2])
|
|
}
|