batchlas::NonZeros Struct Reference

Overview

Non-zero count (per-item capacity) of a CSR matrix, as a distinct type.

The dense and CSR constructors would otherwise differ only in what the third int means: Matrix(rows, cols, batch) versus Matrix(rows, cols, nnz).

Invariant
operator int is deleted so the tag cannot decay back into that ambiguity.
See also
Matrix model: strong types for positional integers

Definition at line 58 of file matrix.hh.

#include <batchlas/blas/matrix.hh>

Constructors

◆ NonZeros()

batchlas::NonZeros::NonZeros ( int v)
inlineexplicitconstexpr

Wraps v.

Definition at line 60 of file matrix.hh.

Functions

◆ operator int()

batchlas::NonZeros::operator int ( ) const
constexprdelete

Deleted: no silent decay back to int.

Variables

◆ value

int batchlas::NonZeros::value

The wrapped value.

Definition at line 59 of file matrix.hh.