CheckAndSaturate Class — pytorch Architecture
Architecture documentation for the CheckAndSaturate class in QuantizedLinear.cpp from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/QuantizedLinear.cpp lines 347–358
template <typename T>
bool CheckAndSaturate(T max_val, T* element) {
if (*element > max_val) {
*element = max_val;
return true;
}
if (*element < -max_val) {
*element = -max_val;
return true;
}
return false;
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free