Home | History | Annotate | Download | only in bench

Lines Matching defs:coords

47 EIGEN_DONT_INLINE Scalar* setinnerrand_eigen(const Coordinates& coords, const Values& vals);
48 EIGEN_DONT_INLINE Scalar* setrand_eigen_dynamic(const Coordinates& coords, const Values& vals);
49 EIGEN_DONT_INLINE Scalar* setrand_eigen_compact(const Coordinates& coords, const Values& vals);
50 EIGEN_DONT_INLINE Scalar* setrand_eigen_sumeq(const Coordinates& coords, const Values& vals);
51 EIGEN_DONT_INLINE Scalar* setrand_eigen_gnu_hash(const Coordinates& coords, const Values& vals);
52 EIGEN_DONT_INLINE Scalar* setrand_eigen_google_dense(const Coordinates& coords, const Values& vals);
53 EIGEN_DONT_INLINE Scalar* setrand_eigen_google_sparse(const Coordinates& coords, const Values& vals);
54 EIGEN_DONT_INLINE Scalar* setrand_scipy(const Coordinates& coords, const Values& vals);
55 EIGEN_DONT_INLINE Scalar* setrand_ublas_mapped(const Coordinates& coords, const Values& vals);
56 EIGEN_DONT_INLINE Scalar* setrand_ublas_coord(const Coordinates& coords, const Values& vals);
57 EIGEN_DONT_INLINE Scalar* setrand_ublas_compressed(const Coordinates& coords, const Values& vals);
58 EIGEN_DONT_INLINE Scalar* setrand_ublas_genvec(const Coordinates& coords, const Values& vals);
59 EIGEN_DONT_INLINE Scalar* setrand_mtl(const Coordinates& coords, const Values& vals);
68 Coordinates coords;
89 coords.reserve(n);
94 coords.push_back(pool[i]);
103 coords.push_back(Vector2i(internal::random<int>(0,rows-1),j));
107 std::cout << "nnz = " << coords.size() << "\n";
113 BENCH(setrand_eigen_dense(coords,values);)
121 // BENCH(setinnerrand_eigen(coords,values);)
125 BENCH(setrand_eigen_dynamic(coords,values);)
129 // BENCH(setrand_eigen_compact(coords,values);)
133 BENCH(setrand_eigen_sumeq(coords,values);)
137 // BENCH(setrand_eigen_gnu_hash(coords,values);)
141 BENCH(setrand_scipy(coords,values);)
146 BENCH(setrand_eigen_google_dense(coords,values);)
150 BENCH(setrand_eigen_google_sparse(coords,values);)
157 // BENCH(setrand_ublas_mapped(coords,values);)
161 BENCH(setrand_ublas_genvec(coords,values);)
168 setrand_ublas_compressed(coords,values);
176 setrand_ublas_coord(coords,values);
186 BENCH(setrand_mtl(coords,values));
194 EIGEN_DONT_INLINE Scalar* setinnerrand_eigen(const Coordinates& coords, const Values& vals)
198 //mat.startFill(2000000/*coords.size()*/);
199 for (int i=0; i<coords.size(); ++i)
201 mat.insert(coords[i].x(), coords[i].y()) = vals[i];
208 EIGEN_DONT_INLINE Scalar* setrand_eigen_dynamic(const Coordinates& coords, const Values& vals)
212 mat.reserve(coords.size()/10);
213 for (int i=0; i<coords.size(); ++i)
215 mat.coeffRef(coords[i].x(), coords[i].y()) += vals[i];
219 return &mat.coeffRef(coords[0].x(), coords[0].y());
222 EIGEN_DONT_INLINE Scalar* setrand_eigen_sumeq(const Coordinates& coords, const Values& vals)
225 int n = coords.size()/KK;
233 aux.insert(coords[i].x(), coords[i].y()) += vals[i];
238 return &mat.coeffRef(coords[0].x(), coords[0].y());
241 EIGEN_DONT_INLINE Scalar* setrand_eigen_compact(const Coordinates& coords, const Values& vals)
245 setter.reserve(coords.size()/10);
246 for (int i=0; i<coords.size(); ++i)
248 setter.coeffRef(coords[i].x(), coords[i].y()) += vals[i];
252 return &mat.coeffRef(coords[0].x(), coords[0].y());
255 EIGEN_DONT_INLINE Scalar* setrand_eigen_gnu_hash(const Coordinates& coords, const Values& vals)
261 for (int i=0; i<coords.size(); ++i)
263 setter(coords[i].x(), coords[i].y()) += vals[i];
267 return &mat.coeffRef(coords[0].x(), coords[0].y());
271 EIGEN_DONT_INLINE Scalar* setrand_eigen_google_dense(const Coordinates& coords, const Values& vals)
277 for (int i=0; i<coords.size(); ++i)
278 setter(coords[i].x(), coords[i].y()) += vals[i];
281 return &mat.coeffRef(coords[0].x(), coords[0].y());
284 EIGEN_DONT_INLINE Scalar* setrand_eigen_google_sparse(const Coordinates& coords, const Values& vals)
290 for (int i=0; i<coords.size(); ++i)
291 setter(coords[i].x(), coords[i].y()) += vals[i];
294 return &mat.coeffRef(coords[0].x(), coords[0].y());
405 EIGEN_DONT_INLINE Scalar* setrand_scipy(const Coordinates& coords, const Values& vals)
409 mat.resizeNonZeros(coords.size());
411 coo_tocsr<Scalar>(SIZE,SIZE, coords.size(), coords, vals, mat._outerIndexPtr(), mat._innerIndexPtr(), mat._valuePtr());
420 return &mat.coeffRef(coords[0].x(), coords[0].y());
425 EIGEN_DONT_INLINE Scalar* setrand_ublas_mapped(const Coordinates& coords, const Values& vals)
431 for (int i=0; i<coords.size(); ++i)
433 aux(coords[i].x(), coords[i].y()) += vals[i];
437 return 0;// &mat(coords[0].x(), coords[0].y());
439 /*EIGEN_DONT_INLINE Scalar* setrand_ublas_coord(const Coordinates& coords, const Values& vals)
445 for (int i=0; i<coords.size(); ++i)
447 aux(coords[i].x(), coords[i].y()) = vals[i];
450 return 0;//&mat(coords[0].x(), coords[0].y());
452 EIGEN_DONT_INLINE Scalar* setrand_ublas_compressed(const Coordinates& coords, const Values& vals)
458 for (int i=0; i<coords.size(); ++i)
460 mat(coords[i].x(), coords[i].y()) = vals[i];
462 return 0;//&mat(coords[0].x(), coords[0].y());
464 EIGEN_DONT_INLINE Scalar* setrand_ublas_genvec(const Coordinates& coords, const Values& vals)
472 for (int i=0; i<coords.size(); ++i)
474 aux(coords[i].x(), coords[i].y()) += vals[i];
478 return 0;//&mat(coords[0].x(), coords[0].y());
483 EIGEN_DONT_INLINE void setrand_mtl(const Coordinates& coords, const Values& vals);