gpt4 book ai didi

c++ - 使用 C++ 绑定(bind)编译 OpenCL

转载 作者:行者123 更新时间:2023-11-30 01:57:38 24 4
gpt4 key购买 nike

我正在尝试编译 cl.hpp来自 Khronos Groups with VS2010,我收到以下消息:

1>c:\users\facundo\documents\visual studio 2010\projects\opencl\opencl\cl.hpp(4757): error C2039: 'resize' : it is not a member of 'cl::vector<T>'
1> with
1> [
1> T=cl_context_properties
1> ]

如何在VS2010上正确编译C++/OpenCL项目?

最佳答案

cl::vector<>已被弃用。

默认情况下 cl.hpp 应该选择 std::vector<>作为默认 vector 类。

也许你定义了__NO_STD_VECTOR或者你正在使用 cl::vector<>你自己?

关于c++ - 使用 C++ 绑定(bind)编译 OpenCL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18493400/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com