MCPcopy Create free account
hub / github.com/PX4/eigen / setrand_ublas_genvec

Function setrand_ublas_genvec

bench/sparse_setter.cpp:464–479  ·  view source on GitHub ↗

EIGEN_DONT_INLINE Scalar* setrand_ublas_coord(const Coordinates& coords, const Values& vals) { using namespace boost; using namespace boost::numeric; using namespace boost::numeric::ublas; coordinate_matrix aux(SIZE,SIZE); for (int i=0; i mat(aux); return 0;//&mat(coords[0].

Source from the content-addressed store, hash-verified

462 return 0;//&mat(coords[0].x(), coords[0].y());
463}*/
464EIGEN_DONT_INLINE Scalar* setrand_ublas_genvec(const Coordinates& coords, const Values& vals)
465{
466 using namespace boost;
467 using namespace boost::numeric;
468 using namespace boost::numeric::ublas;
469
470// ublas::vector<coordinate_vector<Scalar> > foo;
471 generalized_vector_of_vector<Scalar, row_major, ublas::vector<coordinate_vector<Scalar> > > aux(SIZE,SIZE);
472 for (int i=0; i<coords.size(); ++i)
473 {
474 aux(coords[i].x(), coords[i].y()) += vals[i];
475 }
476 CHECK_MEM;
477 compressed_matrix<Scalar,row_major> mat(aux);
478 return 0;//&mat(coords[0].x(), coords[0].y());
479}
480#endif
481
482#ifndef NOMTL

Callers 1

mainFunction · 0.85

Calls 3

sizeMethod · 0.45
xMethod · 0.45
yMethod · 0.45

Tested by

no test coverage detected