SG++-Doxygen-Documentation
|
#include <MPIEnviroment.hpp>
Public Member Functions | |
bool | is_finished () |
Checks whether the queue has already finished. More... | |
size_t | receive_result (int &startid, T *partial_result) |
Wait for a result from any of the other workers, send a new workpackage and return said result. More... | |
SimpleQueue (size_t startindex, size_t workitem_count, size_t node_packagesize, MPI_Comm &comm, int commsize, bool verbose=false, bool prefetching=false) | |
Constructor for a simple queue. More... | |
virtual | ~SimpleQueue () |
Protected Attributes | |
MPI_Comm & | comm |
int | commsize |
MPI_Datatype | mpi_typ |
Datatyp for MPI_SEND and MPI_RECV, only supports float, double and int right now. More... | |
unsigned int | packagecount |
Number of all workpackages. More... | |
int | packageinfo [2] |
Array with for sending indices and packagesizes. More... | |
size_t | packagesize |
bool | prefetching |
Prefetching activated? More... | |
unsigned int | received_packageindex |
Number of received workapckages. More... | |
unsigned int * | secondary_indices |
Stores the current starting indices for each prefetched work package. More... | |
unsigned int | send_packageindex |
Number of sent workapckages. More... | |
size_t | startindex |
Start index for the entire problem chunk of this queue. More... | |
unsigned int * | startindices |
Stores the current starting indices for each work package. More... | |
bool | verbose |
size_t | workitem_count |
|
inline |
Constructor for a simple queue.
This constructor check whether there are enough packages for all subworkers (workers which receive workpackages from this queue). If there are not enough packages, the packagesize will be modified such that every worker receives at least 1 package (2 if prefetching is activated). This constructor will also already send the first workpackages with a blocking send so use with care!
startindex | Index where the chunk of the problem begins |
workitem_count | Number of subworkers |
node_packagesize | Prefered packagesize - will be modified if to small |
comm | Communicator to the subworkers |
commsize | Size of the communictor |
verbose | Verbosity on or off |
prefetching | Activates package prefetching if this parameter is true |
References create_dataset::dest.
|
inlinevirtual |
|
inline |
Checks whether the queue has already finished.
Referenced by sgpp::datadriven::clusteringmpi::GraphCreationWorker::divide_workpackages(), and sgpp::datadriven::clusteringmpi::MPIWorkerPackageBase< int >::divide_workpackages().
|
inline |
Wait for a result from any of the other workers, send a new workpackage and return said result.
startid | Returns the starting index of the package result |
partial_result | Buffer containing the package result |
Referenced by sgpp::datadriven::clusteringmpi::GraphCreationWorker::divide_workpackages(), and sgpp::datadriven::clusteringmpi::MPIWorkerPackageBase< int >::divide_workpackages().
|
protected |
|
protected |
|
protected |
Datatyp for MPI_SEND and MPI_RECV, only supports float, double and int right now.
|
protected |
Number of all workpackages.
|
protected |
Array with for sending indices and packagesizes.
|
protected |
|
protected |
Prefetching activated?
|
protected |
Number of received workapckages.
|
protected |
Stores the current starting indices for each prefetched work package.
|
protected |
Number of sent workapckages.
|
protected |
Start index for the entire problem chunk of this queue.
|
protected |
Stores the current starting indices for each work package.
|
protected |
|
protected |