merge_v2_magic_division< LowLengths > Struct Template Reference

merge_v2_magic_division&lt; LowLengths &gt; Struct Template Reference#

Composable Kernel: ck_tile::merge_v2_magic_division< LowLengths > Struct Template Reference
ck_tile::merge_v2_magic_division< LowLengths > Struct Template Reference

#include <coordinate_transform.hpp>

Inheritance diagram for ck_tile::merge_v2_magic_division< LowLengths >:
ck_tile::base_transform< LowLengths::size(), 1 >

Public Types

using LowerIndex = multi_index<NDimLow>
using UpperIndex = multi_index<1>
using UpLengths
using LowLengthsMagicDivisor

Public Member Functions

CK_TILE_HOST_DEVICE constexpr merge_v2_magic_division ()=default
CK_TILE_HOST_DEVICE constexpr merge_v2_magic_division (const LowLengths &low_lengths)
CK_TILE_HOST_DEVICE constexpr const auto & get_upper_lengths () const
template<typename LowIdx, typename UpIdx>
CK_TILE_HOST_DEVICE constexpr void calculate_lower_index (LowIdx &idx_low, const UpIdx &idx_up) const
template<typename LowIdxDiff, typename UpIdxDiff, typename LowIdx, typename UpIdx>
CK_TILE_HOST_DEVICE void update_lower_index (LowIdxDiff &idx_diff_low, const UpIdxDiff &, LowIdx &idx_low, const UpIdx &idx_up_new) const

Static Public Member Functions

static CK_TILE_HOST_DEVICE constexpr auto get_type_enum ()
static CK_TILE_HOST_DEVICE constexpr bool is_valid_upper_index_always_mapped_to_valid_lower_index ()
static CK_TILE_HOST_DEVICE constexpr bool is_known_at_compile_time ()
template<typename UpIdx>
static CK_TILE_HOST_DEVICE constexpr bool is_valid_upper_index_mapped_to_valid_lower_index (const UpIdx &)
template<typename LowVectorLengths, typename LowVectorStrides>
static CK_TILE_HOST_DEVICE constexpr auto calculate_upper_dimension_safe_vector_length_strides (const LowVectorLengths &low_vector_lengths, const LowVectorStrides &low_vector_strides)
Static Public Member Functions inherited from ck_tile::base_transform< LowLengths::size(), 1 >
static CK_TILE_HOST_DEVICE constexpr auto get_type_enum ()
static CK_TILE_HOST_DEVICE constexpr index_t get_num_of_lower_dimension ()
static CK_TILE_HOST_DEVICE constexpr index_t get_num_of_upper_dimension ()
static CK_TILE_HOST_DEVICE constexpr auto calculate_upper_dimension_safe_vector_length_strides (const LowVectorLengths &, const LowVectorStrides &)

Public Attributes

LowLengths low_lengths_
LowLengthsMagicDivisor low_lengths_magic_divisor_
UpLengths up_lengths_

Static Public Attributes

static constexpr index_t NDimLow = LowLengths::size()
static constexpr auto I0 = number<0>{}
static constexpr auto I1 = number<1>{}

Member Typedef Documentation

◆ LowerIndex

template<typename LowLengths>
using ck_tile::merge_v2_magic_division< LowLengths >::LowerIndex = multi_index<NDimLow>

◆ LowLengthsMagicDivisor

