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

Function diagExtract

src/backend/cpu/diagonal.cpp:42–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40
41template<typename T>
42Array<T> diagExtract(const Array<T> &in, const int num) {
43 const dim4 &idims = in.dims();
44 dim_t size = min(idims[0], idims[1]) - abs(num);
45 Array<T> out = createEmptyArray<T>(dim4(size, 1, idims[2], idims[3]));
46
47 getQueue().enqueue(kernel::diagExtract<T>, out, in, num);
48
49 return out;
50}
51
52#define INSTANTIATE_DIAGONAL(T) \
53 template Array<T> diagExtract<T>(const Array<T> &in, const int num); \

Callers

nothing calls this directly

Calls 6

minFunction · 0.70
absFunction · 0.70
dim4Class · 0.70
getQueueFunction · 0.50
dimsMethod · 0.45
enqueueMethod · 0.45

Tested by

no test coverage detected