Differences From Artifact [c5f86994f5]:
- File
src/OFMatrix4x4.m
— part of check-in
[d9af65de97]
at
2023-10-31 20:25:57
on branch trunk
— Don't use -masm=intel
It's broken in older versions of Clang (e.g. Clang 12). (user: js, size: 6546) [annotate] [blame] [check-ins using]
To Artifact [b494f24572]:
- File
src/OFMatrix4x4.m
— part of check-in
[d53c87e7bb]
at
2023-10-31 20:27:32
on branch trunk
— OFMatrix4x4: Partially unroll multiplication loop
This way, `result` doesn't need to be initialized. (user: js, size: 6634) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
199 200 201 202 203 204 205 | OFHashFinalize(&hash); return hash; } - (void)multiplyWithMatrix: (OFMatrix4x4 *)matrix { | | < | | > > > | 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | OFHashFinalize(&hash); return hash; } - (void)multiplyWithMatrix: (OFMatrix4x4 *)matrix { float result[4][4]; for (uint_fast8_t i = 0; i < 4; i++) for (uint_fast8_t j = 0; j < 4; j++) result[i][j] = matrix->_values[i][0] * _values[0][j] + matrix->_values[i][1] * _values[1][j] + matrix->_values[i][2] * _values[2][j] + matrix->_values[i][3] * _values[3][j]; memcpy(_values, result, sizeof(result)); } - (void)translateWithVector: (OFVector3D)vector { OFMatrix4x4 *translation = [[OFMatrix4x4 alloc] initWithValues: |
︙ | ︙ |