MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / clamp

Function clamp

src/backend/cuda/math.hpp:431–434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

429
430template<typename T, typename Compare>
431constexpr const __DH__ T clamp(const T value, const T lo, const T hi,
432 Compare comp) {
433 return comp(value, lo) ? lo : comp(hi, value) ? hi : value;
434}
435
436template<typename T>
437constexpr const __DH__ T clamp(const T value, const T lo, const T hi) {

Callers 5

load2LocalMemMethod · 0.50
idxByndEdgeMethod · 0.50
bilateralFunction · 0.50
idx_yFunction · 0.50
idx_yFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected