MUDA
Loading...
Searching...
No Matches
muda_config.h
1#pragma once
2#ifndef MUDA_CHECK_ON
3#define MUDA_CHECK_ON 0
4#endif
5#ifndef MUDA_COMPUTE_GRAPH_ON
6#define MUDA_COMPUTE_GRAPH_ON 0
7#endif
8
9namespace muda
10{
11constexpr bool RUNTIME_CHECK_ON = MUDA_CHECK_ON;
12constexpr bool COMPUTE_GRAPH_ON = MUDA_COMPUTE_GRAPH_ON;
13namespace config
14{
15 constexpr bool on(bool cond = false)
16 {
17 return cond && RUNTIME_CHECK_ON;
18 }
19} // namespace config
20// debug viewer
21constexpr bool DEBUG_VIEWER = config::on(true);
22// trap on error happens
23constexpr bool TRAP_ON_ERROR = config::on(true);
24// light workload block size
25constexpr int LIGHT_WORKLOAD_BLOCK_SIZE = 256;
26// middle workload block size
27constexpr int MIDDLE_WORKLOAD_BLOCK_SIZE = 128;
28// heavy workload block size
29constexpr int HEAVY_WORKLOAD_BLOCK_SIZE = 64;
30} // namespace muda