thrust::system::cpp::universal_pointer
Defined in thrust/system/cpp/pointer.h
-
template<typename T>
using thrust::system::cpp::universal_pointer = thrust::pointer<T, thrust::system::cpp::tag, typename std::add_lvalue_reference<T>::type> cpp::universal_pointer
stores a pointer to an object allocated in memory accessible by thecpp
system and host systems.cpp::universal_pointer
has pointer semantics: it may be dereferenced and manipulated with pointer arithmetic.cpp::universal_pointer
can be created withcpp::universal_allocator
or by explicitly calling its constructor with a raw pointer.The raw pointer encapsulated by a
cpp::universal_pointer
may be obtained by eiter itsget
member function or theraw_pointer_cast
function.See also
cpp::universal_allocator
See also
raw_pointer_cast
Note
cpp::universal_pointer
is not a “smart” pointer; it is the programmer’s responsibility to deallocate memory pointed to bycpp::universal_pointer
.- Template Parameters
T – specifies the type of the pointee.