[linalg.tags]

# 29 Numerics library [[numerics]](./#numerics)

## 29.9 Basic linear algebra algorithms [[linalg]](linalg#tags)

### 29.9.5 Tag classes [linalg.tags]

#### [29.9.5.1](#order) Storage order tags [[linalg.tags.order]](linalg.tags.order)

[1](#order-1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L11933)

The storage order tags describe
the order of elements in an mdspan withlayout_blas_packed ([[linalg.layout.packed]](linalg.layout.packed "29.9.6 Layouts for packed matrix types")) layout[.](#order-1.sentence-1)

[ð](#order-itemdecl:1)

`struct [column_major_t](#lib:column_major_t "29.9.5.1 Storage order tags [linalg.tags.order]") {
  explicit column_major_t() = default;
};
inline constexpr column_major_t [column_major](#lib:column_major "29.9.5.1 Storage order tags [linalg.tags.order]"){};

struct [row_major_t](#lib:row_major_t "29.9.5.1 Storage order tags [linalg.tags.order]") {
  explicit row_major_t() = default;
};
inline constexpr row_major_t [row_major](#lib:row_major "29.9.5.1 Storage order tags [linalg.tags.order]"){};
`

[2](#order-2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L11950)

column_major_t indicates a column-major order,
and row_major_t indicates a row-major order[.](#order-2.sentence-1)

#### [29.9.5.2](#triangle) Triangle tags [[linalg.tags.triangle]](linalg.tags.triangle)

[ð](#triangle-itemdecl:1)

`struct [upper_triangle_t](#lib:upper_triangle_t "29.9.5.2 Triangle tags [linalg.tags.triangle]") {
  explicit upper_triangle_t() = default;
};
inline constexpr upper_triangle_t [upper_triangle](#lib:upper_triangle "29.9.5.2 Triangle tags [linalg.tags.triangle]"){};

struct [lower_triangle_t](#lib:lower_triangle_t "29.9.5.2 Triangle tags [linalg.tags.triangle]") {
  explicit lower_triangle_t() = default;
};
inline constexpr lower_triangle_t [lower_triangle](#lib:lower_triangle "29.9.5.2 Triangle tags [linalg.tags.triangle]"){};
`

[1](#triangle-1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L11970)

These tag classes specify whether
algorithms and other users of a matrix (represented as an mdspan)
access the
upper triangle (upper_triangle_t) or
lower triangle (lower_triangle_t)
of the matrix (see also [[linalg.general]](linalg.general "29.9.3 General"))[.](#triangle-1.sentence-1)

This is also subject to the restrictions of implicit_unit_diagonal_t if that tag is also used as a function argument; see below[.](#triangle-1.sentence-2)

#### [29.9.5.3](#diagonal) Diagonal tags [[linalg.tags.diagonal]](linalg.tags.diagonal)

[ð](#diagonal-itemdecl:1)

`struct [implicit_unit_diagonal_t](#lib:implicit_unit_diagonal_t "29.9.5.3 Diagonal tags [linalg.tags.diagonal]") {
  explicit implicit_unit_diagonal_t() = default;
};
inline constexpr implicit_unit_diagonal_t [implicit_unit_diagonal](#lib:implicit_unit_diagonal "29.9.5.3 Diagonal tags [linalg.tags.diagonal]"){};

struct [explicit_diagonal_t](#lib:explicit_diagonal_t "29.9.5.3 Diagonal tags [linalg.tags.diagonal]") {
  explicit explicit_diagonal_t() = default;
};
inline constexpr explicit_diagonal_t [explicit_diagonal](#lib:explicit_diagonal "29.9.5.3 Diagonal tags [linalg.tags.diagonal]"){};
`

[1](#diagonal-1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L11996)

These tag classes specify whether algorithms
access the matrix's diagonal entries, and if not,
then how algorithms interpret
the matrix's implicitly represented diagonal values[.](#diagonal-1.sentence-1)

[2](#diagonal-2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L12002)

The implicit_unit_diagonal_t tag indicates that
an implicit unit diagonal is to be assumed ([[linalg.general]](linalg.general "29.9.3 General"))[.](#diagonal-2.sentence-1)

[3](#diagonal-3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L12006)

The explicit_diagonal_t tag indicates that
an explicit diagonal is used ([[linalg.general]](linalg.general "29.9.3 General"))[.](#diagonal-3.sentence-1)
