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

Function lu

src/backend/cuda/lu.cpp:96–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94
95template<typename T>
96void lu(Array<T> &lower, Array<T> &upper, Array<int> &pivot,
97 const Array<T> &in) {
98 dim4 iDims = in.dims();
99 int M = iDims[0];
100 int N = iDims[1];
101
102 Array<T> in_copy = copyArray<T>(in);
103 pivot = lu_inplace(in_copy);
104
105 // SPLIT into lower and upper
106 dim4 ldims(M, std::min(M, N));
107 dim4 udims(std::min(M, N), N);
108 lower = createEmptyArray<T>(ldims);
109 upper = createEmptyArray<T>(udims);
110 kernel::lu_split<T>(lower, upper, in_copy);
111}
112
113template<typename T>
114Array<int> lu_inplace(Array<T> &in, const bool convert_pivot) {

Callers

nothing calls this directly

Calls 3

lu_inplaceFunction · 0.70
minFunction · 0.70
dimsMethod · 0.45

Tested by

no test coverage detected