runtimes.h
Go to the documentation of this file.
1 //
2 // Created by Eduard Valeyev on 8/28/18.
3 //
4 
5 #ifndef TTG_TRAITS_H
6 #define TTG_TRAITS_H
7 
8 #include <cstddef>
9 #include <cstdint>
10 
11 #include "ttg/execution.h"
12 
13 namespace ttg {
14 
15  enum class Runtime { PaRSEC, MADWorld };
16 
17  template <Runtime R>
19 
20  template <>
22  static constexpr const bool supports_streaming_terminal = true;
23  static constexpr const bool supports_async_reduction = false;
24  using hash_t = unsigned long; // must be same as parsec_key_t
25  constexpr static ExecutionSpace execution_spaces[] = {ExecutionSpace::CUDA, ExecutionSpace::Host};
26  constexpr static std::size_t num_execution_spaces = sizeof(execution_spaces) / sizeof(ExecutionSpace);
27  };
28 
29  template <>
31  static constexpr const bool supports_streaming_terminal = true;
32  static constexpr const bool supports_async_reduction = true;
33  using hash_t = uint64_t;
34  constexpr static ExecutionSpace execution_spaces[] = {ExecutionSpace::Host};
35  constexpr static std::size_t num_execution_spaces = sizeof(execution_spaces) / sizeof(ExecutionSpace);
36  };
37 
38 } // namespace ttg
39 
40 #endif // TTG_TRAITS_H
top-level TTG namespace contains runtime-neutral functionality
Definition: keymap.h:8
ExecutionSpace
denotes task execution space
Definition: execution.h:17
Runtime
Definition: runtimes.h:15