kurzer zwischenspeicher
This commit is contained in:
parent
396ad0c4ca
commit
0cba75ff5c
16
matrix.c
16
matrix.c
@ -101,20 +101,14 @@ Matrix multiply(const Matrix matrix1, const Matrix matrix2)
|
|||||||
Matrix result;
|
Matrix result;
|
||||||
result.rows = matrix1.rows;
|
result.rows = matrix1.rows;
|
||||||
result.cols = matrix2.cols;
|
result.cols = matrix2.cols;
|
||||||
//TODO: Chat sagt hier noch buffer calloc rein
|
|
||||||
|
|
||||||
//Multipliaktion der beiden Matrizen
|
//mit get matrix den 4 werte aus matrix1/2.buffer rausnehmen und verrechnen
|
||||||
for(int i = 0; ... ; i++)
|
//mit set matrix in result.buffer reinladen
|
||||||
{
|
|
||||||
result.buffer[i] = matrix1.buffer[i] * matrix2.buffer[i];
|
|
||||||
for(int j = 1; ... ; j++)
|
|
||||||
{
|
|
||||||
result.buffer[i] += matrix1.buffer[j] * matrix2.buffer[i*j]
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
//FIXME: hier steht glaube viel bullshit lol
|
|
||||||
|
|
||||||
|
//1. for: buffer um stelle weiter
|
||||||
|
//2. for: 1. reihe von matrix1 geht von x10-x12 und x13-x15 das wird 2 mal gemacht
|
||||||
|
//3. for: 2. reihe von matrix1 geht von x20-x23; x24-x27; x28-x211 das wird 2 mal gemacht
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user