Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal > Struct Template Reference

GeneralVectorTensor is a template class that provides Tensor -vector contraction operation, which is a special case of Tensor Tensor contraction. More...

#include <TensorContractionSycl.h>

Public Types

typedef Eigen::TensorSycl::internal::Vectorise< OutScalar, Eigen::SyclDevice, Vectorizable >::PacketReturnType PacketReturnType
 
typedef cl::sycl::accessor< OutScalar, 1, cl::sycl::access::mode::read_write, cl::sycl::access::target::local > Scratch
 
typedef BlockProperties< is_lhs_vec ? false :true, is_lhs_vec ? false :true, Vectorizable, PacketReturnTypeVecBlockProperties
 

Public Member Functions

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE GeneralVectorTensor (Scratch scratch_, const VectorMapper vec_, const TensorMapper mat_, OutAccessor out_res_, const StorageIndex nonContractGroupSize_, const StorageIndex nonContractDim_, const StorageIndex contractDim_)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void operator() (cl::sycl::nd_item< 1 > itemID)
 

Static Public Member Functions

template<bool is_internal_block, typename OutPtr >
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void compute_panel (const cl::sycl::nd_item< 1 > &itemID, const VectorMapper &vec, const TensorMapper &mat, OutScalar *local_output, OutPtr out_ptr, const StorageIndex nonContractGroupOffset, const StorageIndex linearLocalThreadId, StorageIndex contractDim, StorageIndex nonContractDim, StorageIndex contractId, StorageIndex nonContractId, StorageIndex globalContractDimOffset, StorageIndex globalNonContractDimOffset, StorageIndex outScratchIndex)
 
template<typename InputBlockProperties , bool is_internal_block, int CFactor, int GroupSize, typename Input , typename Local >
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void extract_block (const Input &inpt, Local *local_ptr, const StorageIndex &linearLocalThreadId, const StorageIndex &cOffset, const StorageIndex &C)
 

Public Attributes

const StorageIndex contractDim
 
const TensorMapper mat
 
const StorageIndex nonContractDim
 
const StorageIndex nonContractGroupSize
 
OutAccessor out_res
 
Scratch scratch
 
const VectorMapper vec
 

Static Public Attributes

static EIGEN_CONSTEXPR StorageIndex OutScratchOffset
 
static EIGEN_CONSTEXPR int PacketSize
 

Detailed Description

template<typename OutScalar, typename OutAccessor, typename VectorMapper, typename TensorMapper, typename StorageIndex, typename Properties, StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
struct Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >

GeneralVectorTensor is a template class that provides Tensor -vector contraction operation, which is a special case of Tensor Tensor contraction.

