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

Function idx_y

src/backend/cpu/kernel/fast.hpp:18–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16namespace kernel {
17
18inline int idx_y(int i) {
19 using std::clamp;
20 if (i >= 8) return clamp(-(i - 8 - 4), -3, 3);
21
22 return clamp(i - 4, -3, 3);
23}
24
25inline int idx_x(int i) {
26 if (i < 12) return idx_y(i + 4);

Callers 2

idx_xFunction · 0.70
locate_featuresFunction · 0.70

Calls 1

clampFunction · 0.50

Tested by

no test coverage detected