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

Function lu

src/backend/oneapi/lu.cpp:48–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46
47template<typename T>
48void lu(Array<T> &lower, Array<T> &upper, Array<int> &pivot,
49 const Array<T> &in) {
50 dim4 iDims = in.dims();
51 int M = iDims[0];
52 int N = iDims[1];
53 int MN = std::min(M, N);
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, MN);
60 dim4 udims(MN, N);
61 lower = createEmptyArray<T>(ldims);
62 upper = createEmptyArray<T>(udims);
63 kernel::lu_split<T>(lower, upper, in_copy);
64}
65
66template<typename T>
67Array<int> lu_inplace(Array<T> &in, const bool convert_pivot) {

Callers

nothing calls this directly

Calls 3

minFunction · 0.70
lu_inplaceFunction · 0.70
dimsMethod · 0.45

Tested by

no test coverage detected