Template Parameters
OutScalardetermines the output scalar type
OutAccessordetermines the sycl accessor type for out put (please see the sycl-1.2.1 specification (https://www.khronos.org/registry/SYCL/specs/sycl-1.2.1.pdf) for accessor definition)
VectorMapperdetermines the tensor contraction mapper for the vector input (can be lhs or rhs)
TensorMapperdetermines the tensor contraction mapper for the tensor input (can be lhs or rhs)
StorageIndexdetermines the StorageIndex Type
Propertiesdetermines the Contraction Panel properties
KFactordetermines the number of elements in K dimension in a Tile
Vectorizabledetermines whether or not the vectorization is enabled for the Eigen expression.
is_lhs_vecdetermines whether lhs is a vector or rhs is a vector
IsFinaldetermine if this is the final kernel. If so, the result will be written in a final output. Otherwise, the result of contraction will be written iin a temporary buffer.
Parameters
scratchdetermines the local memory containing the vector block for each work-group
vecdetermines the vector input (tensor mapper)
matdetermines the tensor input (tensor mapper)
out_resdetermines the output vector containing the contraction result
nonContractGroupSizea logical number determining the number of work-group for non-contracting dimension
nonContractDimdetermines the size of non contracting dimension for the flattened tensor
contractDimdetermines the size of non contracting dimension for the flattened tensor

Definition at line 1001 of file TensorContractionSycl.h.

Member Typedef Documentation

◆ PacketReturnType

template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
typedef Eigen::TensorSycl::internal::Vectorise<OutScalar, Eigen::SyclDevice, Vectorizable>::PacketReturnType Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::PacketReturnType

Definition at line 1003 of file TensorContractionSycl.h.

◆ Scratch

template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
typedef cl::sycl::accessor<OutScalar, 1, cl::sycl::access::mode::read_write, cl::sycl::access::target::local> Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::Scratch

Definition at line 1006 of file TensorContractionSycl.h.

◆ VecBlockProperties

template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
typedef BlockProperties<is_lhs_vec ? false : true, is_lhs_vec ? false : true, Vectorizable, PacketReturnType> Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::VecBlockProperties

Definition at line 1014 of file TensorContractionSycl.h.

Constructor & Destructor Documentation

◆ GeneralVectorTensor()

template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::GeneralVectorTensor ( Scratch  scratch_,
const VectorMapper  vec_,
const TensorMapper  mat_,
OutAccessor  out_res_,
const StorageIndex  nonContractGroupSize_,
const StorageIndex  nonContractDim_,
const StorageIndex  contractDim_ 
)
inline

Definition at line 1024 of file TensorContractionSycl.h.

Member Function Documentation

◆ compute_panel()

template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
template<bool is_internal_block, typename OutPtr >
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::compute_panel ( const cl::sycl::nd_item< 1 > &  itemID,
const VectorMapper &  vec,
const TensorMapper &  mat,
OutScalar *  local_output,
OutPtr  out_ptr,
const StorageIndex  nonContractGroupOffset,
const StorageIndex  linearLocalThreadId,
StorageIndex  contractDim,
StorageIndex  nonContractDim,
StorageIndex  contractId,
StorageIndex  nonContractId,
StorageIndex  globalContractDimOffset,
StorageIndex  globalNonContractDimOffset,
StorageIndex  outScratchIndex 
)
inlinestatic

Definition at line 1074 of file TensorContractionSycl.h.

◆ extract_block()

template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
template<typename InputBlockProperties , bool is_internal_block, int CFactor, int GroupSize, typename Input , typename Local >
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::extract_block ( const Input &  inpt,
Local *  local_ptr,
const StorageIndex &  linearLocalThreadId,
const StorageIndex &  cOffset,
const StorageIndex &  C 
)
inlinestatic

Definition at line 1177 of file TensorContractionSycl.h.

◆ operator()()

template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::operator() ( cl::sycl::nd_item< 1 >  itemID)
inline

Definition at line 1037 of file TensorContractionSycl.h.

Member Data Documentation

◆ contractDim

template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
const StorageIndex Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::contractDim

Definition at line 1022 of file TensorContractionSycl.h.

◆ mat

template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
const TensorMapper Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::mat

Definition at line 1018 of file TensorContractionSycl.h.

◆ nonContractDim

template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
const StorageIndex Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::nonContractDim

Definition at line 1021 of file TensorContractionSycl.h.

◆ nonContractGroupSize

template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
const StorageIndex Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::nonContractGroupSize

Definition at line 1020 of file TensorContractionSycl.h.

◆ out_res

template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
OutAccessor Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::out_res

Definition at line 1019 of file TensorContractionSycl.h.

◆ OutScratchOffset

template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
EIGEN_CONSTEXPR StorageIndex Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::OutScratchOffset
static
Initial value:
=
KFactor * Properties::LocalThreadSizeC * Properties::LocalThreadSizeNC

Definition at line 1008 of file TensorContractionSycl.h.

◆ PacketSize

template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
EIGEN_CONSTEXPR int Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::PacketSize
static
Initial value:
=
Eigen::TensorSycl::internal::Vectorise<OutScalar, Eigen::SyclDevice, Vectorizable>::PacketSize

Definition at line 1004 of file TensorContractionSycl.h.

◆ scratch

template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
Scratch Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::scratch

Definition at line 1016 of file TensorContractionSycl.h.

◆ vec

template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
const VectorMapper Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::vec

Definition at line 1017 of file TensorContractionSycl.h.


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


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:46:11