Is there are some operations to transform the Tensor into IntTensor or LongTensor in cpp?

I custom C++ extensions for the first time. And at::Tensor making a default type of float, but in my case I need the type of int of long, how can I do for it? It is better if there are some doc for c++ extensions. Thanks a lot! Please help me!