@@ -63,18 +63,12 @@ inline L divide_ri(const L x, const R y)
63
63
template <typename InputIterator, typename BinaryFunction, typename SFINAE = void >
64
64
struct partial_sum_type
65
65
{
66
- using type = typename thrust::iterator_value<InputIterator>::type;
67
- };
68
-
69
- template <typename InputIterator, typename BinaryFunction>
70
- struct partial_sum_type <InputIterator, BinaryFunction, ::cuda::std::void_t <typename BinaryFunction::result_type>>
71
- {
72
- using type = typename BinaryFunction::result_type;
66
+ using type = thrust::iterator_value_t <InputIterator>;
73
67
};
74
68
75
69
template <typename InputIterator1, typename InputIterator2, typename BinaryPredicate, typename BinaryFunction>
76
70
thrust::pair<InputIterator1,
77
- thrust::pair<typename thrust::iterator_value <InputIterator1>::type ,
71
+ thrust::pair<thrust::iterator_value_t <InputIterator1>,
78
72
typename partial_sum_type<InputIterator2, BinaryFunction>::type>>
79
73
reduce_last_segment_backward (
80
74
InputIterator1 keys_first,
@@ -90,7 +84,7 @@ reduce_last_segment_backward(
90
84
thrust::reverse_iterator<InputIterator1> keys_last_r (keys_first);
91
85
thrust::reverse_iterator<InputIterator2> values_first_r (values_first + n);
92
86
93
- typename thrust::iterator_value <InputIterator1>::type result_key = *keys_first_r;
87
+ thrust::iterator_value_t <InputIterator1> result_key = *keys_first_r;
94
88
typename partial_sum_type<InputIterator2, BinaryFunction>::type result_value = *values_first_r;
95
89
96
90
// consume the entirety of the first key's sequence
@@ -111,7 +105,7 @@ template <typename InputIterator1,
111
105
typename BinaryFunction>
112
106
thrust::tuple<OutputIterator1,
113
107
OutputIterator2,
114
- typename thrust::iterator_value <InputIterator1>::type ,
108
+ thrust::iterator_value_t <InputIterator1>,
115
109
typename partial_sum_type<InputIterator2, BinaryFunction>::type>
116
110
reduce_by_key_with_carry (
117
111
InputIterator1 keys_first,
@@ -124,8 +118,7 @@ reduce_by_key_with_carry(
124
118
{
125
119
// first, consume the last sequence to produce the carry
126
120
// XXX is there an elegant way to pose this such that we don't need to default construct carry?
127
- thrust::pair<typename thrust::iterator_value<InputIterator1>::type,
128
- typename partial_sum_type<InputIterator2, BinaryFunction>::type>
121
+ thrust::pair<thrust::iterator_value_t <InputIterator1>, typename partial_sum_type<InputIterator2, BinaryFunction>::type>
129
122
carry;
130
123
131
124
thrust::tie (keys_last, carry) =
@@ -215,7 +208,7 @@ struct serial_reduce_by_key_body
215
208
Iterator6 my_carry_result = carry_result + interval_idx;
216
209
217
210
// consume the rest of the interval with reduce_by_key
218
- using key_type = typename thrust::iterator_value <Iterator1>::type ;
211
+ using key_type = thrust::iterator_value_t <Iterator1>;
219
212
using value_type = typename partial_sum_type<Iterator2, BinaryFunction>::type;
220
213
221
214
// XXX is there a way to pose this so that we don't require default construction of carry?
0 commit comments