execution.h
Go to the documentation of this file.
1 //
2 // Created by Eduard Valeyev on 8/28/18.
3 //
4 
5 #ifndef TTG_EXECUTION_H
6 #define TTG_EXECUTION_H
7 
8 namespace ttg {
9 
11 enum class Execution {
12  Inline, // calls on the caller's thread
13  Async // calls asynchronously, e.g. by firing off a task
14 };
15 
17 enum class ExecutionSpace {
18  Host, // a CPU
19  CUDA, // an NVIDIA CUDA device
20  HIP, // an AMD HIP device
21  L0, // an Intel L0 device
22  Invalid
23 };
24 
25 namespace detail {
26  inline const char *execution_space_name(ExecutionSpace space) noexcept {
27  switch (space) {
28  case ExecutionSpace::Host: return "Host";
29  case ExecutionSpace::CUDA: return "CUDA";
30  case ExecutionSpace::HIP: return "HIP";
31  case ExecutionSpace::Invalid: return "INVALID";
32  default: return "UNKNOWN";
33  }
34  }
35 } // namespace detail
36 
37 };
38 
39 #endif //TTG_EXECUTION_H
const char * execution_space_name(ExecutionSpace space) noexcept
Definition: execution.h:26
top-level TTG namespace contains runtime-neutral functionality
Definition: keymap.h:8
ExecutionSpace
denotes task execution space
Definition: execution.h:17
Execution
denotes task execution policy
Definition: execution.h:11