30 #ifndef HIPCUB_ROCPRIM_BLOCK_BLOCK_ADJACENT_DIFFERENCE_HPP_
31 #define HIPCUB_ROCPRIM_BLOCK_BLOCK_ADJACENT_DIFFERENCE_HPP_
33 #include "../../../config.hpp"
35 #include <rocprim/block/block_adjacent_difference.hpp>
37 BEGIN_HIPCUB_NAMESPACE
44 int ARCH = HIPCUB_ARCH
47 :
private ::rocprim::block_adjacent_difference<
55 BLOCK_DIM_X * BLOCK_DIM_Y * BLOCK_DIM_Z > 0,
56 "BLOCK_DIM_X * BLOCK_DIM_Y * BLOCK_DIM_Z must be greater than 0"
60 typename ::rocprim::block_adjacent_difference<
68 typename base_type::storage_type& temp_storage_;
71 using TempStorage =
typename base_type::storage_type;
83 template<
int ITEMS_PER_THREAD,
typename FlagT,
typename FlagOp>
84 [[deprecated(
"The Flags API of BlockAdjacentDifference is deprecated.")]]
86 void FlagHeads(FlagT (&head_flags)[ITEMS_PER_THREAD],
87 T (&input)[ITEMS_PER_THREAD],
90 HIPCUB_CLANG_SUPPRESS_WARNING_WITH_PUSH(
"-Wdeprecated")
91 base_type::flag_heads(head_flags, input, flag_op, temp_storage_);
92 HIPCUB_CLANG_SUPPRESS_WARNING_POP
95 template<
int ITEMS_PER_THREAD,
typename FlagT,
typename FlagOp>
96 [[deprecated(
"The Flags API of BlockAdjacentDifference is deprecated.")]]
98 void FlagHeads(FlagT (&head_flags)[ITEMS_PER_THREAD],
99 T (&input)[ITEMS_PER_THREAD],
101 T tile_predecessor_item)
103 HIPCUB_CLANG_SUPPRESS_WARNING_WITH_PUSH(
"-Wdeprecated")
104 base_type::flag_heads(head_flags, tile_predecessor_item, input, flag_op, temp_storage_);
105 HIPCUB_CLANG_SUPPRESS_WARNING_POP
108 template<
int ITEMS_PER_THREAD,
typename FlagT,
typename FlagOp>
109 [[deprecated(
"The Flags API of BlockAdjacentDifference is deprecated.")]]
111 void FlagTails(FlagT (&tail_flags)[ITEMS_PER_THREAD],
112 T (&input)[ITEMS_PER_THREAD],
115 HIPCUB_CLANG_SUPPRESS_WARNING_WITH_PUSH(
"-Wdeprecated")
116 base_type::flag_tails(tail_flags, input, flag_op, temp_storage_);
117 HIPCUB_CLANG_SUPPRESS_WARNING_POP
120 template<
int ITEMS_PER_THREAD,
typename FlagT,
typename FlagOp>
121 [[deprecated(
"The Flags API of BlockAdjacentDifference is deprecated.")]]
123 void FlagTails(FlagT (&tail_flags)[ITEMS_PER_THREAD],
124 T (&input)[ITEMS_PER_THREAD],
126 T tile_successor_item)
128 HIPCUB_CLANG_SUPPRESS_WARNING_WITH_PUSH(
"-Wdeprecated")
129 base_type::flag_tails(tail_flags, tile_successor_item, input, flag_op, temp_storage_);
130 HIPCUB_CLANG_SUPPRESS_WARNING_POP
133 template<
int ITEMS_PER_THREAD,
typename FlagT,
typename FlagOp>
134 [[deprecated(
"The Flags API of BlockAdjacentDifference is deprecated.")]]
136 void FlagHeadsAndTails(FlagT (&head_flags)[ITEMS_PER_THREAD],
137 FlagT (&tail_flags)[ITEMS_PER_THREAD],
138 T (&input)[ITEMS_PER_THREAD],
141 HIPCUB_CLANG_SUPPRESS_WARNING_WITH_PUSH(
"-Wdeprecated")
142 base_type::flag_heads_and_tails(
143 head_flags, tail_flags, input,
144 flag_op, temp_storage_
146 HIPCUB_CLANG_SUPPRESS_WARNING_POP
149 template<
int ITEMS_PER_THREAD,
typename FlagT,
typename FlagOp>
150 [[deprecated(
"The Flags API of BlockAdjacentDifference is deprecated.")]]
152 void FlagHeadsAndTails(FlagT (&head_flags)[ITEMS_PER_THREAD],
153 FlagT (&tail_flags)[ITEMS_PER_THREAD],
154 T tile_successor_item,
155 T (&input)[ITEMS_PER_THREAD],
158 HIPCUB_CLANG_SUPPRESS_WARNING_WITH_PUSH(
"-Wdeprecated")
159 base_type::flag_heads_and_tails(
160 head_flags, tail_flags, tile_successor_item, input,
161 flag_op, temp_storage_
163 HIPCUB_CLANG_SUPPRESS_WARNING_POP
166 template<
int ITEMS_PER_THREAD,
typename FlagT,
typename FlagOp>
167 [[deprecated(
"The Flags API of BlockAdjacentDifference is deprecated.")]]
169 void FlagHeadsAndTails(FlagT (&head_flags)[ITEMS_PER_THREAD],
170 T tile_predecessor_item,
171 FlagT (&tail_flags)[ITEMS_PER_THREAD],
172 T (&input)[ITEMS_PER_THREAD],
175 HIPCUB_CLANG_SUPPRESS_WARNING_WITH_PUSH(
"-Wdeprecated")
176 base_type::flag_heads_and_tails(
177 head_flags, tile_predecessor_item, tail_flags, input,
178 flag_op, temp_storage_
180 HIPCUB_CLANG_SUPPRESS_WARNING_POP
183 template<
int ITEMS_PER_THREAD,
typename FlagT,
typename FlagOp>
184 [[deprecated(
"The Flags API of BlockAdjacentDifference is deprecated.")]]
186 void FlagHeadsAndTails(FlagT (&head_flags)[ITEMS_PER_THREAD],
187 T tile_predecessor_item,
188 FlagT (&tail_flags)[ITEMS_PER_THREAD],
189 T tile_successor_item,
190 T (&input)[ITEMS_PER_THREAD],
193 HIPCUB_CLANG_SUPPRESS_WARNING_WITH_PUSH(
"-Wdeprecated")
194 base_type::flag_heads_and_tails(
195 head_flags, tile_predecessor_item, tail_flags, tile_successor_item, input,
196 flag_op, temp_storage_
198 HIPCUB_CLANG_SUPPRESS_WARNING_POP
201 template <
int ITEMS_PER_THREAD,
typename OutputType,
typename DifferenceOpT>
203 void SubtractLeft(T (&input)[ITEMS_PER_THREAD],
204 OutputType (&output)[ITEMS_PER_THREAD],
205 DifferenceOpT difference_op)
207 base_type::subtract_left(
208 input, output, difference_op, temp_storage_
212 template <
int ITEMS_PER_THREAD,
typename OutputT,
typename DifferenceOpT>
214 void SubtractLeft(T (&input)[ITEMS_PER_THREAD],
215 OutputT (&output)[ITEMS_PER_THREAD],
216 DifferenceOpT difference_op,
217 T tile_predecessor_item)
219 base_type::subtract_left(
220 input, output, difference_op, tile_predecessor_item, temp_storage_
224 template <
int ITEMS_PER_THREAD,
typename OutputType,
typename DifferenceOpT>
226 void SubtractLeftPartialTile(T (&input)[ITEMS_PER_THREAD],
227 OutputType (&output)[ITEMS_PER_THREAD],
228 DifferenceOpT difference_op,
231 base_type::subtract_left_partial(
232 input, output, difference_op, valid_items, temp_storage_
236 template<
int ITEMS_PER_THREAD,
typename OutputType,
typename DifferenceOpT>
237 HIPCUB_DEVICE
inline void SubtractLeftPartialTile(T (&input)[ITEMS_PER_THREAD],
238 OutputType (&output)[ITEMS_PER_THREAD],
239 DifferenceOpT difference_op,
241 T tile_predecessor_item)
243 base_type::subtract_left_partial(input,
246 tile_predecessor_item,
251 template <
int ITEMS_PER_THREAD,
typename OutputT,
typename DifferenceOpT>
253 void SubtractRight(T (&input)[ITEMS_PER_THREAD],
254 OutputT (&output)[ITEMS_PER_THREAD],
255 DifferenceOpT difference_op)
257 base_type::subtract_right(
258 input, output, difference_op, temp_storage_
262 template <
int ITEMS_PER_THREAD,
typename OutputT,
typename DifferenceOpT>
264 void SubtractRight(T (&input)[ITEMS_PER_THREAD],
265 OutputT (&output)[ITEMS_PER_THREAD],
266 DifferenceOpT difference_op,
267 T tile_successor_item)
269 base_type::subtract_right(
270 input, output, difference_op, tile_successor_item, temp_storage_
274 template <
int ITEMS_PER_THREAD,
typename OutputT,
typename DifferenceOpT>
276 void SubtractRightPartialTile(T (&input)[ITEMS_PER_THREAD],
277 OutputT (&output)[ITEMS_PER_THREAD],
278 DifferenceOpT difference_op,
281 base_type::subtract_right_partial(
282 input, output, difference_op, valid_items, temp_storage_
288 TempStorage& private_storage()
290 HIPCUB_SHARED_MEMORY TempStorage private_storage;
291 return private_storage;
Definition: block_adjacent_difference.hpp:53