【问题标题】:C/preprocessor standard macro for OpenACC?OpenACC 的 C/预处理器标准宏?
【发布时间】:2013-07-16 05:40:57
【问题描述】:

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

维拉万

【问题讨论】:

    标签: c c-preprocessor openacc


    【解决方案1】:

    是的,您为 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.
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-02-09
      • 2014-04-30
      • 2011-01-26
      • 1970-01-01
      • 2012-07-21
      • 2012-11-16
      • 2016-12-14
      • 2011-03-26
      相关资源
      最近更新 更多