STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
nmmintrin.h
Go to the documentation of this file.
1 /***
2 *** Copyright (C) 1985-2007 Intel Corporation. All rights reserved.
3 ***
4 *** The information and source code contained herein is the exclusive
5 *** property of Intel Corporation and may not be disclosed, examined
6 *** or reproduced in whole or in part without explicit written authorization
7 *** from the company.
8 ***
9 ****/
10 
11 /*
12  * nmmintrin.h
13  *
14  * Principal header file for Intel(R) Core(TM) 2 Duo processor
15  * SSE4.2 intrinsics.
16  */
17 
18 #pragma once
19 #ifndef __midl
20 #ifndef _INCLUDED_NMM
21 #define _INCLUDED_NMM
22 
23 #if defined (_M_CEE_PURE)
24  #error ERROR: EMM intrinsics not supported in the pure mode!
25 #else /* defined (_M_CEE_PURE) */
26 
27 #include <smmintrin.h>
28 
29 
30 #if __cplusplus
31 extern "C" {
32 #endif /* __cplusplus */
33 
34 /*
35  * These defines are used to determine the kind of units to be compared
36  */
37 #define _SIDD_UBYTE_OPS 0x00
38 #define _SIDD_UWORD_OPS 0x01
39 #define _SIDD_SBYTE_OPS 0x02
40 #define _SIDD_SWORD_OPS 0x03
41 
42 
43 /*
44  * These defines are used to determine the comparison operation
45  */
46 #define _SIDD_CMP_EQUAL_ANY 0x00
47 #define _SIDD_CMP_RANGES 0x04
48 #define _SIDD_CMP_EQUAL_EACH 0x08
49 #define _SIDD_CMP_EQUAL_ORDERED 0x0C
50 
51 
52 /*
53  * These defines are used to determine the polarity
54  */
55 #define _SIDD_POSITIVE_POLARITY 0x00
56 #define _SIDD_NEGATIVE_POLARITY 0x10
57 #define _SIDD_MASKED_POSITIVE_POLARITY 0x20
58 #define _SIDD_MASKED_NEGATIVE_POLARITY 0x30
59 
60 
61 /*
62  * These defines are used in _mm_cmpXstri()
63  */
64 #define _SIDD_LEAST_SIGNIFICANT 0x00
65 #define _SIDD_MOST_SIGNIFICANT 0x40
66 
67 /*
68  * These defines are used _mm_cmpXstrm()
69  */
70 #define _SIDD_BIT_MASK 0x00
71 #define _SIDD_UNIT_MASK 0x40
72 
73 
74 /*
75  * Intrinsics for text/string processing.
76  */
77 
78  extern __m128i _mm_cmpistrm (__m128i a, __m128i b, const int mode);
79  extern int _mm_cmpistri (__m128i a, __m128i b, const int mode);
80 
81  extern __m128i _mm_cmpestrm (__m128i a, int la, __m128i b, int lb, const int mode);
82  extern int _mm_cmpestri (__m128i a, int la, __m128i b, int lb, const int mode);
83 
84 /*
85  * Intrinsics for text/string processing and reading values of EFlags.
86  */
87 
88  extern int _mm_cmpistrz (__m128i a, __m128i b, const int mode);
89  extern int _mm_cmpistrc (__m128i a, __m128i b, const int mode);
90  extern int _mm_cmpistrs (__m128i a, __m128i b, const int mode);
91  extern int _mm_cmpistro (__m128i a, __m128i b, const int mode);
92  extern int _mm_cmpistra (__m128i a, __m128i b, const int mode);
93 
94  extern int _mm_cmpestrz (__m128i a, int la, __m128i b, int lb, const int mode);
95  extern int _mm_cmpestrc (__m128i a, int la, __m128i b, int lb, const int mode);
96  extern int _mm_cmpestrs (__m128i a, int la, __m128i b, int lb, const int mode);
97  extern int _mm_cmpestro (__m128i a, int la, __m128i b, int lb, const int mode);
98  extern int _mm_cmpestra (__m128i a, int la, __m128i b, int lb, const int mode);
99 
100 /*
101  * Packed integer 64-bit comparison, zeroing or filling with ones
102  * corresponding parts of result
103  */
104 
105  extern __m128i _mm_cmpgt_epi64(__m128i val1, __m128i val2);
106 
107 /*
108  * Calculate a number of bits set to 1
109  */
110 
111  extern int _mm_popcnt_u32(unsigned int v);
112 
113 #if defined (_M_X64)
114  extern __int64 _mm_popcnt_u64(unsigned __int64 v);
115 #endif /* defined (_M_X64) */
116 
117 /*
118  * Accumulate CRC32 (polynomial 0x11EDC6F41) value
119  */
120 
121  extern unsigned int _mm_crc32_u8 (unsigned int crc, unsigned char v);
122  extern unsigned int _mm_crc32_u16(unsigned int crc, unsigned short v);
123  extern unsigned int _mm_crc32_u32(unsigned int crc, unsigned int v);
124 
125 #if defined (_M_X64)
126  extern unsigned __int64 _mm_crc32_u64(unsigned __int64 crc, unsigned __int64 v);
127 #endif /* defined (_M_X64) */
128 
129 #if defined __cplusplus
130 }; /* End "C" */
131 #endif /* defined __cplusplus */
132 
133 #endif /* defined (_M_CEE_PURE) */
134 
135 #endif /* _INCLUDED_NMM */
136 #endif /* __midl */
unsigned int _mm_crc32_u8(unsigned int crc, unsigned char v)
int _mm_cmpistri(__m128i a, __m128i b, const int mode)
int _mm_cmpistrz(__m128i a, __m128i b, const int mode)
int _mm_cmpestrz(__m128i a, int la, __m128i b, int lb, const int mode)
int _mm_cmpestra(__m128i a, int la, __m128i b, int lb, const int mode)
__m128i _mm_cmpistrm(__m128i a, __m128i b, const int mode)
int _mm_cmpistra(__m128i a, __m128i b, const int mode)
int _mm_popcnt_u32(unsigned int v)
__m128i
Definition: emmintrin.h:44
__m128i _mm_cmpestrm(__m128i a, int la, __m128i b, int lb, const int mode)
int _mm_cmpistrc(__m128i a, __m128i b, const int mode)
int _mm_cmpestrc(__m128i a, int la, __m128i b, int lb, const int mode)
unsigned int _mm_crc32_u32(unsigned int crc, unsigned int v)
int _mm_cmpestro(__m128i a, int la, __m128i b, int lb, const int mode)
int _mm_cmpestri(__m128i a, int la, __m128i b, int lb, const int mode)
unsigned int _mm_crc32_u16(unsigned int crc, unsigned short v)
int _mm_cmpestrs(__m128i a, int la, __m128i b, int lb, const int mode)
int _mm_cmpistrs(__m128i a, __m128i b, const int mode)
__m128i _mm_cmpgt_epi64(__m128i val1, __m128i val2)
int _mm_cmpistro(__m128i a, __m128i b, const int mode)