Could you help me to understand in details ?
I use these code, but it do not work:
result is a torch::Tensor object, it is on cpu.
result = result.contiguous();
std::memcpy(ret_array,_result.data_ptr(),sizeof(float)*_result.numel());