ttg
1.0.0
Template Task Graph (TTG): flowgraph-based programming model for high-performance distributed-memory algorithms
Loading...
Searching...
No Matches
ttg
ttg
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
14
namespace
ttg
{
15
16
enum class
Runtime
{
PaRSEC
,
MADWorld
};
17
18
template
<Runtime R>
19
struct
runtime_traits
;
20
21
template
<>
22
struct
runtime_traits
<
Runtime
::
PaRSEC
> {
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
<>
31
struct
runtime_traits
<
Runtime
::
MADWorld
> {
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
execution.h
ttg
top-level TTG namespace contains runtime-neutral functionality
Definition
keymap.h:9
ttg::ExecutionSpace
ExecutionSpace
denotes task execution space
Definition
execution.h:18
ttg::ExecutionSpace::CUDA
@ CUDA
ttg::ExecutionSpace::Host
@ Host
ttg::Runtime
Runtime
Definition
runtimes.h:16
ttg::Runtime::MADWorld
@ MADWorld
ttg::Runtime::PaRSEC
@ PaRSEC
ttg::runtime_traits< Runtime::MADWorld >::hash_t
uint64_t hash_t
Definition
runtimes.h:34
ttg::runtime_traits< Runtime::PaRSEC >::hash_t
unsigned long hash_t
Definition
runtimes.h:25
ttg::runtime_traits
Definition
runtimes.h:19
Generated at Mon Nov 24 2025 07:32:22 for
ttg
1.0.0 by
1.9.8