|
Lift
Library of parallel computing primitives for GPUs and multi-core CPUs
|
Lift's tagged pointer class. More...
#include <pointer.h>
Additional Inherited Members | |
Protected Attributes inherited from lift::tagged_pointer_base< system, T, _index_type > | |
| pointer_type | storage |
| size_type | storage_size |
Lift's tagged pointer class.
The type of a pointer includes a system tag, which identifies each pointer based on the memory space it belongs to. When dereferencing the pointer, the type of the index is also selectable at compile-time. This is because GPU implementations can benefit from 32-bit indexing even in 64-bit mode, as certain index calculations can be slow.
Lift pointers are sized (meaning they track the amount of memory they point at), but no bounds-checking is performed. They implement C-style pointer semantics, allowing assignment from compatible pointer types as well as pointer arithmetic.
Note that despite the fact that pointers are tagged with the memory space they belong to, Lift does not directly handle cross-device dereferencing in the pointer dereference operator. Directly dereferencing a GPU pointer on the CPU (or vice-versa) yields undefined behavior. Lift pointers provide an explicit interface for cross-memory-space reads/writes (peek() / poke()).
| typedef tagged_pointer_base<host, T, _index_type> lift::pointer< system, T, _index_type >::base |
| typedef base::const_iterator_type lift::pointer< system, T, _index_type >::const_iterator_type |
| typedef base::const_reference_type lift::pointer< system, T, _index_type >::const_reference_type |
| typedef base::index_type lift::pointer< system, T, _index_type >::index_type |
| typedef base::iterator_type lift::pointer< system, T, _index_type >::iterator_type |
| typedef base::reference_type lift::pointer< system, T, _index_type >::reference_type |
| typedef base::size_type lift::pointer< system, T, _index_type >::size_type |
| typedef base::value_type lift::pointer< system, T, _index_type >::value_type |
| LIFT_HOST_DEVICE pointer lift::pointer< system, T, _index_type >::operator+ | ( | off_t | offset | ) | const |
| LIFT_HOST_DEVICE pointer lift::pointer< system, T, _index_type >::operator- | ( | off_t | offset | ) | const |
| value_type lift::pointer< system, T, _index_type >::peek | ( | index_type | pos | ) |
| void lift::pointer< system, T, _index_type >::poke | ( | index_type | pos, |
| const value_type | value | ||
| ) |
| LIFT_HOST_DEVICE pointer lift::pointer< system, T, _index_type >::range | ( | const size_type | offset, |
| size_type | len = size_type(-1) |
||
| ) | const |
| LIFT_HOST_DEVICE pointer lift::pointer< system, T, _index_type >::truncate | ( | size_t | new_size | ) |
1.8.6