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

Function checkInPlaceSameResults

test/svd_dense.cpp:116–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114
115template<typename T>
116void checkInPlaceSameResults(const int M, const int N) {
117 SUPPORTED_TYPE_CHECK(T);
118 LAPACK_ENABLED_CHECK();
119
120 dtype ty = (dtype)dtype_traits<T>::af_type;
121
122 array in = randu(dim4(M, N), ty);
123 array u, s, v;
124 af::svd(u, s, v, in);
125
126 array uu, ss, vv;
127 af::svdInPlace(uu, ss, vv, in);
128
129 ASSERT_ARRAYS_EQ(u, uu);
130 ASSERT_ARRAYS_EQ(s, ss);
131 ASSERT_ARRAYS_EQ(v, vv);
132}
133
134TYPED_TEST(svd, Square) { svdTest<TypeParam>(500, 500); }
135

Callers

nothing calls this directly

Calls 4

randuFunction · 0.85
svdClass · 0.70
dim4Class · 0.50
svdInPlaceFunction · 0.50

Tested by

no test coverage detected