acts-project / algebra-plugins

Mozilla Public License 2.0
3 stars 10 forks source link

Vectorize the rotate function of cmath transform3 #120

Closed beomki-yeo closed 4 months ago

beomki-yeo commented 4 months ago

Vectorize the rotate function of cmath transform3 Also vectorized the == operator

beomki-yeo commented 4 months ago

@niermann999 will look into a detailed report from compiler tomorrow but is using the for loop mandatory for vectorization?

niermann999 commented 4 months ago

@niermann999 will look into a detailed report from compiler tomorrow but is using the for loop mandatory for vectorization?

I don't know too much about autovectorization tbh (and wether it is the same between different compilers). It seems though that there is SLP vectorization next to the loop vectorization, which should be capable of vectorizing simple code blocks where operations are repeated for multiple scalars.

beomki-yeo commented 4 months ago

OK. It seems the SLP vectorization is enabled by default. https://gcc.gnu.org/projects/tree-ssa/vectorization.html

Basic block vectorization, aka SLP, is enabled by the flag -ftree-slp-vectorize, and requires the same platform dependent flags as loop vectorization. Basic block SLP is enabled by default at -O3 and when -ftree-vectorize is enabled.