Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals | Examples

Processor specific optimizations for SSE2 instructions
[BitMagic C++ Library]

Collaboration diagram for Processor specific optimizations for SSE2 instructions:


Data Structures

class  bm::sse2_empty_guard
 SSE2 reinitialization guard class. More...

Functions

BMFORCEINLINE void bm::sse2_xor_arr_2_mask (__m128i *BMRESTRICT dst, const __m128i *BMRESTRICT src, const __m128i *BMRESTRICT src_end, bm::word_t mask)
 XOR array elements to specified mask dst = *src ^ mask.
BMFORCEINLINE void bm::sse2_andnot_arr_2_mask (__m128i *BMRESTRICT dst, const __m128i *BMRESTRICT src, const __m128i *BMRESTRICT src_end, bm::word_t mask)
 Inverts array elements and NOT them to specified mask dst = ~*src & mask.
BMFORCEINLINE void bm::sse2_and_arr (__m128i *BMRESTRICT dst, const __m128i *BMRESTRICT src, const __m128i *BMRESTRICT src_end)
 AND array elements against another array dst &= *src.
BMFORCEINLINE void bm::sse2_or_arr (__m128i *BMRESTRICT dst, const __m128i *BMRESTRICT src, const __m128i *BMRESTRICT src_end)
 OR array elements against another array dst |= *src.
BMFORCEINLINE void bm::sse2_xor_arr (__m128i *BMRESTRICT dst, const __m128i *BMRESTRICT src, const __m128i *BMRESTRICT src_end)
 OR array elements against another array dst |= *src.
BMFORCEINLINE void bm::sse2_sub_arr (__m128i *BMRESTRICT dst, const __m128i *BMRESTRICT src, const __m128i *BMRESTRICT src_end)
 AND-NOT (SUB) array elements against another array dst &= ~*src.
BMFORCEINLINE void bm::sse2_set_block (__m128i *BMRESTRICT dst, __m128i *BMRESTRICT dst_end, bm::word_t value)
 SSE2 block memset dst = value.
BMFORCEINLINE void bm::sse2_copy_block (__m128i *BMRESTRICT dst, const __m128i *BMRESTRICT src, const __m128i *BMRESTRICT src_end)
 SSE2 block copy dst = *src.
BMFORCEINLINE void bm::sse2_invert_arr (bm::word_t *first, bm::word_t *last)
 Invert array elements dst = ~*dst or dst ^= *dst.
bm::id_t bm::sse2_bit_count (const __m128i *block, const __m128i *block_end)

Function Documentation

BMFORCEINLINE void sse2_and_arr __m128i *BMRESTRICT  dst,
const __m128i *BMRESTRICT  src,
const __m128i *BMRESTRICT  src_end
 

AND array elements against another array dst &= *src.

Definition at line 137 of file bmsse2.h.

BMFORCEINLINE void sse2_andnot_arr_2_mask __m128i *BMRESTRICT  dst,
const __m128i *BMRESTRICT  src,
const __m128i *BMRESTRICT  src_end,
bm::word_t  mask
 

Inverts array elements and NOT them to specified mask dst = ~*src & mask.

Definition at line 109 of file bmsse2.h.

bm::id_t sse2_bit_count const __m128i *  block,
const __m128i *  block_end
[inline]
 

SSE2 optimized bitcounting function implements parallel bitcounting algorithm for SSE2 instruction set.

unsigned CalcBitCount32(unsigned b)
{
    b = (b & 0x55555555) + (b >> 1 & 0x55555555);
    b = (b & 0x33333333) + (b >> 2 & 0x33333333);
    b = (b + (b >> 4)) & 0x0F0F0F0F;
    b = b + (b >> 8);
    b = (b + (b >> 16)) & 0x0000003F;
    return b;
}

Definition at line 414 of file bmsse2.h.

BMFORCEINLINE void sse2_copy_block __m128i *BMRESTRICT  dst,
const __m128i *BMRESTRICT  src,
const __m128i *BMRESTRICT  src_end
 

SSE2 block copy dst = *src.

Definition at line 330 of file bmsse2.h.

BMFORCEINLINE void sse2_invert_arr bm::word_t first,
bm::word_t last
 

Invert array elements dst = ~*dst or dst ^= *dst.

Definition at line 375 of file bmsse2.h.

BMFORCEINLINE void sse2_or_arr __m128i *BMRESTRICT  dst,
const __m128i *BMRESTRICT  src,
const __m128i *BMRESTRICT  src_end
 

OR array elements against another array dst |= *src.

Definition at line 179 of file bmsse2.h.

BMFORCEINLINE void sse2_set_block __m128i *BMRESTRICT  dst,
__m128i *BMRESTRICT  dst_end,
bm::word_t  value
 

SSE2 block memset dst = value.

Definition at line 298 of file bmsse2.h.

BMFORCEINLINE void sse2_sub_arr __m128i *BMRESTRICT  dst,
const __m128i *BMRESTRICT  src,
const __m128i *BMRESTRICT  src_end
 

AND-NOT (SUB) array elements against another array dst &= ~*src.

Definition at line 258 of file bmsse2.h.

BMFORCEINLINE void sse2_xor_arr __m128i *BMRESTRICT  dst,
const __m128i *BMRESTRICT  src,
const __m128i *BMRESTRICT  src_end
 

OR array elements against another array dst |= *src.

Definition at line 218 of file bmsse2.h.

BMFORCEINLINE void sse2_xor_arr_2_mask __m128i *BMRESTRICT  dst,
const __m128i *BMRESTRICT  src,
const __m128i *BMRESTRICT  src_end,
bm::word_t  mask
 

XOR array elements to specified mask dst = *src ^ mask.

Definition at line 84 of file bmsse2.h.


Generated on Thu Apr 20 13:29:10 2006 for BitMagic by  doxygen 1.4.1