SparseLibrary  Version 1.6.0
Public Member Functions | Public Attributes | List of all members
RDScheme_shared_data< T > Class Template Reference

Shared data for RDScheme threads. More...

#include <RDScheme.hpp>

Public Member Functions

 RDScheme_shared_data ()
 Base constructor. More...
 
 RDScheme_shared_data (size_t _id, size_t _P, std::vector< Triplet< double > > *_original, size_t *_nzb, pthread_mutex_t *_mutex, pthread_cond_t *_cond, pthread_mutex_t *_end_mutex, pthread_cond_t *_end_cond, size_t *_sync, size_t *_end_sync, size_t _ovsize, size_t _ovoffset)
 Default constructor. More...
 

Public Attributes

size_t id
 Thread ID.
 
size_t P
 Total number of processors.
 
unsigned char mode
 0 undef, 1 init, 2 zax, 3 zxa, 4 exit
 
unsigned long int repeat
 how many times to repeat the operation set in `mode' (above, only for 2 and 3)
 
std::vector< Triplet< T > > * original
 Array of vectors of thread-local nonzeroes. More...
 
size_t * nzb
 Will store rowsums.
 
double time
 Will store local timing.
 
size_t bytes
 Will store memory use. More...
 
pthread_mutex_t * mutex
 Mutex used for synchronisation. More...
 
pthread_cond_t * cond
 Condition used for synchronisation. More...
 
pthread_mutex_t * end_mutex
 Mutex used for end sync. More...
 
pthread_cond_t * end_cond
 Condition used for end sync. More...
 
size_t * sync
 Counter used for synchronisation. More...
 
size_t * end_sync
 Counter used for end sync. More...
 
size_t output_vector_size
 Length of the local output vector. More...
 
size_t output_vector_offset
 Offset of the local output vector compared to global indices. More...
 
T * local_y
 Pointer to the local output vector. More...
 

Detailed Description

template<typename T>
class RDScheme_shared_data< T >

Shared data for RDScheme threads.

Constructor & Destructor Documentation

template<typename T>
RDScheme_shared_data< T >::RDScheme_shared_data ( )
inline

Base constructor.

Will initialise all to invalid values or NULL.

template<typename T>
RDScheme_shared_data< T >::RDScheme_shared_data ( size_t  _id,
size_t  _P,
std::vector< Triplet< double > > *  _original,
size_t *  _nzb,
pthread_mutex_t *  _mutex,
pthread_cond_t *  _cond,
pthread_mutex_t *  _end_mutex,
pthread_cond_t *  _end_cond,
size_t *  _sync,
size_t *  _end_sync,
size_t  _ovsize,
size_t  _ovoffset 
)
inline

Default constructor.

Parameters
_idThread ID.
_PNumber of SPMD processes.
_originalOriginal set of nonzeroes, split by blocks.
_nzbNumber of sparse blocks.
_mutexSync mutex.
_condSync condition.
_end_mutexEnd sync mutex.
_end_condEnd sync condition.
_syncSync counter.
_end_syncEnd sync counter.
_ovsizeOutput vector size.
_ovoffsetOutput vector start position (global view).

Member Data Documentation

template<typename T>
size_t RDScheme_shared_data< T >::bytes

Will store memory use.

Referenced by RDScheme< T, DS >::thread().

template<typename T>
pthread_cond_t* RDScheme_shared_data< T >::cond

Condition used for synchronisation.

Referenced by RDScheme< T, DS >::thread().

template<typename T>
pthread_cond_t* RDScheme_shared_data< T >::end_cond

Condition used for end sync.

Referenced by RDScheme< T, DS >::thread().

template<typename T>
pthread_mutex_t* RDScheme_shared_data< T >::end_mutex

Mutex used for end sync.

Referenced by RDScheme< T, DS >::thread().

template<typename T>
size_t* RDScheme_shared_data< T >::end_sync

Counter used for end sync.

Referenced by RDScheme< T, DS >::thread().

template<typename T>
T* RDScheme_shared_data< T >::local_y

Pointer to the local output vector.

Referenced by RDScheme< T, DS >::collectY(), and RDScheme< T, DS >::thread().

template<typename T>
pthread_mutex_t* RDScheme_shared_data< T >::mutex

Mutex used for synchronisation.

Referenced by RDScheme< T, DS >::thread().

template<typename T>
std::vector< Triplet< T > >* RDScheme_shared_data< T >::original

Array of vectors of thread-local nonzeroes.

Referenced by RDScheme< T, DS >::thread().

template<typename T>
size_t RDScheme_shared_data< T >::output_vector_offset

Offset of the local output vector compared to global indices.

Referenced by RDScheme< T, DS >::collectY(), and RDScheme< T, DS >::thread().

template<typename T>
size_t RDScheme_shared_data< T >::output_vector_size

Length of the local output vector.

Referenced by RDScheme< T, DS >::collectY(), and RDScheme< T, DS >::thread().

template<typename T>
size_t* RDScheme_shared_data< T >::sync

Counter used for synchronisation.

Referenced by RDScheme< T, DS >::thread().


The documentation for this class was generated from the following file: