Lift
Library of parallel computing primitives for GPUs and multi-core CPUs
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Public Types | Public Member Functions | Protected Attributes | List of all members
lift::persistent_allocation< system, T, _index_type, allocator > Struct Template Reference

#include <persistent_allocation.h>

Inheritance diagram for lift::persistent_allocation< system, T, _index_type, allocator >:
lift::allocation< system, T, _index_type > lift::pointer< system, T, _index_type > lift::tagged_pointer_base< system, T, _index_type >

Public Types

typedef allocation< system, T,
_index_type > 
base
 
typedef base::pointer_type pointer_type
 
typedef base::value_type value_type
 
typedef base::size_type size_type
 
typedef base::index_type index_type
 
typedef allocator allocator_type
 
- Public Types inherited from lift::allocation< system, T, _index_type >
typedef pointer< system, T,
_index_type > 
base
 
typedef tagged_pointer_base
< host, T, _index_type > 
base
 
typedef base::pointer_type pointer_type
 
typedef base::value_type value_type
 
typedef base::size_type size_type
 
typedef base::index_type index_type
 
typedef typename
default_memory_allocator
< system >::type 
allocator_type
 
- Public Types inherited from lift::pointer< system, T, _index_type >
typedef tagged_pointer_base
< host, T, _index_type > 
base
 
typedef base::reference_type reference_type
 
typedef base::const_reference_type const_reference_type
 
typedef base::value_type value_type
 
typedef base::index_type index_type
 
typedef base::size_type size_type
 
typedef base::iterator_type iterator_type
 
typedef base::const_iterator_type const_iterator_type
 
- Public Types inherited from lift::tagged_pointer_base< system, T, _index_type >
enum  { system_tag = system }
 
typedef T value_type
 
typedef const T const_value_type
 
typedef _index_type index_type
 
typedef index_type size_type
 
typedef index_type difference_type
 
typedef T & reference_type
 
typedef const T & const_reference_type
 
typedef T * pointer_type
 
typedef const T * const_pointer_type
 
typedef T * iterator_type
 
typedef const T * const_iterator_type
 
typedef
thrust_iterator_adaptor
< system, value_type,
iterator_type
thrust_iterator_type
 Thrust-compatible iterator types. More...
 
typedef
thrust_iterator_adaptor
< system, value_type,
const_iterator_type
thrust_const_iterator_type
 

Public Member Functions

LIFT_HOST_DEVICE persistent_allocation ()
 
 persistent_allocation (size_type count)
 
LIFT_HOST_DEVICE persistent_allocation (const persistent_allocation &other)
 
 persistent_allocation (const std::initializer_list< value_type > &l)
 
persistent_allocationoperator= (const std::initializer_list< value_type > &l)
 
virtual void resize (size_type count) override
 
void reserve (size_type count)
 
size_type capacity (void) const
 
void shrink_to_fit (void)
 
virtual void free (void) override
 
void push_back (const value_type &value)
 
void clear (void)
 
- Public Member Functions inherited from lift::allocation< system, T, _index_type >
LIFT_HOST_DEVICE allocation ()
 
 allocation (size_type count)
 
LIFT_HOST_DEVICE allocation (const allocation &other)
 
 allocation (const pointer< system, value_type, index_type > &other)
 
 allocation (const std::initializer_list< value_type > &l)
 
allocationoperator= (const pointer< system, value_type, index_type > &other)
 
allocationoperator= (const std::initializer_list< value_type > &l)
 
virtual void resize (size_type count)
 
void copy (const other_allocation &other)
 
- Public Member Functions inherited from lift::pointer< system, T, _index_type >
LIFT_HOST_DEVICE pointer range (const size_type offset, size_type len=size_type(-1)) const
 
LIFT_HOST_DEVICE pointer operator+ (off_t offset) const
 
LIFT_HOST_DEVICE pointer operator- (off_t offset) const
 
LIFT_HOST_DEVICE pointer truncate (size_t new_size)
 
value_type peek (index_type pos)
 
void poke (index_type pos, const value_type value)
 
- Public Member Functions inherited from lift::tagged_pointer_base< system, T, _index_type >
LIFT_HOST_DEVICE tagged_pointer_base ()
 The default constructor initializes the pointer to null. More...
 
LIFT_HOST_DEVICE tagged_pointer_base (T *storage, size_type storage_size)
 Construct a tagged pointer from a raw pointer. More...
 
template<target_system other_system, typename other_value_type >
LIFT_HOST_DEVICE tagged_pointer_base (tagged_pointer_base< other_system, other_value_type, index_type > &other)
 Copy constructor creates a copy of the pointer. More...
 
template<typename other_pointer >
LIFT_HOST_DEVICE tagged_pointer_base (other_pointer &other)
 
template<target_system other_system, typename other_value_type >
LIFT_HOST_DEVICE
tagged_pointer_base
operator= (tagged_pointer_base< other_system, other_value_type, index_type > &other)
 Copy constructor creates a copy of the pointer. More...
 
LIFT_HOST_DEVICE
const_reference_type 
at (size_type pos) const
 
LIFT_HOST_DEVICE reference_type at (size_type pos)
 
LIFT_HOST_DEVICE
const_reference_type 
operator[] (size_type pos) const
 
LIFT_HOST_DEVICE reference_type operator[] (size_type pos)
 
LIFT_HOST_DEVICE
const_reference_type 
front () const
 
LIFT_HOST_DEVICE reference_type front ()
 
LIFT_HOST_DEVICE
const_reference_type 
back () const
 
LIFT_HOST_DEVICE reference_type back ()
 
LIFT_HOST_DEVICE
const_iterator_type 
begin () const
 
LIFT_HOST_DEVICE iterator_type begin ()
 
LIFT_HOST_DEVICE
const_iterator_type 
end () const
 
LIFT_HOST_DEVICE iterator_type end ()
 
LIFT_HOST_DEVICE
const_iterator_type 
cbegin () const
 
LIFT_HOST_DEVICE
const_iterator_type 
cend () const
 
LIFT_HOST_DEVICE
thrust_const_iterator_type 
t_begin () const
 Returns a Thrust-compatible iterator pointing at the base address of the pointer. More...
 
LIFT_HOST_DEVICE
thrust_iterator_type 
t_begin ()
 Returns a Thrust-compatible iterator pointing at the base address of the pointer. More...
 
LIFT_HOST_DEVICE
thrust_const_iterator_type 
t_end () const
 Returns a Thrust-compatible iterator pointing at the end of the memory region covered by this pointer object. More...
 
LIFT_HOST_DEVICE
thrust_iterator_type 
t_end ()
 Returns a Thrust-compatible iterator pointing at the end of the memory region covered by this pointer object. More...
 
LIFT_HOST_DEVICE size_type size () const
 
LIFT_HOST_DEVICE bool empty () const
 
LIFT_HOST_DEVICE pointer_type data () const
 

Protected Attributes

size_type storage_capacity
 
- Protected Attributes inherited from lift::tagged_pointer_base< system, T, _index_type >
pointer_type storage
 
size_type storage_size
 

Additional Inherited Members

- Protected Member Functions inherited from lift::allocation< system, T, _index_type >
void device_memory_copy (void *dst, const void *src, size_t size)
 

Detailed Description

template<target_system system, typename T, typename _index_type = uint32, typename allocator = typename default_memory_allocator<system>::type>
struct lift::persistent_allocation< system, T, _index_type, allocator >

Definition at line 52 of file persistent_allocation.h.

Member Typedef Documentation

template<target_system system, typename T, typename _index_type = uint32, typename allocator = typename default_memory_allocator<system>::type>
typedef allocator lift::persistent_allocation< system, T, _index_type, allocator >::allocator_type

Definition at line 61 of file persistent_allocation.h.

template<target_system system, typename T, typename _index_type = uint32, typename allocator = typename default_memory_allocator<system>::type>
typedef allocation<system, T, _index_type> lift::persistent_allocation< system, T, _index_type, allocator >::base

Definition at line 54 of file persistent_allocation.h.

template<target_system system, typename T, typename _index_type = uint32, typename allocator = typename default_memory_allocator<system>::type>
typedef base::index_type lift::persistent_allocation< system, T, _index_type, allocator >::index_type

Definition at line 59 of file persistent_allocation.h.

template<target_system system, typename T, typename _index_type = uint32, typename allocator = typename default_memory_allocator<system>::type>
typedef base::pointer_type lift::persistent_allocation< system, T, _index_type, allocator >::pointer_type

Definition at line 56 of file persistent_allocation.h.

