【入门】OpenCL C的限制

OpenCL C编程语言是用来编写内核代码的编程语言。它是基于ISO C99标准的一个扩展子集,有着如下限制:


The pointer passed as an argument to a kernel function must be of type __global, __constant, or __local. 
传入kernel的指针参数必须是__global, __constant, 或者__local型的. 


Pointer to a pointer cannot be passed as an argument to a kernel function.
指向指针的指针不可以作为参数传给kernel函数。


Bit-fields are not supported.
不支持Bit-fields。


Variable length arrays and structures with flexible (or unsized) arrays are not supported.
不支持可变长度的数组和包含不确定长度的结构体。


Variadic macros and functions are not supported.
不支持可以改变参数的宏和方法。

C99 standard headers cannot be included.
不能引入C99标准的头文件。

The extern, static, auto and register storage-class specifiers are not supported.
不支持extern, static, auto 和 register storage-class 声明符。

Predefined identifiers are not supported. 
不支持预定于标示符。

Recursion is not supported.
不支持递归。

The function using the __kernel qualifier can only have return type void in the source code.
用__kernel限定的函数只能返回空类型。

Writes to a pointer of type char, uchar, char2, uchar2, short, ushort, and half are not supported.
不支持指向char, uchar, char2, uchar2, short, ushort, and half型的指针。

Support for double precision floating-point is currently an optional extension. It may or may not be implemented.
双精度float型指针现在是一个可选扩展,它不一定会不会实现。
  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值