我是opencl domian的新手.我已阅读了一些书籍并尝试编译以下代码
#define __CL_ENABLE_EXCEPTIONS
#define __NO_STD_VECTOR
#define PROGRAM_FILE "blank.cl"
#define KERNEL_FUNC "blank"
//#define __MAX_DEFAULT_VECTOR_SIZE 100
#include <cstdio>
#include <fstream>
#include <iostream>
#include <iterator>
#ifdef Windows
#include <OpenCL/cl.hpp>
#else
#include <CL/cl.hpp>
#endif
using namespace std;
using namespace cl;
int main() {
// int n = 10;
vector<Platform> platforms;
vector<Device> devices;
try {
} catch (exception e) {
}
return 0;
}
Run Code Online (Sandbox Code Playgroud)
但它给了我很多错误.
其中大多数如下
Error 14 error C4996: 'cl::vector<char *,10>': was declared deprecated C:\Program Files (x86)\AMD APP SDK\2.9\include\CL\cl.hpp 1138 1 Matrix_multilpy_C
Run Code Online (Sandbox Code Playgroud)
那么任何人都可以帮助我.我使用visual …