Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
uni20::extent_strides< N > Struct Template Reference

Structure to represent a common extent and an array of strides. More...

#include <strides.hpp>

Public Member Functions

constexpr bool can_merge_with_inner (extent_strides inner) const noexcept
 Returns true if the current (outer) dimension and the given inner dimension can be merged.
 
constexpr extent_strides ()=default
 
template<typename Ext , typename Str >
requires std::is_integral_v<Ext> && std::is_integral_v<Str>
constexpr extent_strides (Ext e, std::array< Str, N > s)
 Construct from an extent and an array of strides.
 
template<typename Ext >
requires std::is_integral_v<Ext>
constexpr extent_strides (Ext e, std::initializer_list< std::ptrdiff_t > s)
 Construct from an extent and initializer-list strides.
 
template<typename Ext , typename... Strides>
requires (std::is_integral_v<Ext> && sizeof...(Strides) == N)
constexpr extent_strides (Ext e, Strides... s)
 Construct from an extent and a parameter pack of stride values.
 
constexpr void merge_with_inner (extent_strides inner) noexcept
 Merge an inner dimension into this one when merging is valid.
 

Public Attributes

index_type extent
 
std::array< std::ptrdiff_t, N > strides
 

Detailed Description

template<std::size_t N>
struct uni20::extent_strides< N >

Structure to represent a common extent and an array of strides.

Template Parameters
NNumber of stride values tracked for each dimension.

Constructor & Destructor Documentation

◆ extent_strides()

template<std::size_t N>
constexpr uni20::extent_strides< N >::extent_strides ( )
constexprdefault

Member Data Documentation

◆ extent

template<std::size_t N>
index_type uni20::extent_strides< N >::extent

◆ strides

template<std::size_t N>
std::array<std::ptrdiff_t, N> uni20::extent_strides< N >::strides

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