Skip to content

2 typos in linalg mandates and preconditions sections #7371

@iburyl

Description

@iburyl

[linalg.helpers.mandates] section:

template<class MDS1, class MDS2>
  requires(is-mdspan<MDS1> && is-mdspan<MDS2>)
  constexpr
  bool compatible-static-extents(size_t r1, size_t r2) {         // exposition only
    return MDS1::static_extent(r1) == dynamic_extent ||
           MDS2::static_extent(r2) == dynamic_extent ||
           MDS1::static_extent(r1) == MDS2::static_extent(r2));
  }

MDS2::static_extent(r2)); -> last parenthesis is redundant

[linalg.helpers.precond]

constexpr bool multipliable(                                     // exposition only
  const in-matrix auto& in_mat1, const in-matrix auto& in_mat2, const in-matrix auto& out_mat) {
  return out_mat.extent(0) == in_mat1.extent(0) && out_mat.extent(1) == in_mat2.extent(1) &&
         in1_mat.extent(1) == in_mat2.extent(0);
}

in1_mat.extent(1) == in_mat2.extent(0) -> in1_mat should be in_mat1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions