3 ms·
I still don't get it. Doing exactly what you describe would be much easier if we had a [x, y, z, w] types built into the language. I just don't get the downside
by ant6n 11y ago
I still don't get it. Doing exactly what you describe would be much easier if we had a [x, y, z, w] types built into the language. I just don't get the downside of having packed types builtin -- so far it was said that it would be faster to do some operations in scalar. If there is actually some way to express operations in scalar faster than using SIMD operations, then the compiler could probably regognize that as well and express my float32x4 operations in scalar. Like the dot product example from the linked slides.
I see this line of code, and I want to write the comment as code, rather than the code:
__m128 dw = _mm_mul_ps(aw, bw); // dw = aw * bw
- yoklov 11y agoI'm not saying they wouldn't be nice, but they would certainly encourage SIMD antipatterns.
- tbirdz 11y agoYou could use Agner Fog's vector class, but keep in mind that just using a vector class isn't always the best idea: http://www.agner.org/optimize/#vectorclass http://www.agner.org/optimize/#vectorclass