Embed< UpLengths, Coefficients, type > Struct Template Reference

Embed&lt; UpLengths, Coefficients, type &gt; Struct Template Reference#

Composable Kernel: ck::Embed< UpLengths, Coefficients, type > Struct Template Reference
ck::Embed< UpLengths, Coefficients, type > Struct Template Reference

#include <multi_index_transform.hpp>

Public Types

using LowerIndex = MultiIndex< 1 >
 
using UpperIndex = MultiIndex< NDimUp >
 

Public Member Functions

__host__ constexpr __device__ Embed ()=default
 
__host__ constexpr __device__ Embed (const UpLengths &up_lengths, const Coefficients &coefficients)
 
__host__ constexpr __device__ const auto & GetUpperLengths () const
 
template<typename LowIdx , typename UpIdx >
__host__ constexpr __device__ void CalculateLowerIndex (LowIdx &idx_low, const UpIdx &idx_up) const
 
template<typename LowIdxDiff , typename UpIdxDiff , typename LowIdx , typename UpIdx , index_t Hack>
__host__ __device__ void UpdateLowerIndex (LowIdxDiff &idx_diff_low, const UpIdxDiff &idx_diff_up, LowIdx &idx_low, const UpIdx &, Number< Hack >) const
 
__host__ __device__ void Print () const
 

Static Public Member Functions

__host__ static constexpr __device__ index_t GetNumOfLowerDimension ()
 
__host__ static constexpr __device__ index_t GetNumOfUpperDimension ()
 
__host__ static constexpr __device__ bool IsLinearTransform ()
 
__host__ static constexpr __device__ bool IsValidUpperIndexAlwaysMappedToValidLowerIndex ()
 
template<typename UpIdx >
__host__ static constexpr __device__ bool IsValidUpperIndexMappedToValidLowerIndex (const UpIdx &)
 
__host__ static constexpr __device__ bool IsKnownAtCompileTime ()
 

Public Attributes

UpLengths up_lengths_
 
Coefficients coefficients_
 

Static Public Attributes

static constexpr index_t NDimUp = UpLengths::Size()
 

Member Typedef Documentation

◆ LowerIndex

template<typename UpLengths , typename Coefficients , typename enable_if< UpLengths::Size()==Coefficients::Size(), bool >::type = false>
using ck::Embed< UpLengths, Coefficients, type >::LowerIndex = MultiIndex<1>

◆ UpperIndex

template<typename UpLengths , typename Coefficients , typename enable_if< UpLengths::Size()==Coefficients::Size(), bool >::type = false>
using ck::Embed< UpLengths, Coefficients, type >::UpperIndex = MultiIndex<NDimUp>

Constructor & Destructor Documentation

◆ Embed() [1/2]

template<typename UpLengths , typename Coefficients , typename enable_if< UpLengths::Size()==Coefficients::Size(), bool >::type = false>
__host__ constexpr __device__ ck::Embed< UpLengths, Coefficients, type >::Embed ( )
constexprdefault

◆ Embed() [2/2]

template<typename UpLengths , typename Coefficients , typename enable_if< UpLengths::Size()==Coefficients::Size(), bool >::type = false>
__host__ constexpr __device__ ck::Embed< UpLengths, Coefficients, type >::Embed ( const UpLengths &  up_lengths,
const Coefficients &  coefficients 
)
inlineconstexpr

Member Function Documentation

◆ CalculateLowerIndex()

template<typename UpLengths , typename Coefficients , typename enable_if< UpLengths::Size()==Coefficients::Size(), bool >::type = false>
template<typename LowIdx , typename UpIdx >
__host__ constexpr __device__ void ck::Embed< UpLengths, Coefficients, type >::CalculateLowerIndex ( LowIdx &  idx_low,
const UpIdx &  idx_up 
) const
inlineconstexpr

◆ GetNumOfLowerDimension()

template<typename UpLengths , typename Coefficients , typename enable_if< UpLengths::Size()==Coefficients::Size(), bool >::type = false>
__host__ static constexpr __device__ index_t ck::Embed< UpLengths, Coefficients, type >::GetNumOfLowerDimension ( )
inlinestaticconstexpr

