Function rc_matrix_add#
Defined in File matrix.h
Function Documentation#
-
int rc_matrix_add(rc_matrix_t A, rc_matrix_t B, rc_matrix_t *C)#
Adds matrices A+B and places the result in C.
The original contents of C are safely freed if necessary to avoid memory leaks. Use rc_matrix_add_inplace if you do not need to keep the contents of one of these matrices after addition.
- Parameters:
A – [in] First matrix
B – [in] second matrix
C – [out] result
- Returns:
Returns 0 on success or -1 on failure.