OpenACC的C /预处理器标准宏?

时间:2013-07-17 15:16:12

标签: c c-preprocessor openacc

在OpenMP模式下编译时,在OpenMP中我们定义了_OPENMP宏(几乎所有我知道的编译器 - gcc,pgi,intel,...)。在OpenACC模式下编译时,我们是否有类似的“标准”宏定义(Cray / pgi /其他编译器)?

Wirawan

1 个答案:

答案 0 :(得分:3)

是的,您为openacc定义了类似的宏:_OPENACC。

2.2 Conditional Compilation

The _OPENACC macro name is defined to have a value yyyymm where yyyy is the year and
mm is the month designation of the version of the OpenACC directives supported by the
implementation. This macro must be defined by a compiler only when OpenACC directives
are enabled. The version described here is 201306.