#pragma once
#if !defined(_M_IX86) && !defined(_M_X64)
#error This header is specific to X86 and X64 targets
#endif
#ifndef _INCLUDED_SMM
#define _INCLUDED_SMM
#ifndef __midl
#if defined (_M_CEE_PURE)
#error ERROR: EMM intrinsics not supported in the pure mode!
#else /* defined (_M_CEE_PURE) */
#include <tmmintrin.h>
#define _MM_FROUND_TO_NEAREST_INT 0x00
#define _MM_FROUND_TO_NEG_INF 0x01
#define _MM_FROUND_TO_POS_INF 0x02
#define _MM_FROUND_TO_ZERO 0x03
#define _MM_FROUND_CUR_DIRECTION 0x04
#define _MM_FROUND_RAISE_EXC 0x00
#define _MM_FROUND_NO_EXC 0x08
#define _MM_FROUND_NINT _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_RAISE_EXC
#define _MM_FROUND_FLOOR _MM_FROUND_TO_NEG_INF | _MM_FROUND_RAISE_EXC
#define _MM_FROUND_CEIL _MM_FROUND_TO_POS_INF | _MM_FROUND_RAISE_EXC
#define _MM_FROUND_TRUNC _MM_FROUND_TO_ZERO | _MM_FROUND_RAISE_EXC
#define _MM_FROUND_RINT _MM_FROUND_CUR_DIRECTION | _MM_FROUND_RAISE_EXC
#define _MM_FROUND_NEARBYINT _MM_FROUND_CUR_DIRECTION | _MM_FROUND_NO_EXC
#define _mm_ceil_pd(val) _mm_round_pd((val), _MM_FROUND_CEIL)
#define _mm_ceil_sd(dst, val) _mm_round_sd((dst), (val), _MM_FROUND_CEIL)
#define _mm_floor_pd(val) _mm_round_pd((val), _MM_FROUND_FLOOR)
#define _mm_floor_sd(dst, val) _mm_round_sd((dst), (val), _MM_FROUND_FLOOR)
#define _mm_ceil_ps(val) _mm_round_ps((val), _MM_FROUND_CEIL)
#define _mm_ceil_ss(dst, val) _mm_round_ss((dst), (val), _MM_FROUND_CEIL)
#define _mm_floor_ps(val) _mm_round_ps((val), _MM_FROUND_FLOOR)
#define _mm_floor_ss(dst, val) _mm_round_ss((dst), (val), _MM_FROUND_FLOOR)
#define _mm_test_all_zeros(mask, val) _mm_testz_si128((mask), (val))
#define _mm_test_all_ones(val) \
_mm_testc_si128((val), _mm_cmpeq_epi32((val),(val)))
#define _mm_test_mix_ones_zeros(mask, val) _mm_testnzc_si128((mask), (val))
#if __cplusplus
extern
"C"
{
#endif /* __cplusplus */
extern
(
,
,
const
int
);
extern
(
,
,
);
extern
(
,
,
const
int
);
extern
(
,
,
);
extern
(
,
,
const
int
);
extern
(
,
,
);
extern
(
,
,
const
int
);
extern
(
,
,
const
int
);
extern
(
,
);
extern
(
,
);
extern
(
,
);
extern
(
,
);
extern
(
,
);
extern
(
,
);
extern
(
,
);
extern
(
,
);
extern
(
,
);
extern
(
,
);
extern
(
,
);
extern
int
(
,
);
extern
int
(
,
);
extern
int
(
,
);
extern
(
,
,
const
int
);
#define _MM_MK_INSERTPS_NDX(srcField, dstField, zeroMask) \
(((srcField)<<6) | ((dstField)<<4) | (zeroMask))
extern
int
(
,
const
int
);
#define _MM_EXTRACT_FLOAT(dest, src, ndx) \
*((int*)&(dest)) = _mm_extract_ps((src), (ndx))
#define _MM_PICK_OUT_PS(src, num) \
_mm_insert_ps(_mm_setzero_ps(), (src), \
_MM_MK_INSERTPS_NDX((num), 0, 0x0e))
extern
(
,
int
,
const
int
);
extern
(
,
int
,
const
int
);
#if defined (_M_X64)
extern __m128i _mm_insert_epi64(__m128i /* dst */, __int64 /* src */, const int /* index */);
#endif /* defined (_M_X64) */
extern
int
(
,
const
int
);
extern
int
(
,
const
int
);
#if defined (_M_X64)
extern __int64 _mm_extract_epi64(__m128i /* src */, const int /* index */);
#endif /* defined (_M_X64) */
extern
(
);
extern
(
,
int
);
extern
(
,
,
int
);
extern
(
,
int
);
extern
(
,
,
int
);
extern
(
);
extern
(
);
extern
(
);
extern
(
);
extern
(
);
extern
(
);
extern
(
);
extern
(
);
extern
(
);
extern
(
);
extern
(
);
extern
(
);
extern
(
,
);
extern
(
,
,
const
int
);
#if defined(_CRT_WINDOWS) || defined(BUILD_WINDOWS)
extern __m128i _mm_stream_load_si128(__m128i*);
#else /* defined(_CRT_WINDOWS) || defined(BUILD_WINDOWS) */
extern
(
const
*);
#endif /* defined(_CRT_WINDOWS) || defined(BUILD_WINDOWS) */
#if defined __cplusplus
};
#endif /* defined __cplusplus */
#endif /* defined (_M_CEE_PURE) */
#endif /* __midl */
#endif /* _INCLUDED_SMM */