Fix cuSTL assign bug

fix bug that threads per block can be greater than 1024

*example:*
- If my local simulation is of the size `1024x1024x1024`
- the old implementation in `DeviceMemAssigner` create a blockDim with size `512x512x512` (this is not allowed)