7 #include <boost/unordered_map.hpp> 13 namespace frechet {
namespace data {
28 typedef std::pair<int,int>
Key;
32 typedef boost::unordered_map<Key,mzdList>
mzdMap;
116 #endif // MATRIX_POOL_H clmatrix_t * new_clmatrix(int rows, int cols, MatrixPool *pool, clm4rm_conditions *cond)
allocate a new clmatrix_t structure (a matrix for the CLM4RM algorithms)
OpenCL boolean matrix data structure. Data is arranged in 32 bit words.
mzdMap free_mzd
set of recyclable mzd_t objects
std::pair< int, int > Key
global definitions for all algorithms.
MatrixPool()
empty constructor
std::list< mzd_t * > mzdList
clmatrix_t * new_clmatrix_t(int rows, int cols, clm4rm_conditions *cond)
allocate a new clmatrix_t structure (a matrix for the CLM4RM algorithms)
Manages OpenCL event dependencies; necessary when the queue is out-of-order; dependencies must be est...
mzd_t * new_mzd(int rows, int cols, MatrixPool *pool)
allocate a new mzd_t structure (a matrix for the M4RI algorithms)
boost::unordered_map< Key, clmatrixList > clmatrixMap
void clear()
release all resources
std::list< clmatrix_t * > clmatrixList
mzd_t * new_mzd_t(int rows, int cols)
allocate a new mzd_t structure (a matrix for the M4RI algorithms)
clmatrixList & getClmatrixFreeList(int rows, int cols)
memory pool for matrix objects (M4RI matrices mzd_t* and OpenCL matrices clm4rm_t*)
void reclaim(mzd_t *m, MatrixPool *pool)
reclaim an object (i.e. put it into the recycling list)
~MatrixPool()
destructor; releases all resources
clmatrixMap free_clmatrix
set of recyclable clmatrix_t objects
void reclaim(mzd_t *)
reclaim an object (i.e. put it into the recycling list)
boost::unordered_map< Key, mzdList > mzdMap
mzdList & getMzdFreeList(int rows, int cols)