CUTLASS
CUDA Templates for Linear Algebra Subroutines and Solvers
Classes | Public Member Functions | Public Attributes | List of all members
cutlass::device_memory::allocation< T > Struct Template Reference

Device allocation abstraction that tracks size and capacity.

#include <device_memory.h>

Collaboration diagram for cutlass::device_memory::allocation< T >:
Collaboration graph
[legend]

Classes

struct  deleter
 Delete functor for CUDA device memory. More...
 

Public Member Functions

 allocation ()
 Constructor: allocates no memory. More...
 
 allocation (size_t _capacity)
 Constructor: allocates capacity elements on the current CUDA device. More...
 
 allocation (allocation const &p)
 Copy constructor. More...
 
 ~allocation ()
 Destructor. More...
 
T * get () const
 Returns a pointer to the managed object. More...
 
T * release ()
 Releases the ownership of the managed object (without deleting) and resets capacity to zero. More...
 
void reset ()
 Deletes the managed object and resets capacity to zero. More...
 
void reset (T *_ptr, size_t _capacity)
 Deletes managed object, if owned, and replaces its reference with a given pointer and capacity. More...
 
T * operator-> () const
 Returns a pointer to the object owned by *this. More...
 
deleterget_deleter ()
 Returns the deleter object which would be used for destruction of the managed object. More...
 
const deleterget_deleter () const
 Returns the deleter object which would be used for destruction of the managed object (const) More...
 
allocationoperator= (allocation const &p)
 Copies a device-side memory allocation. More...
 

Public Attributes

size_t capacity
 Number of elements of T allocated on the current CUDA device. More...
 
platform::unique_ptr< T, deletersmart_ptr
 Smart pointer. More...
 

Constructor & Destructor Documentation

template<typename T>
cutlass::device_memory::allocation< T >::allocation ( )
inline
template<typename T>
cutlass::device_memory::allocation< T >::allocation ( size_t  _capacity)
inline
template<typename T>
cutlass::device_memory::allocation< T >::allocation ( allocation< T > const &  p)
inline
template<typename T>
cutlass::device_memory::allocation< T >::~allocation ( )
inline

Member Function Documentation

template<typename T>
T* cutlass::device_memory::allocation< T >::get ( ) const
inline
template<typename T>
deleter& cutlass::device_memory::allocation< T >::get_deleter ( )
inline
template<typename T>
const deleter& cutlass::device_memory::allocation< T >::get_deleter ( ) const
inline
template<typename T>
T* cutlass::device_memory::allocation< T >::operator-> ( ) const
inline
template<typename T>
allocation& cutlass::device_memory::allocation< T >::operator= ( allocation< T > const &  p)
inline
template<typename T>
T* cutlass::device_memory::allocation< T >::release ( )
inline
template<typename T>
void cutlass::device_memory::allocation< T >::reset ( )
inline
template<typename T>
void cutlass::device_memory::allocation< T >::reset ( T *  _ptr,
size_t  _capacity 
)
inline

Member Data Documentation

template<typename T>
size_t cutlass::device_memory::allocation< T >::capacity
template<typename T>
platform::unique_ptr<T, deleter> cutlass::device_memory::allocation< T >::smart_ptr

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