/usr/local/lib64/python3.6/site-packages/torch/include/THC
Edit: /usr/local/lib64/python3.6/site-packages/torch/include/THC/THCTensorMathReduce.cuh (664B)
#ifndef THC_TENSORMATH_REDUCE_CUH
#define THC_TENSORMATH_REDUCE_CUH
#include
/*
Reductions that (only) operate on accumulate types.
*/
template
struct ReduceAdd {
inline __device__ T operator()(const T a, const T b) const {
return THCNumerics::add(a, b);
}
};
template
struct AddOp {
__device__ __forceinline__ T operator()(T const &lhs, T const &rhs) {
return THCNumerics::add(lhs, rhs);
}
};
template
struct MulOp {
__device__ __forceinline__ T operator()(T const &lhs, T const &rhs) {
return THCNumerics::mul(lhs, rhs);
}
};
#endif // THC_TENSORMATH_REDUCE_CUH