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

Function clamp

src/api/cpp/clamp.cpp:17–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15
16namespace af {
17array clamp(const array &in, const array &lo, const array &hi) {
18 af_array out;
19 AF_THROW(af_clamp(&out, in.get(), lo.get(), hi.get(), gforGet()));
20 return array(out);
21}
22
23array clamp(const array &in, const array &lo, const double hi) {
24 return clamp(in, lo, constant(hi, lo.dims(), lo.type()));

Callers 2

TEST_PFunction · 0.50
TESTFunction · 0.50

Calls 7

gforGetFunction · 0.85
constantFunction · 0.85
typeMethod · 0.80
af_clampFunction · 0.50
arrayClass · 0.50
getMethod · 0.45
dimsMethod · 0.45

Tested by

no test coverage detected