Macros | Typedefs | Functions
sparse_setter.cpp File Reference
#include <google/sparse_hash_map>
#include "BenchSparseUtil.h"
Include dependency graph for sparse_setter.cpp:

Go to the source code of this file.

Macros

#define BENCH(X)
 
#define CHECK_MEM
 
#define EIGEN_GOOGLEHASH_SUPPORT
 
#define KK   10
 
#define NBPERROW   24
 
#define NBTRIES   2
 
#define REPEAT   2
 
#define SIZE   100000
 

Typedefs

typedef std::vector< Vector2i > Coordinates
 
typedef std::vector< float > Values
 

Functions

template<class T >
void coo_tocsr (const int n_row, const int n_col, const int nnz, const Coordinates Aij, const Values Ax, int Bp[], int Bj[], T Bx[])
 
template<class I , class T >
void csr_sort_indices (const I n_row, const I Ap[], I Aj[], T Ax[])
 
template<class I , class T >
void csr_sum_duplicates (const I n_row, const I n_col, I Ap[], I Aj[], T Ax[])
 
template<class T1 , class T2 >
bool kv_pair_less (const std::pair< T1, T2 > &x, const std::pair< T1, T2 > &y)
 
int main (int argc, char *argv[])
 
EIGEN_DONT_INLINE Scalarsetinnerrand_eigen (const Coordinates &coords, const Values &vals)
 
EIGEN_DONT_INLINE Scalarsetrand_eigen_compact (const Coordinates &coords, const Values &vals)
 
EIGEN_DONT_INLINE Scalarsetrand_eigen_dynamic (const Coordinates &coords, const Values &vals)
 
EIGEN_DONT_INLINE Scalarsetrand_eigen_gnu_hash (const Coordinates &coords, const Values &vals)
 
EIGEN_DONT_INLINE Scalarsetrand_eigen_google_dense (const Coordinates &coords, const Values &vals)
 
EIGEN_DONT_INLINE Scalarsetrand_eigen_google_sparse (const Coordinates &coords, const Values &vals)
 
EIGEN_DONT_INLINE Scalarsetrand_eigen_sumeq (const Coordinates &coords, const Values &vals)
 
EIGEN_DONT_INLINE Scalarsetrand_mtl (const Coordinates &coords, const Values &vals)
 
EIGEN_DONT_INLINE Scalarsetrand_scipy (const Coordinates &coords, const Values &vals)
 
EIGEN_DONT_INLINE Scalarsetrand_ublas_compressed (const Coordinates &coords, const Values &vals)
 
EIGEN_DONT_INLINE Scalarsetrand_ublas_coord (const Coordinates &coords, const Values &vals)
 
EIGEN_DONT_INLINE Scalarsetrand_ublas_genvec (const Coordinates &coords, const Values &vals)
 
EIGEN_DONT_INLINE Scalarsetrand_ublas_mapped (const Coordinates &coords, const Values &vals)
 

Macro Definition Documentation

◆ BENCH

#define BENCH (   X)
Value:
for (int _j=0; _j<NBTRIES; ++_j) { \
timer.start(); \
for (int _k=0; _k<REPEAT; ++_k) { \
X \
} timer.stop(); }
#define REPEAT
#define NBTRIES
static BenchTimer timer

Definition at line 36 of file sparse_setter.cpp.

◆ CHECK_MEM

#define CHECK_MEM

Definition at line 33 of file sparse_setter.cpp.

◆ EIGEN_GOOGLEHASH_SUPPORT

#define EIGEN_GOOGLEHASH_SUPPORT

Definition at line 27 of file sparse_setter.cpp.

◆ KK

#define KK   10

Definition at line 23 of file sparse_setter.cpp.

◆ NBPERROW

#define NBPERROW   24

Definition at line 11 of file sparse_setter.cpp.

◆ NBTRIES

#define NBTRIES   2

Definition at line 19 of file sparse_setter.cpp.

◆ REPEAT

#define REPEAT   2

Definition at line 15 of file sparse_setter.cpp.

◆ SIZE

#define SIZE   100000

Definition at line 7 of file sparse_setter.cpp.

