Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use __m512i or __m256i instead of __m128i to increase the SIMD vector length #5

Open
eriksjolund opened this issue Nov 19, 2016 · 2 comments

Comments

@eriksjolund
Copy link
Owner

eriksjolund commented Nov 19, 2016

The AVX2 call
_mm_blend_epi32
was introduced in the git commit
4f2b2c8

When starting to use AVX2 we could also double the SIMD vector length by using
__m256i
instead of the current
__m128i

Maybe we could even make the SIMD vector length four times bigger by starting to use
__m512i

Here is a list of the current intrinsic functions:

$ cd diagonalsw
$ git branch | grep \*
* changeblend
$ git rev-parse HEAD
4f2b2c8d66d595c74806e43e306541f53742ecdf
$ grep -oh "_mm_[^(]*" diagonalsw/src/c/smith_waterman_sse_byte.1load.xml | sort | uniq
_mm_adds_epu8
_mm_alignr_epi8
_mm_blend_epi16
_mm_blend_epi32
_mm_blendv_epi8
_mm_cmpeq_epi8 
_mm_extract_epi8
_mm_load_si128
_mm_max_epu8
_mm_set1_epi8
_mm_set_epi8
_mm_setzero_si128
_mm_slli_si128
_mm_store_si128
_mm_subs_epu8
_mm_testc_si128

Do they all have 512-bit and 256-bit counterparts in AVX2?

@eriksjolund eriksjolund changed the title use __m256i instead of __m128i to double the SIMD vector length Use __m256i instead of __m128i to double the SIMD vector length Nov 19, 2016
@eriksjolund eriksjolund changed the title Use __m256i instead of __m128i to double the SIMD vector length Use __m512i or __m256i instead of __m128i to increase the SIMD vector length Nov 19, 2016
@martin-steinegger
Copy link

I wrote a small preprocessor abstraction for simd instructions (not all instructions are covered). Maybe it could be useful for this purpose. See https://github.com/soedinglab/mmseqs2/blob/master/lib/simd/simd.h

@eriksjolund
Copy link
Owner Author

Thanks for the tip, but it seems the software license is not compatible with the MIT license that diagonalsw is licensed under.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants