diff options
Diffstat (limited to 'src/mtx_mul.c')
-rw-r--r-- | src/mtx_mul.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mtx_mul.c b/src/mtx_mul.c index 8272d53..e00af08 100644 --- a/src/mtx_mul.c +++ b/src/mtx_mul.c @@ -25,9 +25,11 @@ t_matrixfloat*mtx_doMultiply(int rowA, t_matrixfloat*A, int colArowB, t_matrixfloat*B, int colB){ t_matrixfloat*result=0; + int r, c, n; + if(!A || !B || !rowA || !colArowB || !colB)return 0; result=(t_matrixfloat*)getbytes(sizeof(t_matrixfloat)*rowA*colB); - int r, c, n; + for(r=0; r<rowA; r++){ for(c=0; c<colB; c++){ t_matrixfloat sum=0.f; |