#include #include #include int main( int argc, char** argv ) { cl_int err = CL_SUCCESS; std::vector platforms; cl::Platform::get( &platforms ); cl_context_properties properties[] = { CL_CONTEXT_PLATFORM, (cl_context_properties)(platforms[0])(), 0}; cl::Context context(CL_DEVICE_TYPE_GPU, properties); std::vector devices = context.getInfo(); const char * helloStr = "__kernel void hello(void){}"; cl::Program::Sources source(1, std::make_pair( helloStr, strlen(helloStr) ) ); cl::Program program_ = cl::Program(context, source); err = program_.build(devices); if( err == CL_BUILD_SUCCESS ){ std::cout<<"Build successfull"<