MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / clamp

Function clamp

arm_compute/core/utils/misc/Utility.h:110–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108 */
109template <typename DataType, typename RangeType = DataType>
110inline DataType clamp(const DataType &n,
111 const DataType &lower = std::numeric_limits<RangeType>::lowest(),
112 const DataType &upper = std::numeric_limits<RangeType>::max())
113{
114 return std::max(lower, std::min(n, upper));
115}
116
117/** Base case of for_each. Does nothing. */
118template <typename F>

Callers 8

calculate_start_on_indexFunction · 0.85
calculate_end_on_indexFunction · 0.85
q8_prepare_lutFunction · 0.85
DecodeBBoxFunction · 0.85
roi_align_layerFunction · 0.85
generate_scaleMethod · 0.85

Calls 1

lowestFunction · 0.85

Tested by

no test coverage detected