/usr/local/lib64/python3.6/site-packages/torch/include/caffe2/utils/math
NameSizeModeActions
broadcast.h5550644editdlrm
elementwise.h64550644editdlrm
half_utils.h13290644editdlrm
reduce.h26720644editdlrm
transpose.h7850644editdlrm
utils.h46430644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/torch/include/caffe2/utils/math/reduce.h (2672B)
#ifndef CAFFE2_UTILS_MATH_REDUCE_H_ #define CAFFE2_UTILS_MATH_REDUCE_H_ #include "caffe2/core/common.h" #include "caffe2/core/types.h" namespace caffe2 { class Tensor; namespace math { template TORCH_API void ReduceMin(const int N, const T* X, T* y, Tensor* scratch_ptr, Context* context); template TORCH_API void ReduceMax(const int N, const T* X, T* y, Tensor* scratch_ptr, Context* context); // In all of the reduce functions, X_dims and Y_dims should have ndim elements. // Each dimension of Y_dims must match the corresponding dimension of X_dims or // must be equal to 1. The dimensions equal to 1 indicate the dimensions of X to // be reduced. // Y = alpha * ReduceMin(X) template TORCH_API void ReduceMin( const int ndim, const int* X_dims, const int* Y_dims, const T alpha, const T* X, T* Y, Context* context, bool allow_broadcast_fastpath=false); // Y = alpha * ReduceMax(X) template TORCH_API void ReduceMax( const int ndim, const int* X_dims, const int* Y_dims, const T alpha, const T* X, T* Y, Context* context, bool allow_broadcast_fastpath=false); // Y = alpha * ReduceSum(X) template TORCH_API void ReduceSum( const int ndim, const int* X_dims, const int* Y_dims, const T alpha, const T* X, T* Y, Context* context, bool allow_broadcast_fastpath=false); // Y = alpha * ReduceMean(X) template TORCH_API void ReduceMean( const int ndim, const int* X_dims, const int* Y_dims, const T alpha, const T* X, T* Y, Context* context, bool allow_broadcast_fastpath=false); // Y = alpha * ReduceL1(X) template TORCH_API void ReduceL1( const int ndim, const int* X_dims, const int* Y_dims, const T alpha, const T* X, T* Y, Context* context, bool allow_broadcast_fastpath=false); // Y = alpha * ReduceL2(X) template TORCH_API void ReduceL2( const int ndim, const int* X_dims, const int* Y_dims, const T alpha, const T* X, T* Y, Context* context, bool allow_broadcast_fastpath=false); // Computes mean and variance over axes. template TORCH_API void Moments( const int ndims, const int* X_dims, const int* Y_dims, const T* X, T* mean, T* var, Context* context, bool allow_broadcast_fastpath=false); } // namespace math } // namespace caffe2 #endif // CAFFE2_UTILS_MATH_REDUCE_H_