powturbo / TurboPFor-Integer-Compression

Fastest Integer Compression
GNU General Public License v2.0
770 stars 112 forks source link

Compiling with AVX2 option #97

Closed anson304 closed 1 year ago

anson304 commented 1 year ago

Hello,

I uncommented AVX2=1 and commented SSE=1 in the makefile. When I run make, an error occurs:

/usr/bin/ld: lib/icapp.o: in function befgen': icapp.c:(.text+0x319d): undefined reference to_fprazor64'

The error is many lines long. How do I fix this? AVX instructions should work on my machine.

powturbo commented 1 year ago

Use the default makefile as is. There is nothing to change with the current version. The minimum cpu architecture is set to corei7-avx (sandy bridge). The library can be used on SSE4.1/AVX or AVX2 Systems. AVX2 functions are only usable on archtictures >= haswell.

anson304 commented 1 year ago

Thank you, I have another question: how do I know what sized SIMD registers are used for v8enc32()? (Turbobyte SIMD) e.g. 128, 256, 512?

powturbo commented 1 year ago

Actually only the functions with a suffix 256v32 are using avx2. All other SIMD functions are using 128 bits sse4.1 (actually compiled with corei7-avx) .

The TurboByte functions (ex. v8enc32) are compiled with sse/neon. There is no significant difference in speed between avx2 and sse.

anson304 commented 1 year ago

Thank you :)