Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
impala::SSEUtil Namespace Reference

This class contains constants useful for text processing with SSE4.2 intrinsics. More...

Variables

static const int CHARS_PER_64_BIT_REGISTER = 8
 
static const int CHARS_PER_128_BIT_REGISTER = 16
 
static const int PCMPSTR_EQUAL_ANY = 0x00
 
static const int PCMPSTR_EQUAL_EACH = 0x08
 
static const int PCMPSTR_UBYTE_OPS = 0x00
 
static const int PCMPSTR_NEG_POLARITY = 0x10
 
static const int STRCHR_MODE = PCMPSTR_EQUAL_ANY | PCMPSTR_UBYTE_OPS
 
static const int STRCMP_MODE
 
static const int SSE_BITMASK [CHARS_PER_128_BIT_REGISTER]
 Precomputed mask values up to 16 bits. More...
 

Detailed Description

This class contains constants useful for text processing with SSE4.2 intrinsics.

Variable Documentation

const int impala::SSEUtil::CHARS_PER_64_BIT_REGISTER = 8
static

Number of characters that fit in 64/128 bit register. SSE provides instructions for loading 64 or 128 bits into a register at a time.

Definition at line 27 of file sse-util.h.

Referenced by StringCompare1().

const int impala::SSEUtil::PCMPSTR_EQUAL_ANY = 0x00
static

SSE4.2 adds instructions for text processing. The instructions have a control byte that determines some of functionality of the instruction. (Equivalent to GCC's _SIDD_CMP_EQUAL_ANY, etc).

Definition at line 33 of file sse-util.h.

const int impala::SSEUtil::PCMPSTR_EQUAL_EACH = 0x08
static

Definition at line 34 of file sse-util.h.

const int impala::SSEUtil::PCMPSTR_NEG_POLARITY = 0x10
static

Definition at line 36 of file sse-util.h.

const int impala::SSEUtil::PCMPSTR_UBYTE_OPS = 0x00
static

Definition at line 35 of file sse-util.h.

const int impala::SSEUtil::SSE_BITMASK[CHARS_PER_128_BIT_REGISTER]
static
Initial value:
= {
1 << 0,
1 << 1,
1 << 2,
1 << 3,
1 << 4,
1 << 5,
1 << 6,
1 << 7,
1 << 8,
1 << 9,
1 << 10,
1 << 11,
1 << 12,
1 << 13,
1 << 14,
1 << 15,
}

Precomputed mask values up to 16 bits.

Definition at line 48 of file sse-util.h.

Referenced by impala::DelimitedTextParser::FindFirstInstance(), impala::DelimitedTextParser::ParseSingleTuple(), impala::DelimitedTextParser::ParseSse(), and impala::ProcessEscapeMask().

const int impala::SSEUtil::STRCHR_MODE = PCMPSTR_EQUAL_ANY | PCMPSTR_UBYTE_OPS
static

In this mode, SSE text processing functions will return a mask of all the characters that matched.

Definition at line 40 of file sse-util.h.

Referenced by impala::DelimitedTextParser::FindFirstInstance(), impala::DelimitedTextParser::ParseSingleTuple(), and impala::DelimitedTextParser::ParseSse().

const int impala::SSEUtil::STRCMP_MODE
static
Initial value:
static const int PCMPSTR_EQUAL_EACH
Definition: sse-util.h:34
static const int PCMPSTR_UBYTE_OPS
Definition: sse-util.h:35
static const int PCMPSTR_NEG_POLARITY
Definition: sse-util.h:36

In this mode, SSE text processing functions will return the number of bytes that match consecutively from the beginning.

Definition at line 44 of file sse-util.h.

Referenced by impala::StringCompare(), StringCompare1(), StringCompare2(), and StringCompare3().