c++ - Computing size of symmetric difference of two sorted arrays using SIMD AVX -


i looking way optimize algorithm working on. it's repetitive , compute-intensive part comparison of 2 sorted arrays of size, containing unique unsigned integer (uint32_t) values in order obtain size of symmetric difference of them (number of elements exist in 1 of vectors). target machine on algorithm deployed uses intel processors supporting avx2, therefore looking way perform in-place using simd.

is there way exploit avx2 instructions obtain size of symmetric difference of 2 sorted arrays of unsigned integers?

since both arrays sorted should easy implement algorithm using simd (avx2). need iterate through 2 arrays concurrently, , when mismatch when comparing 2 vectors of 8 ints need resolve mismatch, i.e. count differences, , 2 array indices in phase, , continue until end of 1 of arrays. add no of remaining elements in other array, if any, final count.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -