From 024c4cf5b82165f9155c31a1ffc13b6824a1abec Mon Sep 17 00:00:00 2001 From: bramas <berenger.bramas@inria.fr> Date: Mon, 15 Sep 2014 08:34:16 +0200 Subject: [PATCH] Move local parameters into the mains --- Examples/statisticsOnOctree.cpp | 9 ++++--- Tests/Kernels/testRotationPeriodicBench.cpp | 28 ++++++++++---------- Tests/Kernels/testTuneSphericalBlockBlas.cpp | 9 ++++--- Tests/noDist/compare2Files.cpp | 9 +++---- Tests/noDist/testBlockedTree.cpp | 9 +++---- 5 files changed, 32 insertions(+), 32 deletions(-) diff --git a/Examples/statisticsOnOctree.cpp b/Examples/statisticsOnOctree.cpp index 352939767..a2c14ef46 100755 --- a/Examples/statisticsOnOctree.cpp +++ b/Examples/statisticsOnOctree.cpp @@ -54,12 +54,13 @@ // Simply create particles and try the kernels // -static const FParameterNames LocalOptitionHist = { - {"-histP", "--histogram-stat"} , - "Build the histogram of the particle number per leaf." -}; + int main(int argc, char ** argv){ + const FParameterNames LocalOptitionHist = { + {"-histP", "--histogram-stat"} , + "Build the histogram of the particle number per leaf." + }; FHelpDescribeAndExit(argc, argv, "Driver to obtain statistics on the octree.", FParameterDefinitions::InputFile, FParameterDefinitions::OctreeHeight, diff --git a/Tests/Kernels/testRotationPeriodicBench.cpp b/Tests/Kernels/testRotationPeriodicBench.cpp index a89621059..23e0bb1c5 100644 --- a/Tests/Kernels/testRotationPeriodicBench.cpp +++ b/Tests/Kernels/testRotationPeriodicBench.cpp @@ -33,23 +33,23 @@ #include "../../Src/Utils/FMath.hpp" #include "../../Src/Utils/FParameterNames.hpp" -static const FParameterNames LocalOptionMinPer { - {"-min"}, - "The starting periodicity" -}; - -static const FParameterNames LocalOptionMaxPer { - {"-max"}, - "The ending periodicity" -}; - -static const FParameterNames LocalOptionNbPrint { - {"-nbprint"}, - "Number of result to print" -}; int main(int argc, char** argv){ + const FParameterNames LocalOptionMinPer { + {"-min"}, + "The starting periodicity" + }; + + const FParameterNames LocalOptionMaxPer { + {"-max"}, + "The ending periodicity" + }; + + const FParameterNames LocalOptionNbPrint { + {"-nbprint"}, + "Number of result to print" + }; FHelpDescribeAndExit(argc, argv, "Run a Spherical Harmonic (Rotation) FMM kernel in periodic.", FParameterDefinitions::InputFile, FParameterDefinitions::OctreeHeight, diff --git a/Tests/Kernels/testTuneSphericalBlockBlas.cpp b/Tests/Kernels/testTuneSphericalBlockBlas.cpp index 8e3859125..26cded162 100755 --- a/Tests/Kernels/testTuneSphericalBlockBlas.cpp +++ b/Tests/Kernels/testTuneSphericalBlockBlas.cpp @@ -47,13 +47,14 @@ /** This program find the best block blas size */ -static const FParameterNames LocalOptionMaxBlockSize { - {"-mbs"}, - "The maximum size of blocks." -}; + // Simply create particles and try the kernels int main(int argc, char ** argv){ + const FParameterNames LocalOptionMaxBlockSize { + {"-mbs"}, + "The maximum size of blocks." + }; FHelpDescribeAndExit(argc, argv, "Test the TSM (target source model) using the Rotation or the Spherical Harmonic Old implementations.", FParameterDefinitions::OctreeHeight,FParameterDefinitions::SHDevelopment, diff --git a/Tests/noDist/compare2Files.cpp b/Tests/noDist/compare2Files.cpp index 8f6bd66b6..abc0fe9ae 100644 --- a/Tests/noDist/compare2Files.cpp +++ b/Tests/noDist/compare2Files.cpp @@ -40,12 +40,11 @@ -static const FParameterNames LocalParameterEwald{ - {"-ewaldfile2"}, - "-ewaldfile2 name2 if name2 contains the result done by the ewald method for 1/r kernel" -}; - int main(int argc, char ** argv){ + const FParameterNames LocalParameterEwald{ + {"-ewaldfile2"}, + "-ewaldfile2 name2 if name2 contains the result done by the ewald method for 1/r kernel" + }; FHelpDescribeAndExit(argc, argv, "Driver to change the format of the input file.", FParameterDefinitions::InputFileOne, FParameterDefinitions::InputFileTwow, diff --git a/Tests/noDist/testBlockedTree.cpp b/Tests/noDist/testBlockedTree.cpp index 8a397c44e..9b67cefb0 100644 --- a/Tests/noDist/testBlockedTree.cpp +++ b/Tests/noDist/testBlockedTree.cpp @@ -28,12 +28,11 @@ #include "../../Src/Utils/FParameterNames.hpp" -static const FParameterNames LocalOptionBlocSize { - {"-bs"}, - "The size of the block of the blocked tree" -}; - int main(int argc, char* argv[]){ + const FParameterNames LocalOptionBlocSize { + {"-bs"}, + "The size of the block of the blocked tree" + }; FHelpDescribeAndExit(argc, argv, "Test the blocked tree.", FParameterDefinitions::OctreeHeight, FParameterDefinitions::OctreeSubHeight, -- GitLab