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

#include <polymorphic_allocator.h>

Public Types

using system_tag = SystemTag
 
using value_type = ValueType
 

Public Member Functions

template<class Allocator >
 Polymorphic_Allocator (const Allocator &alloc)
 
 Polymorphic_Allocator ()
 
 Polymorphic_Allocator (const Polymorphic_Allocator &pa)
 
Polymorphic_Allocatoroperator= (const Polymorphic_Allocator &other)
 
Polymorphic_Allocatoroperator= (Polymorphic_Allocator &&other)
 
value_typeallocate (std::size_t sz)
 
void deallocate (value_type *data, std::size_t sz)
 
template<class Allocator >
void set_allocator (const Allocator &alloc)
 
template<class AltT >
bool operator== (const Polymorphic_Allocator< AltT, system_tag > &other)
 
template<class AltT >
bool operator!= (const Polymorphic_Allocator< AltT, system_tag > &other)
 

Member Typedef Documentation

◆ system_tag

template<class ValueType, class SystemTag>
using bc::allocators::Polymorphic_Allocator< ValueType, SystemTag >::system_tag = SystemTag

◆ value_type

template<class ValueType, class SystemTag>
using bc::allocators::Polymorphic_Allocator< ValueType, SystemTag >::value_type = ValueType

Constructor & Destructor Documentation

◆ Polymorphic_Allocator() [1/3]

template<class ValueType, class SystemTag>
template<class Allocator >
bc::allocators::Polymorphic_Allocator< ValueType, SystemTag >::Polymorphic_Allocator ( const Allocator alloc)
inline

◆ Polymorphic_Allocator() [2/3]

template<class ValueType, class SystemTag>
bc::allocators::Polymorphic_Allocator< ValueType, SystemTag >::Polymorphic_Allocator ( )
inline

◆ Polymorphic_Allocator() [3/3]

template<class ValueType, class SystemTag>
bc::allocators::Polymorphic_Allocator< ValueType, SystemTag >::Polymorphic_Allocator ( const Polymorphic_Allocator< ValueType, SystemTag > &  pa)
inline

Member Function Documentation

◆ allocate()

template<class ValueType, class SystemTag>
value_type* bc::allocators::Polymorphic_Allocator< ValueType, SystemTag >::allocate ( std::size_t  sz)
inline

◆ deallocate()

template<class ValueType, class SystemTag>
void bc::allocators::Polymorphic_Allocator< ValueType, SystemTag >::deallocate ( value_type data,
std::size_t  sz 
)
inline

◆ operator!=()

template<class ValueType, class SystemTag>
template<class AltT >
bool bc::allocators::Polymorphic_Allocator< ValueType, SystemTag >::operator!= ( const Polymorphic_Allocator< AltT, system_tag > &  other)
inline

◆ operator=() [1/2]

template<class ValueType, class SystemTag>
Polymorphic_Allocator& bc::allocators::Polymorphic_Allocator< ValueType, SystemTag >::operator= ( const Polymorphic_Allocator< ValueType, SystemTag > &  other)
inline

◆ operator=() [2/2]

template<class ValueType, class SystemTag>
Polymorphic_Allocator& bc::allocators::Polymorphic_Allocator< ValueType, SystemTag >::operator= ( Polymorphic_Allocator< ValueType, SystemTag > &&  other)
inline

◆ operator==()

template<class ValueType, class SystemTag>
template<class AltT >
bool bc::allocators::Polymorphic_Allocator< ValueType, SystemTag >::operator== ( const Polymorphic_Allocator< AltT, system_tag > &  other)
inline

◆ set_allocator()

template<class ValueType, class SystemTag>
template<class Allocator >
void bc::allocators::Polymorphic_Allocator< ValueType, SystemTag >::set_allocator ( const Allocator alloc)
inline

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