Optimized Belief Propagation (CPU and GPU)
RunImpMultInputs.h
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 
28 #ifndef RUN_IMP_MULT_INPUTS_H_
29 #define RUN_IMP_MULT_INPUTS_H_
30 
31 #include <utility>
32 #include <memory>
37 
43 public:
45  opt_imp_accel_(opt_imp_accel) {}
46 
56  std::pair<MultRunData, std::vector<RunSpeedupAvgMedian>> operator()(
57  const run_environment::RunImpSettings& run_imp_settings,
58  size_t data_type_size,
59  std::unique_ptr<EvaluateImpResults>& evalResults) const;
60 
67  return opt_imp_accel_; }
68 
69 protected:
71 
72 private:
80  virtual MultRunData RunEvalImpMultDataSets(
81  const run_environment::RunImpSettings& run_imp_settings,
82  size_t data_type_size) const = 0;
83 };
84 
85 #endif //RUN_IMP_MULT_INPUTS_H_
Header for defining aliases for storing run results and evaluating implementations.
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 class with operator function to evaluate implementations of the same algorithm across differ...
Contains namespace with enums and constants for implementation run evaluation.
Declares and defines structure that stores settings for current implementation run as well as functio...
Base class for running and evaluating multiple runs of an implementation that may be optimized on CPU...
RunImpMultInputs(run_environment::AccSetting opt_imp_accel)
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.
run_environment::AccSetting AccelerationSetting() const
Return acceleration setting for implementation.
const run_environment::AccSetting opt_imp_accel_
AccSetting
Enum for acceleration setting.
Structure that stores settings for current implementation run.
Definition: RunSettings.h:84