thrust::system::cpp::pointer#
-
template<typename T>
using thrust::system::cpp::pointer = thrust::pointer<T, thrust::system::cpp::tag, thrust::tagged_reference<T, thrust::system::cpp::tag>># cpp::pointerstores a pointer to an object allocated in memory accessible by thecppsystem. This type provides type safety when dispatching algorithms on ranges resident incppmemory.cpp::pointerhas pointer semantics: it may be dereferenced and manipulated with pointer arithmetic.cpp::pointercan be created with the functioncpp::malloc, or by explicitly calling its constructor with a raw pointer.The raw pointer encapsulated by a
cpp::pointermay be obtained by either itsgetmember function or theraw_pointer_castfunction.See also
cpp::malloc
See also
cpp::free
See also
Note
cpp::pointeris not a “smart” pointer; it is the programmer’s responsibility to deallocate memory pointed to bycpp::pointer.- Template Parameters:
T – specifies the type of the pointee.