30 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_SNS 38 M0_PRE(
m->m_height > 0 &&
m->m_width > 0);
59 uint32_t ret = column;
62 for (
i = column + 1;
i <
m->m_height; ++
i) {
77 uint32_t current_row = 0;
79 for (; col <
m->m_width; ++col, ++current_row) {
95 row = current_row + 1;
96 for (; row <
m->m_height; ++row) {
106 uint32_t col =
m->m_width - 1;
107 uint32_t row =
m->m_height - 1;
109 for (; (int32_t)row >= 0; --row, --col) {
116 for (pos = 1; pos <
m->m_height - row; ++pos) {
140 uint32_t current_row;
146 return M0_ERR_INFO(-EIO,
"Input matrix not a square one");
155 for (col = 0, current_row = 0; col < mat.
m_width; ++col,
177 for (row = 0; row < mat.
m_height; ++row) {
178 if (row == current_row)
194 #undef M0_TRACE_SUBSYSTEM
static struct m0_addb2_mach * m
M0_INTERNAL void m0_linsys_init(struct m0_linsys *lynsys, struct m0_matrix *m, struct m0_matvec *v, struct m0_matvec *r)
static m0_parity_elem_t m0_parity_lt(m0_parity_elem_t x, m0_parity_elem_t y)
M0_INTERNAL bool m0_matrix_is_square(const struct m0_matrix *mat)
static m0_parity_elem_t m0_parity_div(m0_parity_elem_t x, m0_parity_elem_t y)
M0_INTERNAL void m0_matrix_row_operate(struct m0_matrix *m, uint32_t row, m0_parity_elem_t c, m0_matvec_matrix_binary_operator_t f)
M0_INTERNAL void m0_matvec_row_operate(struct m0_matvec *v, uint32_t row, m0_parity_elem_t c, m0_matvec_matrix_binary_operator_t f)
#define M0_ERR_INFO(rc, fmt,...)
static void substitute(struct m0_matrix *m, struct m0_matvec *v, struct m0_matvec *r)
return M0_ERR(-EOPNOTSUPP)
M0_INTERNAL void m0_linsys_fini(struct m0_linsys *lynsys)
M0_INTERNAL void m0_matvec_rows_operate1(struct m0_matvec *v, uint32_t row0, uint32_t row1, m0_matvec_matrix_binary_operator_t f1, m0_parity_elem_t c1, m0_matvec_matrix_binary_operator_t f)
M0_INTERNAL void m0_matvec_swap_row(struct m0_matvec *v, uint32_t r0, uint32_t r1)
M0_INTERNAL void m0_matrix_rows_operate1(struct m0_matrix *m, uint32_t row0, uint32_t row1, m0_matvec_matrix_binary_operator_t f1, m0_parity_elem_t c1, m0_matvec_matrix_binary_operator_t f)
M0_INTERNAL void m0_linsys_solve(struct m0_linsys *lynsys)
m0_parity_elem_t * m0_matrix_elem_get(const struct m0_matrix *m, uint32_t x, uint32_t y)
m0_parity_elem_t * m0_matvec_elem_get(const struct m0_matvec *v, uint32_t x)
M0_INTERNAL void m0_matrix_submatrix_get(const struct m0_matrix *mat, struct m0_matrix *submat, uint32_t x_off, uint32_t y_off)
M0_INTERNAL void m0_matrix_fini(struct m0_matrix *m)
M0_INTERNAL void m0_identity_matrix_fill(struct m0_matrix *identity_mat)
M0_INTERNAL int m0_matrix_init(struct m0_matrix *m, uint32_t w, uint32_t h)
static m0_parity_elem_t m0_parity_sub(m0_parity_elem_t x, m0_parity_elem_t y)
M0_INTERNAL int m0_matrix_invert(const struct m0_matrix *in_mat, struct m0_matrix *mat_inverse)
static m0_parity_elem_t m0_parity_mul(m0_parity_elem_t x, m0_parity_elem_t y)
static uint32_t find_max_row_index_for_col(struct m0_matrix *m, uint32_t column)
static void triangularize(struct m0_matrix *m, struct m0_matvec *v)
M0_INTERNAL void m0_matrix_swap_row(struct m0_matrix *m, uint32_t r0, uint32_t r1)