I have problems with my OpenCL-Code, that crashes at the marked position, but only for my nvidia gpu (OpenCL 1.1) (the intel platforms (OpenCL 1.2 and OpenCL 2.0) behave well).
cl::Platform::get(&allPlatforms);
allDevices.resize(allPlatforms.size());
size_t noDevices = 0;
for (size_t i = 0, end = allPlatforms.size(); i < end; ++i)
{
allPlatforms[i].getDevices(CL_DEVICE_TYPE_ALL, &allDevices[i]); //here it crashes
noDevices += allDevices[i].size();
}
cl_int getDevices(
cl_device_type type,
VECTOR_CLASS<Device>* devices) const
{
...
devices->assign(&ids[0], &ids[n]); //here it crashes
return CL_SUCCESS;
}
I've no idea why it crashes and how to fix it.
Edit: my debugger says that ids is a valid pointer and n=1 (in the case of crash)