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

Function diagCreate

src/backend/cpu/diagonal.cpp:31–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29
30template<typename T>
31Array<T> diagCreate(const Array<T> &in, const int num) {
32 int size = in.dims()[0] + abs(num);
33 int batch = in.dims()[1];
34 Array<T> out = createEmptyArray<T>(dim4(size, size, batch));
35
36 getQueue().enqueue(kernel::diagCreate<T>, out, in, num);
37
38 return out;
39}
40
41template<typename T>
42Array<T> diagExtract(const Array<T> &in, const int num) {

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected