CPPuddle
Loading...
Searching...
No Matches
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
16namespace cppuddle {
18
20template <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
31template <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>>;
36template <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 aligned_recycling_allocators.hpp:19
CPPuddle namespace containing the memory recycling functionality.
Definition aligned_recycling_allocators.hpp:17
detail::recycle_allocator< T, boost::alignment::aligned_allocator< T, alignement > > recycle_aligned
Recycling allocator for boost aligned memory.
Definition aligned_recycling_allocators.hpp:33
detail::aggressive_recycle_allocator< T, boost::alignment::aligned_allocator< T, alignement > > aggressive_recycle_aligned
Recycling allocator for boost aligned memory (reusing previous content as well).
Definition aligned_recycling_allocators.hpp:38
Definition config.hpp:31
Recycles not only allocations but also the contents of a buffer.
Definition buffer_management.hpp:865
Definition buffer_management.hpp:795
Default device selector - No MultGPU support.
Definition buffer_management.hpp:69