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

Function diagCreate

src/backend/oneapi/diagonal.cpp:23–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21namespace oneapi {
22template<typename T>
23Array<T> diagCreate(const Array<T> &in, const int num) {
24 int size = in.dims()[0] + std::abs(num);
25 int batch = in.dims()[1];
26 Array<T> out = createEmptyArray<T>(dim4(size, size, batch));
27
28 kernel::diagCreate<T>(out, in, num);
29
30 return out;
31}
32
33template<typename T>
34Array<T> diagExtract(const Array<T> &in, const int num) {

Callers

nothing calls this directly

Calls 3

absFunction · 0.70
dim4Class · 0.50
dimsMethod · 0.45

Tested by

no test coverage detected