24#ifndef _GEMA_SPARSE_MATRIX_OPTIONS_H_
25#define _GEMA_SPARSE_MATRIX_OPTIONS_H_
51#define GM_MATRIX_OPTIONS_DEF_RESIZE_FACTOR 2.0
67 const char*
modeStr()
const {
return matrixModeToStr(_mode); }
86 if(_tripletSortStrategy < 0)
95 size_t reserve()
const {
return _reserve; }
110 void setNumThreads(
int nthreads);
124 static int strToMatrixMode(
const QString& str);
131 int _tripletSortStrategy;
Auxiliar class used to store the complete set of simulation data.
Definition gmSimulationData.h:55
Set of configuration options for Sparse matrices.
Definition gmSparseMatrixOptions.h:55
GmSparseMatrixLayoutMode _mode
The mode for building the sparse matrix.
Definition gmSparseMatrixOptions.h:126
size_t _reserve
A user given estimate of the expected number of triplets / layout entries. If 0, will be estimated by...
Definition gmSparseMatrixOptions.h:128
double resizeFactor() const
Returns the user given metric for resizing data structures. Returns 0.0 if the value should be estima...
Definition gmSparseMatrixOptions.h:100
void setTripletSortStrategy(GmSparseMatrixTripletBufferSortStrategy st)
Updates the trilet sort strategy control (used by tests code only)
Definition gmSparseMatrixOptions.h:119
double _resizeFactor
A user given metric for resizing data structures. If 0, will be estimated by GeMA.
Definition gmSparseMatrixOptions.h:129
size_t reserve() const
Returns the user given estimate of the expected number of triplets / layout entries....
Definition gmSparseMatrixOptions.h:95
bool _lowMemory
User given setting to favour low memory strategies.
Definition gmSparseMatrixOptions.h:127
const char * modeStr() const
Returns the mode for building the sparse matrix as a string.
Definition gmSparseMatrixOptions.h:67
void setLowMemory(bool mode)
Updates the sparse matrix low memory control (used by tests code only)
Definition gmSparseMatrixOptions.h:116
int numThreads() const
The number of threads that should be used by sparse matrix building code. A value of -1 means the max...
Definition gmSparseMatrixOptions.h:108
GmSparseMatrixLayoutMode mode() const
Returns the mode for building the sparse matrix.
Definition gmSparseMatrixOptions.h:64
bool lowMemory() const
Returns true if the matrix should favour low memory strategies, false otherwise. If the user didn't s...
Definition gmSparseMatrixOptions.h:77
GmSparseMatrixTripletBufferSortStrategy tripletSortStrategy() const
Returns the sorting strategy used to process triplet lists. If the user didn't specified a value,...
Definition gmSparseMatrixOptions.h:84
void setMode(GmSparseMatrixLayoutMode mode)
Updates the sparse matrix building mode.
Definition gmSparseMatrixOptions.h:113
int _nthreads
The maximum number of threads that should be used by sparse matrix.
Definition gmSparseMatrixOptions.h:130
Declaration of useful configuration definitions for the Core library.
#define GMC_API_EXPORT
Macro for controlling if the class is being exported (GEMA_CORE_LIB defined) or imported (GEMA_CORE_L...
Definition gmCoreConfig.h:35
GmSparseMatrixLayoutMode
Supported modes for building the sparse matrix.
Definition gmSparseMatrixOptions.h:36
@ GM_HASH_LAYOUT
Layout mode with a hash table.
Definition gmSparseMatrixOptions.h:38
@ GM_VECTOR_LAYOUT
Layout mode with a vector based structure.
Definition gmSparseMatrixOptions.h:39
@ GM_ARMADILLO_TRIPLET_LIST
Definition gmSparseMatrixOptions.h:48
@ GM_TRIPLET_LIST
Batch mode with a (per thread) triplet list.
Definition gmSparseMatrixOptions.h:37
Declaration of the GmSparseMatrixTripletData and GmSparseMatrixTripletBuffer template classes.
GmSparseMatrixTripletBufferSortStrategy
The strategy used by the GmSparseMatrixTripletBuffer<T>::sortedData() methods.
Definition gmSparseMatrixTripletData.h:110
@ GM_TRIBUF_SS_ISORT_MERGE
Vectors are parallel inplace sorted, followed by a merge operation to the destination vector.
Definition gmSparseMatrixTripletData.h:112
@ GM_TRIBUF_SS_CONCAT_PCSORT
Vectors are concatenated and then parallel copy sorted. Faster when there is plenty of memory.
Definition gmSparseMatrixTripletData.h:111