CPPuddle
std_recycling_allocators.hpp
Go to the documentation of this file.
1 // Copyright (c) 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 STD_RECYCLING_ALLOCATORS_HPP
7 #define STD_RECYCLING_ALLOCATORS_HPP
8 
10 
14 
15 namespace cppuddle {
16 namespace memory_recycling {
17 
18 namespace device_selection {
22 template <typename T> struct select_device_functor<T, std::allocator<T>> {
23  void operator()(const size_t device_id) {}
24 };
25 } // namespace device_selection
26 
27 
29 template <typename T, std::enable_if_t<std::is_trivial<T>::value, int> = 0>
32 template <typename T, std::enable_if_t<std::is_trivial<T>::value, int> = 0>
35 
36 } // namespace memory_recycling
37 } // namespace cppuddle
38 
39 #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
void operator()(const size_t device_id)
Definition: std_recycling_allocators.hpp:23
Default device selector - No MultGPU support.
Definition: buffer_management.hpp:55