BlackCat_Tensors
A GPU-supported autograd and linear algebra library, designed for neural network construction
Classes | Public Types | Public Member Functions | List of all members
bc::allocators::Recycle_Allocator< T, SystemTag, AlternateAllocator > Struct Template Reference

#include <recycle_allocator.h>

Classes

struct  rebind
 

Public Types

using system_tag = SystemTag
 
using value_type = T
 
using pointer = value_type *
 
using const_pointer = const value_type *
 
using size_type = bc::size_t
 
using propagate_on_container_copy_assignment = std::false_type
 
using propagate_on_container_move_assignment = std::false_type
 
using propagate_on_container_swap = std::false_type
 
using is_always_equal = std::true_type
 

Public Member Functions

 Recycle_Allocator ()=default
 
 Recycle_Allocator (const Recycle_Allocator &)=default
 
 Recycle_Allocator (Recycle_Allocator &&)=default
 
Recycle_Allocatoroperator= (const Recycle_Allocator &)=default
 
Recycle_Allocatoroperator= (Recycle_Allocator &&)=default
 
template<class U >
 Recycle_Allocator (const Recycle_Allocator< U, SystemTag, AlternateAllocator > &other)
 
T * allocate (bc::size_t size)
 
void deallocate (T *ptr, bc::size_t size)
 
void clear_cache ()
 
template<class U >
constexpr bool operator== (const Recycle_Allocator< U, SystemTag, AlternateAllocator > &) const
 
template<class U >
constexpr bool operator!= (const Recycle_Allocator< U, SystemTag, AlternateAllocator > &) const
 

Member Typedef Documentation

◆ const_pointer

template<class T, class SystemTag, class AlternateAllocator = Allocator<Byte, SystemTag>>
using bc::allocators::Recycle_Allocator< T, SystemTag, AlternateAllocator >::const_pointer = const value_type*

◆ is_always_equal

template<class T, class SystemTag, class AlternateAllocator = Allocator<Byte, SystemTag>>
using bc::allocators::Recycle_Allocator< T, SystemTag, AlternateAllocator >::is_always_equal = std::true_type

◆ pointer

template<class T, class SystemTag, class AlternateAllocator = Allocator<Byte, SystemTag>>
using bc::allocators::Recycle_Allocator< T, SystemTag, AlternateAllocator >::pointer = value_type*

◆ propagate_on_container_copy_assignment

template<class T, class SystemTag, class AlternateAllocator = Allocator<Byte, SystemTag>>
using bc::allocators::Recycle_Allocator< T, SystemTag, AlternateAllocator >::propagate_on_container_copy_assignment = std::false_type

◆ propagate_on_container_move_assignment

template<class T, class SystemTag, class AlternateAllocator = Allocator<Byte, SystemTag>>
using bc::allocators::Recycle_Allocator< T, SystemTag, AlternateAllocator >::propagate_on_container_move_assignment = std::false_type

◆ propagate_on_container_swap

template<class T, class SystemTag, class AlternateAllocator = Allocator<Byte, SystemTag>>
using bc::allocators::Recycle_Allocator< T, SystemTag, AlternateAllocator >::propagate_on_container_swap = std::false_type

◆ size_type

template<class T, class SystemTag, class AlternateAllocator = Allocator<Byte, SystemTag>>
using bc::allocators::Recycle_Allocator< T, SystemTag, AlternateAllocator >::size_type = bc::size_t

◆ system_tag

template<class T, class SystemTag, class AlternateAllocator = Allocator<Byte, SystemTag>>
using bc::allocators::Recycle_Allocator< T, SystemTag, AlternateAllocator >::system_tag = SystemTag

◆ value_type

template<class T, class SystemTag, class AlternateAllocator = Allocator<Byte, SystemTag>>
using bc::allocators::Recycle_Allocator< T, SystemTag, AlternateAllocator >::value_type = T

Constructor & Destructor Documentation

◆ Recycle_Allocator() [1/4]

template<class T, class SystemTag, class AlternateAllocator = Allocator<Byte, SystemTag>>
bc::allocators::Recycle_Allocator< T, SystemTag, AlternateAllocator >::Recycle_Allocator ( )
default

◆ Recycle_Allocator() [2/4]

template<class T, class SystemTag, class AlternateAllocator = Allocator<Byte, SystemTag>>
bc::allocators::Recycle_Allocator< T, SystemTag, AlternateAllocator >::Recycle_Allocator ( const Recycle_Allocator< T, SystemTag, AlternateAllocator > &  )
default

◆ Recycle_Allocator() [3/4]

template<class T, class SystemTag, class AlternateAllocator = Allocator<Byte, SystemTag>>
bc::allocators::Recycle_Allocator< T, SystemTag, AlternateAllocator >::Recycle_Allocator ( Recycle_Allocator< T, SystemTag, AlternateAllocator > &&  )
default

◆ Recycle_Allocator() [4/4]

template<class T, class SystemTag, class AlternateAllocator = Allocator<Byte, SystemTag>>
template<class U >
bc::allocators::Recycle_Allocator< T, SystemTag, AlternateAllocator >::Recycle_Allocator ( const Recycle_Allocator< U, SystemTag, AlternateAllocator > &  other)
inline

Member Function Documentation

◆ allocate()

template<class T, class SystemTag, class AlternateAllocator = Allocator<Byte, SystemTag>>
T* bc::allocators::Recycle_Allocator< T, SystemTag, AlternateAllocator >::allocate ( bc::size_t  size)
inline

◆ clear_cache()

template<class T, class SystemTag, class AlternateAllocator = Allocator<Byte, SystemTag>>
void bc::allocators::Recycle_Allocator< T, SystemTag, AlternateAllocator >::clear_cache ( )
inline

◆ deallocate()

template<class T, class SystemTag, class AlternateAllocator = Allocator<Byte, SystemTag>>
void bc::allocators::Recycle_Allocator< T, SystemTag, AlternateAllocator >::deallocate ( T *  ptr,
bc::size_t  size 
)
inline

◆ operator!=()

template<class T, class SystemTag, class AlternateAllocator = Allocator<Byte, SystemTag>>
template<class U >
constexpr bool bc::allocators::Recycle_Allocator< T, SystemTag, AlternateAllocator >::operator!= ( const Recycle_Allocator< U, SystemTag, AlternateAllocator > &  ) const
inline

◆ operator=() [1/2]

template<class T, class SystemTag, class AlternateAllocator = Allocator<Byte, SystemTag>>
Recycle_Allocator& bc::allocators::Recycle_Allocator< T, SystemTag, AlternateAllocator >::operator= ( const Recycle_Allocator< T, SystemTag, AlternateAllocator > &  )
default

◆ operator=() [2/2]

template<class T, class SystemTag, class AlternateAllocator = Allocator<Byte, SystemTag>>
Recycle_Allocator& bc::allocators::Recycle_Allocator< T, SystemTag, AlternateAllocator >::operator= ( Recycle_Allocator< T, SystemTag, AlternateAllocator > &&  )
default

◆ operator==()

template<class T, class SystemTag, class AlternateAllocator = Allocator<Byte, SystemTag>>
template<class U >
constexpr bool bc::allocators::Recycle_Allocator< T, SystemTag, AlternateAllocator >::operator== ( const Recycle_Allocator< U, SystemTag, AlternateAllocator > &  ) const
inline

The documentation for this struct was generated from the following file: