/usr/local/lib64/python3.6/site-packages/torch/include/ATen/native/cpu
NameSizeModeActions
AtomicAddFloat.h7500644editdlrm
avx_mathfun.h174480644editdlrm
CatKernel.h2520644editdlrm
DepthwiseConvKernel.h4470644editdlrm
DistributionTemplates.h140510644editdlrm
GridSamplerKernel.h5920644editdlrm
Intrinsics.h12120644editdlrm
IsContiguous.h24140644editdlrm
Loops.h144110644editdlrm
MaxUnpoolKernel.h4830644editdlrm
moments_utils.h42450644editdlrm
Reduce.h109550644editdlrm
SoftmaxKernel.h6360644editdlrm
StackKernel.h3150644editdlrm
utils.h10930644editdlrm
zmath.h64800644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/torch/include/ATen/native/cpu/utils.h (1093B)
#pragma once #include #include namespace at { namespace native { namespace { template inline T data_index_init(T offset) { return offset; } template inline T data_index_init(T offset, T& x, const T& X, Args&&... args) { offset = data_index_init(offset, std::forward(args)...); x = offset % X; return offset / X; } inline bool data_index_step() { return true; } template inline bool data_index_step(T& x, const T& X, Args&&... args) { if (data_index_step(std::forward(args)...)) { x = ((x + 1) == X) ? 0 : (x + 1); return x == 0; } return false; } } // namespace namespace utils { template T CeilLog2(const T& x) { if (x <= 2) { return 1; } // Last set bit is floor(log2(x)), floor + 1 is ceil // except when x is an exact powers of 2, so subtract 1 first return static_cast(llvm::findLastSet(static_cast(x) - 1)) + 1; } } // namespace utils } // namespace native } // namespace at