◆ GetNumOfUpperDimension()

template<typename UpLengths , typename Coefficients , typename enable_if< UpLengths::Size()==Coefficients::Size(), bool >::type = false>
__host__ static constexpr __device__ index_t ck::Embed< UpLengths, Coefficients, type >::GetNumOfUpperDimension ( )
inlinestaticconstexpr

◆ GetUpperLengths()

template<typename UpLengths , typename Coefficients , typename enable_if< UpLengths::Size()==Coefficients::Size(), bool >::type = false>
__host__ constexpr __device__ const auto& ck::Embed< UpLengths, Coefficients, type >::GetUpperLengths ( ) const
inlineconstexpr

◆ IsKnownAtCompileTime()

template<typename UpLengths , typename Coefficients , typename enable_if< UpLengths::Size()==Coefficients::Size(), bool >::type = false>
__host__ static constexpr __device__ bool ck::Embed< UpLengths, Coefficients, type >::IsKnownAtCompileTime ( )
inlinestaticconstexpr

◆ IsLinearTransform()

template<typename UpLengths , typename Coefficients , typename enable_if< UpLengths::Size()==Coefficients::Size(), bool >::type = false>
__host__ static constexpr __device__ bool ck::Embed< UpLengths, Coefficients, type >::IsLinearTransform ( )
inlinestaticconstexpr

◆ IsValidUpperIndexAlwaysMappedToValidLowerIndex()

template<typename UpLengths , typename Coefficients , typename enable_if< UpLengths::Size()==Coefficients::Size(), bool >::type = false>
__host__ static constexpr __device__ bool ck::Embed< UpLengths, Coefficients, type >::IsValidUpperIndexAlwaysMappedToValidLowerIndex ( )
inlinestaticconstexpr

◆ IsValidUpperIndexMappedToValidLowerIndex()

template<typename UpLengths , typename Coefficients , typename enable_if< UpLengths::Size()==Coefficients::Size(), bool >::type = false>
template<typename UpIdx >
__host__ static constexpr __device__ bool ck::Embed< UpLengths, Coefficients, type >::IsValidUpperIndexMappedToValidLowerIndex ( const UpIdx &  )
inlinestaticconstexpr

◆ Print()

template<typename UpLengths , typename Coefficients , typename enable_if< UpLengths::Size()==Coefficients::Size(), bool >::type = false>
__host__ __device__ void ck::Embed< UpLengths, Coefficients, type >::Print ( ) const
inline

◆ UpdateLowerIndex()

template<typename UpLengths , typename Coefficients , typename enable_if< UpLengths::Size()==Coefficients::Size(), bool >::type = false>
template<typename LowIdxDiff , typename UpIdxDiff , typename LowIdx , typename UpIdx , index_t Hack>
__host__ __device__ void ck::Embed< UpLengths, Coefficients, type >::UpdateLowerIndex ( LowIdxDiff &  idx_diff_low,
const UpIdxDiff &  idx_diff_up,
LowIdx &  idx_low,
const UpIdx &  ,
Number< Hack >   
) const
inline

Member Data Documentation

◆ coefficients_

template<typename UpLengths , typename Coefficients , typename enable_if< UpLengths::Size()==Coefficients::Size(), bool >::type = false>
Coefficients ck::Embed< UpLengths, Coefficients, type >::coefficients_

◆ NDimUp

template<typename UpLengths , typename Coefficients , typename enable_if< UpLengths::Size()==Coefficients::Size(), bool >::type = false>
constexpr index_t ck::Embed< UpLengths, Coefficients, type >::NDimUp = UpLengths::Size()
staticconstexpr

◆ up_lengths_

template<typename UpLengths , typename Coefficients , typename enable_if< UpLengths::Size()==Coefficients::Size(), bool >::type = false>
UpLengths ck::Embed< UpLengths, Coefficients, type >::up_lengths_

The documentation for this struct was generated from the following file:
  • /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-composable-kernel/checkouts/docs-6.4.3/include/ck/tensor_description/multi_index_transform.hpp