llvm.x86.sse.rsqrt.ps calls the _mm_rsqrt_ps intrinsic which can greatly speed up calculations in some cases. It would be very convenient if this was included in SIMD.jl (see discussion here: JuliaPerf/BenchmarksGame.jl#44 (comment)). I see two barriers to this:
rsqrt is not a function in Julia Base like the other functions defined in this package. To me, this seems like a non-issue, but it does expand the conceptual scope of this package.
rsqrt could only be defined for Vec{4,Float32}. The current architecture of the package doesn't cleanly allow this. While llvmins could be defined for Float32 but not for Float64, there's no way of defining it for length 4 vectors but not for length 2. Perhaps this makes "(Also currently missing: Type conversions, reinterpretation that changes the vector size)" a prerequisite for including something like this.
Thoughts?
llvm.x86.sse.rsqrt.pscalls the_mm_rsqrt_psintrinsic which can greatly speed up calculations in some cases. It would be very convenient if this was included in SIMD.jl (see discussion here: JuliaPerf/BenchmarksGame.jl#44 (comment)). I see two barriers to this:rsqrtis not a function in Julia Base like the other functions defined in this package. To me, this seems like a non-issue, but it does expand the conceptual scope of this package.rsqrtcould only be defined forVec{4,Float32}. The current architecture of the package doesn't cleanly allow this. Whilellvminscould be defined forFloat32but not forFloat64, there's no way of defining it for length 4 vectors but not for length 2. Perhaps this makes "(Also currently missing: Type conversions, reinterpretation that changes the vector size)" a prerequisite for including something like this.Thoughts?