Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Namespaces | Functions
uni20::kernel Namespace Reference

Namespaces

namespace  cpu
 

Functions

template<typename T , StridedMdspanLike AType, StridedMdspanLike BType, std::size_t N, typename U , MutableStridedMdspanLike CType>
requires (AType::rank() + BType::rank() == CType::rank() + 2 * N) && DefaultAccessorMdspanLike<AType> && DefaultAccessorMdspanLike<BType> && DefaultAccessorMdspanLike<CType>
void contract (T const &alpha, AType A, BType B, std::array< std::pair< std::size_t, std::size_t >, N > const &contractDims, U const &beta, CType C)
 
template<typename T , StridedMdspanLike AType, StridedMdspanLike BType, typename U , MutableStridedMdspanLike CType, std::size_t N>
requires DefaultAccessorMdspanLike<AType> && DefaultAccessorMdspanLike<BType> && DefaultAccessorMdspanLike<CType>
void contract (T const &alpha, AType A, BType B, std::pair< std::size_t, std::size_t > const (&dims)[N], U const &beta, CType C)
 
template<typename T , std::size_t MR, std::size_t NR, std::size_t KR>
void contract_strided (static_vector< extent_strides< 2 >, MR > const &Mgrp, static_vector< extent_strides< 2 >, NR > const &Ngrp, static_vector< extent_strides< 2 >, KR > const &Kgrp, T alpha, T const *A, T const *B, T beta, T *C)
 Execute the CPU tensor contraction using precomputed stride groupings.
 

Function Documentation

◆ contract() [1/2]

template<typename T , StridedMdspanLike AType, StridedMdspanLike BType, std::size_t N, typename U , MutableStridedMdspanLike CType>
requires (AType::rank() + BType::rank() == CType::rank() + 2 * N) && DefaultAccessorMdspanLike<AType> && DefaultAccessorMdspanLike<BType> && DefaultAccessorMdspanLike<CType>
void uni20::kernel::contract ( T const &  alpha,
AType  A,
BType  B,
std::array< std::pair< std::size_t, std::size_t >, N > const &  contractDims,
U const &  beta,
CType  C 
)

◆ contract() [2/2]

template<typename T , StridedMdspanLike AType, StridedMdspanLike BType, typename U , MutableStridedMdspanLike CType, std::size_t N>
requires DefaultAccessorMdspanLike<AType> && DefaultAccessorMdspanLike<BType> && DefaultAccessorMdspanLike<CType>
void uni20::kernel::contract ( T const &  alpha,
AType  A,
BType  B,
std::pair< std::size_t, std::size_t > const (&)  dims[N],
U const &  beta,
CType  C 
)