← Home ← Back to /g/

Thread 106288571

10 posts 6 images /g/
Anonymous No.106288571 >>106288583 >>106288590 >>106288604 >>106290823 >>106290913 >>106291374
clang > gcc
https://clang.llvm.org/docs/LanguageExtensions.html

>Clang provides an extension for matrix types, which is currently being implemented. See the draft specification for more details.
>For example, the code below uses the matrix types extension to multiply two 4x4 float matrices and add the result to a third 4x4 matrix.

typedef float m4x4_t __attribute__((matrix_type(4, 4)));

m4x4_t f(m4x4_t a, m4x4_t b, m4x4_t c) {
return a + b * c;
}
Anonymous No.106288583
>>106288571 (OP)
Why now?
Anonymous No.106288590
>>106288571 (OP)
>clang
the name sounds like when something technological gets dropped on the ground
also yes, its not the first time i hear clang is better than gcc
i didnt encounter a situation where id see the difference yet
Anonymous No.106288604
>>106288571 (OP)
This is nothing new. Clang has always been ahead of the game. GCC only is relevant because the Linux Kernel heavily depends on its extensions (granted Clang probably has most of them replicated).
Anonymous No.106288674
I'm cooming, it's beautiful
Anonymous No.106290604
No need for bloated C++ anymore
Anonymous No.106290811
For some reason, it refused to use dpps which could speed up the multiplication a bit.
Anonymous No.106290823
>>106288571 (OP)
>We're too lazy to fix our shit optimiser or speed anything up
>So we'll bloat our shit even more
How many millions have been thrown into this shit to still lose to GCC?
Anonymous No.106290913
>>106288571 (OP)
the purpose of this is likely to support matrix instructions such as intel AMX. since the matrix size needs to be defined at compile time, this is only useful as a primitive to implement tiling as part of a more complex matrix library.
Anonymous No.106291374
>>106288571 (OP)
Palmolive?