ttg 1.0.0
Template Task Graph (TTG): flowgraph-based programming model for high-performance distributed-memory algorithms
Loading...
Searching...
No Matches
devicefunc.h
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-3-Clause
2#ifndef TTG_MAD_DEVICEFUNC_H
3#define TTG_MAD_DEVICEFUNC_H
4
5#include "ttg/devicescope.h"
6
8
9namespace ttg_madness {
10
11 template<typename T, typename A>
12 auto buffer_data(const Buffer<T, A>& buffer) {
13 /* for now return the internal pointer, should be adapted if ever relevant for madness */
14 return buffer.current_device_ptr();
15 }
16
17 template<typename... Views>
18 inline bool register_device_memory(std::tuple<Views&...> &views)
19 {
20 /* nothing to do here */
21 return true;
22 }
23
24 template<typename T, std::size_t N>
25 inline bool register_device_memory(const ttg::span<T, N>& span)
26 {
27 /* nothing to do here */
28 return true;
29 }
30
31} // namespace ttg_madness
32
33#endif // TTG_MAD_DEVICEFUNC_H
this contains MADNESS-based TTG functionality
Definition fwd.h:17
auto buffer_data(const Buffer< T, A > &buffer)
Definition devicefunc.h:12
bool register_device_memory(std::tuple< Views &... > &views)
Definition devicefunc.h:18
A runtime-managed buffer mirrored between host and device memory.
Definition buffer.h:14
element_type * current_device_ptr()
Definition buffer.h:144