template<typename LowLengths>
using ck_tile::merge_v2_magic_division< LowLengths >::LowLengthsMagicDivisor
Initial value:
decltype(generate_tuple(
constant< v > number
Definition tile/core/numeric/integral_constant.hpp:37
CK_TILE_HOST_DEVICE constexpr auto generate_tuple(F &&f, number< N >)
Definition tile/core/container/tuple.hpp:429

◆ UpLengths

template<typename LowLengths>
using ck_tile::merge_v2_magic_division< LowLengths >::UpLengths
Initial value:
decltype(make_tuple(container_reduce(LowLengths{}, multiplies{}, number<1>{})))
CK_TILE_HOST_DEVICE constexpr auto container_reduce(const Container &x, Reduce reduce, Init init, number< IBegin >=number< 0 >{}, number< IEnd >=number< Container::size()>{}, number< IStep >=number< 1 >{})
Definition tile/core/container/container_helper.hpp:198
CK_TILE_HOST_DEVICE constexpr auto make_tuple(Xs &&... xs)
Definition tile/core/container/tuple.hpp:360
Definition tile/core/numeric/math.hpp:98

◆ UpperIndex

template<typename LowLengths>
using ck_tile::merge_v2_magic_division< LowLengths >::UpperIndex = multi_index<1>

Constructor & Destructor Documentation

◆ merge_v2_magic_division() [1/2]

template<typename LowLengths>
CK_TILE_HOST_DEVICE constexpr ck_tile::merge_v2_magic_division< LowLengths >::merge_v2_magic_division ( )
constexprdefault

◆ merge_v2_magic_division() [2/2]

template<typename LowLengths>
CK_TILE_HOST_DEVICE constexpr ck_tile::merge_v2_magic_division< LowLengths >::merge_v2_magic_division ( const LowLengths & low_lengths)
inlineconstexpr

Member Function Documentation

◆ calculate_lower_index()

template<typename LowLengths>
template<typename LowIdx, typename UpIdx>
CK_TILE_HOST_DEVICE constexpr void ck_tile::merge_v2_magic_division< LowLengths >::calculate_lower_index ( LowIdx & idx_low,
const UpIdx & idx_up ) const
inlineconstexpr

◆ calculate_upper_dimension_safe_vector_length_strides()

template<typename LowLengths>
template<typename LowVectorLengths, typename LowVectorStrides>
CK_TILE_HOST_DEVICE constexpr auto ck_tile::merge_v2_magic_division< LowLengths >::calculate_upper_dimension_safe_vector_length_strides ( const LowVectorLengths & low_vector_lengths,
const LowVectorStrides & low_vector_strides )
inlinestaticconstexpr

◆ get_type_enum()

template<typename LowLengths>
CK_TILE_HOST_DEVICE constexpr auto ck_tile::merge_v2_magic_division< LowLengths >::get_type_enum ( )
inlinestaticconstexpr

◆ get_upper_lengths()

template<typename LowLengths>
CK_TILE_HOST_DEVICE constexpr const auto & ck_tile::merge_v2_magic_division< LowLengths >::get_upper_lengths ( ) const
inlineconstexpr

◆ is_known_at_compile_time()

template<typename LowLengths>
CK_TILE_HOST_DEVICE constexpr bool ck_tile::merge_v2_magic_division< LowLengths >::is_known_at_compile_time ( )
inlinestaticconstexpr

◆ is_valid_upper_index_always_mapped_to_valid_lower_index()

template<typename LowLengths>
CK_TILE_HOST_DEVICE constexpr bool ck_tile::merge_v2_magic_division< LowLengths >::is_valid_upper_index_always_mapped_to_valid_lower_index ( )
inlinestaticconstexpr

◆ is_valid_upper_index_mapped_to_valid_lower_index()

template<typename LowLengths>
template<typename UpIdx>
CK_TILE_HOST_DEVICE constexpr bool ck_tile::merge_v2_magic_division< LowLengths >::is_valid_upper_index_mapped_to_valid_lower_index ( const UpIdx & )
inlinestaticconstexpr

◆ update_lower_index()

template<typename LowLengths>
template<typename LowIdxDiff, typename UpIdxDiff, typename LowIdx, typename UpIdx>
CK_TILE_HOST_DEVICE void ck_tile::merge_v2_magic_division< LowLengths >::update_lower_index ( LowIdxDiff & idx_diff_low,
const UpIdxDiff & ,
LowIdx & idx_low,
const UpIdx & idx_up_new ) const
inline

Member Data Documentation

◆ I0

template<typename LowLengths>
auto ck_tile::merge_v2_magic_division< LowLengths >::I0 = number<0>{}
staticconstexpr

◆ I1

template<typename LowLengths>
auto ck_tile::merge_v2_magic_division< LowLengths >::I1 = number<1>{}
staticconstexpr

◆ low_lengths_

template<typename LowLengths>
LowLengths ck_tile::merge_v2_magic_division< LowLengths >::low_lengths_

◆ low_lengths_magic_divisor_

template<typename LowLengths>
LowLengthsMagicDivisor ck_tile::merge_v2_magic_division< LowLengths >::low_lengths_magic_divisor_

◆ NDimLow

template<typename LowLengths>
index_t ck_tile::merge_v2_magic_division< LowLengths >::NDimLow = LowLengths::size()
staticconstexpr

◆ up_lengths_

template<typename LowLengths>
UpLengths ck_tile::merge_v2_magic_division< LowLengths >::up_lengths_

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