batchlas::Slice Struct Reference

Overview

A half-open index range [start, end) along one dimension.

A default Slice selects the whole dimension; Slice(k) selects [k, dim). A negative start or end counts from the end of the dimension (-1 is the last index). Slicing is dense-only and never copies.

Definition at line 120 of file matrix.hh.

#include <batchlas/blas/matrix.hh>

Constructors

◆ Slice() [1/4]

batchlas::Slice::Slice ( int64_t start,
SliceEnd  )
inline

[start, dim).

Definition at line 124 of file matrix.hh.

◆ Slice() [2/4]

batchlas::Slice::Slice ( int64_t start,
int64_t end )
inline

[start, end); either bound may be negative (counted from the end).

Definition at line 126 of file matrix.hh.

◆ Slice() [3/4]

batchlas::Slice::Slice ( int64_t start)
inline

[start, dim) (implicit, so an integer can stand in for a Slice).

Definition at line 128 of file matrix.hh.

◆ Slice() [4/4]

batchlas::Slice::Slice ( )
default

The whole dimension.

Variables

◆ start

int64_t batchlas::Slice::start = std::numeric_limits<int64_t>::min()

First index; negative counts from the end. The default (min) with a default end means the whole dimension.

Definition at line 121 of file matrix.hh.

◆ end

int64_t batchlas::Slice::end = std::numeric_limits<int64_t>::max()

One past the last index; negative counts from the end; max means the end of the dimension.

Definition at line 122 of file matrix.hh.