ttg 1.0.0
Template Task Graph (TTG): flowgraph-based programming model for high-performance distributed-memory algorithms
Loading...
Searching...
No Matches
runtimes.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_TRAITS_H
7#define TTG_TRAITS_H
8
9#include <cstddef>
10#include <cstdint>
11
12#include "ttg/execution.h"
13
14namespace ttg {
15
16 enum class Runtime { PaRSEC, MADWorld };
17
18 template <Runtime R>
20
21 template <>
23 static constexpr const bool supports_streaming_terminal = true;
24 static constexpr const bool supports_async_reduction = false;
25 using hash_t = unsigned long; // must be same as parsec_key_t
26 constexpr static ExecutionSpace execution_spaces[] = {ExecutionSpace::CUDA, ExecutionSpace::Host};
27 constexpr static std::size_t num_execution_spaces = sizeof(execution_spaces) / sizeof(ExecutionSpace);
28 };
29
30 template <>
32 static constexpr const bool supports_streaming_terminal = true;
33 static constexpr const bool supports_async_reduction = true;
34 using hash_t = uint64_t;
35 constexpr static ExecutionSpace execution_spaces[] = {ExecutionSpace::Host};
36 constexpr static std::size_t num_execution_spaces = sizeof(execution_spaces) / sizeof(ExecutionSpace);
37 };
38
39} // namespace ttg
40
41#endif // TTG_TRAITS_H
top-level TTG namespace contains runtime-neutral functionality
Definition keymap.h:9
ExecutionSpace
denotes task execution space
Definition execution.h:18
Runtime
Definition runtimes.h:16