Tannic
A C++ Tensor Library
Loading...
Searching...
No Matches
indexing.hpp File Reference
#include <cassert>
#include "concepts.hpp"
#include "exceptions.hpp"
Include dependency graph for indexing.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tannic::indexing::Range
 Represents a half-open interval [start, stop) for slicing. More...
 

Namespaces

namespace  tannic
 
namespace  tannic::indexing
 

Typedefs

using tannic::range = indexing::Range
 Convenience alias for tannic::indexing::Range.
 

Functions

template<Integral Index, Integral Size>
constexpr Index tannic::indexing::normalize (Index index, Size bound)
 Normalize a possibly-negative index into the valid range [0, bound).
 
template<Integral Size>
constexpr Range tannic::indexing::normalize (Range range, Size size)
 Normalize a slicing range into valid [start, stop) indices.