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

Function data_and_stride

dependence/eigen-3.4.0/test/block.cpp:277–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275
276template<typename MatrixType>
277void data_and_stride(const MatrixType& m)
278{
279 Index rows = m.rows();
280 Index cols = m.cols();
281
282 Index r1 = internal::random<Index>(0,rows-1);
283 Index r2 = internal::random<Index>(r1,rows-1);
284 Index c1 = internal::random<Index>(0,cols-1);
285 Index c2 = internal::random<Index>(c1,cols-1);
286
287 MatrixType m1 = MatrixType::Random(rows, cols);
288 compare_using_data_and_stride(m1.block(r1, c1, r2-r1+1, c2-c1+1));
289 compare_using_data_and_stride(m1.transpose().block(c1, r1, c2-c1+1, r2-r1+1));
290 compare_using_data_and_stride(m1.row(r1));
291 compare_using_data_and_stride(m1.col(c1));
292 compare_using_data_and_stride(m1.row(r1).transpose());
293 compare_using_data_and_stride(m1.col(c1).transpose());
294}
295
296EIGEN_DECLARE_TEST(block)
297{

Callers 1

EIGEN_DECLARE_TESTFunction · 0.85

Calls 7

rowsMethod · 0.45
colsMethod · 0.45
blockMethod · 0.45
transposeMethod · 0.45
rowMethod · 0.45
colMethod · 0.45

Tested by

no test coverage detected