Skip to content

Commit 03701a9

Browse files
Link to universal_[host_pinned_][allocator|vector] in the docs
Also expose `thrust::universal_host_pinned_allocator` Fixes: NVIDIA#4106
1 parent 12390d6 commit 03701a9

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

docs/thrust/api_docs/containers.rst

+2
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ Containers
99

1010
${repo_docs_api_path}/*host__vector*
1111
${repo_docs_api_path}/*device__vector*
12+
${repo_docs_api_path}/*universal_vector*
13+
${repo_docs_api_path}/*universal_host_pinned_vector*

docs/thrust/api_docs/memory_management/allocators.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ Allocators
66
- :cpp:class:`thrust::device_allocator <thrust::device_allocator>`
77
- :cpp:class:`thrust::device_malloc_allocator <thrust::device_malloc_allocator>`
88
- :cpp:class:`thrust::device_new_allocator <thrust::device_new_allocator>`
9+
- :cpp:class:`thrust::universal_allocator <thrust::universal_allocator>`
10+
- :cpp:class:`thrust::universal_host_pinned_allocator <thrust::universal_host_pinned_allocator>`
911
- :cpp:class:`thrust::mr::allocator <thrust::mr::allocator>`
1012
- :cpp:class:`thrust::mr::stateless_resource_allocator <thrust::mr::stateless_resource_allocator>`
11-
- :cpp:class:`thrust::mr::stateless_resource_allocator <thrust::mr::stateless_resource_allocator>`
1213

1314
.. toctree::
1415
:glob:

thrust/thrust/universal_allocator.h

+7
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ THRUST_NAMESPACE_BEGIN
5050
*/
5151
using thrust::system::__THRUST_DEVICE_SYSTEM_NAMESPACE::universal_allocator;
5252

53+
/*! \brief An allocator which creates new elements in memory accessible by both hosts and devices. Uses pinned memory
54+
* when the system supports it.
55+
*
56+
* \see https://en.cppreference.com/w/cpp/named_req/Allocator
57+
*/
58+
using thrust::system::__THRUST_DEVICE_SYSTEM_NAMESPACE::universal_host_pinned_allocator;
59+
5360
/*! \p universal_ptr stores a pointer to an object allocated in memory accessible
5461
* to both hosts and devices.
5562
*

0 commit comments

Comments
 (0)