错误:标识符“float3”未定义;在 ATI 卡上运行 oclNbody 演示时
我尝试在 ATI Radeo 4850 卡上运行 NVidia 的 OpenCL 演示 oclNbody.exe 并收到以下错误:
构建日志: C:\DOCUME~1\DIMEDR~1\LOCALS~1\Temp\OCL27C.tmp.cl(33): 错误:标识符
“float3”未定义
REAL3 bodyBodyInteraction(REAL3 ai, REAL4 bi、REAL4 bj、REAL 软化平方)
^
对于所有 REAL3 数据类型使用依此类推。我已经看过 OpenCL 规范 1.1 ,它清楚地表明说支持float3。我尝试用 float3 更改 REAL3 但没有成功。我的卡有最新的驱动程序。使用 Windows XP SP3 操作系统
如何修复或解决此错误?
I'm trying to run NVidia's OpenCL demo oclNbody.exe on ATI Radeo 4850 card and receive such errors:
Build Log:
C:\DOCUME~1\DIMEDR~1\LOCALS~1\Temp\OCL27C.tmp.cl(33):
error: identifier"float3" is undefined
REAL3 bodyBodyInteraction(REAL3 ai,
REAL4 bi, REAL4 bj, REAL
softeningSquared)^
And so on for all REAL3 datatype using. I have seen the OpenCL specification 1.1 and it clearly says that float3 is supported. I've tried to change REAL3 with float3 with no luck. I have the latest drivers for my card. Using Windows XP SP3 OS
How can I fix or work around this error?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
float3
和其他 3 分量向量类型不是 OpenCL 1.0 规范的一部分;它们是在 1.1 修订版中添加的。根据AMD的驱动兼容性页面,Radeon HD 4800卡仅支持OpenCL 1.0。编译器尝试将 float3 解释为标识符的事实表明它不是可识别的类型。
float3
and other 3-component vector types were not part of the OpenCL 1.0 spec; they were added in the 1.1 revision. According to AMD's driver compatibility page, the Radeon HD 4800 cards only support OpenCL 1.0.The fact that the compiler tried to interpret
float3
as an identifier shows that it is not a recognized type.我找到了一个解决方法:
,它成功了!
I have found a workaround:
and it worked!