template<target_system system, typename T, typename _index_type = uint32, typename allocator = typename default_memory_allocator<system>::type>
typedef base::size_type lift::persistent_allocation< system, T, _index_type, allocator >::size_type

Definition at line 58 of file persistent_allocation.h.

template<target_system system, typename T, typename _index_type = uint32, typename allocator = typename default_memory_allocator<system>::type>
typedef base::value_type lift::persistent_allocation< system, T, _index_type, allocator >::value_type

Definition at line 57 of file persistent_allocation.h.

Constructor & Destructor Documentation

template<target_system system, typename T, typename _index_type = uint32, typename allocator = typename default_memory_allocator<system>::type>
LIFT_HOST_DEVICE lift::persistent_allocation< system, T, _index_type, allocator >::persistent_allocation ( )
inline

Definition at line 66 of file persistent_allocation.h.

template<target_system system, typename T, typename _index_type = uint32, typename allocator = typename default_memory_allocator<system>::type>
lift::persistent_allocation< system, T, _index_type, allocator >::persistent_allocation ( size_type  count)
inline

Definition at line 70 of file persistent_allocation.h.

template<target_system system, typename T, typename _index_type = uint32, typename allocator = typename default_memory_allocator<system>::type>
LIFT_HOST_DEVICE lift::persistent_allocation< system, T, _index_type, allocator >::persistent_allocation ( const persistent_allocation< system, T, _index_type, allocator > &  other)
inline

Definition at line 76 of file persistent_allocation.h.

template<target_system system, typename T, typename _index_type = uint32, typename allocator = typename default_memory_allocator<system>::type>
lift::persistent_allocation< system, T, _index_type, allocator >::persistent_allocation ( const std::initializer_list< value_type > &  l)
inline

Definition at line 81 of file persistent_allocation.h.

Member Function Documentation

template<target_system system, typename T, typename _index_type = uint32, typename allocator = typename default_memory_allocator<system>::type>
size_type lift::persistent_allocation< system, T, _index_type, allocator >::capacity ( void  ) const
inline

Definition at line 147 of file persistent_allocation.h.

template<target_system system, typename T, typename _index_type = uint32, typename allocator = typename default_memory_allocator<system>::type>
void lift::persistent_allocation< system, T, _index_type, allocator >::clear ( void  )
inline

Definition at line 197 of file persistent_allocation.h.

template<target_system system, typename T, typename _index_type = uint32, typename allocator = typename default_memory_allocator<system>::type>
virtual void lift::persistent_allocation< system, T, _index_type, allocator >::free ( void  )
inlineoverridevirtual

Reimplemented from lift::allocation< system, T, _index_type >.

Definition at line 174 of file persistent_allocation.h.

template<target_system system, typename T, typename _index_type = uint32, typename allocator = typename default_memory_allocator<system>::type>
persistent_allocation& lift::persistent_allocation< system, T, _index_type, allocator >::operator= ( const std::initializer_list< value_type > &  l)
inline

Definition at line 88 of file persistent_allocation.h.

template<target_system system, typename T, typename _index_type = uint32, typename allocator = typename default_memory_allocator<system>::type>
void lift::persistent_allocation< system, T, _index_type, allocator >::push_back ( const value_type value)
inline

Definition at line 186 of file persistent_allocation.h.

template<target_system system, typename T, typename _index_type = uint32, typename allocator = typename default_memory_allocator<system>::type>
void lift::persistent_allocation< system, T, _index_type, allocator >::reserve ( size_type  count)
inline

Definition at line 127 of file persistent_allocation.h.

template<target_system system, typename T, typename _index_type = uint32, typename allocator = typename default_memory_allocator<system>::type>
virtual void lift::persistent_allocation< system, T, _index_type, allocator >::resize ( size_type  count)
inlineoverridevirtual

Definition at line 101 of file persistent_allocation.h.

template<target_system system, typename T, typename _index_type = uint32, typename allocator = typename default_memory_allocator<system>::type>
void lift::persistent_allocation< system, T, _index_type, allocator >::shrink_to_fit ( void  )
inline

Definition at line 152 of file persistent_allocation.h.

Member Data Documentation

template<target_system system, typename T, typename _index_type = uint32, typename allocator = typename default_memory_allocator<system>::type>
size_type lift::persistent_allocation< system, T, _index_type, allocator >::storage_capacity
protected

Definition at line 203 of file persistent_allocation.h.


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