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

Shared data for BetaHilbert threads. More...

#include <BetaHilbert.hpp>

Public Member Functions

 shared_data ()
 Base constructor. More...
 
 shared_data (size_t _id, size_t _P, std::vector< Triplet< double > > *_original, size_t *_nzb, size_t **_nzc, 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 _m, const T **_in, T **_out)
 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, 5 reset
 
size_t repeat
 how many times to repeat the operation set in `mode' (above, only for 2 and 3)
 
std::vector< Triplet< T > > * original
 Array of local sparse blocks. More...
 
size_t * nzb
 Will cache block numbers of nonzeroes.
 
size_t ** nzc
 Will contain the nonzero counts of separate blocks.
 
double time
 Will store local timing.
 
size_t bytes
 Local memory use.
 
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...
 
const T ** input
 Array of all local input vectors of all SPMD processes. More...
 
T ** output
 Array of all output vectors local to all SPMD processes. More...
 

Detailed Description

template<typename T>
class shared_data< T >

Shared data for BetaHilbert threads.

Constructor & Destructor Documentation

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

Base constructor.

Initialises with invalid default arguments.

template<typename T>
shared_data< T >::shared_data ( size_t  _id,
size_t  _P,
std::vector< Triplet< double > > *  _original,
size_t *  _nzb,
size_t **  _nzc,
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  _m,
const T **  _in,
T **  _out 
)
inline

Default constructor.

Parameters
_idThread ID.
_PNumber of SPMD processes.
_originalOriginal set of nonzeroes.
_nzbNumber of sparse blocks.
_nzcNumber of nonzeroes in each sparse block,
_mutexSync mutex.
_condSync condition.
_end_mutexEnd sync mutex.
_end_condEnd sync condition.
_syncSync counter.
_end_syncEnd sync counter.
_mNumber of matrix rows.
_inInput vectors of all SPMD processes.
_outOutput vectors of all SPMD processes.

Member Data Documentation

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

Condition used for synchronisation.

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

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

Condition used for end sync.

Referenced by BetaHilbert< T >::thread().

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

Mutex used for end sync.

Referenced by BetaHilbert< T >::thread().

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

Counter used for end sync.

Referenced by BetaHilbert< T >::thread().

template<typename T>
const T** shared_data< T >::input

Array of all local input vectors of all SPMD processes.

Referenced by BetaHilbert< T >::thread().

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

Pointer to the local output vector.

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

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

Mutex used for synchronisation.

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

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

Array of local sparse blocks.

Referenced by BetaHilbert< T >::thread().

template<typename T>
T** shared_data< T >::output

Array of all output vectors local to all SPMD processes.

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

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

Offset of the local output vector compared to global indices.

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

Length of the local output vector.

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

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

Counter used for synchronisation.

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


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