Compadre  1.3.3
Compadre_KokkosParser.hpp
Go to the documentation of this file.
1 #ifndef _COMPADRE_KOKKOSPARSER_HPP_
2 #define _COMPADRE_KOKKOSPARSER_HPP_
3 
4 #include "Compadre_Config.h"
5 #include "Compadre_Typedefs.hpp"
6 
7 namespace Compadre {
8 
9 /*! \class KokkosParser
10  \brief Class handling Kokkos command line arguments and returning parameters.
11 */
12 class KokkosParser {
13 
14 private:
15 
17 
18  // prevent default constructor
19  KokkosParser();
20 
21 public:
22 
23  // call with command line arguments
24  KokkosParser(int argc, char* args[], bool print_status = false);
25 
26  // call with std::vector of std::string's
27  KokkosParser(std::vector<std::string> args, bool print_status = false);
28 
29  // call for default arguments
30  KokkosParser(bool print_status = false);
31 
32  // destructor
34  // clean-up Kokkos
35  if (_called_initialize) {
36  this->finalize();
37  }
38  };
39 
40  // initialize Kokkos if not already initialized using
41  // arguments provided at object construction
42  int initialize(int argc, char*[], bool print_status = false);
43 
44  // finalize Kokkos if this object initialized it
45  // or if hard_finalize is true
46  int finalize(bool hard_finalize = false);
47 
48  // prints Kokkos configuration
49  void status() const;
50 
51  // prohibit using the assignment constructor
52  KokkosParser& operator=( const KokkosParser& ) = delete;
53 
54 };
55 
56 } // Compadre
57 
58 #endif
Class handling Kokkos command line arguments and returning parameters.
int initialize(int argc, char *[], bool print_status=false)
KokkosParser & operator=(const KokkosParser &)=delete
int finalize(bool hard_finalize=false)