00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include <string.h>
00022 #include <flgrCoreVector.h>
00023 #include <flgrCoreDispatch.h>
00024
00025 #ifdef __SSE__
00026 #include <mmintrin.h>
00027 #include <xmmintrin.h>
00028 #endif
00029
00030 #include "flgrArithSSE.h"
00031
00032 #define FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(instr,dtype,set_vec_const) \
00033 __m64 r1,r2; \
00034 void *psrc1 = data1->array; \
00035 void *pdest = datdest->array; \
00036 int j,c = (sizeof(__m64)*8)/data1->bps; \
00037 int length = datdest->length; \
00038 \
00039 \
00040 \
00041 _mm_empty(); \
00042 r2=set_vec_const(*((dtype*) (vec_const->array))); \
00043 \
00044 \
00045 for(j=0;j<length;j+=c) { \
00046 r1 = *((__m64*) psrc1); \
00047 r1 = instr(r1,r2); \
00048 *((__m64*) pdest) = r1; \
00049 \
00050 psrc1+=sizeof(__m64); \
00051 pdest+=sizeof(__m64); \
00052 } \
00053 \
00054 _mm_empty(); \
00055 \
00056 return
00057
00058
00059 #define FLGR_MACRO_ARITH_1D_DIADIC_SSE(instr) \
00060 __m64 r1,r2; \
00061 void *psrc1 = data1->array; \
00062 void *psrc2 = data2->array; \
00063 void *pdest = datdest->array; \
00064 int j,c = (sizeof(__m64)*8)/data1->bps; \
00065 int length = datdest->length*datdest->spp; \
00066 \
00067 \
00068 \
00069 _mm_empty(); \
00070 \
00071 for(j=0;j<length;j+=c) { \
00072 r1 = *((__m64*) psrc1); \
00073 r2 = *((__m64*) psrc2); \
00074 r1 = instr(r1,r2); \
00075 *((__m64*) pdest) = r1; \
00076 \
00077 psrc1+=sizeof(__m64); \
00078 psrc2+=sizeof(__m64); \
00079 pdest+=sizeof(__m64); \
00080 } \
00081 \
00082 _mm_empty(); \
00083 return
00084
00085
00086 void flgr1d_arith_inf_SSE_fgBIT(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00087 #ifdef __SSE__
00088 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_and_si64);
00089 #endif
00090 }
00091 void flgr1d_arith_inf_SSE_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00092 #ifdef __SSE__
00093 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_min_pu8);
00094 #endif
00095 }
00096 void flgr1d_arith_inf_SSE_fgINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00097 #ifdef __SSE__
00098 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_min_pi16);
00099 #endif
00100 }
00101
00102
00103 void flgr1d_arith_sup_SSE_fgBIT(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00104 #ifdef __SSE__
00105 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_or_si64);
00106 #endif
00107 }
00108 void flgr1d_arith_sup_SSE_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00109 #ifdef __SSE__
00110 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_max_pu8);
00111 #endif
00112 }
00113 void flgr1d_arith_sup_SSE_fgINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00114 #ifdef __SSE__
00115 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_max_pi16);
00116 #endif
00117 }
00118
00119
00120
00121 void flgr1d_arith_and_SSE_fgBIT(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00122 #ifdef __SSE__
00123 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_and_si64);
00124 #endif
00125 }
00126 void flgr1d_arith_and_SSE_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00127 #ifdef __SSE__
00128 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_and_si64);
00129 #endif
00130 }
00131 void flgr1d_arith_and_SSE_fgUINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00132 #ifdef __SSE__
00133 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_and_si64);
00134 #endif
00135 }
00136 void flgr1d_arith_and_SSE_fgUINT32(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00137 #ifdef __SSE__
00138 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_and_si64);
00139 #endif
00140 }
00141 void flgr1d_arith_and_SSE_fgINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00142 #ifdef __SSE__
00143 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_and_si64);
00144 #endif
00145 }
00146 void flgr1d_arith_and_SSE_fgINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00147 #ifdef __SSE__
00148 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_and_si64);
00149 #endif
00150 }
00151 void flgr1d_arith_and_SSE_fgINT32(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00152 #ifdef __SSE__
00153 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_and_si64);
00154 #endif
00155 }
00156
00157
00158
00159
00160 void flgr1d_arith_or_SSE_fgBIT(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00161 #ifdef __SSE__
00162 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_or_si64);
00163 #endif
00164 }
00165 void flgr1d_arith_or_SSE_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00166 #ifdef __SSE__
00167 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_or_si64);
00168 #endif
00169 }
00170 void flgr1d_arith_or_SSE_fgUINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00171 #ifdef __SSE__
00172 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_or_si64);
00173 #endif
00174 }
00175 void flgr1d_arith_or_SSE_fgUINT32(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00176 #ifdef __SSE__
00177 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_or_si64);
00178 #endif
00179 }
00180 void flgr1d_arith_or_SSE_fgINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00181 #ifdef __SSE__
00182 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_or_si64);
00183 #endif
00184 }
00185 void flgr1d_arith_or_SSE_fgINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00186 #ifdef __SSE__
00187 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_or_si64);
00188 #endif
00189 }
00190 void flgr1d_arith_or_SSE_fgINT32(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00191 #ifdef __SSE__
00192 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_or_si64);
00193 #endif
00194 }
00195
00196
00197
00198
00199 void flgr1d_arith_xor_SSE_fgBIT(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00200 #ifdef __SSE__
00201 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_xor_si64);
00202 #endif
00203 }
00204 void flgr1d_arith_xor_SSE_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00205 #ifdef __SSE__
00206 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_xor_si64);
00207 #endif
00208 }
00209 void flgr1d_arith_xor_SSE_fgUINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00210 #ifdef __SSE__
00211 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_xor_si64);
00212 #endif
00213 }
00214 void flgr1d_arith_xor_SSE_fgUINT32(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00215 #ifdef __SSE__
00216 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_xor_si64);
00217 #endif
00218 }
00219 void flgr1d_arith_xor_SSE_fgINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00220 #ifdef __SSE__
00221 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_xor_si64);
00222 #endif
00223 }
00224 void flgr1d_arith_xor_SSE_fgINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00225 #ifdef __SSE__
00226 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_xor_si64);
00227 #endif
00228 }
00229 void flgr1d_arith_xor_SSE_fgINT32(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00230 #ifdef __SSE__
00231 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_xor_si64);
00232 #endif
00233 }
00234
00235
00236
00237 void flgr1d_arith_add_SSE_fgBIT(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00238 #ifdef __SSE__
00239 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_xor_si64);
00240 #endif
00241 }
00242 void flgr1d_arith_add_SSE_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00243 #ifdef __SSE__
00244 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_add_pi8);
00245 #endif
00246 }
00247 void flgr1d_arith_add_SSE_fgUINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00248 #ifdef __SSE__
00249 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_add_pi16);
00250 #endif
00251 }
00252 void flgr1d_arith_add_SSE_fgINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00253 #ifdef __SSE__
00254 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_add_pi8);
00255 #endif
00256 }
00257 void flgr1d_arith_add_SSE_fgINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00258 #ifdef __SSE__
00259 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_add_pi16);
00260 #endif
00261 }
00262
00263
00264
00265 void flgr1d_arith_addsat_SSE_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00266 #ifdef __SSE__
00267 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_adds_pu8);
00268 #endif
00269 }
00270 void flgr1d_arith_addsat_SSE_fgUINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00271 #ifdef __SSE__
00272 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_adds_pu16);
00273 #endif
00274 }
00275 void flgr1d_arith_addsat_SSE_fgINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00276 #ifdef __SSE__
00277 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_adds_pi16);
00278 #endif
00279 }
00280
00281
00282
00283 void flgr1d_arith_sub_SSE_fgBIT(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00284 #ifdef __SSE__
00285 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_xor_si64);
00286 #endif
00287 }
00288 void flgr1d_arith_sub_SSE_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00289 #ifdef __SSE__
00290 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_sub_pi8);
00291 #endif
00292 }
00293 void flgr1d_arith_sub_SSE_fgUINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00294 #ifdef __SSE__
00295 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_sub_pi16);
00296 #endif
00297 }
00298 void flgr1d_arith_sub_SSE_fgINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00299 #ifdef __SSE__
00300 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_sub_pi8);
00301 #endif
00302 }
00303 void flgr1d_arith_sub_SSE_fgINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00304 #ifdef __SSE__
00305 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_sub_pi16);
00306 #endif
00307 }
00308
00309
00310
00311 void flgr1d_arith_subsat_SSE_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00312 #ifdef __SSE__
00313 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_subs_pu8);
00314 #endif
00315 }
00316 void flgr1d_arith_subsat_SSE_fgUINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00317 #ifdef __SSE__
00318 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_subs_pu16);
00319 #endif
00320 }
00321 void flgr1d_arith_subsat_SSE_fgINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Data1D *data2) {
00322 #ifdef __SSE__
00323 FLGR_MACRO_ARITH_1D_DIADIC_SSE(_mm_subs_pi16);
00324 #endif
00325 }
00326
00327
00328
00329
00330
00331
00332
00333 void flgr1d_arith_const_inf_spp1_SSE_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00334 #ifdef __SSE__
00335 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_min_pu8,fgUINT8,_mm_set1_pi8);
00336 #endif
00337 }
00338 void flgr1d_arith_const_inf_spp1_SSE_fgINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00339 #ifdef __SSE__
00340 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_min_pi16,fgINT16,_mm_set1_pi16);
00341 #endif
00342 }
00343
00344
00345
00346 void flgr1d_arith_const_sup_spp1_SSE_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00347 #ifdef __SSE__
00348 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_max_pu8,fgUINT8,_mm_set1_pi8);
00349 #endif
00350 }
00351 void flgr1d_arith_const_sup_spp1_SSE_fgINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00352 #ifdef __SSE__
00353 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_max_pi16,fgINT16,_mm_set1_pi16);
00354 #endif
00355 }
00356
00357
00358
00359 void flgr1d_arith_const_and_spp1_SSE_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00360 #ifdef __SSE__
00361 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_and_si64,fgUINT8,_mm_set1_pi8);
00362 #endif
00363 }
00364 void flgr1d_arith_const_and_spp1_SSE_fgUINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00365 #ifdef __SSE__
00366 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_and_si64,fgUINT16,_mm_set1_pi16);
00367 #endif
00368 }
00369 void flgr1d_arith_const_and_spp1_SSE_fgUINT32(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00370 #ifdef __SSE__
00371 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_and_si64,fgUINT32,_mm_set1_pi32);
00372 #endif
00373 }
00374 void flgr1d_arith_const_and_spp1_SSE_fgINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00375 #ifdef __SSE__
00376 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_and_si64,fgINT8,_mm_set1_pi8);
00377 #endif
00378 }
00379 void flgr1d_arith_const_and_spp1_SSE_fgINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00380 #ifdef __SSE__
00381 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_and_si64,fgINT16,_mm_set1_pi16);
00382 #endif
00383 }
00384 void flgr1d_arith_const_and_spp1_SSE_fgINT32(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00385 #ifdef __SSE__
00386 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_and_si64,fgINT32,_mm_set1_pi32);
00387 #endif
00388 }
00389
00390
00391
00392 void flgr1d_arith_const_or_spp1_SSE_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00393 #ifdef __SSE__
00394 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_or_si64,fgUINT8,_mm_set1_pi8);
00395 #endif
00396 }
00397 void flgr1d_arith_const_or_spp1_SSE_fgUINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00398 #ifdef __SSE__
00399 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_or_si64,fgUINT16,_mm_set1_pi16);
00400 #endif
00401 }
00402 void flgr1d_arith_const_or_spp1_SSE_fgUINT32(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00403 #ifdef __SSE__
00404 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_or_si64,fgUINT32,_mm_set1_pi32);
00405 #endif
00406 }
00407 void flgr1d_arith_const_or_spp1_SSE_fgINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00408 #ifdef __SSE__
00409 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_or_si64,fgINT8,_mm_set1_pi8);
00410 #endif
00411 }
00412 void flgr1d_arith_const_or_spp1_SSE_fgINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00413 #ifdef __SSE__
00414 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_or_si64,fgINT16,_mm_set1_pi16);
00415 #endif
00416 }
00417 void flgr1d_arith_const_or_spp1_SSE_fgINT32(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00418 #ifdef __SSE__
00419 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_or_si64,fgINT32,_mm_set1_pi32);
00420 #endif
00421 }
00422
00423
00424
00425 void flgr1d_arith_const_xor_spp1_SSE_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00426 #ifdef __SSE__
00427 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_xor_si64,fgUINT8,_mm_set1_pi8);
00428 #endif
00429 }
00430 void flgr1d_arith_const_xor_spp1_SSE_fgUINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00431 #ifdef __SSE__
00432 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_xor_si64,fgUINT16,_mm_set1_pi16);
00433 #endif
00434 }
00435 void flgr1d_arith_const_xor_spp1_SSE_fgUINT32(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00436 #ifdef __SSE__
00437 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_xor_si64,fgUINT32,_mm_set1_pi32);
00438 #endif
00439 }
00440 void flgr1d_arith_const_xor_spp1_SSE_fgINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00441 #ifdef __SSE__
00442 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_xor_si64,fgINT8,_mm_set1_pi8);
00443 #endif
00444 }
00445 void flgr1d_arith_const_xor_spp1_SSE_fgINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00446 #ifdef __SSE__
00447 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_xor_si64,fgINT16,_mm_set1_pi16);
00448 #endif
00449 }
00450 void flgr1d_arith_const_xor_spp1_SSE_fgINT32(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00451 #ifdef __SSE__
00452 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_xor_si64,fgINT32,_mm_set1_pi32);
00453 #endif
00454 }
00455
00456
00457
00458 void flgr1d_arith_const_add_spp1_SSE_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00459 #ifdef __SSE__
00460 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_add_pi8,fgUINT8,_mm_set1_pi8);
00461 #endif
00462 }
00463 void flgr1d_arith_const_add_spp1_SSE_fgUINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00464 #ifdef __SSE__
00465 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_add_pi16,fgUINT16,_mm_set1_pi16);
00466 #endif
00467 }
00468 void flgr1d_arith_const_add_spp1_SSE_fgINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00469 #ifdef __SSE__
00470 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_add_pi8,fgINT8,_mm_set1_pi8);
00471 #endif
00472 }
00473 void flgr1d_arith_const_add_spp1_SSE_fgINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00474 #ifdef __SSE__
00475 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_add_pi16,fgINT16,_mm_set1_pi16);
00476 #endif
00477 }
00478
00479
00480
00481 void flgr1d_arith_const_addsat_spp1_SSE_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00482 #ifdef __SSE__
00483 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_adds_pu8,fgUINT8,_mm_set1_pi8);
00484 #endif
00485 }
00486 void flgr1d_arith_const_addsat_spp1_SSE_fgUINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00487 #ifdef __SSE__
00488 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_adds_pu16,fgUINT16,_mm_set1_pi16);
00489 #endif
00490 }
00491 void flgr1d_arith_const_addsat_spp1_SSE_fgINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00492 #ifdef __SSE__
00493 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_adds_pi16,fgINT16,_mm_set1_pi16);
00494 #endif
00495 }
00496
00497
00498
00499 void flgr1d_arith_const_sub_spp1_SSE_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00500 #ifdef __SSE__
00501 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_sub_pi8,fgUINT8,_mm_set1_pi8);
00502 #endif
00503 }
00504 void flgr1d_arith_const_sub_spp1_SSE_fgUINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00505 #ifdef __SSE__
00506 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_sub_pi16,fgUINT16,_mm_set1_pi16);
00507 #endif
00508 }
00509 void flgr1d_arith_const_sub_spp1_SSE_fgINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00510 #ifdef __SSE__
00511 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_sub_pi8,fgINT8,_mm_set1_pi8);
00512 #endif
00513 }
00514 void flgr1d_arith_const_sub_spp1_SSE_fgINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00515 #ifdef __SSE__
00516 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_sub_pi16,fgINT16,_mm_set1_pi16);
00517 #endif
00518 }
00519
00520
00521
00522 void flgr1d_arith_const_subsat_spp1_SSE_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00523 #ifdef __SSE__
00524 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_subs_pu8,fgUINT8,_mm_set1_pi8);
00525 #endif
00526 }
00527 void flgr1d_arith_const_subsat_spp1_SSE_fgUINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00528 #ifdef __SSE__
00529 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_subs_pu16,fgUINT16,_mm_set1_pi16);
00530 #endif
00531 }
00532 void flgr1d_arith_const_subsat_spp1_SSE_fgINT16(FLGR_Data1D *datdest, FLGR_Data1D *data1, FLGR_Vector *vec_const) {
00533 #ifdef __SSE__
00534 FLGR_MACRO_ARITH_1D_DIADIC_CONST_SPP1_SSE(_mm_subs_pi16,fgINT16,_mm_set1_pi16);
00535 #endif
00536 }