|
BitMagic-C++
|
Processor specific optimizations for SSE4.2 instructions (internals). More...
Functions | |
| bm::id_t | bm::sse4_bit_count (const __m128i *block, const __m128i *block_end) |
| bool | bm::sse4_is_all_zero (const __m128i *BMRESTRICT block) |
| check if block is all zero bits | |
| bool | bm::sse4_is_digest_zero (const __m128i *BMRESTRICT block) |
| check if digest stride is all zero bits | |
| void | bm::sse4_block_set_digest (__m128i *dst, unsigned value) |
| set digest stride to 0xFF.. or 0x0 value | |
| unsigned | bm::sse4_and_block (__m128i *BMRESTRICT dst, const __m128i *BMRESTRICT src) |
| AND blocks2 dst &= *src. | |
| bool | bm::sse4_and_digest (__m128i *BMRESTRICT dst, const __m128i *BMRESTRICT src) |
| AND block digest stride dst &= *src. | |
| bool | bm::sse4_and_digest_2way (__m128i *BMRESTRICT dst, const __m128i *BMRESTRICT src1, const __m128i *BMRESTRICT src2) |
| AND block digest stride dst = *src1 & src2. | |
| bool | bm::sse4_and_digest_5way (__m128i *BMRESTRICT dst, const __m128i *BMRESTRICT src1, const __m128i *BMRESTRICT src2, const __m128i *BMRESTRICT src3, const __m128i *BMRESTRICT src4) |
| AND block digest stride. | |
| bool | bm::sse4_sub_digest (__m128i *BMRESTRICT dst, const __m128i *BMRESTRICT src) |
| SUB (AND NOT) block digest stride dst &= ~*src. | |
| bool | bm::sse4_sub_digest_2way (__m128i *BMRESTRICT dst, const __m128i *BMRESTRICT src1, const __m128i *BMRESTRICT src2) |
| 2-operand SUB (AND NOT) block digest stride dst = src1 & ~*src2 | |
| bool | bm::sse4_is_all_one (const __m128i *BMRESTRICT block) |
| check if block is all zero bits | |
| BMFORCEINLINE bool | bm::sse42_test_all_one_wave (const void *ptr) |
| check if SSE wave is all oxFFFF...FFF | |
| BMFORCEINLINE bool | bm::sse42_test_all_zero_wave (const void *ptr) |
| check if wave of pointers is all NULL | |
| BMFORCEINLINE bool | bm::sse42_test_all_zero_wave2 (const void *ptr0, const void *ptr1) |
| check if 2 waves of pointers are all NULL | |
| BMFORCEINLINE bool | bm::sse42_test_all_eq_wave2 (const void *ptr0, const void *ptr1) |
| check if wave of 2 pointers are the same (null or FULL) | |
| unsigned | bm::sse42_bit_block_calc_change (const __m128i *BMRESTRICT block, unsigned size) |
| unsigned | bm::sse42_bit_block_calc_xor_change (const __m128i *BMRESTRICT block, const __m128i *BMRESTRICT xor_block, unsigned size) |
| void | bm::sse42_bit_block_calc_change_bc (const __m128i *BMRESTRICT block, unsigned *gc, unsigned *bc) |
| unsigned | bm::sse4_gap_find (const bm::gap_word_t *BMRESTRICT pbuf, const bm::gap_word_t pos, const unsigned size) |
| unsigned | bm::sse42_gap_bfind (const unsigned short *BMRESTRICT buf, unsigned pos, unsigned *BMRESTRICT is_set) |
| Hybrid binary search, starts as binary, then switches to linear scan. | |
| unsigned | bm::sse42_gap_test (const unsigned short *BMRESTRICT buf, unsigned pos) |
| Hybrid binary search, starts as binary, then switches to scan. | |
| int | bm::sse42_cmpge_u32 (__m128i vect4, unsigned value) |
| Experimental (test) function to do SIMD vector search (lower bound) in sorted, growing array. | |
| unsigned | bm::sse4_lower_bound_scan_u32 (const unsigned *BMRESTRICT arr, unsigned target, unsigned from, unsigned to) |
| lower bound (great or equal) linear scan in ascending order sorted array | |
| bool | bm::sse42_shift_l1 (__m128i *block, unsigned *empty_acc, unsigned co1) |
| block shift left by 1 | |
| bool | bm::sse42_shift_r1 (__m128i *block, unsigned *empty_acc, unsigned co1) |
| block shift right by 1 | |
| bool | bm::sse42_shift_r1_and (__m128i *block, bm::word_t co1, const __m128i *BMRESTRICT mask_block, bm::id64_t *digest) |
| block shift right by 1 plus AND | |
| void | bm::sse42_bit_block_xor (bm::word_t *target_block, const bm::word_t *block, const bm::word_t *xor_block, bm::id64_t digest) |
| Build partial XOR product of 2 bit-blocks using digest mask. | |
Processor specific optimizations for SSE4.2 instructions (internals).
|
inline |
SSE4.2 calculate number of bit changes from 0 to 1
Definition at line 633 of file bmsse4.h.
References BMRESTRICT.
|
inline |
SSE4.2 calculate number of bit changes from 0 to 1
Definition at line 798 of file bmsse4.h.
References BMRESTRICT, and set_block_size.
|
inline |
SSE4.2 calculate number of bit changes from 0 to 1 of a XOR product
Definition at line 711 of file bmsse4.h.
References BMRESTRICT.
|
inline |
Build partial XOR product of 2 bit-blocks using digest mask.
| target_block | - target := block ^ xor_block |
| block | - arg1 |
| xor_block | - arg2 |
| digest | - mask for each block wave to XOR (1) or just copy (0) |
Definition at line 1652 of file bmsse4.h.
References block_waves, and set_block_digest_wave_size.
|
inline |
|
inline |
Hybrid binary search, starts as binary, then switches to linear scan.
| buf | - GAP buffer pointer. |
| pos | - index of the element. |
| is_set | - output. GAP value (0 or 1). |
Definition at line 1058 of file bmsse4.h.
References BM_ASSERT, BMRESTRICT, and sse4_gap_find().
Referenced by sse42_gap_test().
|
inline |
Hybrid binary search, starts as binary, then switches to scan.
Definition at line 1106 of file bmsse4.h.
References BMRESTRICT, and sse42_gap_bfind().
Referenced by gap_test_unr().
|
inline |
|
inline |
|
inline |
block shift right by 1 plus AND
Definition at line 1537 of file bmsse4.h.
References BM_ASSERT, BMRESTRICT, id_max, and set_block_digest_wave_size.
| BMFORCEINLINE bool bm::sse42_test_all_eq_wave2 | ( | const void * | ptr0, |
| const void * | ptr1 ) |
check if wave of 2 pointers are the same (null or FULL)
Definition at line 619 of file bmsse4.h.
Referenced by bm::bvector< Alloc >::combine_operation_or().
| BMFORCEINLINE bool bm::sse42_test_all_one_wave | ( | const void * | ptr | ) |
| BMFORCEINLINE bool bm::sse42_test_all_zero_wave | ( | const void * | ptr | ) |
check if wave of pointers is all NULL
Definition at line 595 of file bmsse4.h.
Referenced by bm::bvector< Alloc >::combine_operation_and(), bm::bvector< Alloc >::combine_operation_sub(), for_each_bit(), and for_each_nzblock().
| BMFORCEINLINE bool bm::sse42_test_all_zero_wave2 | ( | const void * | ptr0, |
| const void * | ptr1 ) |
check if 2 waves of pointers are all NULL
Definition at line 606 of file bmsse4.h.
Referenced by bm::bvector< Alloc >::combine_operation_xor().
|
inline |
AND blocks2 dst &= *src.
Definition at line 237 of file bmsse4.h.
References BMRESTRICT, and set_block_size.
|
inline |
AND block digest stride dst &= *src.
Definition at line 284 of file bmsse4.h.
References BMRESTRICT.
|
inline |
AND block digest stride dst = *src1 & src2.
Definition at line 332 of file bmsse4.h.
References BMRESTRICT.
|
inline |
AND block digest stride.
Definition at line 379 of file bmsse4.h.
References BMRESTRICT.
|
inline |
|
inline |
|
inline |
SSE4.2 check for one to two (variable len) 128 bit SSE lines for gap search results (8 elements)
Definition at line 993 of file bmsse4.h.
References BM_ASSERT, and BMRESTRICT.
Referenced by sse42_gap_bfind().
|
inline |
check if block is all zero bits
Definition at line 559 of file bmsse4.h.
References BMRESTRICT, and set_block_size.
|
inline |
check if block is all zero bits
Definition at line 175 of file bmsse4.h.
References BMRESTRICT, and set_block_size.
|
inline |
check if digest stride is all zero bits
Definition at line 200 of file bmsse4.h.
References BMRESTRICT.
|
inline |
lower bound (great or equal) linear scan in ascending order sorted array
Definition at line 1154 of file bmsse4.h.
References BMRESTRICT.
|
inline |
SUB (AND NOT) block digest stride dst &= ~*src.
Definition at line 462 of file bmsse4.h.
References BMRESTRICT.
|
inline |
2-operand SUB (AND NOT) block digest stride dst = src1 & ~*src2
Definition at line 511 of file bmsse4.h.
References BMRESTRICT.