Optimized Belief Propagation (CPU and GPU)
RunImpMultInputs.cpp
Go to the documentation of this file.
1 /*
2 Copyright (C) 2024 Scott Grauer-Gray
3 
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8 
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13 
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18 
27 #include "RunImpMultInputs.h"
28 
29 //run and evaluate runs on one or more input of benchmark implementation
30 //using multiple settings
31 std::pair<MultRunData, std::vector<RunSpeedupAvgMedian>> RunImpMultInputs::operator()(
32  const run_environment::RunImpSettings& run_imp_settings,
33  size_t data_type_size,
34  std::unique_ptr<EvaluateImpResults>& evalResults) const
35 {
36  //run belief propagation implementation on multiple datasets and
37  //return run data for all runs
38  MultRunData run_data_all_runs =
39  RunEvalImpMultDataSets(run_imp_settings, data_type_size);
40 
41  //evaluate results
42  //return data for each run and average and median
43  //speedup results across the data
44  return evalResults->EvalResultsSingDataTypeAcc(
45  run_data_all_runs, run_imp_settings, data_type_size);
46 }
std::map< InputSignature, std::optional< std::map< run_environment::ParallelParamsSetting, RunData > >> MultRunData
Alias mapping input signature to run data for each parallel parameters setting Run data is null if r...
Declares base class for running and evaluating multiple runs of an implementation that may be optimiz...
std::pair< MultRunData, std::vector< RunSpeedupAvgMedian > > operator()(const run_environment::RunImpSettings &run_imp_settings, size_t data_type_size, std::unique_ptr< EvaluateImpResults > &evalResults) const
Run and evaluate runs on one or more input of benchmark implementation using multiple settings.
Structure that stores settings for current implementation run.
Definition: RunSettings.h:84