1

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

威拉万

4

1 回答 1

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.
于 2013-07-18T06:51:14.690 回答