【问题标题】:OpenCL program showing errors. What can be a possible solution?OpenCL 程序显示错误。什么是可能的解决方案?
【发布时间】:2020-08-25 15:46:23
【问题描述】:

如下图所示,我遇到了某些错误。我觉得环境设置有问题。我对此很陌生,无法弄清楚如何纠正它。请帮忙。 enter image description here

【问题讨论】:

    标签: eclipse opencl development-environment


    【解决方案1】:

    你尝试#include <CL/cl.hpp>,它没有随你的OpenCL实现一起安装,检查#include <CL/cl2.hpp>是否是(见https://github.com/KhronosGroup/OpenCL-CLHPP)。

    如果您不使用 OpenCL C++ Wrapper API(请参阅 OpenCL 1.2 中的附录 D),那么您可能希望改用 include <CL/cl.h> 或更好(可移植到 Apple MacOS):

    #if defined(__APPLE__) && defined(__MACH__)
    #include <OpenCL/opencl.h>
    #else
    #include <CL/cl.h>
    #endif
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-01-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-02-20
      • 1970-01-01
      • 2016-06-21
      • 2018-04-02
      相关资源
      最近更新 更多