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