TR-mbed 1.0
Loading...
Searching...
No Matches
Macros | Typedefs | Functions
sparse_setter.cpp File Reference
#include <google/sparse_hash_map>
#include "BenchSparseUtil.h"

Macros

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

Typedefs

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

Functions

EIGEN_DONT_INLINE Scalarsetinnerrand_eigen (const Coordinates &coords, const Values &vals)
 
EIGEN_DONT_INLINE Scalarsetrand_eigen_dynamic (const Coordinates &coords, const Values &vals)
 
EIGEN_DONT_INLINE Scalarsetrand_eigen_compact (const Coordinates &coords, const Values &vals)
 
EIGEN_DONT_INLINE Scalarsetrand_eigen_sumeq (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_scipy (const Coordinates &coords, const Values &vals)
 
EIGEN_DONT_INLINE Scalarsetrand_ublas_mapped (const Coordinates &coords, const Values &vals)
 
EIGEN_DONT_INLINE Scalarsetrand_ublas_coord (const Coordinates &coords, const Values &vals)
 
EIGEN_DONT_INLINE Scalarsetrand_ublas_compressed (const Coordinates &coords, const Values &vals)
 
EIGEN_DONT_INLINE Scalarsetrand_ublas_genvec (const Coordinates &coords, const Values &vals)
 
EIGEN_DONT_INLINE Scalarsetrand_mtl (const Coordinates &coords, const Values &vals)
 
int main (int argc, char *argv[])
 
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 T1 , class T2 >
bool kv_pair_less (const std::pair< T1, T2 > &x, const std::pair< T1, T2 > &y)
 
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[])
 

Macro Definition Documentation

◆ BENCH

#define BENCH (   X)
Value:
timer.reset(); \
for (int _j=0; _j<NBTRIES; ++_j) { \
timer.start(); \
for (int _k=0; _k<REPEAT; ++_k) { \
X \
} timer.stop(); }
#define X
Definition icosphere.cpp:20
#define REPEAT
Definition sparse_setter.cpp:15
#define NBTRIES
Definition sparse_setter.cpp:19

◆ CHECK_MEM

#define CHECK_MEM

◆ EIGEN_GOOGLEHASH_SUPPORT

#define EIGEN_GOOGLEHASH_SUPPORT

◆ KK

#define KK   10

◆ NBPERROW

#define NBPERROW   24

◆ NBTRIES

#define NBTRIES   2

◆ REPEAT

#define REPEAT   2

◆ SIZE

#define SIZE   100000

Typedef Documentation

◆ Coordinates

typedef std::vector<Vector2i> Coordinates

◆ Values

typedef std::vector<float> Values

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[] 
)

◆ csr_sort_indices()

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

◆ 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[] 
)

◆ kv_pair_less()

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

◆ main()

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

◆ setinnerrand_eigen()

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

◆ setrand_eigen_compact()

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

◆ setrand_eigen_dynamic()

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

◆ setrand_eigen_gnu_hash()

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

◆ setrand_eigen_google_dense()

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

◆ setrand_eigen_google_sparse()

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

◆ setrand_eigen_sumeq()

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

◆ setrand_mtl()

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

◆ setrand_scipy()

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

◆ 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 
)

◆ setrand_ublas_mapped()

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