Thanks for your answer.
I have a C++ code with signature double some_fcn(double a, double b), and I want to wrap it to PyTorch function Tensor some_fcn_wrap(Tensor& a, Tensor& b) with some broadcasting capability.
The problem of wrapping it is I need to implement the broadcasting inside the function, but I’m sure there’s a function (or class) in PyTorch’s C++ source code to do that.
That’s what I’m looking for. Something like numpy.nditer 1.