Hacker News new | ask | show | jobs
by eigenspace 2082 days ago
Ah I see, yeah I misunderstood you.

> What I did't see was how I could use the AVX2 instructions myself.

If you ever find yourself in a situation where you want manual control over vectorization, the package SIMD.jl [1] is pretty good for manual, handwritten vectorization. There's also VectorizationBase.jl [2] which LoopVectorization.jl uses. Which one of these two packages are most appropriate just kinda depends on what sort of interface you prefer.

[1] https://github.com/eschnett/SIMD.jl

[2] https://github.com/chriselrod/VectorizationBase.jl

1 comments

Thanks for the pointers! The first looks like it gives a language for SIMD operations, but not all of the intrinsics. The second is for vectorization, which also doesn't include all of the intrinsics.

However! The second shows an example with Base.llvmcall, which lets me write LLVM assembly. That should let me do anything I want.

However however - the stuff I actually do doesn't need all that, and could likely be implemented with LoopVectorization.