thrust::system::cpp::universal_pointer#
-
template<typename T>
using thrust::system::cpp::universal_pointer = thrust::pointer<T, cpp::tag, ::cuda::std::add_lvalue_reference_t<T>># cpp::universal_pointerstores a pointer to an object allocated in memory accessible by thecppsystem and host systems.cpp::universal_pointerhas pointer semantics: it may be dereferenced and manipulated with pointer arithmetic.cpp::universal_pointercan be created withcpp::universal_allocatoror by explicitly calling its constructor with a raw pointer.The raw pointer encapsulated by a
cpp::universal_pointermay be obtained by either itsgetmember function or theraw_pointer_castfunction.See also
cpp::universal_allocator
See also
Note
cpp::universal_pointeris 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.