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

Function setrand_eigen_google_dense

bench/sparse_setter.cpp:271–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269
270#ifndef NOGOOGLE
271EIGEN_DONT_INLINE Scalar* setrand_eigen_google_dense(const Coordinates& coords, const Values& vals)
272{
273 using namespace Eigen;
274 SparseMatrix<Scalar> mat(SIZE,SIZE);
275 {
276 RandomSetter<SparseMatrix<Scalar>, GoogleDenseHashMapTraits> setter(mat);
277 for (int i=0; i<coords.size(); ++i)
278 setter(coords[i].x(), coords[i].y()) += vals[i];
279 CHECK_MEM;
280 }
281 return &mat.coeffRef(coords[0].x(), coords[0].y());
282}
283
284EIGEN_DONT_INLINE Scalar* setrand_eigen_google_sparse(const Coordinates& coords, const Values& vals)
285{

Callers 1

mainFunction · 0.85

Calls 4

sizeMethod · 0.45
xMethod · 0.45
yMethod · 0.45
coeffRefMethod · 0.45

Tested by

no test coverage detected