I've been working with some example code from v2.2, and now I installed ATI Stream v2.3. The code that used to work now breakes with this error:
"vector subscript out of range"
This error is from std::vector.
(c:\program files (x86)\microsoft visual studio 9.0\vc\include\vector)
The error occurs when executing last line of this code:
// Find the platform std::vector<cl::Platform> platforms; cl::Platform::get(&platforms); std::vector<cl::Platform>::iterator iter; for(iter = platforms.begin(); iter != platforms.end(); ++iter) { if((*iter).getInfo<CL_PLATFORM_VENDOR>() == "Advanced Micro Devices, Inc.") break; } // Create an OpenCL context cl_context_properties cps[3] = { CL_CONTEXT_PLATFORM, (cl_context_properties)(*iter)(), 0 }; cl::Context context; context = cl::Context(CL_DEVICE_TYPE_GPU, cps); // Detect OpenCL devices std::vector<cl::Device> devices; devices = context.getInfo<CL_CONTEXT_DEVICES>(); // Create an OpenCL command queue cl::CommandQueue queue; queue = cl::CommandQueue(context, devices[0]);