Closed heltonmc closed 1 year ago
Merging #11 (22c996c) into main (aa39de5) will increase coverage by
0.84%
. The diff coverage is100.00%
.
:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@ Coverage Diff @@
## main #11 +/- ##
==========================================
+ Coverage 92.85% 93.70% +0.84%
==========================================
Files 6 6
Lines 238 270 +32
==========================================
+ Hits 221 253 +32
Misses 17 17
Impacted Files | Coverage Δ | |
---|---|---|
src/complex.jl | 100.00% <100.00%> (ø) |
|
src/interface.jl | 100.00% <100.00%> (ø) |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
It's also convenient to sum a vector (horizontal add). This is in general not what you want to do at all and should be avoided. But generally this operation comes at the end of the algorithm.
LLVM offers this method explicitly which can be coded with something like..
The issue is that for some reason LLVM is really slow. Even with the
reassoc
flag it doesn't seem to implement optimal reduction.For example, here is the reduction of a real vector of length 16 using the llvm reduction.
And here is the reduction of a COMPLEX vector of length 16 using this method.
It doesn't seem like much of course but it's also doing double the amount of work.
Anyway, I've gone with two different implementations. An optimal approach if the length of the vector is a power of two and then a fallback approach to just summing them up if not a power of two. This I think is ok because your vectors should generally be as wide as the register width so we will usually always hit the optimimal path. Of course, this method assumes that the order can be summed in any way. This is the general assumption we make with the whole library.
Going to update with new name and add the real version