WojciechMula / sse4-strstr

SIMD (SWAR/SSE/SSE4/AVX2/AVX512F/ARM Neon) of Karp-Rabin algorithm's modification
http://0x80.pl/articles/simd-strfind.html
BSD 2-Clause "Simplified" License
239 stars 29 forks source link

could not compile avx2 on macos #6

Closed xiehuc closed 6 years ago

xiehuc commented 6 years ago

In file included from src/all.h:18: ./avx2-strstr-v2.cpp:66:39: fatal error: argument to 'builtin_ia32_palignr256' must be a constant integer const m256i substring = _mm256_alignr_epi8(next1, curr, i); ^~~~~~~~~~ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/include/avx2intrin.h:130:12: note: expanded from macro '_mm256_alignr_epi8' (m256i)builtin_ia32_palignr256((v32qi)(m256i)(a), \ ^ 1 error generated.

still, i tried a lot , could not fix this.

WojciechMula commented 6 years ago

There's clang on MacOS, is it?

xiehuc commented 6 years ago

yes and dont worry。if i really need it,i could install virtual machine。that is a not hurry problem。

and i think it is clang‘s problem

WojciechMula commented 6 years ago

@xiehuc Could you please check it?

xiehuc commented 6 years ago

yes, it works, thank you very much.