Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

copy_if doesn't require copy assignment operator for OutputIterator #1756

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion thrust/system/cuda/detail/cdp_dispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

// seq_impl unused.
#define THRUST_CDP_DISPATCH(par_impl, seq_impl) \
NV_IF_TARGET(NV_ANY_TARGET, par_impl)
NV_IF_TARGET(NV_ANY_TARGET, par_impl, par_impl)

#else // THRUST_RDC_ENABLED

Expand Down
10 changes: 4 additions & 6 deletions thrust/system/cuda/detail/copy_if.h
Original file line number Diff line number Diff line change
Expand Up @@ -786,19 +786,18 @@ copy_if(execution_policy<Derived> &policy,
OutputIterator result,
Predicate pred)
{
THRUST_CDP_DISPATCH((result = __copy_if::copy_if(policy,
THRUST_CDP_DISPATCH((return __copy_if::copy_if(policy,
first,
last,
__copy_if::no_stencil_tag(),
result,
pred);),
(result =
(return
thrust::copy_if(cvt_to_seq(derived_cast(policy)),
first,
last,
result,
pred);));
return result;
} // func copy_if

__thrust_exec_check_disable__
Expand All @@ -816,14 +815,13 @@ copy_if(execution_policy<Derived> &policy,
Predicate pred)
{
THRUST_CDP_DISPATCH(
(result = __copy_if::copy_if(policy, first, last, stencil, result, pred);),
(result = thrust::copy_if(cvt_to_seq(derived_cast(policy)),
(return __copy_if::copy_if(policy, first, last, stencil, result, pred);),
(return thrust::copy_if(cvt_to_seq(derived_cast(policy)),
first,
last,
stencil,
result,
pred);));
return result;
} // func copy_if

} // namespace cuda_cub
Expand Down