30 #ifndef HIPCUB_ROCPRIM_WARP_WARP_EXCHANGE_HPP_
31 #define HIPCUB_ROCPRIM_WARP_WARP_EXCHANGE_HPP_
33 #include "../../../config.hpp"
34 #include "../util_type.hpp"
36 #include <rocprim/warp/warp_exchange.hpp>
38 BEGIN_HIPCUB_NAMESPACE
43 int LOGICAL_WARP_THREADS = HIPCUB_DEVICE_WARP_THREADS,
44 int ARCH = HIPCUB_ARCH
48 using base_type =
typename rocprim::warp_exchange<InputT, ITEMS_PER_THREAD, LOGICAL_WARP_THREADS>;
51 using TempStorage =
typename base_type::storage_type;
54 TempStorage &temp_storage;
59 explicit HIPCUB_DEVICE __forceinline__
61 temp_storage(temp_storage)
65 template <
typename OutputT>
66 HIPCUB_DEVICE __forceinline__
67 void BlockedToStriped(
68 const InputT (&input_items)[ITEMS_PER_THREAD],
69 OutputT (&output_items)[ITEMS_PER_THREAD])
71 base_type rocprim_warp_exchange;
72 rocprim_warp_exchange.blocked_to_striped(input_items, output_items, temp_storage);
75 template <
typename OutputT>
76 HIPCUB_DEVICE __forceinline__
77 void StripedToBlocked(
78 const InputT (&input_items)[ITEMS_PER_THREAD],
79 OutputT (&output_items)[ITEMS_PER_THREAD])
81 base_type rocprim_warp_exchange;
82 rocprim_warp_exchange.striped_to_blocked(input_items, output_items, temp_storage);
85 template <
typename OffsetT>
86 HIPCUB_DEVICE __forceinline__
87 void ScatterToStriped(
88 InputT (&items)[ITEMS_PER_THREAD],
89 OffsetT (&ranks)[ITEMS_PER_THREAD])
91 ScatterToStriped(items, items, ranks);
94 template <
typename OutputT,
96 HIPCUB_DEVICE __forceinline__
97 void ScatterToStriped(
98 const InputT (&input_items)[ITEMS_PER_THREAD],
99 OutputT (&output_items)[ITEMS_PER_THREAD],
100 OffsetT (&ranks)[ITEMS_PER_THREAD])
102 base_type rocprim_warp_exchange;
103 rocprim_warp_exchange.scatter_to_striped(input_items, output_items, ranks, temp_storage);
Definition: warp_exchange.hpp:47