Re: Would love input / help with SIMD library proof of concept

2017-12-14 Thread guibar
Thanks ! Yes that's what I was looking for, I didn't dig enough in the manual, as usual.

Re: Would love input / help with SIMD library proof of concept

2017-12-14 Thread jester
Instead of using the emit pragma you may want to look into the [CodegenDecl Pragma](https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-codegendecl-pragma).

Re: Would love input / help with SIMD library proof of concept

2017-12-14 Thread guibar
Hello, That is pretty cool and I am interested also in that. I have taken a look and I have some remarks. If I understood correctly your approach, the marked code is selected at runtime according to the CPU properties. To be able to run on different architectures, the general code must be comp

Re: Would love input / help with SIMD library proof of concept

2017-12-13 Thread jackmott
AVX2 cpu, forgot that I7 doesn't really narrow it down anymore! The code is ported from a friends C++ library, which should be good but I could definitely have introduced mistakes with some of the obscure C bindings.

Re: Would love input / help with SIMD library proof of concept

2017-12-13 Thread mratsim
Awesome ! What generation is your CPU? Haswell or later (AVX2)?

Re: Would love input / help with SIMD library proof of concept

2017-12-12 Thread jackmott
runtime detection is now in, tested only on my i7 in linux so far.

Re: Would love input / help with SIMD library proof of concept

2017-12-12 Thread jackmott
Ok I've fixed the .gitignore / bin directory setup

Re: Would love input / help with SIMD library proof of concept

2017-12-12 Thread jackmott
> I don't know much about SIMD, it looks like your approach is to figure out > how to take nim code and SIMDify it? No not quite. You will write explicit SIMD instructions, but it will automatically transform them to use the best possible option given runtime detection. So you can write a loop

Re: Would love input / help with SIMD library proof of concept

2017-12-12 Thread treeform
I don't know much about SIMD, it looks like your approach is to figure out how to take nim code and SIMDify it? Sounds like a hard problem. What are your thoughts about the typed approach? Something like [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SIMD](http

Re: Would love input / help with SIMD library proof of concept

2017-12-12 Thread jackmott
Yes runtime detection is the plan, the prompt is just a placeholder, so that I know the decision is happening at runtime. Thanks on the.gitignore, its ignoring exe but i am in linux!

Re: Would love input / help with SIMD library proof of concept

2017-12-12 Thread mratsim
I'll follow your development and provide input. The library may prove quite useful for some handcrafted computations in Arraymancer. My first remark would be to use a ./bin or ./out folder and .gitignore it, you actually added the produced library to your git repo. Second, I think instead of as

Would love input / help with SIMD library proof of concept

2017-12-12 Thread jackmott
Details are in the readme. If anyone is interested in this and would like to provide input or help out please let me know. [https://github.com/jackmott/nim_simd](https://github.com/jackmott/nim_simd)/