coryan / jaybeams

JayBeams: A Project to have fun Coding, and maybe measure relative delays in market feeds
Apache License 2.0
2 stars 2 forks source link

Investigate use of streaming SIMD extensions to compute TDE #86

Open GFariasR opened 7 years ago

GFariasR commented 7 years ago

we could vectorize computations, like the one below, using the SSE instructions. How does one do that? Is there any advantage?

for (std::size_t i = 0; i != tmpa_.num_elements(); ++i) {
    tmpa_.data()[i] = std::conj(tmpa_.data()[i]) * (tmpb_.data()[i]);
}
coryan commented 7 years ago

This link:

https://users.ece.cmu.edu/~franzf/teaching/slides-18-645-simd.pdf

has some relevant bits around slide 25. Basically there is a cool addsub instruction that helps with complex number arithmetic.

Also check:

https://en.wikipedia.org/wiki/SSE3#New_instructions