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

Function lu

src/backend/opencl/cpu/cpu_lu.cpp:108–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106
107template<typename T>
108void lu(Array<T> &lower, Array<T> &upper, Array<int> &pivot,
109 const Array<T> &in) {
110 dim4 iDims = in.dims();
111 int M = iDims[0];
112 int N = iDims[1];
113
114 Array<T> in_copy = copyArray<T>(in);
115 pivot = lu_inplace(in_copy);
116
117 // SPLIT into lower and upper
118 dim4 ldims(M, min(M, N));
119 dim4 udims(min(M, N), N);
120 lower = createEmptyArray<T>(ldims);
121 upper = createEmptyArray<T>(udims);
122
123 lu_split<T>(lower, upper, in_copy);
124}
125
126template<typename T>
127Array<int> lu_inplace(Array<T> &in, const bool convert_pivot) {

Callers

nothing calls this directly

Calls 3

lu_inplaceFunction · 0.70
minFunction · 0.50
dimsMethod · 0.45

Tested by

no test coverage detected