Home
librmm
libucxx
ucxx
nightly (26.12)
nightly (26.12)
stable (26.10)
legacy (26.08)
Toggle main menu visibility
Loading...
Searching...
No Matches
include
rmm
exec_policy.hpp
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3
* SPDX-License-Identifier: Apache-2.0
4
*/
5
10
11
#pragma once
12
13
#include <rmm/detail/export.hpp>
14
#include <rmm/detail/thrust_namespace.h>
15
#include <
rmm/mr/thrust_allocator_adaptor.hpp
>
16
#include <
rmm/resource_ref.hpp
>
17
18
#include <cuda/stream>
19
#include <thrust/system/cuda/execution_policy.h>
20
#include <thrust/version.h>
21
22
RMM_NAMESPACE_BEGIN
28
32
using
thrust_exec_policy_t
=
33
thrust::detail::execute_with_allocator<mr::thrust_allocator<char>,
34
thrust::cuda_cub::execute_on_stream_base>;
35
40
class
exec_policy
:
public
thrust_exec_policy_t
{
41
public
:
48
explicit
exec_policy
(
49
cuda::stream_ref stream,
50
cuda::mr::any_resource<cuda::mr::device_accessible>
mr
=
mr::get_current_device_resource_ref
());
51
};
52
56
using
thrust_exec_policy_nosync_t
=
57
thrust::detail::execute_with_allocator<mr::thrust_allocator<char>,
58
thrust::cuda_cub::execute_on_stream_nosync_base>;
59
66
class
exec_policy_nosync
:
public
thrust_exec_policy_nosync_t
{
67
public
:
74
explicit
exec_policy_nosync
(
75
cuda::stream_ref stream,
76
cuda::mr::any_resource<cuda::mr::device_accessible>
mr
=
mr::get_current_device_resource_ref
());
77
};
78
// end of group
80
RMM_NAMESPACE_END
rmm::exec_policy_nosync::exec_policy_nosync
exec_policy_nosync(cuda::stream_ref stream, cuda::mr::any_resource< cuda::mr::device_accessible > mr=mr::get_current_device_resource_ref())
Construct a new execution policy object.
rmm::exec_policy::exec_policy
exec_policy(cuda::stream_ref stream, cuda::mr::any_resource< cuda::mr::device_accessible > mr=mr::get_current_device_resource_ref())
Construct a new execution policy object.
rmm::mr::get_current_device_resource_ref
device_async_resource_ref get_current_device_resource_ref()
Get the device_async_resource_ref for the current device.
Definition
per_device_resource.hpp:187
rmm::thrust_exec_policy_t
thrust::detail::execute_with_allocator< mr::thrust_allocator< char >, thrust::cuda_cub::execute_on_stream_base > thrust_exec_policy_t
Synchronous execution policy for allocations using Thrust.
Definition
exec_policy.hpp:32
rmm::thrust_exec_policy_nosync_t
thrust::detail::execute_with_allocator< mr::thrust_allocator< char >, thrust::cuda_cub::execute_on_stream_nosync_base > thrust_exec_policy_nosync_t
Asynchronous execution policy for allocations using Thrust.
Definition
exec_policy.hpp:56
rmm::mr
Memory Resource classes and adaptors.
resource_ref.hpp
thrust_allocator_adaptor.hpp
Generated by
1.18.0