For the effects of all functions in [linalg],
when the effects are described as
“computes ” or “compute ”
(for some R and mathematical expression E),
the following apply:

For any function F that takes
a parameter named t,
t applies to accesses done through the parameter preceding t in the parameter list of F.

Let m be such an access-modified function parameter.

For accesses m[i, j] outside the triangle specified by t,
F will use the value

*conj-if-needed*(m[j, i]) if the name of F starts with hermitian,- m[j, i] if the name of F starts with symmetric, or
- the additive identity if the name of F starts with triangular.

[*Example 1*: *end example*]

Small vector product accessing only specified triangle.

It would not be a precondition violation for the non-accessed
matrix element to be non-zero.

template<class Triangle>
void triangular_matrix_vector_2x2_product(
mdspan<const float, extents<int, 2, 2>> m,
Triangle t,
mdspan<const float, extents<int, 2>> x,
mdspan<float, extents<int, 2>> y) {
static_assert(is_same_v<Triangle, lower_triangle_t> ||
is_same_v<Triangle, upper_triangle_t>);
if constexpr (is_same_v<Triangle, lower_triangle_t>) {
y[0] = m[0,0] * x[0]; // + 0 * x[1]
y[1] = m[1,0] * x[0] + m[1,1] * x[1];
} else { // upper_triangle_t
y[0] = m[0,0] * x[0] + m[0,1] * x[1];
y[1] = /* 0 * x[0] + */ m[1,1] * x[1];
}
}
— For any function F that takes a parameter named d,
d applies to accesses done through
the previous-of-the-previous parameter of d
in the parameter list of F.

Let m be such an access-modified function parameter.

If d specifies that an implicit unit diagonal is to be assumed, then

- F will not access the diagonal of m; and
- the algorithm will interpret m as if it has a unit diagonal, that is, a diagonal each of whose elements behaves as a two-sided multiplicative identity (even if m's value type does not have a two-sided multiplicative identity).

Otherwise,
if d specifies that an explicit diagonal is to be assumed,
then F will access the diagonal of m.