00001
00002
00003
00004
00005 #ifndef __SSEPLUS_NATIVE_SSSE3_H__
00006 #define __SSEPLUS_NATIVE_SSSE3_H__
00007
00008 #include "../SSEPlus_base.h"
00009 #include <tmmintrin.h>
00010
00011
00018 SSP_FORCEINLINE __m128i ssp_abs_epi16_SSSE3 (__m128i a)
00019 {
00020 return _mm_abs_epi16( a );
00021 }
00023 SSP_FORCEINLINE __m128i ssp_abs_epi32_SSSE3 (__m128i a)
00024 {
00025 return _mm_abs_epi32(a);
00026 }
00028 SSP_FORCEINLINE __m128i ssp_abs_epi8_SSSE3 (__m128i a)
00029 {
00030 return _mm_abs_epi8(a);
00031 }
00033 SSP_FORCEINLINE __m64 ssp_abs_pi16_SSSE3 (__m64 a)
00034 {
00035 return _mm_abs_pi16(a);
00036 }
00038 SSP_FORCEINLINE __m64 ssp_abs_pi32_SSSE3 (__m64 a)
00039 {
00040 return _mm_abs_pi32(a);
00041 }
00043 SSP_FORCEINLINE __m64 ssp_abs_pi8_SSSE3 (__m64 a)
00044 {
00045 return _mm_abs_pi8(a);
00046 }
00048 SSP_FORCEINLINE __m128i ssp_alignr_epi8_SSSE3 (__m128i a, __m128i b, int n)
00049 {
00050 n = (n>=32) ? 32 : n;
00051 switch( n )
00052 {
00053 CASE_32( _mm_alignr_epi8, a, b );
00054 }
00055 }
00057 SSP_FORCEINLINE __m64 ssp_alignr_pi8_SSSE3 (__m64 a, __m64 b, int n)
00058 {
00059 n = (n>=16) ? 16 : n;
00060 switch( n )
00061 {
00062 CASE_16( _mm_alignr_pi8, a, b );
00063 }
00064 }
00066 SSP_FORCEINLINE __m128i ssp_hadd_epi16_SSSE3 (__m128i a, __m128i b)
00067 {
00068 return _mm_hadd_epi16(a, b);
00069 }
00071 SSP_FORCEINLINE __m128i ssp_hadd_epi32_SSSE3 (__m128i a, __m128i b)
00072 {
00073 return _mm_hadd_epi32(a, b);
00074 }
00076 SSP_FORCEINLINE __m64 ssp_hadd_pi16_SSSE3 (__m64 a, __m64 b)
00077 {
00078 return _mm_hadd_pi16(a, b);
00079 }
00081 SSP_FORCEINLINE __m64 ssp_hadd_pi32_SSSE3 (__m64 a, __m64 b)
00082 {
00083 return _mm_hadd_pi32(a, b);
00084 }
00086 SSP_FORCEINLINE __m128i ssp_hadds_epi16_SSSE3 (__m128i a, __m128i b)
00087 {
00088 return _mm_hadds_epi16(a, b);
00089 }
00091 SSP_FORCEINLINE __m64 ssp_hadds_pi16_SSSE3 (__m64 a, __m64 b)
00092 {
00093 return _mm_hadds_pi16(a, b);
00094 }
00096 SSP_FORCEINLINE __m128i ssp_hsub_epi16_SSSE3 (__m128i a, __m128i b)
00097 {
00098 return _mm_hsub_epi16(a, b);
00099 }
00101 SSP_FORCEINLINE __m128i ssp_hsub_epi32_SSSE3 (__m128i a, __m128i b)
00102 {
00103 return _mm_hsub_epi32(a, b);
00104 }
00106 SSP_FORCEINLINE __m64 ssp_hsub_pi16_SSSE3 (__m64 a, __m64 b)
00107 {
00108 return _mm_hsub_pi16(a, b);
00109 }
00111 SSP_FORCEINLINE __m64 ssp_hsub_pi32_SSSE3 (__m64 a, __m64 b)
00112 {
00113 return _mm_hsub_pi32(a, b);
00114 }
00116 SSP_FORCEINLINE __m128i ssp_hsubs_epi16_SSSE3 (__m128i a, __m128i b)
00117 {
00118 return _mm_hsubs_epi16(a, b);
00119 }
00121 SSP_FORCEINLINE __m64 ssp_hsubs_pi16_SSSE3 (__m64 a, __m64 b)
00122 {
00123 return _mm_hsubs_pi16(a, b);
00124 }
00126 SSP_FORCEINLINE __m128i ssp_maddubs_epi16_SSSE3 (__m128i a, __m128i b)
00127 {
00128 return _mm_maddubs_epi16(a, b);
00129 }
00131 SSP_FORCEINLINE __m64 ssp_maddubs_pi16_SSSE3 (__m64 a, __m64 b)
00132 {
00133 return _mm_maddubs_pi16(a, b);
00134 }
00136 SSP_FORCEINLINE __m128i ssp_mulhrs_epi16_SSSE3 (__m128i a, __m128i b)
00137 {
00138 return _mm_mulhrs_epi16(a, b);
00139 }
00141 SSP_FORCEINLINE __m64 ssp_mulhrs_pi16_SSSE3 (__m64 a, __m64 b)
00142 {
00143 return _mm_mulhrs_pi16(a, b);
00144 }
00146 SSP_FORCEINLINE __m128i ssp_shuffle_epi8_SSSE3 (__m128i a, __m128i b)
00147 {
00148 return _mm_shuffle_epi8(a, b);
00149 }
00151 SSP_FORCEINLINE __m64 ssp_shuffle_pi8_SSSE3 (__m64 a, __m64 b)
00152 {
00153 return _mm_shuffle_pi8(a, b);
00154 }
00156 SSP_FORCEINLINE __m128i ssp_sign_epi16_SSSE3 (__m128i a, __m128i b)
00157 {
00158 return _mm_sign_epi16(a, b);
00159 }
00161 SSP_FORCEINLINE __m128i ssp_sign_epi32_SSSE3 (__m128i a, __m128i b)
00162 {
00163 return _mm_sign_epi32(a, b);
00164 }
00166 SSP_FORCEINLINE __m128i ssp_sign_epi8_SSSE3 (__m128i a, __m128i b)
00167 {
00168 return _mm_sign_epi8(a, b);
00169 }
00171 SSP_FORCEINLINE __m64 ssp_sign_pi16_SSSE3 (__m64 a, __m64 b)
00172 {
00173 return _mm_sign_pi16(a, b);
00174 }
00176 SSP_FORCEINLINE __m64 ssp_sign_pi32_SSSE3 (__m64 a, __m64 b)
00177 {
00178 return _mm_sign_pi32(a, b);
00179 }
00181 SSP_FORCEINLINE __m64 ssp_sign_pi8_SSSE3 (__m64 a, __m64 b)
00182 {
00183 return _mm_sign_pi8(a, b);
00184 }
00185
00190 #endif // __SSEPLUS_NATIVE_SSSE3_H__