TH This is the C/CPU implementation of Tensors et al For the CUDA implementation, you can look at lib/THC, in cutorch repository.