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

Function scan_key

src/api/c/scan.cpp:37–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35
36template<af_op_t op, typename Ti, typename To>
37static inline af_array scan_key(const af_array key, const af_array in,
38 const int dim, bool inclusive_scan = true) {
39 const ArrayInfo& key_info = getInfo(key);
40 af_dtype type = key_info.getType();
41 af_array out;
42
43 switch (type) {
44 case s32:
45 out = getHandle(scan<op, Ti, int, To>(
46 getArray<int>(key), castArray<Ti>(in), dim, inclusive_scan));
47 break;
48 case u32:
49 out = getHandle(scan<op, Ti, uint, To>(
50 getArray<uint>(key), castArray<Ti>(in), dim, inclusive_scan));
51 break;
52 case s64:
53 out = getHandle(scan<op, Ti, intl, To>(
54 getArray<intl>(key), castArray<Ti>(in), dim, inclusive_scan));
55 break;
56 case u64:
57 out = getHandle(scan<op, Ti, uintl, To>(
58 getArray<uintl>(key), castArray<Ti>(in), dim, inclusive_scan));
59 break;
60 default: TYPE_ERROR(1, type);
61 }
62 return out;
63}
64
65template<typename Ti, typename To>
66static inline af_array scan_op(const af_array key, const af_array in,

Callers

nothing calls this directly

Calls 2

getHandleFunction · 0.70
getTypeMethod · 0.45

Tested by

no test coverage detected