Thank you for your answer.
I tried it out and I’m a bit confused by how to pass a torch::ScalarType to the at::scalar_value_type method.
If I try to insert a torch::ScalarType in place of the the scalar_t above, I get:
[build] …/torchOps/torchOps.cpp:165:64: error: template argument for template type parameter must be a type
[build] auto f32_espilon = std::numeric_limits<at::scalar_value_type< torch::kF32>::type>::epsilon();
[build] ^~~~~~~~~~~
[build] …/libtorch/include/c10/util/complex_utils.h:21:20: note: template parameter is declared here
[build] template < typename T>
[build] ^
[build] 1 error generated.
I’m not experienced with cpp very much, so that could be the source of my confusion. But I can see from the definition of at::scalar_value_type that indeed it expects a type.