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

Function lu

src/backend/cpu/lu.cpp:49–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47
48template<typename T>
49void lu(Array<T> &lower, Array<T> &upper, Array<int> &pivot,
50 const Array<T> &in) {
51 dim4 iDims = in.dims();
52 int M = iDims[0];
53 int N = iDims[1];
54
55 Array<T> in_copy = copyArray<T>(in);
56 pivot = lu_inplace(in_copy);
57
58 // SPLIT into lower and upper
59 dim4 ldims(M, min(M, N));
60 dim4 udims(min(M, N), N);
61 lower = createEmptyArray<T>(ldims);
62 upper = createEmptyArray<T>(udims);
63
64 getQueue().enqueue(kernel::lu_split<T>, lower, upper, in_copy);
65}
66
67template<typename T>
68Array<int> lu_inplace(Array<T> &in, const bool convert_pivot) {

Callers

nothing calls this directly

Calls 5

lu_inplaceFunction · 0.70
minFunction · 0.70
getQueueFunction · 0.50
dimsMethod · 0.45
enqueueMethod · 0.45

Tested by

no test coverage detected