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

Function cholesky

src/backend/opencl/cpu/cpu_cholesky.cpp:40–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38
39template<typename T>
40Array<T> cholesky(int *info, const Array<T> &in, const bool is_upper) {
41 Array<T> out = copyArray<T>(in);
42 *info = cholesky_inplace(out, is_upper);
43
44 mapped_ptr<T> oPtr = out.getMappedPtr();
45
46 if (is_upper) {
47 triangle<T, true, false>(oPtr.get(), oPtr.get(), out.dims(),
48 out.strides(), out.strides());
49 } else {
50 triangle<T, false, false>(oPtr.get(), oPtr.get(), out.dims(),
51 out.strides(), out.strides());
52 }
53
54 return out;
55}
56
57template<typename T>
58int cholesky_inplace(Array<T> &in, const bool is_upper) {

Callers

nothing calls this directly

Calls 5

cholesky_inplaceFunction · 0.70
getMappedPtrMethod · 0.45
getMethod · 0.45
dimsMethod · 0.45
stridesMethod · 0.45

Tested by

no test coverage detected