STATUS: Test 1/2/9/11 Functional
This commit is contained in:
parent
772968dfef
commit
6bd7cfb06e
4
matrix.c
4
matrix.c
@ -11,9 +11,9 @@ Matrix createMatrix(unsigned int rows, unsigned int cols)
|
|||||||
Matrix matrix;
|
Matrix matrix;
|
||||||
matrix.rows = rows;
|
matrix.rows = rows;
|
||||||
matrix.cols = cols;
|
matrix.cols = cols;
|
||||||
matrix.buffer = (float*) calloc(rows * cols, sizeof(float)); //belegt den speicherplatz mit calloc
|
matrix.buffer = (float*) calloc(rows * cols, sizeof(float)); //belegt den speicherplatz mit calloc -> mit 0
|
||||||
return matrix;
|
return matrix;
|
||||||
}else{
|
}else{ //Bei einer "falschen" Matrix eine leere zurückgeben, ohne speicher zu belegen
|
||||||
printf("Nullgroesse der Matrix!!!\n");
|
printf("Nullgroesse der Matrix!!!\n");
|
||||||
Matrix matrix;
|
Matrix matrix;
|
||||||
matrix.rows = 0;
|
matrix.rows = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user