safer kernel indexing for mul_kernel(...)

FYI:http://devblogs.nvidia.com/parallelforall/cuda-pro-tip-write-flexible-kernels-grid-stride-loops/