Cabana 0.8.0-dev
 
Loading...
Searching...
No Matches
Cabana::BinningData< MemorySpace > Class Template Reference

Data describing the bin sizes and offsets resulting from a binning operation. More...

#include <Cabana_Sort.hpp>

Public Types

using memory_space = typename MemorySpace::memory_space
 Memory space.
 
using execution_space = typename memory_space::execution_space
 Default execution space.
 
using size_type = typename memory_space::size_type
 Memory space size type.
 
using CountView = Kokkos::View<const int*, memory_space>
 Binning view type.
 
using OffsetView = Kokkos::View<size_type*, memory_space>
 Offset view type.
 

Public Member Functions

 BinningData ()
 Default constructor.
 
 BinningData (const std::size_t begin, const std::size_t end, CountView counts, OffsetView offsets, OffsetView permute_vector)
 Constructor initializing from Kokkos BinSort data.
 
KOKKOS_INLINE_FUNCTION int numBin () const
 Get the number of bins.
 
KOKKOS_INLINE_FUNCTION int binSize (const size_type bin_id) const
 Given a bin get the number of tuples it contains.
 
KOKKOS_INLINE_FUNCTION size_type binOffset (const size_type bin_id) const
 Given a bin get the tuple index at which it sorts.
 
KOKKOS_INLINE_FUNCTION size_type permutation (const size_type tuple_id) const
 Given a local tuple id in the binned layout, get the id of the tuple in the old (unbinned) layout.
 
KOKKOS_INLINE_FUNCTION std::size_t rangeBegin () const
 The beginning tuple index in the binning.
 
KOKKOS_INLINE_FUNCTION std::size_t rangeEnd () const
 The ending tuple index in the binning.
 

Detailed Description

template<class MemorySpace>
class Cabana::BinningData< MemorySpace >

Data describing the bin sizes and offsets resulting from a binning operation.

Constructor & Destructor Documentation

◆ BinningData()

template<class MemorySpace>
Cabana::BinningData< MemorySpace >::BinningData ( const std::size_t begin,
const std::size_t end,
CountView counts,
OffsetView offsets,
OffsetView permute_vector )
inline

Constructor initializing from Kokkos BinSort data.

Parameters
beginThe beginning index of the range to sort.
endThe end index of the range to sort.
countsBinning counts.
offsetsBinning offsets.
permute_vectorPermutation vector.

Member Function Documentation

◆ binOffset()

template<class MemorySpace>
KOKKOS_INLINE_FUNCTION size_type Cabana::BinningData< MemorySpace >::binOffset ( const size_type bin_id) const
inline

Given a bin get the tuple index at which it sorts.

Parameters
bin_idThe bin id.
Returns
The starting tuple index of the bin.

◆ binSize()

template<class MemorySpace>
KOKKOS_INLINE_FUNCTION int Cabana::BinningData< MemorySpace >::binSize ( const size_type bin_id) const
inline

Given a bin get the number of tuples it contains.

Parameters
bin_idThe bin id.
Returns
The number of tuples in the bin.

◆ numBin()

template<class MemorySpace>
KOKKOS_INLINE_FUNCTION int Cabana::BinningData< MemorySpace >::numBin ( ) const
inline

Get the number of bins.

Returns
The number of bins.

The documentation for this class was generated from the following file: