Optimized Belief Propagation (CPU and GPU)
ParallelParamsBp Class Referencefinal

Child class of ParallelParams to store and process parallelization parameters to use in each BP kernel at each level. More...

#include <ParallelParamsBp.h>

Inheritance diagram for ParallelParamsBp:
Collaboration diagram for ParallelParamsBp:

Public Member Functions

 ParallelParamsBp (run_environment::OptParallelParamsSetting opt_parallel_params_setting, unsigned int num_levels, const std::array< unsigned int, 2 > &default_parallel_dims)
 Constructor to set parallel parameters with default dimensions for each kernel. More...
 
void SetParallelDims (const std::array< unsigned int, 2 > &parallel_dims) override
 Set parallel parameters for each kernel to the same input dimensions. More...
 
void AddTestResultsForParallelParams (const std::array< unsigned int, 2 > &p_params_curr_run, const RunData &curr_run_data)
 Add results from run with same specified parallel parameters used every parallel component. More...
 
void SetOptimizedParams () override
 Retrieve optimized parameters from results across multiple runs with different parallel parameters and set current parameters to retrieved optimized parameters. More...
 
std::array< unsigned int, 2 > OptParamsForKernel (const std::array< unsigned int, 2 > &kernel_location) const override
 Get optimized parallel parameters for parallel processing kernel for kernel that is indexed as an array of two unsigned integers that correspond to the kernel name and bp level. More...
 
RunData AsRunData () const override
 Retrieve current parallel parameters as RunData object. More...
 

Detailed Description

Child class of ParallelParams to store and process parallelization parameters to use in each BP kernel at each level.

Definition at line 57 of file ParallelParamsBp.h.

Constructor & Destructor Documentation

◆ ParallelParamsBp()

ParallelParamsBp::ParallelParamsBp ( run_environment::OptParallelParamsSetting  opt_parallel_params_setting,
unsigned int  num_levels,
const std::array< unsigned int, 2 > &  default_parallel_dims 
)
explicit

Constructor to set parallel parameters with default dimensions for each kernel.

Parameters
opt_parallel_params_setting
num_levels
default_parallel_dims

Definition at line 33 of file ParallelParamsBp.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ AddTestResultsForParallelParams()

void ParallelParamsBp::AddTestResultsForParallelParams ( const std::array< unsigned int, 2 > &  p_params_curr_run,
const RunData curr_run_data 
)
virtual

Add results from run with same specified parallel parameters used every parallel component.

Parameters
p_params_curr_run
curr_run_data

Implements ParallelParams.

Definition at line 117 of file ParallelParamsBp.cpp.

Here is the call graph for this function:

◆ AsRunData()

RunData ParallelParamsBp::AsRunData ( ) const
overridevirtual

Retrieve current parallel parameters as RunData object.

Returns
RunData object containing current parallel parameters

Implements ParallelParams.

Definition at line 73 of file ParallelParamsBp.cpp.

Here is the call graph for this function:

◆ OptParamsForKernel()

std::array<unsigned int, 2> ParallelParamsBp::OptParamsForKernel ( const std::array< unsigned int, 2 > &  kernel_location) const
inlineoverridevirtual

Get optimized parallel parameters for parallel processing kernel for kernel that is indexed as an array of two unsigned integers that correspond to the kernel name and bp level.

Parameters
kernel_location
Returns
Optimized parallel parameters for indexed kernel

Implements ParallelParams.

Definition at line 106 of file ParallelParamsBp.h.

◆ SetOptimizedParams()

void ParallelParamsBp::SetOptimizedParams ( )
overridevirtual

Retrieve optimized parameters from results across multiple runs with different parallel parameters and set current parameters to retrieved optimized parameters.

Implements ParallelParams.

Definition at line 151 of file ParallelParamsBp.cpp.

Here is the call graph for this function:

◆ SetParallelDims()

void ParallelParamsBp::SetParallelDims ( const std::array< unsigned int, 2 > &  parallel_dims)
overridevirtual

Set parallel parameters for each kernel to the same input dimensions.

Parameters
parallel_dims

Implements ParallelParams.

Definition at line 55 of file ParallelParamsBp.cpp.

Here is the caller graph for this function:

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