|
template<size_t dim, typename S , typename Head , size_t D> |
constexpr size_t | Offset (S(&strides)[D], size_t n, Head head) |
|
template<size_t dim, typename S , size_t D, typename Head , typename... Tail> |
constexpr std::enable_if_t< sizeof...(Tail) !=0, size_t > | Offset (S(&strides)[D], size_t n, Head head, Tail &&...rest) |
|
template<int32_t D, bool f_array = false> |
constexpr void | CalcStride (size_t const (&shape)[D], size_t(&stride)[D]) |
|
template<typename T > |
constexpr int32_t | CalcSliceDim () |
| Calculate the dimension of sliced tensor. More...
|
|
template<typename T , typename... S> |
constexpr std::enable_if_t< sizeof...(S) !=0, int32_t > | CalcSliceDim () |
|
template<int32_t D> |
constexpr size_t | CalcSize (size_t(&shape)[D]) |
|
template<int32_t n, typename Fn > |
constexpr LINALG_HD auto | UnrollLoop (Fn fn) |
|
template<typename T > |
int32_t | NativePopc (T v) |
|
LINALG_HD int | Popc (uint32_t v) |
|
LINALG_HD int | Popc (uint64_t v) |
|
template<class T , std::size_t N, std::size_t... Idx> |
constexpr auto | Arr2Tup (T(&arr)[N], std::index_sequence< Idx... >) |
|
template<class T , std::size_t N> |
constexpr auto | Arr2Tup (T(&arr)[N]) |
|
template<typename I , int32_t D> |
LINALG_HD auto | UnravelImpl (I idx, common::Span< size_t const, D > shape) |
|
template<size_t dim, typename I , int32_t D> |
void | ReshapeImpl (size_t(&out_shape)[D], I s) |
|
template<size_t dim, int32_t D, typename... S, typename I , std::enable_if_t< sizeof...(S) !=0 > * = nullptr> |
void | ReshapeImpl (size_t(&out_shape)[D], I &&s, S &&...rest) |
|
template<typename Fn , typename Tup , size_t... I> |
decltype(auto) constexpr LINALG_HD | Apply (Fn &&f, Tup &&t, std::index_sequence< I... >) |
|
template<typename Fn , typename Tup > |
decltype(auto) constexpr LINALG_HD | Apply (Fn &&f, Tup &&t) |
|