Added create Matrix and solves Test 1
This commit is contained in:
parent
5da72e7287
commit
35cc6f2c7b
6
matrix.c
6
matrix.c
@ -6,7 +6,11 @@
|
|||||||
|
|
||||||
Matrix createMatrix(unsigned int rows, unsigned int cols)
|
Matrix createMatrix(unsigned int rows, unsigned int cols)
|
||||||
{
|
{
|
||||||
|
Matrix matrix;
|
||||||
|
matrix.rows = rows;
|
||||||
|
matrix.cols = cols;
|
||||||
|
matrix.buffer = (float*) calloc(rows * cols, sizeof(float));
|
||||||
|
return matrix;
|
||||||
}
|
}
|
||||||
|
|
||||||
void clearMatrix(Matrix *matrix)
|
void clearMatrix(Matrix *matrix)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user