malte-v
malte-v
Is anyone currently working on this? I would be happy to help if I can. Could you tell me what probably needs to be done and how complex it would...
Thanks for the quick explanation! I'm pretty sure adding SIMD types to the language shouldn't be that hard because their implementation is probably very similar to the ones of the...
After experimenting a bit I realized that LLVM is actually very smart when it comes to SIMD. For example, I can create two vectors of 32 single-precision floats and add...
I actually think vectors could be implemented mostly the same way as integers/floats/booleans. I mean, most IR instructions which work for scalars also work for vectors. For example, you can...
Quick update: I wrote a very early implementation of a `Vector(T, N)` type (https://github.com/malte-v/crystal/tree/simd-support). Currently you can only get and set the individual elements, but it does use the SIMD...
I'm really not sure how the "front end" of the `Vector` type should look like. Currently it's like `StaticArray` where you specify the type and number of elements in the...
@asterite Thanks, weird thing I didn't come up with this by myself.
@ysbaddaden I really like that approach. It lets us omit all the "hacky" parts of the aforementioned implementation while also emphasizing the element type. I'll change the implementation to this.
I need some more help with the implementation. I'm trying to add the vector structs to the built-in types in [`program.cr`](https://github.com/malte-v/crystal/blob/simd-support/src/compiler/crystal/program.cr#L218). The key part is: ```cr types["Bool::Vector"] = vec_bool =...
Thanks, works fine now. I'd use vectors for CG, but SIMD is mostly useful when performing the same arithmetic on lots of data over and over again. Of course you...