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

Function svd

src/backend/cuda/svd.cpp:90–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88
89template<typename T, typename Tr>
90void svd(Array<Tr> &s, Array<T> &u, Array<T> &vt, const Array<T> &in) {
91 dim4 iDims = in.dims();
92 int M = iDims[0];
93 int N = iDims[1];
94
95 if (M >= N) {
96 Array<T> in_copy = copyArray(in);
97 svdInPlace(s, u, vt, in_copy);
98 } else {
99 Array<T> in_trans = transpose(in, true);
100 svdInPlace(s, vt, u, in_trans);
101 transpose_inplace(vt, true);
102 transpose_inplace(u, true);
103 }
104}
105
106#define INSTANTIATE(T, Tr) \
107 template void svd<T, Tr>(Array<Tr> & s, Array<T> & u, Array<T> & vt, \

Callers

nothing calls this directly

Calls 5

copyArrayFunction · 0.70
svdInPlaceFunction · 0.70
transposeFunction · 0.70
transpose_inplaceFunction · 0.70
dimsMethod · 0.45

Tested by

no test coverage detected