OpenCL™规范 5.8.6.1. 预处理器选项

5.8.6.1. Preprocessor Options
5.8.6.1. 预处理器选项

These options control the OpenCL C/C++ preprocessor which is run on each program source before actual compilation. These options are ignored for programs created with IL.

这些选项控制OpenCL C/C++预处理器,该预处理器在实际编译之前在每个程序源上运行。对于使用IL创建的程序,这些选项将被忽略。

-D name

Predefine name as a macro, with definition 1.

将名称预定义为宏,定义为1。

-D name=definition

The contents of definition are tokenized and processed as if they appeared during translation phase three in a #define directive. In particular, the definition will be truncated by embedded newline characters.

定义的内容被标记和处理,就像它们出现在#define指令的翻译阶段三一样。特别是,定义将被嵌入的换行符截断。

-D options are processed in the order they are given in the options argument to clBuildProgram or clCompileProgram. Note that a space is required between the -D option and the symbol it defines, otherwise behavior is implementation-defined.

​-D选项按照clBuildProgram或clCompileProgram的options参数中给出的顺序进行处理。请注意,-D选项和它定义的符号之间需要一个空格,否则行为将由实现定义。

-I dir

Add the directory dir to the list of directories to be searched for header files. dir can optionally be enclosed in double quotes.

将目录dir添加到要搜索头文件的目录列表中。dir可以选择用双引号括起来。

This option is not portable due to its dependency on host file system and host operating system. It is supported for backwards compatibility with previous OpenCL versions. Developers are encouraged to create and use explicit header objects by means of clCompileProgram followed by clLinkProgram.

​此选项不可移植,因为它依赖于主机文件系统和主机操作系统。它支持与以前的OpenCL版本向后兼容。鼓励开发人员通过clCompileProgram和clLinkProgram创建和使用显式头对象。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值