2013-07-17 36 views
1

在OpenMP模式下編譯時,我們有_OPENMP宏定義(幾乎所有我認識的編譯器 - gcc,pgi,intel,...)。當我們在OpenACC模式下編譯(Cray/pgi /其他編譯器)時,我們是否定義了類似的「標準」宏?用於OpenACC的C /預處理器標準宏?

Wirawan

回答

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.