Itoyori  v0.0.1
options.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "ityr/common/util.hpp"
5 
6 namespace ityr::ito {
7 
8 inline void print_compile_options() {
9 #ifndef ITYR_ITO_SCHEDULER
10 #define ITYR_ITO_SCHEDULER randws
11 #endif
13 
14 #ifndef ITYR_ITO_DAG_PROF
15 #define ITYR_ITO_DAG_PROF disabled
16 #endif
18 }
19 
20 struct stack_size_option : public common::option<stack_size_option, std::size_t> {
21  using option::option;
22  static std::string name() { return "ITYR_ITO_STACK_SIZE"; }
23  static std::size_t default_value() { return std::size_t(2) * 1024 * 1024; }
24 };
25 
26 struct wsqueue_capacity_option : public common::option<wsqueue_capacity_option, std::size_t> {
27  using option::option;
28  static std::string name() { return "ITYR_ITO_WSQUEUE_CAPACITY"; }
29  static std::size_t default_value() { return 1024; }
30 };
31 
32 struct thread_state_allocator_size_option : public common::option<thread_state_allocator_size_option, std::size_t> {
33  using option::option;
34  static std::string name() { return "ITYR_ITO_THREAD_STATE_ALLOCATOR_SIZE"; }
35  static std::size_t default_value() { return std::size_t(2) * 1024 * 1024; }
36 };
37 
38 struct suspended_thread_allocator_size_option : public common::option<suspended_thread_allocator_size_option, std::size_t> {
39  using option::option;
40  static std::string name() { return "ITYR_ITO_SUSPENDED_THREAD_ALLOCATOR_SIZE"; }
41  static std::size_t default_value() { return std::size_t(2) * 1024 * 1024; }
42 };
43 
44 struct sched_loop_make_mpi_progress_option : public common::option<sched_loop_make_mpi_progress_option, bool> {
45  using option::option;
46  static std::string name() { return "ITYR_ITO_SCHED_LOOP_MAKE_MPI_PROGRESS"; }
47  static bool default_value() { return true; }
48 };
49 
50 struct adws_enable_steal_option : public common::option<adws_enable_steal_option, bool> {
51  using option::option;
52  static std::string name() { return "ITYR_ITO_ADWS_ENABLE_STEAL"; }
53  static bool default_value() { return true; }
54 };
55 
56 struct adws_wsqueue_capacity_option : public common::option<adws_wsqueue_capacity_option, std::size_t> {
57  using option::option;
58  static std::string name() { return "ITYR_ITO_ADWS_WSQUEUE_CAPACITY"; }
59  static std::size_t default_value() { return 256; }
60 };
61 
62 struct adws_max_depth_option : public common::option<adws_max_depth_option, int> {
63  using option::option;
64  static std::string name() { return "ITYR_ITO_ADWS_MAX_DEPTH"; }
65  static int default_value() { return 20; }
66 };
67 
68 struct adws_max_dtree_reuse_option : public common::option<adws_max_dtree_reuse_option, int> {
69  using option::option;
70  static std::string name() { return "ITYR_ITO_ADWS_MAX_DTREE_REUSE"; }
71  static int default_value() { return 10; }
72 };
73 
74 struct adws_min_drange_size_option : public common::option<adws_min_drange_size_option, double> {
75  using option::option;
76  static std::string name() { return "ITYR_ITO_ADWS_MIN_DRANGE_SIZE"; }
77  static double default_value() { return 0.01; }
78 };
79 
91 };
92 
93 }
Definition: options.hpp:90
Definition: options.hpp:54
#define ITYR_PRINT_MACRO(x)
Definition: options.hpp:12
#define ITYR_ITO_SCHEDULER
#define ITYR_ITO_DAG_PROF
Definition: aarch64.hpp:5
void print_compile_options()
Definition: options.hpp:8
Definition: options.hpp:50
static std::string name()
Definition: options.hpp:52
static bool default_value()
Definition: options.hpp:53
Definition: options.hpp:62
static std::string name()
Definition: options.hpp:64
static int default_value()
Definition: options.hpp:65
Definition: options.hpp:68
static std::string name()
Definition: options.hpp:70
static int default_value()
Definition: options.hpp:71
Definition: options.hpp:74
static double default_value()
Definition: options.hpp:77
static std::string name()
Definition: options.hpp:76
Definition: options.hpp:56
static std::size_t default_value()
Definition: options.hpp:59
static std::string name()
Definition: options.hpp:58
Definition: options.hpp:80
common::option_initializer< thread_state_allocator_size_option > ITYR_ANON_VAR
Definition: options.hpp:83
common::option_initializer< adws_max_dtree_reuse_option > ITYR_ANON_VAR
Definition: options.hpp:89
common::option_initializer< sched_loop_make_mpi_progress_option > ITYR_ANON_VAR
Definition: options.hpp:85
common::option_initializer< suspended_thread_allocator_size_option > ITYR_ANON_VAR
Definition: options.hpp:84
common::option_initializer< stack_size_option > ITYR_ANON_VAR
Definition: options.hpp:81
common::option_initializer< wsqueue_capacity_option > ITYR_ANON_VAR
Definition: options.hpp:82
common::option_initializer< adws_wsqueue_capacity_option > ITYR_ANON_VAR
Definition: options.hpp:87
common::option_initializer< adws_min_drange_size_option > ITYR_ANON_VAR
Definition: options.hpp:90
common::option_initializer< adws_enable_steal_option > ITYR_ANON_VAR
Definition: options.hpp:86
common::option_initializer< adws_max_depth_option > ITYR_ANON_VAR
Definition: options.hpp:88
static std::string name()
Definition: options.hpp:46
static bool default_value()
Definition: options.hpp:47
Definition: options.hpp:20
static std::string name()
Definition: options.hpp:22
static std::size_t default_value()
Definition: options.hpp:23
static std::string name()
Definition: options.hpp:40
static std::size_t default_value()
Definition: options.hpp:41
static std::size_t default_value()
Definition: options.hpp:35
static std::string name()
Definition: options.hpp:34
Definition: options.hpp:26
static std::string name()
Definition: options.hpp:28
static std::size_t default_value()
Definition: options.hpp:29