-
-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use core.simd? #595
Comments
|
Quite easy: the instructions from |
|
I like that vectorization is left to the compiler but at least for dmd is was decided that it is suboptimal (see http://dlang.org/simd.html). I suppose you are going to add more functions to |
|
No, the DMD way of doing vector instruction will not be added to LDC. It is more or less impossible to implement this in LLVM. (See it the positive way: LDC can generate avx or altivec instructions if available...) There is no way to detect the CPU during compilation. You have to specify the cpu on the command line (e.g. |
|
What do you mean by
? |
|
E.g. |
|
You can, however, also use a large portion of the GCC SIMD builtins. Some elementary insertions/shuffles are not offered as builtins though (because LLVM does not expose them). For those, use |
|
How do use GCC SIMD builtins? Can you give an example? |
|
Just |
|
I close this issue because there is nothing to fix. If needed the discussion can continue in the forum (http://forum.dlang.org/group/digitalmars.D.ldc). |
|
We should probably offer a tutorial or a few examples of how to write SIMD code with LDC. Maybe @jerro can point us to a few public examples of his that could be linked on a wiki page or such. |
prevent HashTab manipulation during opApply iteration
I'm trying out latest alpha release (LDC 0.13.0 alpha 2) from https://github.com/ldc-developers/ldc/releases on Linux x86_64. I'd like to compare ldc to dmd but the simple program
does not compile
I suppose I must be doing something fundamentally wrong since I found posts where core.simd works with ldc. Please enlighten me.
The text was updated successfully, but these errors were encountered: