CPPuddle
Loading...
Searching...
No Matches
cppuddle::memory_recycling Namespace Reference

CPPuddle namespace containing the memory recycling functionality. More...

Namespaces

namespace  device_selection
namespace  detail

Classes

struct  cuda_device_buffer
 RAII wrapper for CUDA device memory (ideally used with a recycling allocator). More...
struct  cuda_aggregated_device_buffer
 RAII wrapper for CUDA device memory using a passed aggregated allocator (which ideally should be an allocator_slice from the work aggregation). More...
struct  hip_device_buffer
struct  hip_aggregated_device_buffer
struct  view_deleter
class  aggregated_recycling_view
class  recycling_view

Typedefs

template<typename T, std::size_t alignement, std::enable_if_t< std::is_trivial< T >::value, int > = 0>
using recycle_aligned
 Recycling allocator for boost aligned memory.
template<typename T, std::size_t alignement, std::enable_if_t< std::is_trivial< T >::value, int > = 0>
using aggressive_recycle_aligned
 Recycling allocator for boost aligned memory (reusing previous content as well).
template<typename T, std::enable_if_t< std::is_trivial< T >::value, int > = 0>
using recycle_allocator_cuda_host
 Recycling allocator for CUDA pinned host memory.
template<typename T, std::enable_if_t< std::is_trivial< T >::value, int > = 0>
using recycle_allocator_cuda_device
 Recycling allocator for CUDA device memory.
template<typename T, std::enable_if_t< std::is_trivial< T >::value, int > = 0>
using recycle_allocator_cuda_managed
template<typename T, std::enable_if_t< std::is_trivial< T >::value, int > = 0>
using recycle_allocator_hip_host
 Recycling allocator for HIP pinned host memory.
template<typename T, std::enable_if_t< std::is_trivial< T >::value, int > = 0>
using recycle_allocator_hip_device
 Recycling allocator for HIP device memory.
template<typename T, std::enable_if_t< std::is_trivial< T >::value, int > = 0>
using recycle_std = detail::recycle_allocator<T, std::allocator<T>>
 Recycling allocator for std memory.
template<typename T, std::enable_if_t< std::is_trivial< T >::value, int > = 0>
using aggressive_recycle_std
 Recycling allocator for boost aligned memory (reusing previous content as well).
template<typename T, std::enable_if_t< std::is_trivial< T >::value, int > = 0>
using recycle_allocator_sycl_host
 Recycling allocator for SYCL pinned host memory (default device).
template<typename T, std::enable_if_t< std::is_trivial< T >::value, int > = 0>
using recycle_allocator_sycl_device
 Recycling allocator for SYCL device memory (default device).

Functions

void print_buffer_counters ()
 Print performance counters of all buffer managers to stdout.
void force_buffer_cleanup ()
void unused_buffer_cleanup ()
 Deletes all buffers currently marked as unused.
void finalize ()

Detailed Description

CPPuddle namespace containing the memory recycling functionality.

Typedef Documentation

◆ aggressive_recycle_aligned

template<typename T, std::size_t alignement, std::enable_if_t< std::is_trivial< T >::value, int > = 0>
using cppuddle::memory_recycling::aggressive_recycle_aligned
Initial value:
T, boost::alignment::aligned_allocator<T, alignement>>
Recycles not only allocations but also the contents of a buffer.
Definition buffer_management.hpp:865

Recycling allocator for boost aligned memory (reusing previous content as well).

◆ aggressive_recycle_std

template<typename T, std::enable_if_t< std::is_trivial< T >::value, int > = 0>
using cppuddle::memory_recycling::aggressive_recycle_std
Initial value:

Recycling allocator for boost aligned memory (reusing previous content as well).

◆ recycle_aligned

template<typename T, std::size_t alignement, std::enable_if_t< std::is_trivial< T >::value, int > = 0>
using cppuddle::memory_recycling::recycle_aligned
Initial value:
T, boost::alignment::aligned_allocator<T, alignement>>
Definition buffer_management.hpp:795

Recycling allocator for boost aligned memory.

◆ recycle_allocator_cuda_device

template<typename T, std::enable_if_t< std::is_trivial< T >::value, int > = 0>
using cppuddle::memory_recycling::recycle_allocator_cuda_device
Initial value:

Recycling allocator for CUDA device memory.

◆ recycle_allocator_cuda_host

template<typename T, std::enable_if_t< std::is_trivial< T >::value, int > = 0>
using cppuddle::memory_recycling::recycle_allocator_cuda_host
Initial value:

Recycling allocator for CUDA pinned host memory.

◆ recycle_allocator_cuda_managed

template<typename T, std::enable_if_t< std::is_trivial< T >::value, int > = 0>
using cppuddle::memory_recycling::recycle_allocator_cuda_managed

◆ recycle_allocator_hip_device

template<typename T, std::enable_if_t< std::is_trivial< T >::value, int > = 0>
using cppuddle::memory_recycling::recycle_allocator_hip_device
Initial value:

Recycling allocator for HIP device memory.

◆ recycle_allocator_hip_host

template<typename T, std::enable_if_t< std::is_trivial< T >::value, int > = 0>
using cppuddle::memory_recycling::recycle_allocator_hip_host
Initial value:

Recycling allocator for HIP pinned host memory.

◆ recycle_allocator_sycl_device

template<typename T, std::enable_if_t< std::is_trivial< T >::value, int > = 0>
using cppuddle::memory_recycling::recycle_allocator_sycl_device
Initial value:

Recycling allocator for SYCL device memory (default device).

◆ recycle_allocator_sycl_host

template<typename T, std::enable_if_t< std::is_trivial< T >::value, int > = 0>
using cppuddle::memory_recycling::recycle_allocator_sycl_host
Initial value:

Recycling allocator for SYCL pinned host memory (default device).

◆ recycle_std

template<typename T, std::enable_if_t< std::is_trivial< T >::value, int > = 0>
using cppuddle::memory_recycling::recycle_std = detail::recycle_allocator<T, std::allocator<T>>

Recycling allocator for std memory.

Function Documentation

◆ finalize()

void cppuddle::memory_recycling::finalize ( )
inline

Deletes all buffers (even ones still marked as used), delete the buffer managers and the recycler itself. Disallows further usage.

◆ force_buffer_cleanup()

void cppuddle::memory_recycling::force_buffer_cleanup ( )
inline

Deletes all buffers (even ones still marked as used), delete the buffer managers and the recycler itself

◆ print_buffer_counters()

void cppuddle::memory_recycling::print_buffer_counters ( )
inline

Print performance counters of all buffer managers to stdout.

◆ unused_buffer_cleanup()

void cppuddle::memory_recycling::unused_buffer_cleanup ( )
inline

Deletes all buffers currently marked as unused.