I asked this because I wanted to understand the following: I have a function
- func: function(Tensor self) -> Tensor
  variants: method, function
  dispatch:
    CPU: function_cpu
    CUDA: function_cuda

whose implementation I want to change.
The current version’s return tensor is declared this way:
Tensor result;
result = at::empty({}, self.options().dtype(dtype));

I computed the result I want to return with std::vectors (probably not optimal, feel free to suggest something better). Now I’m wondering how I can pass this vector to the result tensor. I think I have to use following in some way, and was trying to find its implementation by asking about the location of the Tensor class:
self.data_ptr<scalar_t>()

I can’t seem to infer this from the information you gave me above. Can you explain to me to how I can properly give my data to the return tensor? Is there maybe an instructive function somewhere I could look at.