16 lines
532 B
C++
16 lines
532 B
C++
#pragma once
|
|
|
|
#include <mdspan>
|
|
#include <span>
|
|
#include <vector>
|
|
|
|
namespace cpp23 {
|
|
|
|
[[nodiscard]] auto make_row_major_matrix(int rows, int cols, int fill) -> std::vector<int>;
|
|
[[nodiscard]] auto matrix_element(std::mdspan<const int, std::extents<int, std::dynamic_extent, std::dynamic_extent>> matrix,
|
|
int row, int col) -> int;
|
|
[[nodiscard]] auto row_sums(std::mdspan<const int, std::extents<int, std::dynamic_extent, std::dynamic_extent>> matrix)
|
|
-> std::vector<int>;
|
|
|
|
} // namespace cpp23
|