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

Function abs_diff

src/backend/cuda/kernel/fast.hpp:82–85  ·  view source on GitHub ↗

abs_diff() Returns absolute difference of x and y

Source from the content-addressed store, hash-verified

80// abs_diff()
81// Returns absolute difference of x and y
82inline __device__ int abs_diff(const int x, const int y) {
83 int i = x - y;
84 return max(-i, i);
85}
86inline __device__ unsigned abs_diff(const unsigned x, const unsigned y) {
87 int i = (int)x - (int)y;
88 return max(-i, i);

Callers 1

locate_features_coreFunction · 0.70

Calls 2

fabsFunction · 0.85
maxFunction · 0.50

Tested by

no test coverage detected