Kernels: Now SizeType is always "int". Right now I don't expect data-structure to have more than 2**31 entries. Improves performance on a number of routines.

This commit is contained in:
Philippe Tillet
2015-08-11 11:50:49 -07:00
parent f06c85c97c
commit b5cc1f7ddc
3 changed files with 35 additions and 54 deletions

View File

@@ -83,18 +83,11 @@ void Kernel::setSizeArg(unsigned int index, size_t N)
}
#endif
case OPENCL:
if(address_bits_==32){
cl_int NN = N;
ocl::check(clSetKernelArg(h_.cl(), index, 4, &NN));
}
else if(address_bits_==64)
{
cl_long NN = N;
ocl::check(clSetKernelArg(h_.cl(), index, 8, &NN));
}
else
throw;
{
cl_int NN = N;
setArg(index, 4, &NN);
break;
}
default: throw;
}