I’m writing a shim to use a C++ function with PyTorch and would like to know how to convert torch::Tensor to  a std:vector<int32_t>?
float f_cpp(std::vector<int32_t>& result);

float f(torch::Tensor results_t) {

  //  std:vector<int32_t> <-- torch::Tensor?
  std::vector<int32_t> result = result_t.data_ptr<std::vector<int32_t>>; 

  return f_cpp(*result);
}