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

Commit cdb0604

Browse files
committed
Eliminate copy_when's vestigal implementation.
Reported by Erich Elsen --HG-- branch : 1.4.0
1 parent df6b397 commit cdb0604

File tree

3 files changed

+1
-35
lines changed

3 files changed

+1
-35
lines changed

.LATEST_P4_CHANGELIST

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8815952
1+
9566133

thrust/copy.h

-2
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ template<typename InputIterator, typename Size, typename OutputIterator>
173173
* // result is now {-2, 0, 0, 2}
174174
* \endcode
175175
*
176-
* \see \c copy_when
177176
* \see \c remove_copy_if
178177
*/
179178
template<typename InputIterator,
@@ -234,7 +233,6 @@ template<typename InputIterator,
234233
* // result is now { 0, 1, 3, 5}
235234
* \endcode
236235
*
237-
* \see \c copy_when
238236
* \see \c remove_copy_if
239237
*/
240238
template<typename InputIterator1,

thrust/detail/copy.inl

-32
Original file line numberDiff line numberDiff line change
@@ -68,38 +68,6 @@ template<typename InputIterator,
6868
}
6969

7070

71-
///////////////
72-
// copy_when //
73-
///////////////
74-
75-
template<typename InputIterator,
76-
typename PredicateIterator,
77-
typename OutputIterator>
78-
OutputIterator copy_when(InputIterator first,
79-
InputIterator last,
80-
PredicateIterator stencil,
81-
OutputIterator result)
82-
{
83-
// default predicate is identity
84-
typedef typename thrust::iterator_traits<PredicateIterator>::value_type StencilType;
85-
return thrust::copy_when(first, last, stencil, result, thrust::identity<StencilType>());
86-
}
87-
88-
template<typename InputIterator,
89-
typename PredicateIterator,
90-
typename OutputIterator,
91-
typename Predicate>
92-
OutputIterator copy_when(InputIterator first,
93-
InputIterator last,
94-
PredicateIterator stencil,
95-
OutputIterator result,
96-
Predicate pred)
97-
{
98-
typedef typename thrust::iterator_traits<InputIterator>::value_type InputType;
99-
return thrust::transform_if(first, last, stencil, result, thrust::identity<InputType>(), pred);
100-
}
101-
102-
10371
/////////////
10472
// copy_if //
10573
/////////////

0 commit comments

Comments
 (0)