CPPuddle
Loading...
Searching...
No Matches
include
cppuddle
memory_recycling
sycl_recycling_allocators.hpp
Go to the documentation of this file.
1
// Copyright (c) 2020-2024 Gregor Daiß
2
//
3
// Distributed under the Boost Software License, Version 1.0. (See accompanying
4
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6
#ifndef SYCL_RECYCLING_ALLOCATORS_HPP
7
#define SYCL_RECYCLING_ALLOCATORS_HPP
8
9
#include "
buffer_management_interface.hpp
"
10
#include "
detail/sycl_underlying_allocators.hpp
"
11
15
16
namespace
cppuddle
{
17
namespace
memory_recycling {
18
19
namespace
device_selection {
20
// No MutliGPU support yet, hence no select_device_function required
21
static_assert
(
max_number_gpus
<= 1,
"CPPuddle currently does not support MultiGPU SYCL builds!"
);
22
}
// namespace device_selection
23
25
template <typename T, std::enable_if_t<std::is_trivial<T>::value,
int
> = 0>
26
using
recycle_allocator_sycl_host
=
27
detail::aggressive_recycle_allocator<T, detail::sycl_host_default_allocator<T>
>;
29
template <typename T, std::enable_if_t<std::is_trivial<T>::value,
int
> = 0>
30
using
recycle_allocator_sycl_device
=
31
detail::recycle_allocator<T, detail::sycl_device_default_allocator<T>
>;
32
33
}
// namespace memory_recycling
34
}
// end namespace cppuddle
35
#endif
buffer_management_interface.hpp
cppuddle
Definition
config.hpp:31
cppuddle::max_number_gpus
constexpr size_t max_number_gpus
Definition
config.hpp:52
cppuddle::memory_recycling::detail::aggressive_recycle_allocator
Recycles not only allocations but also the contents of a buffer.
Definition
buffer_management.hpp:840
cppuddle::memory_recycling::detail::recycle_allocator
Definition
buffer_management.hpp:770
sycl_underlying_allocators.hpp
Generated by
1.9.8