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

Function reorder

src/backend/cuda/reorder.cpp:25–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23
24template<typename T>
25Array<T> reorder(const Array<T> &in, const af::dim4 &rdims) {
26 const af::dim4 &iDims = in.dims();
27 af::dim4 oDims(0);
28 for (int i = 0; i < 4; i++) { oDims[i] = iDims[rdims[i]]; }
29
30 Array<T> out = createEmptyArray<T>(oDims);
31
32 kernel::reorder<T>(out, in, rdims.get());
33
34 return out;
35}
36
37#define INSTANTIATE(T) \
38 template Array<T> reorder<T>(const Array<T> &in, const af::dim4 &rdims);

Callers 3

convolve2_baseFunction · 0.70
data_gradient_baseFunction · 0.70
filter_gradient_baseFunction · 0.70

Calls 2

dimsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected