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

Function solveLU

src/backend/opencl/cpu/cpu_solve.cpp:163–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161
162template<typename T>
163Array<T> solveLU(const Array<T> &A, const Array<int> &pivot, const Array<T> &b,
164 const af_mat_prop options) {
165 UNUSED(options);
166 int N = A.dims()[0];
167 int NRHS = b.dims()[1];
168
169 Array<T> B = copyArray<T>(b);
170
171 mapped_ptr<T> aPtr = A.getMappedPtr();
172 mapped_ptr<T> bPtr = B.getMappedPtr();
173 mapped_ptr<int> pPtr = pivot.getMappedPtr();
174
175 getrs_func<T>()(AF_LAPACK_COL_MAJOR, 'N', N, NRHS, aPtr.get(),
176 A.strides()[1], pPtr.get(), bPtr.get(), B.strides()[1]);
177
178 return B;
179}
180
181template<typename T>
182Array<T> triangleSolve(const Array<T> &A, const Array<T> &b,

Callers

nothing calls this directly

Calls 4

dimsMethod · 0.45
getMappedPtrMethod · 0.45
getMethod · 0.45
stridesMethod · 0.45

Tested by

no test coverage detected