p12tic / libsimdpp

Portable header-only C++ low level SIMD library
Boost Software License 1.0
1.24k stars 129 forks source link

libsimdpp shouldn't memorize the architecture of the machine where it is configured #61

Closed yurivict closed 7 years ago

yurivict commented 7 years ago

It should detect which SIMD instructions are available when the project is built. The libsimdpp package can be created on the machine with a narrow SIMD set, and this package can be used on the machine with a wide SIMD set, and vice versa. One shouldn't affect the other.

libsimdpp should detect SIMD availability purely in the runtime when it is used. You shouldn't even have a 'configure' step.

https://stackoverflow.com/questions/28939652/how-to-detect-sse-avx-avx2-avx-512-availability-at-compile-time

p12tic commented 7 years ago

The configure step is needed to figure out which tests to compile and run. If you know that your compiler is able to compile all instruction sets that you use in your project, configure-time detection is not needed at all. So it the library already works just like you propose.

yurivict commented 7 years ago

Ok, thank you for your explanation!