diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2017-08-21 20:06:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-21 20:06:29 +0200 |
commit | e5eb6b1d3a66358093cb40f0fad51ecdc4654771 (patch) | |
tree | e5eb03736240ec07534319fdd15661e1093f04ac /src/tuning/kernels/xaxpy.cpp | |
parent | d67fd6604b4a6584c4f9e856057fcc8076ce377d (diff) | |
parent | dfd332524ab0e66a04d803bb075787e35cd2db1a (diff) |
Merge pull request #173 from mcian/PSO_params
Add PSO parameters support and search strategy selection from command…
Diffstat (limited to 'src/tuning/kernels/xaxpy.cpp')
-rw-r--r-- | src/tuning/kernels/xaxpy.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/tuning/kernels/xaxpy.cpp b/src/tuning/kernels/xaxpy.cpp index a13e54f2..f8e1d93e 100644 --- a/src/tuning/kernels/xaxpy.cpp +++ b/src/tuning/kernels/xaxpy.cpp @@ -53,7 +53,13 @@ class TuneXaxpy { static size_t DefaultBatchCount() { return 1; } // N/A for this kernel static double DefaultFraction() { return 1.0; } // N/A for this kernel static size_t DefaultNumRuns() { return 10; } // run every kernel this many times for averaging - + static size_t DefaultSwarmSizePSO() { return 8; } // N/A for this kernel + static double DefaultInfluenceGlobalPSO(){ return 0.1; }// N/A for this kernel + static double DefaultInfluenceLocalPSO(){ return 0.3; }// N/A for this kernel + static double DefaultInfluenceRandomPSO(){ return 0.6; }// N/A for this kernel + static size_t DefaultHeuristic(){ return static_cast<size_t> (cltune::SearchMethod::FullSearch);} + static double DefaultMaxTempAnn(){ return 1.0;} // N/A for this kernel + // Describes how to obtain the sizes of the buffers static size_t GetSizeX(const Arguments<T> &args) { return args.n; } static size_t GetSizeY(const Arguments<T> &args) { return args.n; } @@ -102,6 +108,11 @@ class TuneXaxpy { return 3 * args.n * GetBytes(args.precision); } static std::string PerformanceUnit() { return "GB/s"; } + + // Returns which Heuristic to run + static size_t GetHeuristic(const Arguments<T> &args){ + return static_cast<size_t> (cltune::SearchMethod::FullSearch); + } }; // ================================================================================================= |