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

Function scan

src/backend/oneapi/scan.cpp:19–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17namespace oneapi {
18template<af_op_t op, typename Ti, typename To>
19Array<To> scan(const Array<Ti>& in, const int dim, bool inclusiveScan) {
20 Array<To> out = createEmptyArray<To>(in.dims());
21
22 Param<To> Out = out;
23 Param<Ti> In = in;
24
25 switch (dim) {
26 case 0: kernel::scan_first<Ti, To, op>(Out, In, inclusiveScan); break;
27 case 1: kernel::scan_dim<Ti, To, op, 1>(Out, In, inclusiveScan); break;
28 case 2: kernel::scan_dim<Ti, To, op, 2>(Out, In, inclusiveScan); break;
29 case 3: kernel::scan_dim<Ti, To, op, 3>(Out, In, inclusiveScan); break;
30 }
31
32 return out;
33}
34
35#define INSTANTIATE_SCAN(ROp, Ti, To) \
36 template Array<To> scan<ROp, Ti, To>(const Array<Ti>&, const int, bool);

Callers

nothing calls this directly

Calls 1

dimsMethod · 0.45

Tested by

no test coverage detected