ridiculousfish / libdivide

Official git repository for libdivide: optimized integer division
http://libdivide.com
Other
1.09k stars 77 forks source link

Consider automatically defining LIBDIVIDE_SSE2 et al #63

Closed AlexGuteniev closed 4 years ago

AlexGuteniev commented 4 years ago

For Visual Studio:

So libdivide could have something like:

#if defined(_MSC_VER) && defined(__AVX2__) 
#define LIBDIVIDE_AVX2

Maybe other compilers also expose compilation against specific instruction set via preprocessor

kimwalisch commented 4 years ago

We already discussed in https://github.com/ridiculousfish/libdivide/issues/34 why we don't enable SSE2 by default.