11 #ifndef __stir_recon_buildblock_DistributedFunctions_h__ 12 #define __stir_recon_buildblock_DistributedFunctions_h__ 43 # define STIR_MPI_TIMINGS 101 extern bool rpc_time;
123 void send_string(
const std::string& str,
int tag,
int destination);
140 void send_int_values(
int* values,
int count,
int tag,
int destination);
164 void send_projectors(
const stir::shared_ptr<stir::ProjectorByBinPair>& proj_pair_sptr,
int destination);
339 stir::shared_ptr<stir::ProjDataInfo>& proj_data_info_sptr,
364 const stir::shared_ptr<stir::ProjDataInfo>& proj_data_info_ptr,
365 const stir::shared_ptr<stir::DataSymmetriesForViewSegmentNumbers> symmetries_sptr,
382 const stir::shared_ptr<stir::ProjDataInfo>& proj_data_info_ptr,
403 int image_buffer_size,
409 const int INT_TAG = 7;
412 const int STIR_MPI_CONF_TAG = 9;
413 const int IMAGE_ESTIMATE_TAG = 23;
414 const int IMAGE_PARAMETER_TAG = 24;
415 const int VIEWGRAM_DIMENSIONS_TAG = 27;
416 const int VIEWGRAM_TAG = 28;
417 const int VIEWGRAM_COUNT_TAG = 29;
418 const int PROJECTION_DATA_INFO_TAG = 30;
419 const int PARAMETER_INFO_TAG = 21;
420 const int REGISTERED_NAME_TAG = 25;
Namespace for the STIR library (and some/most of its applications)
Definition: General_Reconstruction.cxx:6
bool test
enable/disable tests
Definition: distributed_functions.cxx:47
void receive_and_initialize_projectors(stir::shared_ptr< stir::ProjectorByBinPair > &projector_pair_ptr, int source)
receives all needed information to subsequently construct a ProjectorByBinPair object ...
Definition: distributed_functions.cxx:524
MPI_Status receive_image_values_and_fill_image_ptr(stir::shared_ptr< stir::DiscretisedDensity< 3, float >> &image_ptr, int buffer_size, int source)
receives the values of a DiscretisedDensity object
Definition: distributed_functions.cxx:745
void send_int_value(int value, int destination)
threshold for displaying send/receive times, initially set to 0.1 seconds
Definition: distributed_functions.cxx:66
MPI_Status receive_int_values(int *values, int count, int tag)
receives some integer values
Definition: distributed_functions.cxx:612
void reduce_received_output_image(stir::DiscretisedDensity< 3, float > *output_image_ptr, int destination)
the function called by the master to reduce the output image
Definition: distributed_functions.cxx:908
Declaration of class stir::ProjDataInfo.
const int ARBITRARY_TAG
special tag, equivalent to MPI_ANY_TAG in some functions
Definition: distributed_functions.h:411
void receive_and_set_image_parameters(stir::shared_ptr< stir::DiscretisedDensity< 3, float >> &image_ptr, int &buffer, int tag, int source)
receives the parameters of a DiscretisedDensity object
Definition: distributed_functions.cxx:679
void send_bool_value(bool value, int tag, int destination)
send or broadcast a bool value
Definition: distributed_functions.cxx:131
double total_rpc_time_2
adding up the time used for PRC_process_related_viewgrams_gradient() computation at all slaves ...
Definition: distributed_functions.cxx:46
void receive_and_construct_viewgram(stir::Viewgram< float > *&viewgram, const stir::shared_ptr< stir::ProjDataInfo > &proj_data_info_ptr, int source)
receives a Viewgram object
Definition: distributed_functions.cxx:863
Namespace for distributed computation with MPI.
void send_image_parameters(const stir::DiscretisedDensity< 3, float > *input_image_ptr, int tag, int destination)
sends or broadcasts the parameters of a DiscretisedDensity object
Definition: distributed_functions.cxx:227
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast (or corresponding b...
void receive_and_construct_related_viewgrams(stir::RelatedViewgrams< float > *&viewgrams, const stir::shared_ptr< stir::ProjDataInfo > &proj_data_info_ptr, const stir::shared_ptr< stir::DataSymmetriesForViewSegmentNumbers > symmetries_sptr, int source)
receives and constructs a RelatedViewgrams object
Definition: distributed_functions.cxx:833
void reduce_output_image(stir::shared_ptr< stir::DiscretisedDensity< 3, float >> &output_image_ptr, int image_buffer_size, int my_rank, int destination)
the function called by the slaves to reduce the output image
Definition: distributed_functions.cxx:956
defines the stir::DiscretisedDensity class
std::string receive_string(int tag, int source)
receives a string
Definition: distributed_functions.cxx:496
int num_processors
the number of processes used for distributed computation
Definition: distributed_functions.cxx:50
bool receive_bool_value(int tag, int source)
receives a bool value
Definition: distributed_functions.cxx:584
void send_related_viewgrams(stir::RelatedViewgrams< float > *viewgrams, int destination)
sends a RelatedViegrams object
Definition: distributed_functions.cxx:397
void send_exam_and_proj_data_info(const stir::ExamInfo &exam_info, const stir::ProjDataInfo &proj_data_info, int destination)
sends or broadcasts the information from ExamInfo and ProjDataInfo
Definition: distributed_functions.cxx:338
MPI_Status receive_double_values(double *values, int count, int tag)
receives some double values
Definition: distributed_functions.cxx:642
MPI_Status receive_view_segment_numbers(stir::ViewSegmentNumbers &vs_num, int tag)
receive a ViewSegmentNumbers object
Definition: distributed_functions.cxx:669
void send_string(const std::string &str, int tag, int destination)
sends or broadcasts a string
Definition: distributed_functions.cxx:92
Declaration of class stir::Viewgram.
void send_view_segment_numbers(const stir::ViewSegmentNumbers &vs_num, int tag, int destination)
send or broadcast ViewSegmentNumbers object
Definition: distributed_functions.cxx:218
bool first_iteration
some stuff in distributable_computation needs to be done only in the first iteration ...
Definition: distributed_functions.cxx:54
alias for ViewgramIndices
Definition: ViewSegmentNumbers.h:33
void send_double_values(double *values, int count, int tag, int destination)
send or broadcast double values
Definition: distributed_functions.cxx:190
void send_image_estimate(const stir::DiscretisedDensity< 3, float > *input_image_ptr, int destination)
sends or broadcasts the values of a DiscretisedDensity object
Definition: distributed_functions.cxx:302
void receive_and_construct_exam_and_proj_data_info_ptr(stir::shared_ptr< stir::ExamInfo > &exam_info_sptr, stir::shared_ptr< stir::ProjDataInfo > &proj_data_info_sptr, int source)
receives information of ExamInfo and ProjDataInfo objects and constructs new ones from it ...
Definition: distributed_functions.cxx:779
double total_rpc_time
enable timings for every single send/receive operation
Definition: distributed_functions.cxx:43
a class for storing information about 1 exam (or scan)
Definition: ExamInfo.h:41
defines the stir::VoxelsOnCartesianGrid class
An (abstract base) class that contains information on the projection data.
Definition: ProjDataInfo.h:69
double total_rpc_time_slaves
adding up the time used for PRC_process_related_viewgrams_gradient() computation at a single slave ...
Definition: distributed_functions.cxx:45
double min_threshold
value to reduce the total_rpc_time values
Definition: distributed_functions.cxx:44
bool test_send_receive_times
enable timings for PRC_process_related_viewgrams_gradient() computation
Definition: distributed_functions.cxx:41
void send_projectors(const stir::shared_ptr< stir::ProjectorByBinPair > &proj_pair_sptr, int destination)
send or broadcast a projector-pair object
Definition: distributed_functions.cxx:457
void send_viewgram(const stir::Viewgram< float > &viewgram, int destination)
sends a Viewgram object
Definition: distributed_functions.cxx:416
int receive_int_value(int source)
receives a single integer value
Definition: distributed_functions.cxx:469
Declares class stir::ProjectorByBinPair.
void send_int_values(int *values, int count, int tag, int destination)
sends or broadcasts some integer values
Definition: distributed_functions.cxx:161