Optimized Belief Propagation (CPU and GPU)
ParallelParams.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 PARALLEL_PARAMS_H
29 #define PARALLEL_PARAMS_H
30 
31 #include <array>
32 #include "RunEval/RunData.h"
33 
40 public:
47  virtual void SetParallelDims(const std::array<unsigned int, 2>& parallelDims) = 0;
48 
54  virtual RunData AsRunData() const = 0;
55 
64  const std::array<unsigned int, 2>& p_params_curr_run,
65  const RunData& curr_run_data) = 0;
66 
72  virtual void SetOptimizedParams() = 0;
73 
81  virtual std::array<unsigned int, 2> OptParamsForKernel(
82  const std::array<unsigned int, 2>& kernel_location) const = 0;
83 };
84 
85 #endif //PARALLEL_PARAMS_H
Declares class to store headers with data corresponding to current program run and evaluation.
Abstract class for holding and processing parallelization parameters. Child class(es) specific to im...
virtual void AddTestResultsForParallelParams(const std::array< unsigned int, 2 > &p_params_curr_run, const RunData &curr_run_data)=0
Add results from run with same specified parallel parameters used every parallel component.
virtual RunData AsRunData() const =0
Retrieve current parallel parameters as RunData type.
virtual void SetOptimizedParams()=0
Retrieve optimized parameters from results across multiple runs with different parallel parameters an...
virtual void SetParallelDims(const std::array< unsigned int, 2 > &parallelDims)=0
Set parallel parameters for each kernel to the same input dimensions.
virtual std::array< unsigned int, 2 > OptParamsForKernel(const std::array< unsigned int, 2 > &kernel_location) const =0
Get optimized parallel parameters for parallel processing kernel for kernel that is indexed as an arr...
Class to store headers with data corresponding to current program run and evaluation.
Definition: RunData.h:42