SparseLibrary
Version 1.6.0
|
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... | |
Shared data for RDScheme threads.
|
inline |
Base constructor.
Will initialise all to invalid values or NULL.
|
inline |
Default constructor.
_id | Thread ID. |
_P | Number of SPMD processes. |
_original | Original set of nonzeroes, split by blocks. |
_nzb | Number of sparse blocks. |
_mutex | Sync mutex. |
_cond | Sync condition. |
_end_mutex | End sync mutex. |
_end_cond | End sync condition. |
_sync | Sync counter. |
_end_sync | End sync counter. |
_ovsize | Output vector size. |
_ovoffset | Output vector start position (global view). |
size_t RDScheme_shared_data< T >::bytes |
Will store memory use.
Referenced by RDScheme< T, DS >::thread().
pthread_cond_t* RDScheme_shared_data< T >::cond |
Condition used for synchronisation.
Referenced by RDScheme< T, DS >::thread().
pthread_cond_t* RDScheme_shared_data< T >::end_cond |
Condition used for end sync.
Referenced by RDScheme< T, DS >::thread().
pthread_mutex_t* RDScheme_shared_data< T >::end_mutex |
Mutex used for end sync.
Referenced by RDScheme< T, DS >::thread().
size_t* RDScheme_shared_data< T >::end_sync |
Counter used for end sync.
Referenced by RDScheme< T, DS >::thread().
T* RDScheme_shared_data< T >::local_y |
Pointer to the local output vector.
Referenced by RDScheme< T, DS >::collectY(), and RDScheme< T, DS >::thread().
pthread_mutex_t* RDScheme_shared_data< T >::mutex |
Mutex used for synchronisation.
Referenced by RDScheme< T, DS >::thread().
std::vector< Triplet< T > >* RDScheme_shared_data< T >::original |
Array of vectors of thread-local nonzeroes.
Referenced by RDScheme< T, DS >::thread().
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().
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().
size_t* RDScheme_shared_data< T >::sync |
Counter used for synchronisation.
Referenced by RDScheme< T, DS >::thread().