Differences From 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]
To Artifact [240d8b02dd]:
- File src/OFMatrix4x4.m — part of check-in [fa3c89f802] at 2023-10-31 22:14:33 on branch trunk — OFMatrix4x4: Add #pragma GCC target("3dnow") (user: js, size: 6771) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
26 27 28 29 30 31 32 33 34 35 36 37 38 39 | { 0, 1, 0, 0 }, { 0, 0, 1, 0 }, { 0, 0, 0, 1 } }; @implementation OFMatrix4x4 #if defined(OF_AMD64) || defined(OF_X86) static void multiplyWithMatrix_3DNow(OFMatrix4x4 *self, SEL _cmd, OFMatrix4x4 *matrix) { float result[4][4]; for (uint_fast8_t i = 0; i < 4; i++) { for (uint_fast8_t j = 0; j < 4; j++) { | > > > > | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | { 0, 1, 0, 0 }, { 0, 0, 1, 0 }, { 0, 0, 0, 1 } }; @implementation OFMatrix4x4 #if defined(OF_AMD64) || defined(OF_X86) # ifndef __clang__ # pragma GCC push_options # pragma GCC target("3dnow") # endif static void multiplyWithMatrix_3DNow(OFMatrix4x4 *self, SEL _cmd, OFMatrix4x4 *matrix) { float result[4][4]; for (uint_fast8_t i = 0; i < 4; i++) { for (uint_fast8_t j = 0; j < 4; j++) { |
︙ | ︙ | |||
113 114 115 116 117 118 119 120 121 122 123 124 125 126 | "femms" :: "r"(&result), "r"(&self->_values), "r"(&vector) : "mm0", "mm1", "mm2", "mm3", "mm4", "memory" ); return result; } + (void)initialize { if (self != [OFMatrix4x4 class]) return; if ([OFSystemInfo supports3DNow]) { | > > > | 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | "femms" :: "r"(&result), "r"(&self->_values), "r"(&vector) : "mm0", "mm1", "mm2", "mm3", "mm4", "memory" ); return result; } # ifndef __clang__ # pragma GCC pop_options # endif + (void)initialize { if (self != [OFMatrix4x4 class]) return; if ([OFSystemInfo supports3DNow]) { |
︙ | ︙ |