MCPcopy Create free account
hub / github.com/Derious/cuMPC / run

Method run

dependence/eigen-3.4.0/test/basicstuff.cpp:200–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198template<typename SrcScalar, typename TgtScalar>
199struct casting_test {
200 static void run() {
201 Matrix<SrcScalar,4,4> m;
202 for (int i=0; i<m.rows(); ++i) {
203 for (int j=0; j<m.cols(); ++j) {
204 m(i, j) = internal::random_without_cast_overflow<SrcScalar,TgtScalar>::value();
205 }
206 }
207 Matrix<TgtScalar,4,4> n = m.template cast<TgtScalar>();
208 for (int i=0; i<m.rows(); ++i) {
209 for (int j=0; j<m.cols(); ++j) {
210 VERIFY_IS_APPROX(n(i, j), (internal::cast<SrcScalar,TgtScalar>(m(i, j))));
211 }
212 }
213 }
214};
215
216template<typename SrcScalar, typename EnableIf = void>

Callers

nothing calls this directly

Calls 5

valueFunction · 0.85
mFunction · 0.50
nFunction · 0.50
rowsMethod · 0.45
colsMethod · 0.45

Tested by

no test coverage detected