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

Function diagExtract

src/backend/opencl/diagonal.cpp:34–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32
33template<typename T>
34Array<T> diagExtract(const Array<T> &in, const int num) {
35 const dim_t *idims = in.dims().get();
36 dim_t size = std::min(idims[0], idims[1]) - std::abs(num);
37 Array<T> out = createEmptyArray<T>(dim4(size, 1, idims[2], idims[3]));
38
39 kernel::diagExtract<T>(out, in, num);
40
41 return out;
42}
43
44#define INSTANTIATE_DIAGONAL(T) \
45 template Array<T> diagExtract<T>(const Array<T> &in, const int num); \

Callers

nothing calls this directly

Calls 5

minFunction · 0.70
absFunction · 0.70
dim4Class · 0.50
getMethod · 0.45
dimsMethod · 0.45

Tested by

no test coverage detected