ttg 1.0.0
Template Task Graph (TTG): flowgraph-based programming model for high-performance distributed-memory algorithms
Loading...
Searching...
No Matches
execution.h
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-3-Clause
2//
3// Created by Eduard Valeyev on 8/28/18.
4//
5
6#ifndef TTG_EXECUTION_H
7#define TTG_EXECUTION_H
8
9namespace ttg {
10
12enum class Execution {
13 Inline, // calls on the caller's thread
14 Async // calls asynchronously, e.g. by firing off a task
15};
16
18enum class ExecutionSpace {
19 Host, // a CPU
20 CUDA, // an NVIDIA CUDA device
21 HIP, // an AMD HIP device
22 L0, // an Intel L0 device
24};
25
26namespace detail {
27 inline const char *execution_space_name(ExecutionSpace space) noexcept {
28 switch (space) {
29 case ExecutionSpace::Host: return "Host";
30 case ExecutionSpace::CUDA: return "CUDA";
31 case ExecutionSpace::HIP: return "HIP";
32 case ExecutionSpace::Invalid: return "INVALID";
33 default: return "UNKNOWN";
34 }
35 }
36} // namespace detail
37
38};
39
40#endif //TTG_EXECUTION_H
const char * execution_space_name(ExecutionSpace space) noexcept
Definition execution.h:27
top-level TTG namespace contains runtime-neutral functionality
Definition keymap.h:9
ExecutionSpace
denotes task execution space
Definition execution.h:18
Execution
denotes task execution policy
Definition execution.h:12
@ Invalid
not a coroutine, i.e. a standard task function, -> void