Typedef Documentation

◆ Coordinates

typedef std::vector<Vector2i> Coordinates

Definition at line 44 of file sparse_setter.cpp.

◆ Values

typedef std::vector<float> Values

Definition at line 45 of file sparse_setter.cpp.

Function Documentation

◆ coo_tocsr()

template<class T >
void coo_tocsr ( const int  n_row,
const int  n_col,
const int  nnz,
const Coordinates  Aij,
const Values  Ax,
int  Bp[],
int  Bj[],
T  Bx[] 
)

Definition at line 300 of file sparse_setter.cpp.

◆ csr_sort_indices()

template<class I , class T >
void csr_sort_indices ( const I  n_row,
const I  Ap[],
I  Aj[],
T  Ax[] 
)

Definition at line 351 of file sparse_setter.cpp.

◆ csr_sum_duplicates()

template<class I , class T >
void csr_sum_duplicates ( const I  n_row,
const I  n_col,
I  Ap[],
I  Aj[],
T  Ax[] 
)

Definition at line 378 of file sparse_setter.cpp.

◆ kv_pair_less()

template<class T1 , class T2 >
bool kv_pair_less ( const std::pair< T1, T2 > &  x,
const std::pair< T1, T2 > &  y 
)

Definition at line 345 of file sparse_setter.cpp.

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 61 of file sparse_setter.cpp.

◆ setinnerrand_eigen()

EIGEN_DONT_INLINE Scalar * setinnerrand_eigen ( const Coordinates coords,
const Values vals 
)

Definition at line 194 of file sparse_setter.cpp.

◆ setrand_eigen_compact()

EIGEN_DONT_INLINE Scalar * setrand_eigen_compact ( const Coordinates coords,
const Values vals 
)

Definition at line 241 of file sparse_setter.cpp.

◆ setrand_eigen_dynamic()

EIGEN_DONT_INLINE Scalar * setrand_eigen_dynamic ( const Coordinates coords,
const Values vals 
)

Definition at line 208 of file sparse_setter.cpp.

◆ setrand_eigen_gnu_hash()

EIGEN_DONT_INLINE Scalar * setrand_eigen_gnu_hash ( const Coordinates coords,
const Values vals 
)

Definition at line 255 of file sparse_setter.cpp.

◆ setrand_eigen_google_dense()

EIGEN_DONT_INLINE Scalar * setrand_eigen_google_dense ( const Coordinates coords,
const Values vals 
)

Definition at line 271 of file sparse_setter.cpp.

◆ setrand_eigen_google_sparse()

EIGEN_DONT_INLINE Scalar * setrand_eigen_google_sparse ( const Coordinates coords,
const Values vals 
)

Definition at line 284 of file sparse_setter.cpp.

◆ setrand_eigen_sumeq()

EIGEN_DONT_INLINE Scalar * setrand_eigen_sumeq ( const Coordinates coords,
const Values vals 
)

Definition at line 222 of file sparse_setter.cpp.

◆ setrand_mtl()

EIGEN_DONT_INLINE void setrand_mtl ( const Coordinates coords,
const Values vals 
)

◆ setrand_scipy()

EIGEN_DONT_INLINE Scalar * setrand_scipy ( const Coordinates coords,
const Values vals 
)

Definition at line 405 of file sparse_setter.cpp.

◆ setrand_ublas_compressed()

EIGEN_DONT_INLINE Scalar* setrand_ublas_compressed ( const Coordinates coords,
const Values vals 
)

◆ setrand_ublas_coord()

EIGEN_DONT_INLINE Scalar* setrand_ublas_coord ( const Coordinates coords,
const Values vals 
)

◆ setrand_ublas_genvec()

EIGEN_DONT_INLINE Scalar * setrand_ublas_genvec ( const Coordinates coords,
const Values vals 
)

Definition at line 464 of file sparse_setter.cpp.

◆ setrand_ublas_mapped()

EIGEN_DONT_INLINE Scalar * setrand_ublas_mapped ( const Coordinates coords,
const Values vals 
)

Definition at line 425 of file sparse_setter.cpp.



gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:40:54