Struct DevicePartition

Struct Documentation

struct hipcub::DevicePartition

Public Static Functions

template<typename InputIteratorT, typename FlagIterator, typename OutputIteratorT, typename NumSelectedIteratorT>
__host__ __forceinline__ static inline hipError_t Flagged(void *d_temp_storage, size_t &temp_storage_bytes, InputIteratorT d_in, FlagIterator d_flags, OutputIteratorT d_out, NumSelectedIteratorT d_num_selected_out, int num_items, hipStream_t stream = 0, bool debug_synchronous = false)
Parameters
  • d_temp_storage – Device-accessible allocation of temporary storage. When NULL, the required allocation size is written to temp_storage_bytes and no work is done.

  • temp_storage_bytes – Reference to size in bytes of d_temp_storage allocation

  • d_in – Pointer to the input sequence of data items

  • d_flags – Pointer to the input sequence of selection flags

  • d_out – Pointer to the output sequence of partitioned data items

  • d_num_selected_out – Pointer to the output total number of items selected (i.e., the offset of the unselected partition)

  • num_items – Total number of items to select from

  • stream[optional] hip stream to launch kernels within. Default is stream0.

  • debug_synchronous[optional] Whether or not to synchronize the stream after every kernel launch to check for errors. May cause significant slowdown. Default is false.

template<typename InputIteratorT, typename OutputIteratorT, typename NumSelectedIteratorT, typename SelectOp>
__host__ __forceinline__ static inline hipError_t If(void *d_temp_storage, size_t &temp_storage_bytes, InputIteratorT d_in, OutputIteratorT d_out, NumSelectedIteratorT d_num_selected_out, int num_items, SelectOp select_op, hipStream_t stream = 0, bool debug_synchronous = false)
Parameters
  • d_temp_storage – Device-accessible allocation of temporary storage. When NULL, the required allocation size is written to temp_storage_bytes and no work is done.

  • temp_storage_bytes – Reference to size in bytes of d_temp_storage allocation

  • d_in – Pointer to the input sequence of data items

  • d_out – Pointer to the output sequence of partitioned data items

  • d_num_selected_out – Pointer to the output total number of items selected (i.e., the offset of the unselected partition)

  • num_items – Total number of items to select from

  • select_op – Unary selection operator

  • stream[optional] hip stream to launch kernels within. Default is stream0.

  • debug_synchronous[optional] Whether or not to synchronize the stream after every kernel launch to check for errors. May cause significant slowdown. Default is false.

template<typename InputIteratorT, typename FirstOutputIteratorT, typename SecondOutputIteratorT, typename UnselectedOutputIteratorT, typename NumSelectedIteratorT, typename SelectFirstPartOp, typename SelectSecondPartOp>
__host__ __forceinline__ static inline hipError_t If(void *d_temp_storage, std::size_t &temp_storage_bytes, InputIteratorT d_in, FirstOutputIteratorT d_first_part_out, SecondOutputIteratorT d_second_part_out, UnselectedOutputIteratorT d_unselected_out, NumSelectedIteratorT d_num_selected_out, int num_items, SelectFirstPartOp select_first_part_op, SelectSecondPartOp select_second_part_op, hipStream_t stream = 0, bool debug_synchronous = false)
template<typename InputIteratorT, typename FlagIterator, typename OutputIteratorT, typename NumSelectedIteratorT>
__host__ __forceinline__ static inline hipError_t Flagged(void *d_temp_storage, size_t &temp_storage_bytes, InputIteratorT d_in, FlagIterator d_flags, OutputIteratorT d_out, NumSelectedIteratorT d_num_selected_out, int num_items, hipStream_t stream = 0, bool debug_synchronous = false)
Parameters
  • d_temp_storage – Device-accessible allocation of temporary storage. When NULL, the required allocation size is written to temp_storage_bytes and no work is done.

  • temp_storage_bytes – Reference to size in bytes of d_temp_storage allocation

  • d_in – Pointer to the input sequence of data items

  • d_flags – Pointer to the input sequence of selection flags

  • d_out – Pointer to the output sequence of partitioned data items

  • d_num_selected_out – Pointer to the output total number of items selected (i.e., the offset of the unselected partition)

  • num_items – Total number of items to select from

  • stream[optional] hip stream to launch kernels within. Default is stream0.

  • debug_synchronous[optional] Whether or not to synchronize the stream after every kernel launch to check for errors. May cause significant slowdown. Default is false.

template<typename InputIteratorT, typename OutputIteratorT, typename NumSelectedIteratorT, typename SelectOp>
__host__ __forceinline__ static inline hipError_t If(void *d_temp_storage, size_t &temp_storage_bytes, InputIteratorT d_in, OutputIteratorT d_out, NumSelectedIteratorT d_num_selected_out, int num_items, SelectOp select_op, hipStream_t stream = 0, bool debug_synchronous = false)
Parameters
  • d_temp_storage – Device-accessible allocation of temporary storage. When NULL, the required allocation size is written to temp_storage_bytes and no work is done.

  • temp_storage_bytes – Reference to size in bytes of d_temp_storage allocation

  • d_in – Pointer to the input sequence of data items

  • d_out – Pointer to the output sequence of partitioned data items

  • d_num_selected_out – Pointer to the output total number of items selected (i.e., the offset of the unselected partition)

  • num_items – Total number of items to select from

  • select_op – Unary selection operator

  • stream[optional] hip stream to launch kernels within. Default is stream0.

  • debug_synchronous[optional] Whether or not to synchronize the stream after every kernel launch to check for errors. May cause significant slowdown. Default is false.

template<typename InputIteratorT, typename FirstOutputIteratorT, typename SecondOutputIteratorT, typename UnselectedOutputIteratorT, typename NumSelectedIteratorT, typename SelectFirstPartOp, typename SelectSecondPartOp>
__host__ __forceinline__ static inline hipError_t If(void *d_temp_storage, std::size_t &temp_storage_bytes, InputIteratorT d_in, FirstOutputIteratorT d_first_part_out, SecondOutputIteratorT d_second_part_out, UnselectedOutputIteratorT d_unselected_out, NumSelectedIteratorT d_num_selected_out, int num_items, SelectFirstPartOp select_first_part_op, SelectSecondPartOp select_second_part_op, hipStream_t stream = 0, bool debug_synchronous = false)