conditional_data_ptr Class — pytorch Architecture
Architecture documentation for the conditional_data_ptr class in batch_norm.h from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/batch_norm.h lines 27–36
template <typename scalar_t>
static scalar_t* conditional_data_ptr(const Tensor& t) {
if constexpr (std::is_const_v<scalar_t>) {
return t.defined() ? t.contiguous().const_data_ptr<scalar_t>()
: nullptr;
} else {
return t.defined() ? t.contiguous().data_ptr<scalar_t>()
: nullptr;
}
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free