CPPuddle
aligned_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 ALIGNED_RECYCLING_ALLOCATORS_HPP
7 #define ALIGNED_RECYCLING_ALLOCATORS_HPP
8 
9 #include <boost/align/aligned_allocator.hpp>
11 
15 
16 namespace cppuddle {
17 namespace memory_recycling {
18 
19 namespace device_selection {
20 template <typename T, size_t alignement>
25  T, boost::alignment::aligned_allocator<T, alignement>> {
26  void operator()(const size_t device_id) {}
27 };
28 } // namespace device_selection
29 
31 template <typename T, std::size_t alignement,
32  std::enable_if_t<std::is_trivial<T>::value, int> = 0>
34  T, boost::alignment::aligned_allocator<T, alignement>>;
36 template <typename T, std::size_t alignement,
37  std::enable_if_t<std::is_trivial<T>::value, int> = 0>
39  T, boost::alignment::aligned_allocator<T, alignement>>;
40 
41 } // namespace memory_recycling
42 } // namespace cppuddle
43 
44 #endif
Definition: config.hpp:31
Recycles not only allocations but also the contents of a buffer.
Definition: buffer_management.hpp:840
Definition: buffer_management.hpp:770
Default device selector - No MultGPU support.
Definition: buffer_management.hpp:55