Forum > FPC development
State of SIMD Intrinsics
Okoba:
I can see discussions about this from years ago, but is there a place or issue to follow?
It would be nice to have them instead of hand written assembly.
carl_caulkett:
If you want to get connected to a user community who are actively using SIMD related software, you could check out the Mojo programming language. The parent company Modular has a very active Discord server at https://discord.gg/x2xdThTr.
Thaddy:
--- Quote from: Okoba on October 21, 2024, 03:24:08 pm ---I can see discussions about this from years ago, but is there a place or issue to follow?
It would be nice to have them instead of hand written assembly.
--- End quote ---
Not really, apart from fpc-devel, but why would you? When specified, the compiler will use simd instructions for many years, since the mmx days.
But you need to know the correct compiler setup for your project.
You can check the assembler to see that it really uses the simd instructions you specified, also on plain pascal code.
Can be more efficient, sometimes, but the compiler does a dccent job.
Laksen:
To my knowledge not much has happened in FPC in the last 5 years. Around that time previously there were some discussions about how to do it meaningfully.
There were discussions about the shape of API's and naming considerations. Should it follow the C style convention or make it more pascal like? Etc
There were some bugs still in how the codegenerator handled SIMD registers, not super problematic ones. There were issues with passing this as arguments to functions.
Some code was merged back then (rtl/x86_64/cpummprocs.inc as an example of the API) but it was never enabled due to the above questions and discussions that were never finalized.
And of course for good reason. It's a huge API surface that is only ever growing each year
If SIMD has to be supported today maybe it would make sense to look towards the way it has been added to C# in recent years. It is quite elegant and well thought-out
Thaddy:
--- Quote from: Laksen on October 21, 2024, 06:17:54 pm ---To my knowledge not much has happened in FPC in the last 5 years.
--- End quote ---
To the contrary, quite a lot has demonstrably happened. These are the silent little commits by Florian and tend to disappear under the radar unless you actually follow the commits. Also Kit has done a lot in that field and some others. All recent, very recent.
If you mean C++ style macro intrinsics, then you are right, but the use of simd instructions (any generation ) is covered in the compiler.
Navigation
[0] Message Index
[#] Next page