00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include <stdio.h>
00022 #include <stdlib.h>
00023 #include <string.h>
00024 #include <flgrCoreData.h>
00025 #include <flgrCoreDataIO.h>
00026 #include <flgrCoreDispatch.h>
00027 #include <flgrCoreMalloc.h>
00028 #include "flgrCoreCompare.h"
00029 #include "flgrCoreReplace.h"
00030 #include "flgrCoreReplaceFast.h"
00031
00032
00039
00040
00041
00042
00043
00044
00050
00051
00053
00055 #define FLGR_MACRO_REPLACE_1D_I_WITH_I_I_I(dtype) \
00056 int j; \
00057 int length = datout->length * datout->spp; \
00058 dtype *pout,*ptest1,*ptest2; \
00059 dtype *ptrue, *pfalse; \
00060 dtype vout,vtest1,vtest2,vtrue,vfalse; \
00061 \
00062 \
00063 \
00064 pout = (dtype *) datout->array; \
00065 ptest1 = (dtype *) dattest1->array; \
00066 ptest2 = (dtype *) dattest2->array; \
00067 ptrue = (dtype *) dattrue->array; \
00068 pfalse = (dtype *) datfalse->array; \
00069 \
00070 switch(test) { \
00071 case FLGR_TEST_INF: \
00072 for(j=0 ; j<length ; j++) { \
00073 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00074 vtest2 = flgr1d_get_data_array_##dtype(ptest2,j); \
00075 vtrue = flgr1d_get_data_array_##dtype(ptrue,j); \
00076 vfalse = flgr1d_get_data_array_##dtype(pfalse,j); \
00077 vout = (vtest1<vtest2) ? vtrue : vfalse; \
00078 flgr1d_set_data_array_##dtype(pout,j,vout); \
00079 } \
00080 break; \
00081 \
00082 case FLGR_TEST_INFEQ: \
00083 for(j=0 ; j<length ; j++) { \
00084 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00085 vtest2 = flgr1d_get_data_array_##dtype(ptest2,j); \
00086 vtrue = flgr1d_get_data_array_##dtype(ptrue,j); \
00087 vfalse = flgr1d_get_data_array_##dtype(pfalse,j); \
00088 vout = (vtest1<=vtest2) ? vtrue : vfalse; \
00089 flgr1d_set_data_array_##dtype(pout,j,vout); \
00090 } \
00091 break; \
00092 \
00093 case FLGR_TEST_EQ: \
00094 for(j=0 ; j<length ; j++) { \
00095 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00096 vtest2 = flgr1d_get_data_array_##dtype(ptest2,j); \
00097 vtrue = flgr1d_get_data_array_##dtype(ptrue,j); \
00098 vfalse = flgr1d_get_data_array_##dtype(pfalse,j); \
00099 vout = (vtest1==vtest2) ? vtrue : vfalse; \
00100 flgr1d_set_data_array_##dtype(pout,j,vout); \
00101 } \
00102 break; \
00103 \
00104 case FLGR_TEST_SUPEQ: \
00105 for(j=0 ; j<length ; j++) { \
00106 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00107 vtest2 = flgr1d_get_data_array_##dtype(ptest2,j); \
00108 vtrue = flgr1d_get_data_array_##dtype(ptrue,j); \
00109 vfalse = flgr1d_get_data_array_##dtype(pfalse,j); \
00110 vout = (vtest1>=vtest2) ? vtrue : vfalse; \
00111 flgr1d_set_data_array_##dtype(pout,j,vout); \
00112 } \
00113 break; \
00114 \
00115 case FLGR_TEST_SUP: \
00116 for(j=0 ; j<length ; j++) { \
00117 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00118 vtest2 = flgr1d_get_data_array_##dtype(ptest2,j); \
00119 vtrue = flgr1d_get_data_array_##dtype(ptrue,j); \
00120 vfalse = flgr1d_get_data_array_##dtype(pfalse,j); \
00121 vout = (vtest1>vtest2) ? vtrue : vfalse; \
00122 flgr1d_set_data_array_##dtype(pout,j,vout); \
00123 } \
00124 break; \
00125 \
00126 default: \
00127 for(j=0 ; j<length ; j++) { \
00128 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00129 vtest2 = flgr1d_get_data_array_##dtype(ptest2,j); \
00130 vtrue = flgr1d_get_data_array_##dtype(ptrue,j); \
00131 vfalse = flgr1d_get_data_array_##dtype(pfalse,j); \
00132 vout = (vtest1!=vtest2) ? vtrue : vfalse; \
00133 flgr1d_set_data_array_##dtype(pout,j,vout); \
00134 } \
00135 } \
00136 \
00137 return
00138
00139
00140
00141
00142
00144
00146 #define FLGR_MACRO_REPLACE_1D_I_WITH_I_I_C(dtype) \
00147 int j; \
00148 int spp = datout->spp; \
00149 int length = datout->length * datout->spp; \
00150 dtype *pout,*ptest1,*ptest2; \
00151 dtype *ptrue; \
00152 dtype *pfalse; \
00153 dtype vout,vtest1,vtest2,vtrue,vfalse; \
00154 \
00155 \
00156 \
00157 pout = (dtype *) datout->array; \
00158 ptest1 = (dtype *) dattest1->array; \
00159 ptest2 = (dtype *) dattest2->array; \
00160 ptrue = (dtype *) dattrue->array; \
00161 pfalse = (dtype*) vec_false->array; \
00162 \
00163 switch(test) { \
00164 case FLGR_TEST_INF: \
00165 for(j=0 ; j<length ; j++) { \
00166 vfalse = flgr_get_array_##dtype(pfalse,j%spp); \
00167 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00168 vtest2 = flgr1d_get_data_array_##dtype(ptest2,j); \
00169 vtrue = flgr1d_get_data_array_##dtype(ptrue,j); \
00170 vout = (vtest1<vtest2) ? vtrue : vfalse; \
00171 flgr1d_set_data_array_##dtype(pout,j,vout); \
00172 } \
00173 break; \
00174 \
00175 case FLGR_TEST_INFEQ: \
00176 for(j=0 ; j<length ; j++) { \
00177 vfalse = flgr_get_array_##dtype(pfalse,j%spp); \
00178 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00179 vtest2 = flgr1d_get_data_array_##dtype(ptest2,j); \
00180 vtrue = flgr1d_get_data_array_##dtype(ptrue,j); \
00181 vout = (vtest1<=vtest2) ? vtrue : vfalse; \
00182 flgr1d_set_data_array_##dtype(pout,j,vout); \
00183 } \
00184 break; \
00185 \
00186 case FLGR_TEST_EQ: \
00187 for(j=0 ; j<length ; j++) { \
00188 vfalse = flgr_get_array_##dtype(pfalse,j%spp); \
00189 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00190 vtest2 = flgr1d_get_data_array_##dtype(ptest2,j); \
00191 vtrue = flgr1d_get_data_array_##dtype(ptrue,j); \
00192 vout = (vtest1==vtest2) ? vtrue : vfalse; \
00193 flgr1d_set_data_array_##dtype(pout,j,vout); \
00194 } \
00195 break; \
00196 \
00197 case FLGR_TEST_SUPEQ: \
00198 for(j=0 ; j<length ; j++) { \
00199 vfalse = flgr_get_array_##dtype(pfalse,j%spp); \
00200 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00201 vtest2 = flgr1d_get_data_array_##dtype(ptest2,j); \
00202 vtrue = flgr1d_get_data_array_##dtype(ptrue,j); \
00203 vout = (vtest1>=vtest2) ? vtrue : vfalse; \
00204 flgr1d_set_data_array_##dtype(pout,j,vout); \
00205 } \
00206 break; \
00207 \
00208 case FLGR_TEST_SUP: \
00209 for(j=0 ; j<length ; j++) { \
00210 vfalse = flgr_get_array_##dtype(pfalse,j%spp); \
00211 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00212 vtest2 = flgr1d_get_data_array_##dtype(ptest2,j); \
00213 vtrue = flgr1d_get_data_array_##dtype(ptrue,j); \
00214 vout = (vtest1>vtest2) ? vtrue : vfalse; \
00215 flgr1d_set_data_array_##dtype(pout,j,vout); \
00216 } \
00217 break; \
00218 \
00219 default: \
00220 for(j=0 ; j<length ; j++) { \
00221 vfalse = flgr_get_array_##dtype(pfalse,j%spp); \
00222 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00223 vtest2 = flgr1d_get_data_array_##dtype(ptest2,j); \
00224 vtrue = flgr1d_get_data_array_##dtype(ptrue,j); \
00225 vout = (vtest1!=vtest2) ? vtrue : vfalse; \
00226 flgr1d_set_data_array_##dtype(pout,j,vout); \
00227 } \
00228 } \
00229 \
00230 return
00231
00232
00233
00234
00236
00238 #define FLGR_MACRO_REPLACE_1D_I_WITH_I_C_I(dtype) \
00239 int j; \
00240 int spp = datout->spp; \
00241 int length = datout->length * datout->spp; \
00242 dtype *pout,*ptest1,*ptest2; \
00243 dtype *pfalse, *ptrue; \
00244 dtype vout,vtest1,vtest2,vtrue,vfalse; \
00245 \
00246 \
00247 \
00248 pout = (dtype *) datout->array; \
00249 ptest1 = (dtype *) dattest1->array; \
00250 ptest2 = (dtype *) dattest2->array; \
00251 pfalse = (dtype *) datfalse->array; \
00252 ptrue = (dtype*) vec_true->array; \
00253 \
00254 switch(test) { \
00255 case FLGR_TEST_INF: \
00256 for(j=0 ; j<length ; j++) { \
00257 vtrue = flgr_get_array_##dtype(ptrue, j%spp); \
00258 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00259 vtest2 = flgr1d_get_data_array_##dtype(ptest2,j); \
00260 vfalse = flgr1d_get_data_array_##dtype(pfalse,j); \
00261 vout = (vtest1<vtest2) ? vtrue : vfalse; \
00262 flgr1d_set_data_array_##dtype(pout,j,vout); \
00263 } \
00264 break; \
00265 \
00266 case FLGR_TEST_INFEQ: \
00267 for(j=0 ; j<length ; j++) { \
00268 vtrue = flgr_get_array_##dtype(ptrue, j%spp); \
00269 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00270 vtest2 = flgr1d_get_data_array_##dtype(ptest2,j); \
00271 vfalse = flgr1d_get_data_array_##dtype(pfalse,j); \
00272 vout = (vtest1<=vtest2) ? vtrue : vfalse; \
00273 flgr1d_set_data_array_##dtype(pout,j,vout); \
00274 } \
00275 break; \
00276 \
00277 case FLGR_TEST_EQ: \
00278 for(j=0 ; j<length ; j++) { \
00279 vtrue = flgr_get_array_##dtype(ptrue, j%spp); \
00280 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00281 vtest2 = flgr1d_get_data_array_##dtype(ptest2,j); \
00282 vfalse = flgr1d_get_data_array_##dtype(pfalse,j); \
00283 vout = (vtest1==vtest2) ? vtrue : vfalse; \
00284 flgr1d_set_data_array_##dtype(pout,j,vout); \
00285 } \
00286 break; \
00287 \
00288 case FLGR_TEST_SUPEQ: \
00289 for(j=0 ; j<length ; j++) { \
00290 vtrue = flgr_get_array_##dtype(ptrue, j%spp); \
00291 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00292 vtest2 = flgr1d_get_data_array_##dtype(ptest2,j); \
00293 vfalse = flgr1d_get_data_array_##dtype(pfalse,j); \
00294 vout = (vtest1>=vtest2) ? vtrue : vfalse; \
00295 flgr1d_set_data_array_##dtype(pout,j,vout); \
00296 } \
00297 break; \
00298 \
00299 case FLGR_TEST_SUP: \
00300 for(j=0 ; j<length ; j++) { \
00301 vtrue = flgr_get_array_##dtype(ptrue, j%spp); \
00302 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00303 vtest2 = flgr1d_get_data_array_##dtype(ptest2,j); \
00304 vfalse = flgr1d_get_data_array_##dtype(pfalse,j); \
00305 vout = (vtest1>vtest2) ? vtrue : vfalse; \
00306 flgr1d_set_data_array_##dtype(pout,j,vout); \
00307 } \
00308 break; \
00309 \
00310 default: \
00311 for(j=0 ; j<length ; j++) { \
00312 vtrue = flgr_get_array_##dtype(ptrue, j%spp); \
00313 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00314 vtest2 = flgr1d_get_data_array_##dtype(ptest2,j); \
00315 vfalse = flgr1d_get_data_array_##dtype(pfalse,j); \
00316 vout = (vtest1!=vtest2) ? vtrue : vfalse; \
00317 flgr1d_set_data_array_##dtype(pout,j,vout); \
00318 } \
00319 } \
00320 \
00321 return
00322
00323
00324
00325
00326
00327
00329
00331 #define FLGR_MACRO_REPLACE_1D_I_WITH_I_C_C(dtype) \
00332 int j; \
00333 int spp = datout->spp; \
00334 int length = datout->length * datout->spp; \
00335 dtype *pout,*ptest1,*ptest2; \
00336 dtype *ptrue,*pfalse; \
00337 dtype vout,vtest1,vtest2,vtrue,vfalse; \
00338 \
00339 \
00340 \
00341 pout = (dtype *) datout->array; \
00342 ptest1 = (dtype *) dattest1->array; \
00343 ptest2 = (dtype *) dattest2->array; \
00344 ptrue = (dtype*) vec_true->array; \
00345 pfalse = (dtype*) vec_false->array; \
00346 \
00347 switch(test) { \
00348 case FLGR_TEST_INF: \
00349 for(j=0 ; j<length ; j++) { \
00350 vtrue = flgr_get_array_##dtype(ptrue, j%spp); \
00351 vfalse = flgr_get_array_##dtype(pfalse, j%spp); \
00352 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00353 vtest2 = flgr1d_get_data_array_##dtype(ptest2,j); \
00354 vout = (vtest1<vtest2) ? vtrue : vfalse; \
00355 flgr1d_set_data_array_##dtype(pout,j,vout); \
00356 } \
00357 break; \
00358 \
00359 case FLGR_TEST_INFEQ: \
00360 for(j=0 ; j<length ; j++) { \
00361 vtrue = flgr_get_array_##dtype(ptrue, j%spp); \
00362 vfalse = flgr_get_array_##dtype(pfalse, j%spp); \
00363 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00364 vtest2 = flgr1d_get_data_array_##dtype(ptest2,j); \
00365 vout = (vtest1<=vtest2) ? vtrue : vfalse; \
00366 flgr1d_set_data_array_##dtype(pout,j,vout); \
00367 } \
00368 break; \
00369 \
00370 case FLGR_TEST_EQ: \
00371 for(j=0 ; j<length ; j++) { \
00372 vtrue = flgr_get_array_##dtype(ptrue, j%spp); \
00373 vfalse = flgr_get_array_##dtype(pfalse, j%spp); \
00374 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00375 vtest2 = flgr1d_get_data_array_##dtype(ptest2,j); \
00376 vout = (vtest1==vtest2) ? vtrue : vfalse; \
00377 flgr1d_set_data_array_##dtype(pout,j,vout); \
00378 } \
00379 break; \
00380 \
00381 case FLGR_TEST_SUPEQ: \
00382 for(j=0 ; j<length ; j++) { \
00383 vtrue = flgr_get_array_##dtype(ptrue, j%spp); \
00384 vfalse = flgr_get_array_##dtype(pfalse, j%spp); \
00385 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00386 vtest2 = flgr1d_get_data_array_##dtype(ptest2,j); \
00387 vout = (vtest1>=vtest2) ? vtrue : vfalse; \
00388 flgr1d_set_data_array_##dtype(pout,j,vout); \
00389 } \
00390 break; \
00391 \
00392 case FLGR_TEST_SUP: \
00393 for(j=0 ; j<length ; j++) { \
00394 vtrue = flgr_get_array_##dtype(ptrue, j%spp); \
00395 vfalse = flgr_get_array_##dtype(pfalse, j%spp); \
00396 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00397 vtest2 = flgr1d_get_data_array_##dtype(ptest2,j); \
00398 vout = (vtest1>vtest2) ? vtrue : vfalse; \
00399 flgr1d_set_data_array_##dtype(pout,j,vout); \
00400 } \
00401 break; \
00402 \
00403 default: \
00404 for(j=0 ; j<length ; j++) { \
00405 vtrue = flgr_get_array_##dtype(ptrue, j%spp); \
00406 vfalse = flgr_get_array_##dtype(pfalse, j%spp); \
00407 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00408 vtest2 = flgr1d_get_data_array_##dtype(ptest2,j); \
00409 vout = (vtest1!=vtest2) ? vtrue : vfalse; \
00410 flgr1d_set_data_array_##dtype(pout,j,vout); \
00411 } \
00412 } \
00413 \
00414 return
00415
00416
00417
00418
00419
00420
00421
00423
00425 #define FLGR_MACRO_REPLACE_1D_I_WITH_C_I_I(dtype) \
00426 int j; \
00427 int spp = datout->spp; \
00428 int length = datout->length * datout->spp; \
00429 dtype *pout,*ptest1,*ptest2; \
00430 dtype *ptrue, *pfalse; \
00431 dtype vout,vtest1,vtest2,vtrue,vfalse; \
00432 \
00433 \
00434 \
00435 pout = (dtype *) datout->array; \
00436 ptest1 = (dtype *) dattest1->array; \
00437 ptest2 = (dtype*) vec_test2->array; \
00438 ptrue = (dtype *) dattrue->array; \
00439 pfalse = (dtype *) datfalse->array; \
00440 \
00441 switch(test) { \
00442 case FLGR_TEST_INF: \
00443 for(j=0 ; j<length ; j++) { \
00444 vtest2 = flgr_get_array_##dtype(ptest2, j%spp); \
00445 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00446 vtrue = flgr1d_get_data_array_##dtype(ptrue,j); \
00447 vfalse = flgr1d_get_data_array_##dtype(pfalse,j); \
00448 vout = (vtest1<vtest2) ? vtrue : vfalse; \
00449 flgr1d_set_data_array_##dtype(pout,j,vout); \
00450 } \
00451 break; \
00452 \
00453 case FLGR_TEST_INFEQ: \
00454 for(j=0 ; j<length ; j++) { \
00455 vtest2 = flgr_get_array_##dtype(ptest2, j%spp); \
00456 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00457 vtrue = flgr1d_get_data_array_##dtype(ptrue,j); \
00458 vfalse = flgr1d_get_data_array_##dtype(pfalse,j); \
00459 vout = (vtest1<=vtest2) ? vtrue : vfalse; \
00460 flgr1d_set_data_array_##dtype(pout,j,vout); \
00461 } \
00462 break; \
00463 \
00464 case FLGR_TEST_EQ: \
00465 for(j=0 ; j<length ; j++) { \
00466 vtest2 = flgr_get_array_##dtype(ptest2, j%spp); \
00467 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00468 vtrue = flgr1d_get_data_array_##dtype(ptrue,j); \
00469 vfalse = flgr1d_get_data_array_##dtype(pfalse,j); \
00470 vout = (vtest1==vtest2) ? vtrue : vfalse; \
00471 flgr1d_set_data_array_##dtype(pout,j,vout); \
00472 } \
00473 break; \
00474 \
00475 case FLGR_TEST_SUPEQ: \
00476 for(j=0 ; j<length ; j++) { \
00477 vtest2 = flgr_get_array_##dtype(ptest2, j%spp); \
00478 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00479 vtrue = flgr1d_get_data_array_##dtype(ptrue,j); \
00480 vfalse = flgr1d_get_data_array_##dtype(pfalse,j); \
00481 vout = (vtest1>=vtest2) ? vtrue : vfalse; \
00482 flgr1d_set_data_array_##dtype(pout,j,vout); \
00483 } \
00484 break; \
00485 \
00486 case FLGR_TEST_SUP: \
00487 for(j=0 ; j<length ; j++) { \
00488 vtest2 = flgr_get_array_##dtype(ptest2, j%spp); \
00489 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00490 vtrue = flgr1d_get_data_array_##dtype(ptrue,j); \
00491 vfalse = flgr1d_get_data_array_##dtype(pfalse,j); \
00492 vout = (vtest1>vtest2) ? vtrue : vfalse; \
00493 flgr1d_set_data_array_##dtype(pout,j,vout); \
00494 } \
00495 break; \
00496 \
00497 default: \
00498 for(j=0 ; j<length ; j++) { \
00499 vtest2 = flgr_get_array_##dtype(ptest2, j%spp); \
00500 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00501 vtrue = flgr1d_get_data_array_##dtype(ptrue,j); \
00502 vfalse = flgr1d_get_data_array_##dtype(pfalse,j); \
00503 vout = (vtest1!=vtest2) ? vtrue : vfalse; \
00504 flgr1d_set_data_array_##dtype(pout,j,vout); \
00505 } \
00506 } \
00507 \
00508 return
00509
00510
00511
00512
00513
00515
00517 #define FLGR_MACRO_REPLACE_1D_I_WITH_C_I_C(dtype) \
00518 int j; \
00519 int spp = datout->spp; \
00520 int length = datout->length * datout->spp; \
00521 dtype *pout,*ptest1,*ptest2; \
00522 dtype *ptrue,*pfalse; \
00523 dtype vout,vtest1,vtest2,vtrue,vfalse; \
00524 \
00525 \
00526 \
00527 pout = (dtype *) datout->array; \
00528 ptest1 = (dtype *) dattest1->array; \
00529 ptest2 = (dtype*) vec_test2->array; \
00530 ptrue = (dtype *) dattrue->array; \
00531 pfalse = (dtype*) vec_false->array; \
00532 \
00533 switch(test) { \
00534 case FLGR_TEST_INF: \
00535 for(j=0 ; j<length ; j++) { \
00536 vtest2 = flgr_get_array_##dtype(ptest2, j%spp); \
00537 vfalse = flgr_get_array_##dtype(pfalse, j%spp); \
00538 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00539 vtrue = flgr1d_get_data_array_##dtype(ptrue,j); \
00540 vout = (vtest1<vtest2) ? vtrue : vfalse; \
00541 flgr1d_set_data_array_##dtype(pout,j,vout); \
00542 } \
00543 break; \
00544 \
00545 case FLGR_TEST_INFEQ: \
00546 for(j=0 ; j<length ; j++) { \
00547 vtest2 = flgr_get_array_##dtype(ptest2, j%spp); \
00548 vfalse = flgr_get_array_##dtype(pfalse, j%spp); \
00549 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00550 vtrue = flgr1d_get_data_array_##dtype(ptrue,j); \
00551 vout = (vtest1<=vtest2) ? vtrue : vfalse; \
00552 flgr1d_set_data_array_##dtype(pout,j,vout); \
00553 } \
00554 break; \
00555 \
00556 case FLGR_TEST_EQ: \
00557 for(j=0 ; j<length ; j++) { \
00558 vtest2 = flgr_get_array_##dtype(ptest2, j%spp); \
00559 vfalse = flgr_get_array_##dtype(pfalse, j%spp); \
00560 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00561 vtrue = flgr1d_get_data_array_##dtype(ptrue,j); \
00562 vout = (vtest1==vtest2) ? vtrue : vfalse; \
00563 flgr1d_set_data_array_##dtype(pout,j,vout); \
00564 } \
00565 break; \
00566 \
00567 case FLGR_TEST_SUPEQ: \
00568 for(j=0 ; j<length ; j++) { \
00569 vtest2 = flgr_get_array_##dtype(ptest2, j%spp); \
00570 vfalse = flgr_get_array_##dtype(pfalse, j%spp); \
00571 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00572 vtrue = flgr1d_get_data_array_##dtype(ptrue,j); \
00573 vout = (vtest1>=vtest2) ? vtrue : vfalse; \
00574 flgr1d_set_data_array_##dtype(pout,j,vout); \
00575 } \
00576 break; \
00577 \
00578 case FLGR_TEST_SUP: \
00579 for(j=0 ; j<length ; j++) { \
00580 vtest2 = flgr_get_array_##dtype(ptest2, j%spp); \
00581 vfalse = flgr_get_array_##dtype(pfalse, j%spp); \
00582 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00583 vtrue = flgr1d_get_data_array_##dtype(ptrue,j); \
00584 vout = (vtest1>vtest2) ? vtrue : vfalse; \
00585 flgr1d_set_data_array_##dtype(pout,j,vout); \
00586 } \
00587 break; \
00588 \
00589 default: \
00590 for(j=0 ; j<length ; j++) { \
00591 vtest2 = flgr_get_array_##dtype(ptest2, j%spp); \
00592 vfalse = flgr_get_array_##dtype(pfalse, j%spp); \
00593 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00594 vtrue = flgr1d_get_data_array_##dtype(ptrue,j); \
00595 vout = (vtest1!=vtest2) ? vtrue : vfalse; \
00596 flgr1d_set_data_array_##dtype(pout,j,vout); \
00597 } \
00598 } \
00599 \
00600 return
00601
00602
00603
00604
00606
00608 #define FLGR_MACRO_REPLACE_1D_I_WITH_C_C_I(dtype) \
00609 int j; \
00610 int spp = datout->spp; \
00611 int length = datout->length * datout->spp; \
00612 dtype *pout,*ptest1,*ptest2; \
00613 dtype *ptrue,*pfalse; \
00614 dtype vout,vtest1,vtest2,vtrue,vfalse; \
00615 \
00616 \
00617 \
00618 pout = (dtype *) datout->array; \
00619 ptest1 = (dtype *) dattest1->array; \
00620 ptest2 = (dtype*) vec_test2->array; \
00621 ptrue = (dtype*) vec_true->array; \
00622 pfalse = (dtype *) datfalse->array; \
00623 \
00624 switch(test) { \
00625 case FLGR_TEST_INF: \
00626 for(j=0 ; j<length ; j++) { \
00627 vtest2 = flgr_get_array_##dtype(ptest2, j%spp); \
00628 vtrue = flgr_get_array_##dtype(ptrue, j%spp); \
00629 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00630 vfalse = flgr1d_get_data_array_##dtype(pfalse,j); \
00631 vout = (vtest1<vtest2) ? vtrue : vfalse; \
00632 flgr1d_set_data_array_##dtype(pout,j,vout); \
00633 } \
00634 break; \
00635 \
00636 case FLGR_TEST_INFEQ: \
00637 for(j=0 ; j<length ; j++) { \
00638 vtest2 = flgr_get_array_##dtype(ptest2, j%spp); \
00639 vtrue = flgr_get_array_##dtype(ptrue, j%spp); \
00640 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00641 vfalse = flgr1d_get_data_array_##dtype(pfalse,j); \
00642 vout = (vtest1<=vtest2) ? vtrue : vfalse; \
00643 flgr1d_set_data_array_##dtype(pout,j,vout); \
00644 } \
00645 break; \
00646 \
00647 case FLGR_TEST_EQ: \
00648 for(j=0 ; j<length ; j++) { \
00649 vtest2 = flgr_get_array_##dtype(ptest2, j%spp); \
00650 vtrue = flgr_get_array_##dtype(ptrue, j%spp); \
00651 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00652 vfalse = flgr1d_get_data_array_##dtype(pfalse,j); \
00653 vout = (vtest1==vtest2) ? vtrue : vfalse; \
00654 flgr1d_set_data_array_##dtype(pout,j,vout); \
00655 } \
00656 break; \
00657 \
00658 case FLGR_TEST_SUPEQ: \
00659 for(j=0 ; j<length ; j++) { \
00660 vtest2 = flgr_get_array_##dtype(ptest2, j%spp); \
00661 vtrue = flgr_get_array_##dtype(ptrue, j%spp); \
00662 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00663 vfalse = flgr1d_get_data_array_##dtype(pfalse,j); \
00664 vout = (vtest1>=vtest2) ? vtrue : vfalse; \
00665 flgr1d_set_data_array_##dtype(pout,j,vout); \
00666 } \
00667 break; \
00668 \
00669 case FLGR_TEST_SUP: \
00670 for(j=0 ; j<length ; j++) { \
00671 vtest2 = flgr_get_array_##dtype(ptest2, j%spp); \
00672 vtrue = flgr_get_array_##dtype(ptrue, j%spp); \
00673 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00674 vfalse = flgr1d_get_data_array_##dtype(pfalse,j); \
00675 vout = (vtest1>vtest2) ? vtrue : vfalse; \
00676 flgr1d_set_data_array_##dtype(pout,j,vout); \
00677 } \
00678 break; \
00679 \
00680 default: \
00681 for(j=0 ; j<length ; j++) { \
00682 vtest2 = flgr_get_array_##dtype(ptest2, j%spp); \
00683 vtrue = flgr_get_array_##dtype(ptrue, j%spp); \
00684 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00685 vfalse = flgr1d_get_data_array_##dtype(pfalse,j); \
00686 vout = (vtest1!=vtest2) ? vtrue : vfalse; \
00687 flgr1d_set_data_array_##dtype(pout,j,vout); \
00688 } \
00689 } \
00690 \
00691 return
00692
00693
00694
00695
00696
00697
00699
00701 #define FLGR_MACRO_REPLACE_1D_I_WITH_C_C_C(dtype) \
00702 int j,k; \
00703 int spp = datout->spp; \
00704 int length = datout->length * datout->spp; \
00705 dtype *pout, *ptest1, *ptest2; \
00706 dtype *ptrue, *pfalse; \
00707 dtype vout,vtest1,vtest2,vtrue,vfalse; \
00708 \
00709 \
00710 \
00711 pout = (dtype *) datout->array; \
00712 ptest1 = (dtype *) dattest1->array; \
00713 ptest2 = (dtype*) vec_test2->array; \
00714 ptrue = (dtype*) vec_true->array; \
00715 pfalse = (dtype*) vec_false->array; \
00716 \
00717 switch(test) { \
00718 case FLGR_TEST_INF: \
00719 for(j=0 ; j<length ; j++) { \
00720 k = j%spp; \
00721 vtest2 = flgr_get_array_##dtype(ptest2, k); \
00722 vtrue = flgr_get_array_##dtype(ptrue, k); \
00723 vfalse = flgr_get_array_##dtype(pfalse, k); \
00724 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00725 vout = (vtest1<vtest2) ? vtrue : vfalse; \
00726 flgr1d_set_data_array_##dtype(pout,j,vout); \
00727 } \
00728 break; \
00729 \
00730 case FLGR_TEST_INFEQ: \
00731 for(j=0 ; j<length ; j++) { \
00732 k = j%spp; \
00733 vtest2 = flgr_get_array_##dtype(ptest2, k); \
00734 vtrue = flgr_get_array_##dtype(ptrue, k); \
00735 vfalse = flgr_get_array_##dtype(pfalse, k); \
00736 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00737 vout = (vtest1<=vtest2) ? vtrue : vfalse; \
00738 flgr1d_set_data_array_##dtype(pout,j,vout); \
00739 } \
00740 break; \
00741 \
00742 case FLGR_TEST_EQ: \
00743 for(j=0 ; j<length ; j++) { \
00744 k = j%spp; \
00745 vtest2 = flgr_get_array_##dtype(ptest2, k); \
00746 vtrue = flgr_get_array_##dtype(ptrue, k); \
00747 vfalse = flgr_get_array_##dtype(pfalse, k); \
00748 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00749 vout = (vtest1==vtest2) ? vtrue : vfalse; \
00750 flgr1d_set_data_array_##dtype(pout,j,vout); \
00751 } \
00752 break; \
00753 \
00754 case FLGR_TEST_SUPEQ: \
00755 for(j=0 ; j<length ; j++) { \
00756 k = j%spp; \
00757 vtest2 = flgr_get_array_##dtype(ptest2, k); \
00758 vtrue = flgr_get_array_##dtype(ptrue, k); \
00759 vfalse = flgr_get_array_##dtype(pfalse, k); \
00760 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00761 vout = (vtest1>=vtest2) ? vtrue : vfalse; \
00762 flgr1d_set_data_array_##dtype(pout,j,vout); \
00763 } \
00764 break; \
00765 \
00766 case FLGR_TEST_SUP: \
00767 for(j=0 ; j<length ; j++) { \
00768 k = j%spp; \
00769 vtest2 = flgr_get_array_##dtype(ptest2, k); \
00770 vtrue = flgr_get_array_##dtype(ptrue, k); \
00771 vfalse = flgr_get_array_##dtype(pfalse, k); \
00772 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00773 vout = (vtest1>vtest2) ? vtrue : vfalse; \
00774 flgr1d_set_data_array_##dtype(pout,j,vout); \
00775 } \
00776 break; \
00777 \
00778 default: \
00779 for(j=0 ; j<length ; j++) { \
00780 k = j%spp; \
00781 vtest2 = flgr_get_array_##dtype(ptest2, k); \
00782 vtrue = flgr_get_array_##dtype(ptrue, k); \
00783 vfalse = flgr_get_array_##dtype(pfalse, k); \
00784 vtest1 = flgr1d_get_data_array_##dtype(ptest1,j); \
00785 vout = (vtest1!=vtest2) ? vtrue : vfalse; \
00786 flgr1d_set_data_array_##dtype(pout,j,vout); \
00787 } \
00788 } \
00789 \
00790 return
00791
00792
00793
00794
00795
00796
00797 void flgr1d_replace_I_with_I_I_I_fgBIT(FLGR_Data1D *datout,
00798 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
00799 FLGR_Data1D *dattrue, FLGR_Data1D *datfalse) {
00800 FLGR_MACRO_REPLACE_1D_I_WITH_I_I_I(fgBIT);
00801 }
00802
00803 void flgr1d_replace_I_with_I_I_I_fgUINT8(FLGR_Data1D *datout,
00804 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
00805 FLGR_Data1D *dattrue, FLGR_Data1D *datfalse) {
00806 #ifdef __SSE2__
00807 if(datout->spp==1) {
00808 if(test == FLGR_TEST_EQ) {
00809 flgr1d_replace_I_EQ_I_I_I_fast_fgUINT8(datout,dattest1,dattest2,dattrue,datfalse);
00810
00811 }else if(test == FLGR_TEST_INFEQ) {
00812 flgr1d_replace_I_LE_I_I_I_fast_fgUINT8(datout,dattest1,dattest2,dattrue,datfalse);
00813
00814 }else if(test == FLGR_TEST_SUPEQ) {
00815 flgr1d_replace_I_GE_I_I_I_fast_fgUINT8(datout,dattest1,dattest2,dattrue,datfalse);
00816
00817 }else if(test == FLGR_TEST_DIFF) {
00818 flgr1d_replace_I_NE_I_I_I_fast_fgUINT8(datout,dattest1,dattest2,dattrue,datfalse);
00819
00820 }else{
00821 FLGR_MACRO_REPLACE_1D_I_WITH_I_I_I(fgUINT8);
00822 }
00823 }else{
00824 FLGR_MACRO_REPLACE_1D_I_WITH_I_I_I(fgUINT8);
00825 }
00826 #else
00827 FLGR_MACRO_REPLACE_1D_I_WITH_I_I_I(fgUINT8);
00828 #endif
00829
00830 }
00831
00832 void flgr1d_replace_I_with_I_I_I_fgUINT16(FLGR_Data1D *datout,
00833 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
00834 FLGR_Data1D *dattrue, FLGR_Data1D *datfalse) {
00835 FLGR_MACRO_REPLACE_1D_I_WITH_I_I_I(fgUINT16);
00836 }
00837
00838 void flgr1d_replace_I_with_I_I_I_fgUINT32(FLGR_Data1D *datout,
00839 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
00840 FLGR_Data1D *dattrue, FLGR_Data1D *datfalse) {
00841 FLGR_MACRO_REPLACE_1D_I_WITH_I_I_I(fgUINT32);
00842 }
00843
00844 void flgr1d_replace_I_with_I_I_I_fgINT8(FLGR_Data1D *datout,
00845 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
00846 FLGR_Data1D *dattrue, FLGR_Data1D *datfalse) {
00847 FLGR_MACRO_REPLACE_1D_I_WITH_I_I_I(fgINT8);
00848 }
00849
00850 void flgr1d_replace_I_with_I_I_I_fgINT16(FLGR_Data1D *datout,
00851 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
00852 FLGR_Data1D *dattrue, FLGR_Data1D *datfalse) {
00853 FLGR_MACRO_REPLACE_1D_I_WITH_I_I_I(fgINT16);
00854 }
00855
00856 void flgr1d_replace_I_with_I_I_I_fgINT32(FLGR_Data1D *datout,
00857 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
00858 FLGR_Data1D *dattrue, FLGR_Data1D *datfalse) {
00859 FLGR_MACRO_REPLACE_1D_I_WITH_I_I_I(fgINT32);
00860 }
00861
00862 void flgr1d_replace_I_with_I_I_I_fgFLOAT32(FLGR_Data1D *datout,
00863 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
00864 FLGR_Data1D *dattrue, FLGR_Data1D *datfalse) {
00865 FLGR_MACRO_REPLACE_1D_I_WITH_I_I_I(fgFLOAT32);
00866 }
00867
00868 void flgr1d_replace_I_with_I_I_I_fgFLOAT64(FLGR_Data1D *datout,
00869 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
00870 FLGR_Data1D *dattrue, FLGR_Data1D *datfalse) {
00871 FLGR_MACRO_REPLACE_1D_I_WITH_I_I_I(fgFLOAT64);
00872 }
00873
00874
00875
00876
00878
00893
00894 FLGR_Ret flgr1d_replace_I_with_I_I_I(FLGR_Data1D *datout,
00895 FLGR_Data1D *dattest1, char *test, FLGR_Data1D *dattest2,
00896 FLGR_Data1D *dattrue, FLGR_Data1D *datfalse) {
00897
00898 FLGR_Test tst;
00899 FLGR_Ret ret;
00900
00901
00902
00903 if((datout==NULL) || (dattest1==NULL) || (dattest2==NULL) || (dattrue==NULL) || (datfalse==NULL)) {
00904 POST_ERROR("Null objects!\n");
00905 return FLGR_RET_NULL_OBJECT;
00906 }
00907
00908 if( (ret=flgr1d_is_data_same_attributes(datout, dattest1, __FUNCTION__)) != FLGR_RET_OK )
00909 return ret;
00910 if( (ret=flgr1d_is_data_same_attributes(dattest1, dattest2, __FUNCTION__)) != FLGR_RET_OK )
00911 return ret;
00912 if( (ret=flgr1d_is_data_same_attributes(dattest2, dattrue, __FUNCTION__)) != FLGR_RET_OK )
00913 return ret;
00914 if( (ret=flgr1d_is_data_same_attributes(dattrue, datfalse, __FUNCTION__)) != FLGR_RET_OK )
00915 return ret;
00916
00917 tst=flgr_get_test_value(test);
00918 if(tst==FLGR_TEST_UNKNOWN) {
00919 POST_ERROR("Illegal test %s",test);
00920 return FLGR_RET_UNDEFINED_ERROR;
00921 }
00922
00923 FLGR_DISPATCH_PROCEDURE(datout->type,flgr1d_replace_I_with_I_I_I,datout,dattest1,tst,dattest2,dattrue,datfalse);
00924
00925 return FLGR_RET_OK;
00926
00927 }
00928
00929
00930
00931
00932 void flgr1d_replace_I_with_I_I_C_fgBIT(FLGR_Data1D *datout,
00933 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
00934 FLGR_Data1D *dattrue, FLGR_Vector *vec_false) {
00935 FLGR_MACRO_REPLACE_1D_I_WITH_I_I_C(fgBIT);
00936 }
00937
00938 void flgr1d_replace_I_with_I_I_C_fgUINT8(FLGR_Data1D *datout,
00939 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
00940 FLGR_Data1D *dattrue, FLGR_Vector *vec_false) {
00941 #ifdef __SSE2__
00942 if(datout->spp==1) {
00943 if(test == FLGR_TEST_EQ) {
00944 flgr1d_replace_I_EQ_I_I_C_fast_fgUINT8(datout,
00945 dattest1,
00946 dattest2,
00947 dattrue,
00948 flgr_get_array_fgUINT8((fgUINT8*) vec_false->array,0) );
00949
00950 }else if(test == FLGR_TEST_INFEQ) {
00951 flgr1d_replace_I_LE_I_I_C_fast_fgUINT8(datout,
00952 dattest1,
00953 dattest2,
00954 dattrue,
00955 flgr_get_array_fgUINT8((fgUINT8*) vec_false->array,0) );
00956
00957 }else if(test == FLGR_TEST_SUPEQ) {
00958 flgr1d_replace_I_GE_I_I_C_fast_fgUINT8(datout,
00959 dattest1,
00960 dattest2,
00961 dattrue,
00962 flgr_get_array_fgUINT8((fgUINT8*) vec_false->array,0) );
00963
00964 }else if(test == FLGR_TEST_DIFF) {
00965 flgr1d_replace_I_NE_I_I_C_fast_fgUINT8(datout,
00966 dattest1,
00967 dattest2,
00968 dattrue,
00969 flgr_get_array_fgUINT8((fgUINT8*) vec_false->array,0) );
00970
00971 }else{
00972 FLGR_MACRO_REPLACE_1D_I_WITH_I_I_C(fgUINT8);
00973 }
00974 }else{
00975 FLGR_MACRO_REPLACE_1D_I_WITH_I_I_C(fgUINT8);
00976 }
00977
00978 #else
00979 FLGR_MACRO_REPLACE_1D_I_WITH_I_I_C(fgUINT8);
00980 #endif
00981 }
00982
00983 void flgr1d_replace_I_with_I_I_C_fgUINT16(FLGR_Data1D *datout,
00984 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
00985 FLGR_Data1D *dattrue, FLGR_Vector *vec_false) {
00986 FLGR_MACRO_REPLACE_1D_I_WITH_I_I_C(fgUINT16);
00987 }
00988
00989 void flgr1d_replace_I_with_I_I_C_fgUINT32(FLGR_Data1D *datout,
00990 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
00991 FLGR_Data1D *dattrue, FLGR_Vector *vec_false) {
00992 FLGR_MACRO_REPLACE_1D_I_WITH_I_I_C(fgUINT32);
00993 }
00994
00995 void flgr1d_replace_I_with_I_I_C_fgINT8(FLGR_Data1D *datout,
00996 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
00997 FLGR_Data1D *dattrue, FLGR_Vector *vec_false) {
00998 FLGR_MACRO_REPLACE_1D_I_WITH_I_I_C(fgINT8);
00999 }
01000
01001 void flgr1d_replace_I_with_I_I_C_fgINT16(FLGR_Data1D *datout,
01002 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
01003 FLGR_Data1D *dattrue, FLGR_Vector *vec_false) {
01004 FLGR_MACRO_REPLACE_1D_I_WITH_I_I_C(fgINT16);
01005 }
01006
01007 void flgr1d_replace_I_with_I_I_C_fgINT32(FLGR_Data1D *datout,
01008 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
01009 FLGR_Data1D *dattrue, FLGR_Vector *vec_false) {
01010 FLGR_MACRO_REPLACE_1D_I_WITH_I_I_C(fgINT32);
01011 }
01012
01013 void flgr1d_replace_I_with_I_I_C_fgFLOAT32(FLGR_Data1D *datout,
01014 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
01015 FLGR_Data1D *dattrue, FLGR_Vector *vec_false) {
01016 FLGR_MACRO_REPLACE_1D_I_WITH_I_I_C(fgFLOAT32);
01017 }
01018
01019 void flgr1d_replace_I_with_I_I_C_fgFLOAT64(FLGR_Data1D *datout,
01020 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
01021 FLGR_Data1D *dattrue, FLGR_Vector *vec_false) {
01022 FLGR_MACRO_REPLACE_1D_I_WITH_I_I_C(fgFLOAT64);
01023 }
01024
01026
01041
01042 FLGR_Ret flgr1d_replace_I_with_I_I_C(FLGR_Data1D *datout,
01043 FLGR_Data1D *dattest1, char *test, FLGR_Data1D *dattest2,
01044 FLGR_Data1D *dattrue, FLGR_Vector *vec_false) {
01045
01046 FLGR_Test tst;
01047 FLGR_Ret ret;
01048
01049
01050
01051 if((datout==NULL) || (dattest1==NULL) || (dattest2==NULL) || (dattrue==NULL)) {
01052 POST_ERROR("Null objects!\n");
01053 return FLGR_RET_NULL_OBJECT;
01054 }
01055
01056 if( (ret=flgr1d_is_data_same_attributes(datout, dattest1, __FUNCTION__)) != FLGR_RET_OK )
01057 return ret;
01058 if( (ret=flgr1d_is_data_same_attributes(dattest1, dattest2, __FUNCTION__)) != FLGR_RET_OK )
01059 return ret;
01060 if( (ret=flgr1d_is_data_same_attributes(dattest2, dattrue, __FUNCTION__)) != FLGR_RET_OK )
01061 return ret;
01062
01063 tst=flgr_get_test_value(test);
01064 if(tst==FLGR_TEST_UNKNOWN) {
01065 POST_ERROR("Illegal test %s",test);
01066 return FLGR_RET_UNDEFINED_ERROR;
01067 }
01068
01069 FLGR_DISPATCH_PROCEDURE(datout->type,flgr1d_replace_I_with_I_I_C,datout,dattest1,tst,dattest2,dattrue,vec_false);
01070
01071
01072 }
01073
01075
01090
01091 FLGR_Ret flgr1d_replace_I_with_I_I_S(FLGR_Data1D *datout,
01092 FLGR_Data1D *dattest1, char *test, FLGR_Data1D *dattest2,
01093 FLGR_Data1D *dattrue, char *str_false) {
01094 int ret;
01095 FLGR_Vector *vector_false;
01096
01097
01098
01099 if((datout==NULL) || (dattest1==NULL) || (dattest2==NULL) || (dattrue==NULL)) {
01100 POST_ERROR("Null objects!\n");
01101 return FLGR_RET_NULL_OBJECT;
01102 }
01103
01104 vector_false = flgr_vector_create(datout->spp,datout->type);
01105
01106 if((ret=flgr_vector_import_string(vector_false, str_false))!= FLGR_RET_OK) {
01107 POST_ERROR("String is not valid ""%s""\n",str_false);
01108 flgr_vector_destroy(vector_false);
01109 return ret;
01110 }
01111
01112
01113 ret = flgr1d_replace_I_with_I_I_C(datout,dattest1,test,dattest2,dattrue,vector_false);
01114
01115 flgr_vector_destroy(vector_false);
01116
01117 return ret;
01118
01119 }
01120
01121
01122
01123
01124
01125 void flgr1d_replace_I_with_I_C_I_fgBIT(FLGR_Data1D *datout,
01126 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
01127 FLGR_Vector *vec_true, FLGR_Data1D *datfalse) {
01128 FLGR_MACRO_REPLACE_1D_I_WITH_I_C_I(fgBIT);
01129 }
01130
01131 void flgr1d_replace_I_with_I_C_I_fgUINT8(FLGR_Data1D *datout,
01132 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
01133 FLGR_Vector *vec_true, FLGR_Data1D *datfalse) {
01134 #ifdef __SSE2__
01135 if(datout->spp==1) {
01136 if(test == FLGR_TEST_EQ) {
01137 flgr1d_replace_I_EQ_I_C_I_fast_fgUINT8(datout,
01138 dattest1,
01139 dattest2,
01140 flgr_get_array_fgUINT8((fgUINT8*) vec_true->array,0) ,
01141 datfalse);
01142
01143 }else if(test == FLGR_TEST_INFEQ) {
01144 flgr1d_replace_I_LE_I_C_I_fast_fgUINT8(datout,
01145 dattest1,
01146 dattest2,
01147 flgr_get_array_fgUINT8((fgUINT8*) vec_true->array,0) ,
01148 datfalse);
01149
01150 }else if(test == FLGR_TEST_SUPEQ) {
01151 flgr1d_replace_I_GE_I_C_I_fast_fgUINT8(datout,
01152 dattest1,
01153 dattest2,
01154 flgr_get_array_fgUINT8((fgUINT8*) vec_true->array,0)
01155 ,datfalse);
01156
01157 }else if(test == FLGR_TEST_DIFF) {
01158 flgr1d_replace_I_NE_I_C_I_fast_fgUINT8(datout,
01159 dattest1,
01160 dattest2,
01161 flgr_get_array_fgUINT8((fgUINT8*) vec_true->array,0) ,
01162 datfalse);
01163
01164 }else{
01165 FLGR_MACRO_REPLACE_1D_I_WITH_I_C_I(fgUINT8);
01166 }
01167 }else{
01168 FLGR_MACRO_REPLACE_1D_I_WITH_I_C_I(fgUINT8);
01169 }
01170 #else
01171 FLGR_MACRO_REPLACE_1D_I_WITH_I_C_I(fgUINT8);
01172 #endif
01173 }
01174
01175 void flgr1d_replace_I_with_I_C_I_fgUINT16(FLGR_Data1D *datout,
01176 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
01177 FLGR_Vector *vec_true, FLGR_Data1D *datfalse) {
01178 FLGR_MACRO_REPLACE_1D_I_WITH_I_C_I(fgUINT16);
01179 }
01180
01181 void flgr1d_replace_I_with_I_C_I_fgUINT32(FLGR_Data1D *datout,
01182 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
01183 FLGR_Vector *vec_true, FLGR_Data1D *datfalse) {
01184 FLGR_MACRO_REPLACE_1D_I_WITH_I_C_I(fgUINT32);
01185 }
01186
01187 void flgr1d_replace_I_with_I_C_I_fgINT8(FLGR_Data1D *datout,
01188 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
01189 FLGR_Vector *vec_true, FLGR_Data1D *datfalse) {
01190 FLGR_MACRO_REPLACE_1D_I_WITH_I_C_I(fgINT8);
01191 }
01192
01193 void flgr1d_replace_I_with_I_C_I_fgINT16(FLGR_Data1D *datout,
01194 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
01195 FLGR_Vector *vec_true, FLGR_Data1D *datfalse) {
01196 FLGR_MACRO_REPLACE_1D_I_WITH_I_C_I(fgINT16);
01197 }
01198
01199 void flgr1d_replace_I_with_I_C_I_fgINT32(FLGR_Data1D *datout,
01200 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
01201 FLGR_Vector *vec_true, FLGR_Data1D *datfalse) {
01202 FLGR_MACRO_REPLACE_1D_I_WITH_I_C_I(fgINT32);
01203 }
01204
01205 void flgr1d_replace_I_with_I_C_I_fgFLOAT32(FLGR_Data1D *datout,
01206 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
01207 FLGR_Vector *vec_true, FLGR_Data1D *datfalse) {
01208 FLGR_MACRO_REPLACE_1D_I_WITH_I_C_I(fgFLOAT32);
01209 }
01210
01211 void flgr1d_replace_I_with_I_C_I_fgFLOAT64(FLGR_Data1D *datout,
01212 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
01213 FLGR_Vector *vec_true, FLGR_Data1D *datfalse) {
01214 FLGR_MACRO_REPLACE_1D_I_WITH_I_C_I(fgFLOAT64);
01215 }
01216
01217
01219
01234
01235 FLGR_Ret flgr1d_replace_I_with_I_C_I(FLGR_Data1D *datout,
01236 FLGR_Data1D *dattest1, char *test, FLGR_Data1D *dattest2,
01237 FLGR_Vector *vec_true, FLGR_Data1D *datfalse) {
01238
01239 FLGR_Test tst;
01240 FLGR_Ret ret;
01241
01242
01243
01244 if((datout==NULL) || (dattest1==NULL) || (dattest2==NULL) || (datfalse==NULL)) {
01245 POST_ERROR("Null objects!\n");
01246 return FLGR_RET_NULL_OBJECT;
01247 }
01248
01249 if( (ret=flgr1d_is_data_same_attributes(datout, dattest1, __FUNCTION__)) != FLGR_RET_OK )
01250 return ret;
01251 if( (ret=flgr1d_is_data_same_attributes(dattest1, dattest2, __FUNCTION__)) != FLGR_RET_OK )
01252 return ret;
01253 if( (ret=flgr1d_is_data_same_attributes(dattest2, datfalse, __FUNCTION__)) != FLGR_RET_OK )
01254 return ret;
01255
01256 tst=flgr_get_test_value(test);
01257 if(tst==FLGR_TEST_UNKNOWN) {
01258 POST_ERROR("Illegal test %s",test);
01259 return FLGR_RET_UNDEFINED_ERROR;
01260 }
01261
01262 FLGR_DISPATCH_PROCEDURE(datout->type,flgr1d_replace_I_with_I_C_I,datout,dattest1,tst,dattest2,vec_true,datfalse);
01263
01264 }
01266
01281
01282 FLGR_Ret flgr1d_replace_I_with_I_S_I(FLGR_Data1D *datout,
01283 FLGR_Data1D *dattest1, char *test, FLGR_Data1D *dattest2,
01284 char *str_true, FLGR_Data1D *datfalse) {
01285 int ret;
01286 FLGR_Vector *vector_true;
01287
01288
01289
01290 if((datout==NULL) || (dattest1==NULL) || (dattest2==NULL) || (datfalse==NULL)) {
01291 POST_ERROR("Null objects!\n");
01292 return FLGR_RET_NULL_OBJECT;
01293 }
01294
01295 vector_true = flgr_vector_create(datout->spp,datout->type);
01296
01297 if((ret=flgr_vector_import_string(vector_true, str_true))!= FLGR_RET_OK) {
01298 POST_ERROR("String is not valid ""%s""\n",str_true);
01299 flgr_vector_destroy(vector_true);
01300 return ret;
01301 }
01302
01303
01304 ret = flgr1d_replace_I_with_I_C_I(datout,dattest1,test,dattest2,vector_true,datfalse);
01305
01306 flgr_vector_destroy(vector_true);
01307
01308 return ret;
01309
01310 }
01311
01312
01313
01314
01315 void flgr1d_replace_I_with_I_C_C_fgBIT(FLGR_Data1D *datout,
01316 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
01317 FLGR_Vector *vec_true, FLGR_Vector *vec_false) {
01318 FLGR_MACRO_REPLACE_1D_I_WITH_I_C_C(fgBIT);
01319 }
01320
01321 void flgr1d_replace_I_with_I_C_C_fgUINT8(FLGR_Data1D *datout,
01322 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
01323 FLGR_Vector *vec_true, FLGR_Vector *vec_false) {
01324 #ifdef __SSE2__
01325 if(datout->spp==1) {
01326 if(test == FLGR_TEST_EQ) {
01327 flgr1d_replace_I_EQ_I_C_C_fast_fgUINT8(datout,
01328 dattest1,
01329 dattest2,
01330 flgr_get_array_fgUINT8((fgUINT8*) vec_true->array,0) ,
01331 flgr_get_array_fgUINT8((fgUINT8*) vec_false->array,0) );
01332
01333 }else if(test == FLGR_TEST_INFEQ) {
01334 flgr1d_replace_I_LE_I_C_C_fast_fgUINT8(datout,
01335 dattest1,
01336 dattest2,
01337 flgr_get_array_fgUINT8((fgUINT8*) vec_true->array,0) ,
01338 flgr_get_array_fgUINT8((fgUINT8*) vec_false->array,0) );
01339
01340 }else if(test == FLGR_TEST_SUPEQ) {
01341 flgr1d_replace_I_GE_I_C_C_fast_fgUINT8(datout,
01342 dattest1,
01343 dattest2,
01344 flgr_get_array_fgUINT8((fgUINT8*) vec_true->array,0) ,
01345 flgr_get_array_fgUINT8((fgUINT8*) vec_false->array,0) );
01346
01347 }else if(test == FLGR_TEST_DIFF) {
01348 flgr1d_replace_I_NE_I_C_C_fast_fgUINT8(datout,
01349 dattest1,
01350 dattest2,
01351 flgr_get_array_fgUINT8((fgUINT8*) vec_true->array,0) ,
01352 flgr_get_array_fgUINT8((fgUINT8*) vec_false->array,0) );
01353
01354 }else{
01355 FLGR_MACRO_REPLACE_1D_I_WITH_I_C_C(fgUINT8);
01356 }
01357 }else{
01358 FLGR_MACRO_REPLACE_1D_I_WITH_I_C_C(fgUINT8);
01359 }
01360 #else
01361 FLGR_MACRO_REPLACE_1D_I_WITH_I_C_C(fgUINT8);
01362 #endif
01363 }
01364
01365 void flgr1d_replace_I_with_I_C_C_fgUINT16(FLGR_Data1D *datout,
01366 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
01367 FLGR_Vector *vec_true, FLGR_Vector *vec_false) {
01368 FLGR_MACRO_REPLACE_1D_I_WITH_I_C_C(fgUINT16);
01369 }
01370
01371 void flgr1d_replace_I_with_I_C_C_fgUINT32(FLGR_Data1D *datout,
01372 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
01373 FLGR_Vector *vec_true, FLGR_Vector *vec_false) {
01374 FLGR_MACRO_REPLACE_1D_I_WITH_I_C_C(fgUINT32);
01375 }
01376
01377 void flgr1d_replace_I_with_I_C_C_fgINT8(FLGR_Data1D *datout,
01378 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
01379 FLGR_Vector *vec_true, FLGR_Vector *vec_false) {
01380 FLGR_MACRO_REPLACE_1D_I_WITH_I_C_C(fgINT8);
01381 }
01382
01383 void flgr1d_replace_I_with_I_C_C_fgINT16(FLGR_Data1D *datout,
01384 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
01385 FLGR_Vector *vec_true, FLGR_Vector *vec_false) {
01386 FLGR_MACRO_REPLACE_1D_I_WITH_I_C_C(fgINT16);
01387 }
01388
01389 void flgr1d_replace_I_with_I_C_C_fgINT32(FLGR_Data1D *datout,
01390 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
01391 FLGR_Vector *vec_true, FLGR_Vector *vec_false) {
01392 FLGR_MACRO_REPLACE_1D_I_WITH_I_C_C(fgINT32);
01393 }
01394
01395 void flgr1d_replace_I_with_I_C_C_fgFLOAT32(FLGR_Data1D *datout,
01396 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
01397 FLGR_Vector *vec_true, FLGR_Vector *vec_false) {
01398 FLGR_MACRO_REPLACE_1D_I_WITH_I_C_C(fgFLOAT32);
01399 }
01400
01401 void flgr1d_replace_I_with_I_C_C_fgFLOAT64(FLGR_Data1D *datout,
01402 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Data1D *dattest2,
01403 FLGR_Vector *vec_true, FLGR_Vector *vec_false) {
01404 FLGR_MACRO_REPLACE_1D_I_WITH_I_C_C(fgFLOAT64);
01405 }
01406
01407
01409
01424
01425 FLGR_Ret flgr1d_replace_I_with_I_C_C(FLGR_Data1D *datout,
01426 FLGR_Data1D *dattest1, char *test, FLGR_Data1D *dattest2,
01427 FLGR_Vector *vec_true, FLGR_Vector *vec_false) {
01428
01429 FLGR_Test tst;
01430 FLGR_Ret ret;
01431
01432
01433
01434 if((datout==NULL) || (dattest1==NULL) || (dattest2==NULL)) {
01435 POST_ERROR("Null objects!\n");
01436 return FLGR_RET_NULL_OBJECT;
01437 }
01438
01439 if( (ret=flgr1d_is_data_same_attributes(datout, dattest1, __FUNCTION__)) != FLGR_RET_OK )
01440 return ret;
01441 if( (ret=flgr1d_is_data_same_attributes(dattest1, dattest2, __FUNCTION__)) != FLGR_RET_OK )
01442 return ret;
01443
01444 tst=flgr_get_test_value(test);
01445 if(tst==FLGR_TEST_UNKNOWN) {
01446 POST_ERROR("Illegal test %s",test);
01447 return FLGR_RET_UNDEFINED_ERROR;
01448 }
01449
01450 FLGR_DISPATCH_PROCEDURE(datout->type,flgr1d_replace_I_with_I_C_C,datout,dattest1,tst,dattest2,vec_true,vec_false);
01451
01452
01453 }
01455
01470
01471 FLGR_Ret flgr1d_replace_I_with_I_S_S(FLGR_Data1D *datout,
01472 FLGR_Data1D *dattest1, char *test, FLGR_Data1D *dattest2,
01473 char *str_true, char *str_false) {
01474 int ret;
01475 FLGR_Vector *vector_true;
01476 FLGR_Vector *vector_false;
01477
01478
01479
01480 if((datout==NULL) || (dattest1==NULL) || (dattest2==NULL)) {
01481 POST_ERROR("Null objects!\n");
01482 return FLGR_RET_NULL_OBJECT;
01483 }
01484
01485 vector_true = flgr_vector_create(datout->spp,datout->type);
01486 vector_false = flgr_vector_create(datout->spp,datout->type);
01487
01488 if((ret=flgr_vector_import_string(vector_true, str_true))!= FLGR_RET_OK) {
01489 POST_ERROR("String is not valid ""%s""\n",str_true);
01490 flgr_vector_destroy(vector_true);
01491 return ret;
01492 }
01493
01494 if((ret=flgr_vector_import_string(vector_false, str_false))!= FLGR_RET_OK) {
01495 POST_ERROR("String is not valid ""%s""\n",str_false);
01496 flgr_vector_destroy(vector_false);
01497 return ret;
01498 }
01499
01500
01501 ret = flgr1d_replace_I_with_I_C_C(datout,dattest1,test,dattest2,vector_true,vector_false);
01502
01503 flgr_vector_destroy(vector_true);
01504 flgr_vector_destroy(vector_false);
01505
01506 return ret;
01507
01508 }
01509
01510
01511
01512
01513
01514
01515
01516
01517 void flgr1d_replace_I_with_C_I_I_fgBIT(FLGR_Data1D *datout,
01518 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
01519 FLGR_Data1D *dattrue, FLGR_Data1D *datfalse) {
01520 FLGR_MACRO_REPLACE_1D_I_WITH_C_I_I(fgBIT);
01521 }
01522
01523 void flgr1d_replace_I_with_C_I_I_fgUINT8(FLGR_Data1D *datout,
01524 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
01525 FLGR_Data1D *dattrue, FLGR_Data1D *datfalse) {
01526 #ifdef __SSE2__
01527 if(datout->spp==1) {
01528 if(test == FLGR_TEST_EQ) {
01529 flgr1d_replace_I_EQ_C_I_I_fast_fgUINT8(datout,
01530 dattest1,
01531 flgr_get_array_fgUINT8((fgUINT8*) vec_test2->array,0) ,
01532 dattrue,
01533 datfalse);
01534
01535 }else if(test == FLGR_TEST_INFEQ) {
01536 flgr1d_replace_I_LE_C_I_I_fast_fgUINT8(datout,
01537 dattest1,
01538 flgr_get_array_fgUINT8((fgUINT8*) vec_test2->array,0) ,
01539 dattrue,
01540 datfalse);
01541
01542 }else if(test == FLGR_TEST_SUPEQ) {
01543 flgr1d_replace_I_GE_C_I_I_fast_fgUINT8(datout,
01544 dattest1,
01545 flgr_get_array_fgUINT8((fgUINT8*) vec_test2->array,0) ,
01546 dattrue,
01547 datfalse);
01548
01549 }else if(test == FLGR_TEST_DIFF) {
01550 flgr1d_replace_I_NE_C_I_I_fast_fgUINT8(datout,
01551 dattest1,
01552 flgr_get_array_fgUINT8((fgUINT8*) vec_test2->array,0) ,
01553 dattrue,
01554 datfalse);
01555
01556 }else{
01557 FLGR_MACRO_REPLACE_1D_I_WITH_C_I_I(fgUINT8);
01558 }
01559 }else{
01560 FLGR_MACRO_REPLACE_1D_I_WITH_C_I_I(fgUINT8);
01561 }
01562 #else
01563 FLGR_MACRO_REPLACE_1D_I_WITH_C_I_I(fgUINT8);
01564 #endif
01565 }
01566
01567 void flgr1d_replace_I_with_C_I_I_fgUINT16(FLGR_Data1D *datout,
01568 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
01569 FLGR_Data1D *dattrue, FLGR_Data1D *datfalse) {
01570 FLGR_MACRO_REPLACE_1D_I_WITH_C_I_I(fgUINT16);
01571 }
01572
01573 void flgr1d_replace_I_with_C_I_I_fgUINT32(FLGR_Data1D *datout,
01574 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
01575 FLGR_Data1D *dattrue, FLGR_Data1D *datfalse) {
01576 FLGR_MACRO_REPLACE_1D_I_WITH_C_I_I(fgUINT32);
01577 }
01578
01579 void flgr1d_replace_I_with_C_I_I_fgINT8(FLGR_Data1D *datout,
01580 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
01581 FLGR_Data1D *dattrue, FLGR_Data1D *datfalse) {
01582 FLGR_MACRO_REPLACE_1D_I_WITH_C_I_I(fgINT8);
01583 }
01584
01585 void flgr1d_replace_I_with_C_I_I_fgINT16(FLGR_Data1D *datout,
01586 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
01587 FLGR_Data1D *dattrue, FLGR_Data1D *datfalse) {
01588 FLGR_MACRO_REPLACE_1D_I_WITH_C_I_I(fgINT16);
01589 }
01590
01591 void flgr1d_replace_I_with_C_I_I_fgINT32(FLGR_Data1D *datout,
01592 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
01593 FLGR_Data1D *dattrue, FLGR_Data1D *datfalse) {
01594 FLGR_MACRO_REPLACE_1D_I_WITH_C_I_I(fgINT32);
01595 }
01596
01597 void flgr1d_replace_I_with_C_I_I_fgFLOAT32(FLGR_Data1D *datout,
01598 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
01599 FLGR_Data1D *dattrue, FLGR_Data1D *datfalse) {
01600 FLGR_MACRO_REPLACE_1D_I_WITH_C_I_I(fgFLOAT32);
01601 }
01602
01603 void flgr1d_replace_I_with_C_I_I_fgFLOAT64(FLGR_Data1D *datout,
01604 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
01605 FLGR_Data1D *dattrue, FLGR_Data1D *datfalse) {
01606 FLGR_MACRO_REPLACE_1D_I_WITH_C_I_I(fgFLOAT64);
01607 }
01608
01609
01610
01611
01613
01628
01629 FLGR_Ret flgr1d_replace_I_with_C_I_I(FLGR_Data1D *datout,
01630 FLGR_Data1D *dattest1, char *test, FLGR_Vector *vec_test2,
01631 FLGR_Data1D *dattrue, FLGR_Data1D *datfalse) {
01632
01633 FLGR_Test tst;
01634 FLGR_Ret ret;
01635
01636
01637
01638 if((datout==NULL) || (dattest1==NULL) || (dattrue==NULL) || (datfalse==NULL)) {
01639 POST_ERROR("Null objects!\n");
01640 return FLGR_RET_NULL_OBJECT;
01641 }
01642
01643 if( (ret=flgr1d_is_data_same_attributes(datout, dattest1, __FUNCTION__)) != FLGR_RET_OK )
01644 return ret;
01645 if( (ret=flgr1d_is_data_same_attributes(dattest1, dattrue, __FUNCTION__)) != FLGR_RET_OK )
01646 return ret;
01647 if( (ret=flgr1d_is_data_same_attributes(dattrue, datfalse, __FUNCTION__)) != FLGR_RET_OK )
01648 return ret;
01649
01650 tst=flgr_get_test_value(test);
01651 if(tst==FLGR_TEST_UNKNOWN) {
01652 POST_ERROR("Illegal test %s",test);
01653 return FLGR_RET_UNDEFINED_ERROR;
01654 }
01655
01656 FLGR_DISPATCH_PROCEDURE(datout->type,flgr1d_replace_I_with_C_I_I,datout,dattest1,tst,vec_test2,dattrue,datfalse);
01657
01658
01659 }
01661
01676
01677 FLGR_Ret flgr1d_replace_I_with_S_I_I(FLGR_Data1D *datout,
01678 FLGR_Data1D *dattest1, char *test, char *str_test2,
01679 FLGR_Data1D *dattrue, FLGR_Data1D *datfalse) {
01680 int ret;
01681 FLGR_Vector *vector_test2;
01682
01683
01684
01685 if((datout==NULL) || (dattest1==NULL) || (dattrue==NULL) || (datfalse==NULL)) {
01686 POST_ERROR("Null objects!\n");
01687 return FLGR_RET_NULL_OBJECT;
01688 }
01689
01690 vector_test2 = flgr_vector_create(datout->spp,datout->type);
01691
01692 if((ret=flgr_vector_import_string(vector_test2, str_test2))!= FLGR_RET_OK) {
01693 POST_ERROR("String is not valid ""%s""\n",str_test2);
01694 flgr_vector_destroy(vector_test2);
01695 return ret;
01696 }
01697
01698
01699 ret = flgr1d_replace_I_with_C_I_I(datout,dattest1,test,vector_test2,dattrue,datfalse);
01700
01701 flgr_vector_destroy(vector_test2);
01702
01703 return ret;
01704
01705 }
01706
01707
01708
01709
01710 void flgr1d_replace_I_with_C_I_C_fgBIT(FLGR_Data1D *datout,
01711 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
01712 FLGR_Data1D *dattrue, FLGR_Vector *vec_false) {
01713 FLGR_MACRO_REPLACE_1D_I_WITH_C_I_C(fgBIT);
01714 }
01715
01716 void flgr1d_replace_I_with_C_I_C_fgUINT8(FLGR_Data1D *datout,
01717 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
01718 FLGR_Data1D *dattrue, FLGR_Vector *vec_false) {
01719 #ifdef __SSE2__
01720 if(datout->spp==1) {
01721 if(test == FLGR_TEST_EQ) {
01722 flgr1d_replace_I_EQ_C_I_C_fast_fgUINT8(datout,
01723 dattest1,
01724 flgr_get_array_fgUINT8((fgUINT8*) vec_test2->array,0) ,
01725 dattrue,
01726 flgr_get_array_fgUINT8((fgUINT8*) vec_false->array,0) );
01727
01728 }else if(test == FLGR_TEST_INFEQ) {
01729 flgr1d_replace_I_LE_C_I_C_fast_fgUINT8(datout,
01730 dattest1,
01731 flgr_get_array_fgUINT8((fgUINT8*) vec_test2->array,0) ,
01732 dattrue,
01733 flgr_get_array_fgUINT8((fgUINT8*) vec_false->array,0) );
01734
01735 }else if(test == FLGR_TEST_SUPEQ) {
01736 flgr1d_replace_I_GE_C_I_C_fast_fgUINT8(datout,
01737 dattest1,
01738 flgr_get_array_fgUINT8((fgUINT8*) vec_test2->array,0) ,
01739 dattrue,
01740 flgr_get_array_fgUINT8((fgUINT8*) vec_false->array,0) );
01741
01742 }else if(test == FLGR_TEST_DIFF) {
01743 flgr1d_replace_I_NE_C_I_C_fast_fgUINT8(datout,
01744 dattest1,
01745 flgr_get_array_fgUINT8((fgUINT8*) vec_test2->array,0) ,
01746 dattrue,
01747 flgr_get_array_fgUINT8((fgUINT8*) vec_false->array,0) );
01748
01749 }else{
01750 FLGR_MACRO_REPLACE_1D_I_WITH_C_I_C(fgUINT8);
01751 }
01752 }else{
01753 FLGR_MACRO_REPLACE_1D_I_WITH_C_I_C(fgUINT8);
01754 }
01755 #else
01756 FLGR_MACRO_REPLACE_1D_I_WITH_C_I_C(fgUINT8);
01757 #endif
01758 }
01759
01760 void flgr1d_replace_I_with_C_I_C_fgUINT16(FLGR_Data1D *datout,
01761 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
01762 FLGR_Data1D *dattrue, FLGR_Vector *vec_false) {
01763 FLGR_MACRO_REPLACE_1D_I_WITH_C_I_C(fgUINT16);
01764 }
01765
01766 void flgr1d_replace_I_with_C_I_C_fgUINT32(FLGR_Data1D *datout,
01767 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
01768 FLGR_Data1D *dattrue, FLGR_Vector *vec_false) {
01769 FLGR_MACRO_REPLACE_1D_I_WITH_C_I_C(fgUINT32);
01770 }
01771
01772 void flgr1d_replace_I_with_C_I_C_fgINT8(FLGR_Data1D *datout,
01773 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
01774 FLGR_Data1D *dattrue, FLGR_Vector *vec_false) {
01775 FLGR_MACRO_REPLACE_1D_I_WITH_C_I_C(fgINT8);
01776 }
01777
01778 void flgr1d_replace_I_with_C_I_C_fgINT16(FLGR_Data1D *datout,
01779 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
01780 FLGR_Data1D *dattrue, FLGR_Vector *vec_false) {
01781 FLGR_MACRO_REPLACE_1D_I_WITH_C_I_C(fgINT16);
01782 }
01783
01784 void flgr1d_replace_I_with_C_I_C_fgINT32(FLGR_Data1D *datout,
01785 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
01786 FLGR_Data1D *dattrue, FLGR_Vector *vec_false) {
01787 FLGR_MACRO_REPLACE_1D_I_WITH_C_I_C(fgINT32);
01788 }
01789
01790 void flgr1d_replace_I_with_C_I_C_fgFLOAT32(FLGR_Data1D *datout,
01791 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
01792 FLGR_Data1D *dattrue, FLGR_Vector *vec_false) {
01793 FLGR_MACRO_REPLACE_1D_I_WITH_C_I_C(fgFLOAT32);
01794 }
01795
01796 void flgr1d_replace_I_with_C_I_C_fgFLOAT64(FLGR_Data1D *datout,
01797 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
01798 FLGR_Data1D *dattrue, FLGR_Vector *vec_false) {
01799 FLGR_MACRO_REPLACE_1D_I_WITH_C_I_C(fgFLOAT64);
01800 }
01801
01803
01818
01819 FLGR_Ret flgr1d_replace_I_with_C_I_C(FLGR_Data1D *datout,
01820 FLGR_Data1D *dattest1, char *test, FLGR_Vector *vec_test2,
01821 FLGR_Data1D *dattrue, FLGR_Vector *vec_false) {
01822
01823 FLGR_Test tst;
01824 FLGR_Ret ret;
01825
01826
01827
01828 if((datout==NULL) || (dattest1==NULL) | (dattrue==NULL)) {
01829 POST_ERROR("Null objects!\n");
01830 return FLGR_RET_NULL_OBJECT;
01831 }
01832
01833 if( (ret=flgr1d_is_data_same_attributes(datout, dattest1, __FUNCTION__)) != FLGR_RET_OK )
01834 return ret;
01835 if( (ret=flgr1d_is_data_same_attributes(dattest1, dattrue, __FUNCTION__)) != FLGR_RET_OK )
01836 return ret;
01837
01838 tst=flgr_get_test_value(test);
01839 if(tst==FLGR_TEST_UNKNOWN) {
01840 POST_ERROR("Illegal test %s",test);
01841 return FLGR_RET_UNDEFINED_ERROR;
01842 }
01843
01844 FLGR_DISPATCH_PROCEDURE(datout->type,flgr1d_replace_I_with_C_I_C,datout,dattest1,tst,vec_test2,dattrue,vec_false);
01845
01846
01847 }
01849
01864
01865 FLGR_Ret flgr1d_replace_I_with_S_I_S(FLGR_Data1D *datout,
01866 FLGR_Data1D *dattest1, char *test, char *str_test2,
01867 FLGR_Data1D *dattrue, char *str_false) {
01868 int ret;
01869 FLGR_Vector *vector_test2;
01870 FLGR_Vector *vector_false;
01871
01872
01873
01874 if((datout==NULL) || (dattest1==NULL) || (dattrue==NULL)) {
01875 POST_ERROR("Null objects!\n");
01876 return FLGR_RET_NULL_OBJECT;
01877 }
01878
01879 vector_test2 = flgr_vector_create(datout->spp,datout->type);
01880 vector_false = flgr_vector_create(datout->spp,datout->type);
01881
01882 if((ret=flgr_vector_import_string(vector_test2, str_test2))!= FLGR_RET_OK) {
01883 POST_ERROR("String is not valid ""%s""\n",str_test2);
01884 flgr_vector_destroy(vector_test2);
01885 return ret;
01886 }
01887
01888 if((ret=flgr_vector_import_string(vector_false, str_false))!= FLGR_RET_OK) {
01889 POST_ERROR("String is not valid ""%s""\n",str_false);
01890 flgr_vector_destroy(vector_false);
01891 return ret;
01892 }
01893
01894
01895 ret = flgr1d_replace_I_with_C_I_C(datout,dattest1,test,vector_test2,dattrue,vector_false);
01896
01897 flgr_vector_destroy(vector_test2);
01898 flgr_vector_destroy(vector_false);
01899
01900 return ret;
01901
01902 }
01903
01904
01905 void flgr1d_replace_I_with_C_C_I_fgBIT(FLGR_Data1D *datout,
01906 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
01907 FLGR_Vector *vec_true, FLGR_Data1D *datfalse) {
01908 FLGR_MACRO_REPLACE_1D_I_WITH_C_C_I(fgBIT);
01909 }
01910
01911 void flgr1d_replace_I_with_C_C_I_fgUINT8(FLGR_Data1D *datout,
01912 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
01913 FLGR_Vector *vec_true, FLGR_Data1D *datfalse) {
01914 #ifdef __SSE2__
01915 if(datout->spp==1) {
01916 if(test == FLGR_TEST_EQ) {
01917 flgr1d_replace_I_EQ_C_C_I_fast_fgUINT8(datout,
01918 dattest1,
01919 flgr_get_array_fgUINT8((fgUINT8*) vec_test2->array,0),
01920 flgr_get_array_fgUINT8((fgUINT8*) vec_true->array,0),
01921 datfalse);
01922
01923 }else if(test == FLGR_TEST_INFEQ) {
01924 flgr1d_replace_I_LE_C_C_I_fast_fgUINT8(datout,
01925 dattest1,flgr_get_array_fgUINT8((fgUINT8*) vec_test2->array,0),
01926 flgr_get_array_fgUINT8((fgUINT8*) vec_true->array,0),
01927 datfalse);
01928
01929 }else if(test == FLGR_TEST_SUPEQ) {
01930 flgr1d_replace_I_GE_C_C_I_fast_fgUINT8(datout,
01931 dattest1,
01932 flgr_get_array_fgUINT8((fgUINT8*) vec_test2->array,0),
01933 flgr_get_array_fgUINT8((fgUINT8*) vec_true->array,0),
01934 datfalse);
01935
01936 }else if(test == FLGR_TEST_DIFF) {
01937 flgr1d_replace_I_NE_C_C_I_fast_fgUINT8(datout,
01938 dattest1,
01939 flgr_get_array_fgUINT8((fgUINT8*) vec_test2->array,0),
01940 flgr_get_array_fgUINT8((fgUINT8*) vec_true->array,0),
01941 datfalse);
01942
01943 }else{
01944 FLGR_MACRO_REPLACE_1D_I_WITH_C_C_I(fgUINT8);
01945 }
01946 }else{
01947 FLGR_MACRO_REPLACE_1D_I_WITH_C_C_I(fgUINT8);
01948 }
01949 #else
01950 FLGR_MACRO_REPLACE_1D_I_WITH_C_C_I(fgUINT8);
01951 #endif
01952 }
01953
01954 void flgr1d_replace_I_with_C_C_I_fgUINT16(FLGR_Data1D *datout,
01955 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
01956 FLGR_Vector *vec_true, FLGR_Data1D *datfalse) {
01957 FLGR_MACRO_REPLACE_1D_I_WITH_C_C_I(fgUINT16);
01958 }
01959
01960 void flgr1d_replace_I_with_C_C_I_fgUINT32(FLGR_Data1D *datout,
01961 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
01962 FLGR_Vector *vec_true, FLGR_Data1D *datfalse) {
01963 FLGR_MACRO_REPLACE_1D_I_WITH_C_C_I(fgUINT32);
01964 }
01965
01966 void flgr1d_replace_I_with_C_C_I_fgINT8(FLGR_Data1D *datout,
01967 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
01968 FLGR_Vector *vec_true, FLGR_Data1D *datfalse) {
01969 FLGR_MACRO_REPLACE_1D_I_WITH_C_C_I(fgINT8);
01970 }
01971
01972 void flgr1d_replace_I_with_C_C_I_fgINT16(FLGR_Data1D *datout,
01973 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
01974 FLGR_Vector *vec_true, FLGR_Data1D *datfalse) {
01975 FLGR_MACRO_REPLACE_1D_I_WITH_C_C_I(fgINT16);
01976 }
01977
01978 void flgr1d_replace_I_with_C_C_I_fgINT32(FLGR_Data1D *datout,
01979 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
01980 FLGR_Vector *vec_true, FLGR_Data1D *datfalse) {
01981 FLGR_MACRO_REPLACE_1D_I_WITH_C_C_I(fgINT32);
01982 }
01983
01984 void flgr1d_replace_I_with_C_C_I_fgFLOAT32(FLGR_Data1D *datout,
01985 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
01986 FLGR_Vector *vec_true, FLGR_Data1D *datfalse) {
01987 FLGR_MACRO_REPLACE_1D_I_WITH_C_C_I(fgFLOAT32);
01988 }
01989
01990 void flgr1d_replace_I_with_C_C_I_fgFLOAT64(FLGR_Data1D *datout,
01991 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
01992 FLGR_Vector *vec_true, FLGR_Data1D *datfalse) {
01993 FLGR_MACRO_REPLACE_1D_I_WITH_C_C_I(fgFLOAT64);
01994 }
01995
01996
01998
02013
02014 FLGR_Ret flgr1d_replace_I_with_C_C_I(FLGR_Data1D *datout,
02015 FLGR_Data1D *dattest1, char *test, FLGR_Vector *vec_test2,
02016 FLGR_Vector *vec_true, FLGR_Data1D *datfalse) {
02017
02018 FLGR_Test tst;
02019 FLGR_Ret ret;
02020
02021
02022
02023 if((datout==NULL) || (dattest1==NULL) || (datfalse==NULL)) {
02024 POST_ERROR("Null objects!\n");
02025 return FLGR_RET_NULL_OBJECT;
02026 }
02027
02028 if( (ret=flgr1d_is_data_same_attributes(datout, dattest1, __FUNCTION__)) != FLGR_RET_OK )
02029 return ret;
02030 if( (ret=flgr1d_is_data_same_attributes(dattest1, datfalse, __FUNCTION__)) != FLGR_RET_OK )
02031 return ret;
02032
02033 tst=flgr_get_test_value(test);
02034 if(tst==FLGR_TEST_UNKNOWN) {
02035 POST_ERROR("Illegal test %s",test);
02036 return FLGR_RET_UNDEFINED_ERROR;
02037 }
02038
02039 FLGR_DISPATCH_PROCEDURE(datout->type,flgr1d_replace_I_with_C_C_I,datout,dattest1,tst,vec_test2,vec_true,datfalse);
02040
02041
02042 }
02044
02059
02060 FLGR_Ret flgr1d_replace_I_with_S_S_I(FLGR_Data1D *datout,
02061 FLGR_Data1D *dattest1, char *test, char *str_test2,
02062 char *str_true,FLGR_Data1D *datfalse) {
02063 int ret;
02064 FLGR_Vector *vector_test2;
02065 FLGR_Vector *vector_true;
02066
02067
02068
02069 if((datout==NULL) || (dattest1==NULL) || (datfalse==NULL)) {
02070 POST_ERROR("Null objects!\n");
02071 return FLGR_RET_NULL_OBJECT;
02072 }
02073
02074 vector_test2 = flgr_vector_create(datout->spp,datout->type);
02075 vector_true = flgr_vector_create(datout->spp,datout->type);
02076
02077 if((ret=flgr_vector_import_string(vector_test2, str_test2))!= FLGR_RET_OK) {
02078 POST_ERROR("String is not valid ""%s""\n",str_test2);
02079 flgr_vector_destroy(vector_test2);
02080 return ret;
02081 }
02082
02083 if((ret=flgr_vector_import_string(vector_true, str_true))!= FLGR_RET_OK) {
02084 POST_ERROR("String is not valid ""%s""\n",str_true);
02085 flgr_vector_destroy(vector_true);
02086 return ret;
02087 }
02088
02089
02090 ret = flgr1d_replace_I_with_C_C_I(datout,dattest1,test,vector_test2,vector_true,datfalse);
02091
02092 flgr_vector_destroy(vector_test2);
02093 flgr_vector_destroy(vector_true);
02094
02095 return ret;
02096
02097 }
02098
02099
02100
02101
02102 void flgr1d_replace_I_with_C_C_C_fgBIT(FLGR_Data1D *datout,
02103 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
02104 FLGR_Vector *vec_true, FLGR_Vector *vec_false) {
02105 FLGR_MACRO_REPLACE_1D_I_WITH_C_C_C(fgBIT);
02106 }
02107
02108 void flgr1d_replace_I_with_C_C_C_fgUINT8(FLGR_Data1D *datout,
02109 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
02110 FLGR_Vector *vec_true, FLGR_Vector *vec_false) {
02111 #ifdef __SSE2__
02112 if(datout->spp==1) {
02113 if(test == FLGR_TEST_EQ) {
02114 flgr1d_replace_I_EQ_C_C_C_fast_fgUINT8(datout,dattest1,
02115 flgr_get_array_fgUINT8((fgUINT8*) vec_test2->array,0),
02116 flgr_get_array_fgUINT8((fgUINT8*) vec_true->array,0) ,
02117 flgr_get_array_fgUINT8((fgUINT8*) vec_false->array,0));
02118
02119 }else if(test == FLGR_TEST_INFEQ) {
02120 flgr1d_replace_I_LE_C_C_C_fast_fgUINT8(datout,
02121 dattest1,
02122 flgr_get_array_fgUINT8((fgUINT8*) vec_test2->array,0),
02123 flgr_get_array_fgUINT8((fgUINT8*) vec_true->array,0),
02124 flgr_get_array_fgUINT8((fgUINT8*) vec_false->array,0));
02125
02126 }else if(test == FLGR_TEST_SUPEQ) {
02127 flgr1d_replace_I_GE_C_C_C_fast_fgUINT8(datout,
02128 dattest1,
02129 flgr_get_array_fgUINT8((fgUINT8*) vec_test2->array,0),
02130 flgr_get_array_fgUINT8((fgUINT8*) vec_true->array,0),
02131 flgr_get_array_fgUINT8((fgUINT8*) vec_false->array,0) );
02132
02133 }else if(test == FLGR_TEST_DIFF) {
02134 flgr1d_replace_I_NE_C_C_C_fast_fgUINT8(datout,
02135 dattest1,
02136 flgr_get_array_fgUINT8((fgUINT8*) vec_test2->array,0),
02137 flgr_get_array_fgUINT8((fgUINT8*) vec_true->array,0),
02138 flgr_get_array_fgUINT8((fgUINT8*) vec_false->array,0) );
02139
02140 }else{
02141 FLGR_MACRO_REPLACE_1D_I_WITH_C_C_C(fgUINT8);
02142 }
02143 }else{
02144 FLGR_MACRO_REPLACE_1D_I_WITH_C_C_C(fgUINT8);
02145 }
02146 #else
02147 FLGR_MACRO_REPLACE_1D_I_WITH_C_C_C(fgUINT8);
02148 #endif
02149 }
02150
02151 void flgr1d_replace_I_with_C_C_C_fgUINT16(FLGR_Data1D *datout,
02152 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
02153 FLGR_Vector *vec_true, FLGR_Vector *vec_false) {
02154 FLGR_MACRO_REPLACE_1D_I_WITH_C_C_C(fgUINT16);
02155 }
02156
02157 void flgr1d_replace_I_with_C_C_C_fgUINT32(FLGR_Data1D *datout,
02158 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
02159 FLGR_Vector *vec_true, FLGR_Vector *vec_false) {
02160 FLGR_MACRO_REPLACE_1D_I_WITH_C_C_C(fgUINT32);
02161 }
02162
02163 void flgr1d_replace_I_with_C_C_C_fgINT8(FLGR_Data1D *datout,
02164 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
02165 FLGR_Vector *vec_true, FLGR_Vector *vec_false) {
02166 FLGR_MACRO_REPLACE_1D_I_WITH_C_C_C(fgINT8);
02167 }
02168
02169 void flgr1d_replace_I_with_C_C_C_fgINT16(FLGR_Data1D *datout,
02170 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
02171 FLGR_Vector *vec_true, FLGR_Vector *vec_false) {
02172 FLGR_MACRO_REPLACE_1D_I_WITH_C_C_C(fgINT16);
02173 }
02174
02175 void flgr1d_replace_I_with_C_C_C_fgINT32(FLGR_Data1D *datout,
02176 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
02177 FLGR_Vector *vec_true, FLGR_Vector *vec_false) {
02178 FLGR_MACRO_REPLACE_1D_I_WITH_C_C_C(fgINT32);
02179 }
02180
02181 void flgr1d_replace_I_with_C_C_C_fgFLOAT32(FLGR_Data1D *datout,
02182 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
02183 FLGR_Vector *vec_true, FLGR_Vector *vec_false) {
02184 FLGR_MACRO_REPLACE_1D_I_WITH_C_C_C(fgFLOAT32);
02185 }
02186
02187 void flgr1d_replace_I_with_C_C_C_fgFLOAT64(FLGR_Data1D *datout,
02188 FLGR_Data1D *dattest1, FLGR_Test test, FLGR_Vector *vec_test2,
02189 FLGR_Vector *vec_true, FLGR_Vector *vec_false) {
02190 FLGR_MACRO_REPLACE_1D_I_WITH_C_C_C(fgFLOAT64);
02191 }
02192
02193
02195
02210
02211 FLGR_Ret flgr1d_replace_I_with_C_C_C(FLGR_Data1D *datout,
02212 FLGR_Data1D *dattest1, char *test, FLGR_Vector *vec_test2,
02213 FLGR_Vector *vec_true, FLGR_Vector *vec_false) {
02214
02215 FLGR_Test tst;
02216 FLGR_Ret ret;
02217
02218
02219
02220 if((datout==NULL) || (dattest1==NULL)) {
02221 POST_ERROR("Null objects!\n");
02222 return FLGR_RET_NULL_OBJECT;
02223 }
02224
02225 if( (ret=flgr1d_is_data_same_attributes(datout, dattest1, __FUNCTION__)) != FLGR_RET_OK )
02226 return ret;
02227
02228 tst=flgr_get_test_value(test);
02229 if(tst==FLGR_TEST_UNKNOWN) {
02230 POST_ERROR("Illegal test %s",test);
02231 return FLGR_RET_UNDEFINED_ERROR;
02232 }
02233
02234 FLGR_DISPATCH_PROCEDURE(datout->type,flgr1d_replace_I_with_C_C_C,datout,dattest1,tst,vec_test2,vec_true,vec_false);
02235
02236
02237 }
02239
02254
02255 FLGR_Ret flgr1d_replace_I_with_S_S_S(FLGR_Data1D *datout,
02256 FLGR_Data1D *dattest1, char *test, char *str_test2,
02257 char *str_true, char *str_false) {
02258 int ret;
02259 FLGR_Vector *vector_test2;
02260 FLGR_Vector *vector_true;
02261 FLGR_Vector *vector_false;
02262
02263
02264
02265 if((datout==NULL) || (dattest1==NULL)) {
02266 POST_ERROR("Null objects!\n");
02267 return FLGR_RET_NULL_OBJECT;
02268 }
02269
02270 vector_test2 = flgr_vector_create(datout->spp,datout->type);
02271 vector_true = flgr_vector_create(datout->spp,datout->type);
02272 vector_false = flgr_vector_create(datout->spp,datout->type);
02273
02274 if((ret=flgr_vector_import_string(vector_test2, str_test2))!= FLGR_RET_OK) {
02275 POST_ERROR("String is not valid ""%s""\n",str_test2);
02276 flgr_vector_destroy(vector_test2);
02277 return ret;
02278 }
02279
02280 if((ret=flgr_vector_import_string(vector_true, str_true))!= FLGR_RET_OK) {
02281 POST_ERROR("String is not valid ""%s""\n",str_true);
02282 flgr_vector_destroy(vector_true);
02283 return ret;
02284 }
02285
02286 if((ret=flgr_vector_import_string(vector_false, str_false))!= FLGR_RET_OK) {
02287 POST_ERROR("String is not valid ""%s""\n",str_false);
02288 flgr_vector_destroy(vector_false);
02289 return ret;
02290 }
02291
02292
02293 ret = flgr1d_replace_I_with_C_C_C(datout,dattest1,test,vector_test2,vector_true,vector_false);
02294
02295 flgr_vector_destroy(vector_test2);
02296 flgr_vector_destroy(vector_true);
02297 flgr_vector_destroy(vector_false);
02298
02299 return ret;
02300
02301 }
02302
02303
02304
02305
02311
02317
02318
02319
02320
02322
02324 #define FLGR_MACRO_REPLACE_2D_I_I_I(dtype) \
02325 FLGR_Data1D **pout = datout->row; \
02326 FLGR_Data1D **ptest1 = dattest1->row; \
02327 FLGR_Data1D **ptest2 = dattest2->row; \
02328 FLGR_Data1D **ptrue = dattrue->row; \
02329 FLGR_Data1D **pfalse = datfalse->row; \
02330 int i; \
02331 \
02332 \
02333 \
02334 for(i=0 ; i<datout->size_y ; i++) { \
02335 flgr1d_replace_I_with_I_I_I_##dtype(*pout,*ptest1,tst,*ptest2, \
02336 *ptrue,*pfalse); \
02337 pout++; \
02338 ptest1++; \
02339 ptest2++; \
02340 ptrue++; \
02341 pfalse++; \
02342 } \
02343 return
02344
02346
02348 #define FLGR_MACRO_REPLACE_2D_I_I_C(dtype) \
02349 FLGR_Data1D **pout = datout->row; \
02350 FLGR_Data1D **ptest1 = dattest1->row; \
02351 FLGR_Data1D **ptest2 = dattest2->row; \
02352 FLGR_Data1D **ptrue = dattrue->row; \
02353 int i; \
02354 \
02355 \
02356 \
02357 for(i=0 ; i<datout->size_y ; i++) { \
02358 flgr1d_replace_I_with_I_I_C_##dtype(*pout,*ptest1,tst,*ptest2, \
02359 *ptrue,vec_false); \
02360 pout++; \
02361 ptest1++; \
02362 ptest2++; \
02363 ptrue++; \
02364 } \
02365 return
02366
02368
02370 #define FLGR_MACRO_REPLACE_2D_I_C_I(dtype) \
02371 FLGR_Data1D **pout = datout->row; \
02372 FLGR_Data1D **ptest1 = dattest1->row; \
02373 FLGR_Data1D **ptest2 = dattest2->row; \
02374 FLGR_Data1D **pfalse = datfalse->row; \
02375 int i; \
02376 \
02377 \
02378 \
02379 for(i=0 ; i<datout->size_y ; i++) { \
02380 flgr1d_replace_I_with_I_C_I_##dtype(*pout,*ptest1,tst,*ptest2, \
02381 vec_true,*pfalse); \
02382 pout++; \
02383 ptest1++; \
02384 ptest2++; \
02385 pfalse++; \
02386 } \
02387 return
02388
02390
02392 #define FLGR_MACRO_REPLACE_2D_I_C_C(dtype) \
02393 FLGR_Data1D **pout = datout->row; \
02394 FLGR_Data1D **ptest1 = dattest1->row; \
02395 FLGR_Data1D **ptest2 = dattest2->row; \
02396 int i; \
02397 \
02398 \
02399 \
02400 for(i=0 ; i<datout->size_y ; i++) { \
02401 flgr1d_replace_I_with_I_C_C_##dtype(*pout,*ptest1,tst,*ptest2, \
02402 vec_true,vec_false); \
02403 pout++; \
02404 ptest1++; \
02405 ptest2++; \
02406 } \
02407 return
02408
02410
02412 #define FLGR_MACRO_REPLACE_2D_C_I_I(dtype) \
02413 FLGR_Data1D **pout = datout->row; \
02414 FLGR_Data1D **ptest1 = dattest1->row; \
02415 FLGR_Data1D **ptrue = dattrue->row; \
02416 FLGR_Data1D **pfalse = datfalse->row; \
02417 int i; \
02418 \
02419 \
02420 \
02421 for(i=0 ; i<datout->size_y ; i++) { \
02422 flgr1d_replace_I_with_C_I_I_##dtype(*pout,*ptest1,tst,vec_test2, \
02423 *ptrue,*pfalse); \
02424 pout++; \
02425 ptest1++; \
02426 ptrue++; \
02427 pfalse++; \
02428 } \
02429 return
02430
02432
02434 #define FLGR_MACRO_REPLACE_2D_C_I_C(dtype) \
02435 FLGR_Data1D **pout = datout->row; \
02436 FLGR_Data1D **ptest1 = dattest1->row; \
02437 FLGR_Data1D **ptrue = dattrue->row; \
02438 int i; \
02439 \
02440 \
02441 \
02442 for(i=0 ; i<datout->size_y ; i++) { \
02443 flgr1d_replace_I_with_C_I_C_##dtype(*pout,*ptest1,tst,vec_test2, \
02444 *ptrue,vec_false); \
02445 pout++; \
02446 ptest1++; \
02447 ptrue++; \
02448 } \
02449 return
02450
02452
02454 #define FLGR_MACRO_REPLACE_2D_C_C_I(dtype) \
02455 FLGR_Data1D **pout = datout->row; \
02456 FLGR_Data1D **ptest1 = dattest1->row; \
02457 FLGR_Data1D **pfalse = datfalse->row; \
02458 int i; \
02459 \
02460 \
02461 \
02462 for(i=0 ; i<datout->size_y ; i++) { \
02463 flgr1d_replace_I_with_C_C_I_##dtype(*pout,*ptest1,tst,vec_test2, \
02464 vec_true,*pfalse); \
02465 pout++; \
02466 ptest1++; \
02467 pfalse++; \
02468 } \
02469 return
02470
02472
02474 #define FLGR_MACRO_REPLACE_2D_C_C_C(dtype) \
02475 FLGR_Data1D **pout = datout->row; \
02476 FLGR_Data1D **ptest1 = dattest1->row; \
02477 int i; \
02478 \
02479 \
02480 \
02481 for(i=0 ; i<datout->size_y ; i++) { \
02482 flgr1d_replace_I_with_C_C_C_##dtype(*pout,*ptest1,tst,vec_test2, \
02483 vec_true,vec_false); \
02484 pout++; \
02485 ptest1++; \
02486 } \
02487 return
02488
02489
02490
02491
02492
02493 void flgr2d_replace_I_with_I_I_I_fgBIT(FLGR_Data2D *datout,
02494 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02495 FLGR_Data2D *dattrue, FLGR_Data2D *datfalse) {
02496 FLGR_MACRO_REPLACE_2D_I_I_I(fgBIT);
02497 }
02498 void flgr2d_replace_I_with_I_I_I_fgUINT8(FLGR_Data2D *datout,
02499 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02500 FLGR_Data2D *dattrue, FLGR_Data2D *datfalse) {
02501 FLGR_MACRO_REPLACE_2D_I_I_I(fgUINT8);
02502 }
02503 void flgr2d_replace_I_with_I_I_I_fgUINT16(FLGR_Data2D *datout,
02504 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02505 FLGR_Data2D *dattrue, FLGR_Data2D *datfalse) {
02506 FLGR_MACRO_REPLACE_2D_I_I_I(fgUINT16);
02507 }
02508 void flgr2d_replace_I_with_I_I_I_fgUINT32(FLGR_Data2D *datout,
02509 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02510 FLGR_Data2D *dattrue, FLGR_Data2D *datfalse) {
02511 FLGR_MACRO_REPLACE_2D_I_I_I(fgUINT32);
02512 }
02513 void flgr2d_replace_I_with_I_I_I_fgINT8(FLGR_Data2D *datout,
02514 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02515 FLGR_Data2D *dattrue, FLGR_Data2D *datfalse) {
02516 FLGR_MACRO_REPLACE_2D_I_I_I(fgINT8);
02517 }
02518 void flgr2d_replace_I_with_I_I_I_fgINT16(FLGR_Data2D *datout,
02519 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02520 FLGR_Data2D *dattrue, FLGR_Data2D *datfalse) {
02521 FLGR_MACRO_REPLACE_2D_I_I_I(fgINT16);
02522 }
02523 void flgr2d_replace_I_with_I_I_I_fgINT32(FLGR_Data2D *datout,
02524 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02525 FLGR_Data2D *dattrue, FLGR_Data2D *datfalse) {
02526 FLGR_MACRO_REPLACE_2D_I_I_I(fgINT32);
02527 }
02528 void flgr2d_replace_I_with_I_I_I_fgFLOAT32(FLGR_Data2D *datout,
02529 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02530 FLGR_Data2D *dattrue, FLGR_Data2D *datfalse) {
02531 FLGR_MACRO_REPLACE_2D_I_I_I(fgFLOAT32);
02532 }
02533 void flgr2d_replace_I_with_I_I_I_fgFLOAT64(FLGR_Data2D *datout,
02534 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02535 FLGR_Data2D *dattrue, FLGR_Data2D *datfalse) {
02536 FLGR_MACRO_REPLACE_2D_I_I_I(fgFLOAT64);
02537 }
02538
02539
02540
02541
02542
02543
02544
02545
02546 void flgr2d_replace_I_with_I_I_C_fgBIT(FLGR_Data2D *datout,
02547 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02548 FLGR_Data2D *dattrue, FLGR_Vector *vec_false) {
02549 FLGR_MACRO_REPLACE_2D_I_I_C(fgBIT);
02550 }
02551 void flgr2d_replace_I_with_I_I_C_fgUINT8(FLGR_Data2D *datout,
02552 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02553 FLGR_Data2D *dattrue, FLGR_Vector *vec_false) {
02554 FLGR_MACRO_REPLACE_2D_I_I_C(fgUINT8);
02555 }
02556 void flgr2d_replace_I_with_I_I_C_fgUINT16(FLGR_Data2D *datout,
02557 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02558 FLGR_Data2D *dattrue, FLGR_Vector *vec_false) {
02559 FLGR_MACRO_REPLACE_2D_I_I_C(fgUINT16);
02560 }
02561 void flgr2d_replace_I_with_I_I_C_fgUINT32(FLGR_Data2D *datout,
02562 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02563 FLGR_Data2D *dattrue, FLGR_Vector *vec_false) {
02564 FLGR_MACRO_REPLACE_2D_I_I_C(fgUINT32);
02565 }
02566 void flgr2d_replace_I_with_I_I_C_fgINT8(FLGR_Data2D *datout,
02567 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02568 FLGR_Data2D *dattrue, FLGR_Vector *vec_false) {
02569 FLGR_MACRO_REPLACE_2D_I_I_C(fgINT8);
02570 }
02571 void flgr2d_replace_I_with_I_I_C_fgINT16(FLGR_Data2D *datout,
02572 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02573 FLGR_Data2D *dattrue, FLGR_Vector *vec_false) {
02574 FLGR_MACRO_REPLACE_2D_I_I_C(fgINT16);
02575 }
02576 void flgr2d_replace_I_with_I_I_C_fgINT32(FLGR_Data2D *datout,
02577 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02578 FLGR_Data2D *dattrue, FLGR_Vector *vec_false) {
02579 FLGR_MACRO_REPLACE_2D_I_I_C(fgINT32);
02580 }
02581 void flgr2d_replace_I_with_I_I_C_fgFLOAT32(FLGR_Data2D *datout,
02582 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02583 FLGR_Data2D *dattrue, FLGR_Vector *vec_false) {
02584 FLGR_MACRO_REPLACE_2D_I_I_C(fgFLOAT32);
02585 }
02586 void flgr2d_replace_I_with_I_I_C_fgFLOAT64(FLGR_Data2D *datout,
02587 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02588 FLGR_Data2D *dattrue, FLGR_Vector *vec_false) {
02589 FLGR_MACRO_REPLACE_2D_I_I_C(fgFLOAT64);
02590 }
02591
02592
02593
02594
02595
02596
02597
02598
02599
02600
02601 void flgr2d_replace_I_with_I_C_I_fgBIT(FLGR_Data2D *datout,
02602 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02603 FLGR_Vector *vec_true, FLGR_Data2D *datfalse) {
02604 FLGR_MACRO_REPLACE_2D_I_C_I(fgBIT);
02605 }
02606 void flgr2d_replace_I_with_I_C_I_fgUINT8(FLGR_Data2D *datout,
02607 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02608 FLGR_Vector *vec_true, FLGR_Data2D *datfalse) {
02609 FLGR_MACRO_REPLACE_2D_I_C_I(fgUINT8);
02610 }
02611 void flgr2d_replace_I_with_I_C_I_fgUINT16(FLGR_Data2D *datout,
02612 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02613 FLGR_Vector *vec_true, FLGR_Data2D *datfalse) {
02614 FLGR_MACRO_REPLACE_2D_I_C_I(fgUINT16);
02615 }
02616 void flgr2d_replace_I_with_I_C_I_fgUINT32(FLGR_Data2D *datout,
02617 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02618 FLGR_Vector *vec_true, FLGR_Data2D *datfalse) {
02619 FLGR_MACRO_REPLACE_2D_I_C_I(fgUINT32);
02620 }
02621 void flgr2d_replace_I_with_I_C_I_fgINT8(FLGR_Data2D *datout,
02622 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02623 FLGR_Vector *vec_true, FLGR_Data2D *datfalse) {
02624 FLGR_MACRO_REPLACE_2D_I_C_I(fgINT8);
02625 }
02626 void flgr2d_replace_I_with_I_C_I_fgINT16(FLGR_Data2D *datout,
02627 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02628 FLGR_Vector *vec_true, FLGR_Data2D *datfalse) {
02629 FLGR_MACRO_REPLACE_2D_I_C_I(fgINT16);
02630 }
02631 void flgr2d_replace_I_with_I_C_I_fgINT32(FLGR_Data2D *datout,
02632 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02633 FLGR_Vector *vec_true, FLGR_Data2D *datfalse) {
02634 FLGR_MACRO_REPLACE_2D_I_C_I(fgINT32);
02635 }
02636 void flgr2d_replace_I_with_I_C_I_fgFLOAT32(FLGR_Data2D *datout,
02637 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02638 FLGR_Vector *vec_true, FLGR_Data2D *datfalse) {
02639 FLGR_MACRO_REPLACE_2D_I_C_I(fgFLOAT32);
02640 }
02641 void flgr2d_replace_I_with_I_C_I_fgFLOAT64(FLGR_Data2D *datout,
02642 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02643 FLGR_Vector *vec_true, FLGR_Data2D *datfalse) {
02644 FLGR_MACRO_REPLACE_2D_I_C_I(fgFLOAT64);
02645 }
02646
02647
02648
02649
02650
02651
02652 void flgr2d_replace_I_with_I_C_C_fgBIT(FLGR_Data2D *datout,
02653 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02654 FLGR_Vector *vec_true, FLGR_Vector *vec_false) {
02655 }
02656 void flgr2d_replace_I_with_I_C_C_fgUINT8(FLGR_Data2D *datout,
02657 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02658 FLGR_Vector *vec_true,FLGR_Vector *vec_false) {
02659 FLGR_MACRO_REPLACE_2D_I_C_C(fgUINT8);
02660 }
02661 void flgr2d_replace_I_with_I_C_C_fgUINT16(FLGR_Data2D *datout,
02662 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02663 FLGR_Vector *vec_true,FLGR_Vector *vec_false) {
02664 FLGR_MACRO_REPLACE_2D_I_C_C(fgUINT16);
02665 }
02666 void flgr2d_replace_I_with_I_C_C_fgUINT32(FLGR_Data2D *datout,
02667 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02668 FLGR_Vector *vec_true,FLGR_Vector *vec_false) {
02669 FLGR_MACRO_REPLACE_2D_I_C_C(fgUINT32);
02670 }
02671 void flgr2d_replace_I_with_I_C_C_fgINT8(FLGR_Data2D *datout,
02672 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02673 FLGR_Vector *vec_true,FLGR_Vector *vec_false) {
02674 FLGR_MACRO_REPLACE_2D_I_C_C(fgINT8);
02675 }
02676 void flgr2d_replace_I_with_I_C_C_fgINT16(FLGR_Data2D *datout,
02677 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02678 FLGR_Vector *vec_true,FLGR_Vector *vec_false) {
02679 FLGR_MACRO_REPLACE_2D_I_C_C(fgINT16);
02680 }
02681 void flgr2d_replace_I_with_I_C_C_fgINT32(FLGR_Data2D *datout,
02682 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02683 FLGR_Vector *vec_true,FLGR_Vector *vec_false) {
02684 FLGR_MACRO_REPLACE_2D_I_C_C(fgINT32);
02685 }
02686 void flgr2d_replace_I_with_I_C_C_fgFLOAT32(FLGR_Data2D *datout,
02687 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02688 FLGR_Vector *vec_true,FLGR_Vector *vec_false) {
02689 FLGR_MACRO_REPLACE_2D_I_C_C(fgFLOAT32);
02690 }
02691 void flgr2d_replace_I_with_I_C_C_fgFLOAT64(FLGR_Data2D *datout,
02692 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Data2D *dattest2,
02693 FLGR_Vector *vec_true, FLGR_Vector *vec_false) {
02694 FLGR_MACRO_REPLACE_2D_I_C_C(fgFLOAT64);
02695 }
02696
02697
02698
02699
02700
02701 void flgr2d_replace_I_with_C_I_I_fgBIT(FLGR_Data2D *datout,
02702 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02703 FLGR_Data2D *dattrue, FLGR_Data2D *datfalse) {
02704 FLGR_MACRO_REPLACE_2D_C_I_I(fgBIT);
02705 }
02706 void flgr2d_replace_I_with_C_I_I_fgUINT8(FLGR_Data2D *datout,
02707 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02708 FLGR_Data2D *dattrue, FLGR_Data2D *datfalse) {
02709 FLGR_MACRO_REPLACE_2D_C_I_I(fgUINT8);
02710 }
02711 void flgr2d_replace_I_with_C_I_I_fgUINT16(FLGR_Data2D *datout,
02712 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02713 FLGR_Data2D *dattrue, FLGR_Data2D *datfalse) {
02714 FLGR_MACRO_REPLACE_2D_C_I_I(fgUINT16);
02715 }
02716 void flgr2d_replace_I_with_C_I_I_fgUINT32(FLGR_Data2D *datout,
02717 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02718 FLGR_Data2D *dattrue, FLGR_Data2D *datfalse) {
02719 FLGR_MACRO_REPLACE_2D_C_I_I(fgUINT32);
02720 }
02721 void flgr2d_replace_I_with_C_I_I_fgINT8(FLGR_Data2D *datout,
02722 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02723 FLGR_Data2D *dattrue, FLGR_Data2D *datfalse) {
02724 FLGR_MACRO_REPLACE_2D_C_I_I(fgINT8);
02725 }
02726 void flgr2d_replace_I_with_C_I_I_fgINT16(FLGR_Data2D *datout,
02727 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02728 FLGR_Data2D *dattrue, FLGR_Data2D *datfalse) {
02729 FLGR_MACRO_REPLACE_2D_C_I_I(fgINT16);
02730 }
02731 void flgr2d_replace_I_with_C_I_I_fgINT32(FLGR_Data2D *datout,
02732 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02733 FLGR_Data2D *dattrue, FLGR_Data2D *datfalse) {
02734 FLGR_MACRO_REPLACE_2D_C_I_I(fgINT32);
02735 }
02736 void flgr2d_replace_I_with_C_I_I_fgFLOAT32(FLGR_Data2D *datout,
02737 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02738 FLGR_Data2D *dattrue, FLGR_Data2D *datfalse) {
02739 FLGR_MACRO_REPLACE_2D_C_I_I(fgFLOAT32);
02740 }
02741 void flgr2d_replace_I_with_C_I_I_fgFLOAT64(FLGR_Data2D *datout,
02742 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02743 FLGR_Data2D *dattrue, FLGR_Data2D *datfalse) {
02744 FLGR_MACRO_REPLACE_2D_C_I_I(fgFLOAT64);
02745 }
02746
02747
02748
02749
02750
02751
02752
02753 void flgr2d_replace_I_with_C_I_C_fgBIT(FLGR_Data2D *datout,
02754 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02755 FLGR_Data2D *dattrue, FLGR_Vector *vec_false) {
02756 FLGR_MACRO_REPLACE_2D_C_I_C(fgBIT);
02757 }
02758 void flgr2d_replace_I_with_C_I_C_fgUINT8(FLGR_Data2D *datout,
02759 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02760 FLGR_Data2D *dattrue, FLGR_Vector *vec_false) {
02761 FLGR_MACRO_REPLACE_2D_C_I_C(fgUINT8);
02762 }
02763 void flgr2d_replace_I_with_C_I_C_fgUINT16(FLGR_Data2D *datout,
02764 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02765 FLGR_Data2D *dattrue, FLGR_Vector *vec_false) {
02766 FLGR_MACRO_REPLACE_2D_C_I_C(fgUINT16);
02767 }
02768 void flgr2d_replace_I_with_C_I_C_fgUINT32(FLGR_Data2D *datout,
02769 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02770 FLGR_Data2D *dattrue, FLGR_Vector *vec_false) {
02771 FLGR_MACRO_REPLACE_2D_C_I_C(fgUINT32);
02772 }
02773 void flgr2d_replace_I_with_C_I_C_fgINT8(FLGR_Data2D *datout,
02774 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02775 FLGR_Data2D *dattrue, FLGR_Vector *vec_false) {
02776 FLGR_MACRO_REPLACE_2D_C_I_C(fgINT8);
02777 }
02778 void flgr2d_replace_I_with_C_I_C_fgINT16(FLGR_Data2D *datout,
02779 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02780 FLGR_Data2D *dattrue, FLGR_Vector *vec_false) {
02781 FLGR_MACRO_REPLACE_2D_C_I_C(fgINT16);
02782 }
02783 void flgr2d_replace_I_with_C_I_C_fgINT32(FLGR_Data2D *datout,
02784 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02785 FLGR_Data2D *dattrue, FLGR_Vector *vec_false) {
02786 FLGR_MACRO_REPLACE_2D_C_I_C(fgINT32);
02787 }
02788 void flgr2d_replace_I_with_C_I_C_fgFLOAT32(FLGR_Data2D *datout,
02789 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02790 FLGR_Data2D *dattrue, FLGR_Vector *vec_false) {
02791 FLGR_MACRO_REPLACE_2D_C_I_C(fgFLOAT32);
02792 }
02793 void flgr2d_replace_I_with_C_I_C_fgFLOAT64(FLGR_Data2D *datout,
02794 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02795 FLGR_Data2D *dattrue, FLGR_Vector *vec_false) {
02796 FLGR_MACRO_REPLACE_2D_C_I_C(fgFLOAT64);
02797 }
02798
02799
02800
02801
02802
02803
02804
02805
02806
02807
02808 void flgr2d_replace_I_with_C_C_I_fgBIT(FLGR_Data2D *datout,
02809 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02810 FLGR_Vector *vec_true, FLGR_Data2D *datfalse) {
02811 FLGR_MACRO_REPLACE_2D_C_C_I(fgBIT);
02812 }
02813 void flgr2d_replace_I_with_C_C_I_fgUINT8(FLGR_Data2D *datout,
02814 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02815 FLGR_Vector *vec_true, FLGR_Data2D *datfalse) {
02816 FLGR_MACRO_REPLACE_2D_C_C_I(fgUINT8);
02817 }
02818 void flgr2d_replace_I_with_C_C_I_fgUINT16(FLGR_Data2D *datout,
02819 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02820 FLGR_Vector *vec_true, FLGR_Data2D *datfalse) {
02821 FLGR_MACRO_REPLACE_2D_C_C_I(fgUINT16);
02822 }
02823 void flgr2d_replace_I_with_C_C_I_fgUINT32(FLGR_Data2D *datout,
02824 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02825 FLGR_Vector *vec_true, FLGR_Data2D *datfalse) {
02826 FLGR_MACRO_REPLACE_2D_C_C_I(fgUINT32);
02827 }
02828 void flgr2d_replace_I_with_C_C_I_fgINT8(FLGR_Data2D *datout,
02829 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02830 FLGR_Vector *vec_true, FLGR_Data2D *datfalse) {
02831 FLGR_MACRO_REPLACE_2D_C_C_I(fgINT8);
02832 }
02833 void flgr2d_replace_I_with_C_C_I_fgINT16(FLGR_Data2D *datout,
02834 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02835 FLGR_Vector *vec_true, FLGR_Data2D *datfalse) {
02836 FLGR_MACRO_REPLACE_2D_C_C_I(fgINT16);
02837 }
02838 void flgr2d_replace_I_with_C_C_I_fgINT32(FLGR_Data2D *datout,
02839 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02840 FLGR_Vector *vec_true, FLGR_Data2D *datfalse) {
02841 FLGR_MACRO_REPLACE_2D_C_C_I(fgINT32);
02842 }
02843 void flgr2d_replace_I_with_C_C_I_fgFLOAT32(FLGR_Data2D *datout,
02844 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02845 FLGR_Vector *vec_true, FLGR_Data2D *datfalse) {
02846 FLGR_MACRO_REPLACE_2D_C_C_I(fgFLOAT32);
02847 }
02848 void flgr2d_replace_I_with_C_C_I_fgFLOAT64(FLGR_Data2D *datout,
02849 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02850 FLGR_Vector *vec_true, FLGR_Data2D *datfalse) {
02851 FLGR_MACRO_REPLACE_2D_C_C_I(fgFLOAT64);
02852 }
02853
02854
02855
02856
02857
02858
02859 void flgr2d_replace_I_with_C_C_C_fgBIT(FLGR_Data2D *datout,
02860 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02861 FLGR_Vector *vec_true, FLGR_Vector *vec_false) {
02862 FLGR_MACRO_REPLACE_2D_C_C_C(fgBIT);
02863 }
02864 void flgr2d_replace_I_with_C_C_C_fgUINT8(FLGR_Data2D *datout,
02865 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02866 FLGR_Vector *vec_true,FLGR_Vector *vec_false) {
02867 FLGR_MACRO_REPLACE_2D_C_C_C(fgUINT8);
02868 }
02869 void flgr2d_replace_I_with_C_C_C_fgUINT16(FLGR_Data2D *datout,
02870 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02871 FLGR_Vector *vec_true,FLGR_Vector *vec_false) {
02872 FLGR_MACRO_REPLACE_2D_C_C_C(fgUINT16);
02873 }
02874 void flgr2d_replace_I_with_C_C_C_fgUINT32(FLGR_Data2D *datout,
02875 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02876 FLGR_Vector *vec_true,FLGR_Vector *vec_false) {
02877 FLGR_MACRO_REPLACE_2D_C_C_C(fgUINT32);
02878 }
02879 void flgr2d_replace_I_with_C_C_C_fgINT8(FLGR_Data2D *datout,
02880 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02881 FLGR_Vector *vec_true,FLGR_Vector *vec_false) {
02882 FLGR_MACRO_REPLACE_2D_C_C_C(fgINT8);
02883 }
02884 void flgr2d_replace_I_with_C_C_C_fgINT16(FLGR_Data2D *datout,
02885 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02886 FLGR_Vector *vec_true,FLGR_Vector *vec_false) {
02887 FLGR_MACRO_REPLACE_2D_C_C_C(fgINT16);
02888 }
02889 void flgr2d_replace_I_with_C_C_C_fgINT32(FLGR_Data2D *datout,
02890 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02891 FLGR_Vector *vec_true,FLGR_Vector *vec_false) {
02892 FLGR_MACRO_REPLACE_2D_C_C_C(fgINT32);
02893 }
02894 void flgr2d_replace_I_with_C_C_C_fgFLOAT32(FLGR_Data2D *datout,
02895 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02896 FLGR_Vector *vec_true,FLGR_Vector *vec_false) {
02897 FLGR_MACRO_REPLACE_2D_C_C_C(fgFLOAT32);
02898 }
02899 void flgr2d_replace_I_with_C_C_C_fgFLOAT64(FLGR_Data2D *datout,
02900 FLGR_Data2D *dattest1, FLGR_Test tst, FLGR_Vector *vec_test2,
02901 FLGR_Vector *vec_true, FLGR_Vector *vec_false) {
02902 FLGR_MACRO_REPLACE_2D_C_C_C(fgFLOAT64);
02903 }
02904
02905
02906
02907
02908
02909
02910
02911
02912
02913
02914
02915
02916
02918
02933
02934 FLGR_Ret flgr2d_replace_I_with_I_I_I(FLGR_Data2D *datout,
02935 FLGR_Data2D *dattest1, char * test, FLGR_Data2D *dattest2,
02936 FLGR_Data2D *dattrue, FLGR_Data2D *datfalse) {
02937 FLGR_Test tst;
02938 FLGR_Ret ret;
02939
02940
02941
02942 if((datout==NULL) || (dattest1==NULL) || (dattest2==NULL) || (dattrue==NULL) || (datfalse==NULL)) {
02943 POST_ERROR("Null objects!\n");
02944 return FLGR_RET_NULL_OBJECT;
02945 }
02946
02947 if( (ret=flgr2d_is_data_same_attributes(datout, dattest1, __FUNCTION__)) != FLGR_RET_OK )
02948 return ret;
02949 if( (ret=flgr2d_is_data_same_attributes(dattest1, dattest2, __FUNCTION__)) != FLGR_RET_OK )
02950 return ret;
02951 if( (ret=flgr2d_is_data_same_attributes(dattest2, dattrue, __FUNCTION__)) != FLGR_RET_OK )
02952 return ret;
02953 if( (ret=flgr2d_is_data_same_attributes(dattrue, datfalse, __FUNCTION__)) != FLGR_RET_OK )
02954 return ret;
02955
02956 tst=flgr_get_test_value(test);
02957 if(tst<0) {
02958 POST_ERROR("Illegal test %s",test);
02959 return FLGR_RET_UNDEFINED_ERROR;
02960 }
02961
02962 FLGR_DISPATCH_PROCEDURE(datout->type,flgr2d_replace_I_with_I_I_I,datout,dattest1,tst,dattest2,dattrue,datfalse);
02963
02964 return 0;
02965
02966 }
02967
02968
02969
02970
02971
02973
02988
02989 FLGR_Ret flgr2d_replace_I_with_I_I_C(FLGR_Data2D *datout,
02990 FLGR_Data2D *dattest1, char * test, FLGR_Data2D *dattest2,
02991 FLGR_Data2D *dattrue, FLGR_Vector *vec_false) {
02992 FLGR_Test tst;
02993 FLGR_Ret ret;
02994
02995
02996
02997 if((datout==NULL) || (dattest1==NULL) || (dattest2==NULL) || (dattrue==NULL)) {
02998 POST_ERROR("Null objects!\n");
02999 return FLGR_RET_NULL_OBJECT;
03000 }
03001
03002 if( (ret=flgr2d_is_data_same_attributes(datout, dattest1, __FUNCTION__)) != FLGR_RET_OK )
03003 return ret;
03004 if( (ret=flgr2d_is_data_same_attributes(dattest1, dattest2, __FUNCTION__)) != FLGR_RET_OK )
03005 return ret;
03006 if( (ret=flgr2d_is_data_same_attributes(dattest2, dattrue, __FUNCTION__)) != FLGR_RET_OK )
03007 return ret;
03008
03009 tst=flgr_get_test_value(test);
03010 if(tst<0) {
03011 POST_ERROR("Illegal test %s",test);
03012 return FLGR_RET_UNDEFINED_ERROR;
03013 }
03014
03015 FLGR_DISPATCH_PROCEDURE(datout->type,flgr2d_replace_I_with_I_I_C,datout,dattest1,tst,dattest2,dattrue,vec_false);
03016
03017 }
03018
03019
03020
03021
03023
03038
03039 FLGR_Ret flgr2d_replace_I_with_I_C_I(FLGR_Data2D *datout,
03040 FLGR_Data2D *dattest1, char * test, FLGR_Data2D *dattest2,
03041 FLGR_Vector *vec_true, FLGR_Data2D *datfalse) {
03042 FLGR_Test tst;
03043 FLGR_Ret ret;
03044
03045
03046
03047 if((datout==NULL) || (dattest1==NULL) || (dattest2==NULL) || (datfalse==NULL)) {
03048 POST_ERROR("Null objects!\n");
03049 return FLGR_RET_NULL_OBJECT;
03050 }
03051
03052 if( (ret=flgr2d_is_data_same_attributes(datout, dattest1, __FUNCTION__)) != FLGR_RET_OK )
03053 return ret;
03054 if( (ret=flgr2d_is_data_same_attributes(dattest1, dattest2, __FUNCTION__)) != FLGR_RET_OK )
03055 return ret;
03056 if( (ret=flgr2d_is_data_same_attributes(dattest2, datfalse, __FUNCTION__)) != FLGR_RET_OK )
03057 return ret;
03058
03059 tst=flgr_get_test_value(test);
03060 if(tst<0) {
03061 POST_ERROR("Illegal test %s",test);
03062 return FLGR_RET_UNDEFINED_ERROR;
03063 }
03064
03065
03066 FLGR_DISPATCH_PROCEDURE(datout->type,flgr2d_replace_I_with_I_C_I,datout,dattest1,tst,dattest2,vec_true,datfalse);
03067
03068 }
03069
03070
03071
03072
03074
03089
03090 FLGR_Ret flgr2d_replace_I_with_I_C_C(FLGR_Data2D *datout,
03091 FLGR_Data2D *dattest1, char * test, FLGR_Data2D *dattest2,
03092 FLGR_Vector *vec_true, FLGR_Vector *vec_false) {
03093 FLGR_Test tst;
03094 FLGR_Ret ret;
03095
03096
03097
03098 if((datout==NULL) || (dattest1==NULL) || (dattest2==NULL)) {
03099 POST_ERROR("Null objects!\n");
03100 return FLGR_RET_NULL_OBJECT;
03101 }
03102
03103 if( (ret=flgr2d_is_data_same_attributes(datout, dattest1, __FUNCTION__)) != FLGR_RET_OK )
03104 return ret;
03105 if( (ret=flgr2d_is_data_same_attributes(dattest1, dattest2, __FUNCTION__)) != FLGR_RET_OK )
03106 return ret;
03107
03108 tst=flgr_get_test_value(test);
03109 if(tst<0) {
03110 POST_ERROR("Illegal test %s",test);
03111 return FLGR_RET_UNDEFINED_ERROR;
03112 }
03113
03114 FLGR_DISPATCH_PROCEDURE(datout->type,flgr2d_replace_I_with_I_C_C,datout,dattest1,tst,dattest2,vec_true,vec_false);
03115
03116 }
03117
03118
03119
03121
03136
03137 FLGR_Ret flgr2d_replace_I_with_C_I_I(FLGR_Data2D *datout,
03138 FLGR_Data2D *dattest1, char * test, FLGR_Vector *vec_test2,
03139 FLGR_Data2D *dattrue, FLGR_Data2D *datfalse) {
03140 FLGR_Test tst;
03141 FLGR_Ret ret;
03142
03143
03144
03145 if((datout==NULL) || (dattest1==NULL) || (dattrue==NULL) || (datfalse==NULL)) {
03146 POST_ERROR("Null objects!\n");
03147 return FLGR_RET_NULL_OBJECT;
03148 }
03149
03150 if( (ret=flgr2d_is_data_same_attributes(datout, dattest1, __FUNCTION__)) != FLGR_RET_OK )
03151 return ret;
03152 if( (ret=flgr2d_is_data_same_attributes(dattest1, datfalse, __FUNCTION__)) != FLGR_RET_OK )
03153 return ret;
03154 if( (ret=flgr2d_is_data_same_attributes(datfalse, dattrue, __FUNCTION__)) != FLGR_RET_OK )
03155 return ret;
03156
03157 tst=flgr_get_test_value(test);
03158 if(tst<0) {
03159 POST_ERROR("Illegal test %s",test);
03160 return FLGR_RET_UNDEFINED_ERROR;
03161 }
03162
03163 FLGR_DISPATCH_PROCEDURE(datout->type,flgr2d_replace_I_with_C_I_I,datout,dattest1,tst,vec_test2,dattrue,datfalse);
03164
03165 }
03166
03167
03168
03169
03171
03186
03187 FLGR_Ret flgr2d_replace_I_with_C_I_C(FLGR_Data2D *datout,
03188 FLGR_Data2D *dattest1, char * test, FLGR_Vector *vec_test2,
03189 FLGR_Data2D *dattrue, FLGR_Vector *vec_false) {
03190 FLGR_Test tst;
03191 FLGR_Ret ret;
03192
03193
03194
03195 if((datout==NULL) || (dattest1==NULL) || (dattrue==NULL)) {
03196 POST_ERROR("Null objects!\n");
03197 return FLGR_RET_NULL_OBJECT;
03198 }
03199
03200 if( (ret=flgr2d_is_data_same_attributes(datout, dattest1, __FUNCTION__)) != FLGR_RET_OK )
03201 return ret;
03202 if( (ret=flgr2d_is_data_same_attributes(dattest1, dattrue, __FUNCTION__)) != FLGR_RET_OK )
03203 return ret;
03204
03205 tst=flgr_get_test_value(test);
03206 if(tst<0) {
03207 POST_ERROR("Illegal test %s",test);
03208 return FLGR_RET_UNDEFINED_ERROR;
03209 }
03210
03211 FLGR_DISPATCH_PROCEDURE(datout->type,flgr2d_replace_I_with_C_I_C,datout,dattest1,tst,vec_test2,dattrue,vec_false);
03212
03213 }
03214
03215
03216
03217
03218
03220
03235
03236 FLGR_Ret flgr2d_replace_I_with_C_C_I(FLGR_Data2D *datout,
03237 FLGR_Data2D *dattest1, char * test, FLGR_Vector *vec_test2,
03238 FLGR_Vector *vec_true, FLGR_Data2D *datfalse) {
03239 FLGR_Test tst;
03240 FLGR_Ret ret;
03241
03242
03243
03244 if((datout==NULL) || (dattest1==NULL) || (datfalse==NULL)) {
03245 POST_ERROR("Null objects!\n");
03246 return FLGR_RET_NULL_OBJECT;
03247 }
03248
03249 if( (ret=flgr2d_is_data_same_attributes(datout, dattest1, __FUNCTION__)) != FLGR_RET_OK )
03250 return ret;
03251 if( (ret=flgr2d_is_data_same_attributes(dattest1, datfalse, __FUNCTION__)) != FLGR_RET_OK )
03252 return ret;
03253
03254 tst=flgr_get_test_value(test);
03255 if(tst<0) {
03256 POST_ERROR("Illegal test %s",test);
03257 return FLGR_RET_UNDEFINED_ERROR;
03258 }
03259
03260 FLGR_DISPATCH_PROCEDURE(datout->type,flgr2d_replace_I_with_C_C_I,datout,dattest1,tst,vec_test2,vec_true,datfalse);
03261
03262 }
03263
03264
03265
03266
03268
03283
03284 FLGR_Ret flgr2d_replace_I_with_C_C_C(FLGR_Data2D *datout,
03285 FLGR_Data2D *dattest1, char * test, FLGR_Vector *vec_test2,
03286 FLGR_Vector *vec_true, FLGR_Vector *vec_false) {
03287 FLGR_Test tst;
03288 FLGR_Ret ret;
03289
03290
03291
03292 if((datout==NULL) || (dattest1==NULL)) {
03293 POST_ERROR("Null objects!\n");
03294 return FLGR_RET_NULL_OBJECT;
03295 }
03296
03297 if( (ret=flgr2d_is_data_same_attributes(datout, dattest1, __FUNCTION__)) != FLGR_RET_OK )
03298 return ret;
03299
03300
03301 tst=flgr_get_test_value(test);
03302 if(tst<0) {
03303 POST_ERROR("Illegal test %s",test);
03304 return FLGR_RET_UNDEFINED_ERROR;
03305 }
03306
03307 FLGR_DISPATCH_PROCEDURE(datout->type,flgr2d_replace_I_with_C_C_C,datout,dattest1,tst,vec_test2,vec_true,vec_false);
03308
03309 }
03310
03311
03312
03313
03314
03315
03316
03317
03318
03320
03335
03336 FLGR_Ret flgr2d_replace_I_with_I_I_S(FLGR_Data2D *datout,
03337 FLGR_Data2D *dattest1, char *test, FLGR_Data2D *dattest2,
03338 FLGR_Data2D *dattrue, char *str_false) {
03339 int ret;
03340 FLGR_Vector *vector_false;
03341
03342
03343
03344 if((datout==NULL) || (dattest1==NULL) || (dattest2==NULL) || (dattrue==NULL)) {
03345 POST_ERROR("Null objects!\n");
03346 return FLGR_RET_NULL_OBJECT;
03347 }
03348
03349 vector_false = flgr_vector_create(datout->spp,datout->type);
03350
03351 if((ret=flgr_vector_import_string(vector_false, str_false))!= FLGR_RET_OK) {
03352 POST_ERROR("String is not valid ""%s""\n",str_false);
03353 flgr_vector_destroy(vector_false);
03354 return ret;
03355 }
03356
03357
03358 ret = flgr2d_replace_I_with_I_I_C(datout,dattest1,test,dattest2,dattrue,vector_false);
03359
03360 flgr_vector_destroy(vector_false);
03361
03362 return ret;
03363
03364 }
03365
03366
03368
03383
03384 FLGR_Ret flgr2d_replace_I_with_I_S_I(FLGR_Data2D *datout,
03385 FLGR_Data2D *dattest1, char *test, FLGR_Data2D *dattest2,
03386 char *str_true, FLGR_Data2D *datfalse) {
03387 int ret;
03388 FLGR_Vector *vector_true;
03389
03390
03391
03392 if((datout==NULL) || (dattest1==NULL) || (dattest2==NULL) || (datfalse==NULL)) {
03393 POST_ERROR("Null objects!\n");
03394 return FLGR_RET_NULL_OBJECT;
03395 }
03396
03397 vector_true = flgr_vector_create(datout->spp,datout->type);
03398
03399 if((ret=flgr_vector_import_string(vector_true, str_true))!= FLGR_RET_OK) {
03400 POST_ERROR("String is not valid ""%s""\n",str_true);
03401 flgr_vector_destroy(vector_true);
03402 return ret;
03403 }
03404
03405
03406 ret = flgr2d_replace_I_with_I_C_I(datout,dattest1,test,dattest2,vector_true,datfalse);
03407
03408 flgr_vector_destroy(vector_true);
03409
03410 return ret;
03411
03412 }
03413
03414
03416
03431
03432 FLGR_Ret flgr2d_replace_I_with_I_S_S(FLGR_Data2D *datout,
03433 FLGR_Data2D *dattest1, char *test, FLGR_Data2D *dattest2,
03434 char *str_true, char *str_false) {
03435 int ret;
03436 FLGR_Vector *vector_true;
03437 FLGR_Vector *vector_false;
03438
03439
03440
03441 if((datout==NULL) || (dattest1==NULL) || (dattest2==NULL)) {
03442 POST_ERROR("Null objects!\n");
03443 return FLGR_RET_NULL_OBJECT;
03444 }
03445
03446 vector_true = flgr_vector_create(datout->spp,datout->type);
03447 vector_false = flgr_vector_create(datout->spp,datout->type);
03448
03449 if((ret=flgr_vector_import_string(vector_true, str_true))!= FLGR_RET_OK) {
03450 POST_ERROR("String is not valid ""%s""\n",str_true);
03451 flgr_vector_destroy(vector_true);
03452 return ret;
03453 }
03454
03455 if((ret=flgr_vector_import_string(vector_false, str_false))!= FLGR_RET_OK) {
03456 POST_ERROR("String is not valid ""%s""\n",str_false);
03457 flgr_vector_destroy(vector_false);
03458 return ret;
03459 }
03460
03461
03462 ret = flgr2d_replace_I_with_I_C_C(datout,dattest1,test,dattest2,vector_true,vector_false);
03463
03464 flgr_vector_destroy(vector_true);
03465 flgr_vector_destroy(vector_false);
03466
03467 return ret;
03468
03469 }
03470
03472
03487
03488 FLGR_Ret flgr2d_replace_I_with_S_I_I(FLGR_Data2D *datout,
03489 FLGR_Data2D *dattest1, char *test, char *str_test2,
03490 FLGR_Data2D *dattrue, FLGR_Data2D *datfalse) {
03491 int ret;
03492 FLGR_Vector *vector_test2;
03493
03494
03495
03496 if((datout==NULL) || (dattest1==NULL) || (dattrue==NULL) || (datfalse==NULL)) {
03497 POST_ERROR("Null objects!\n");
03498 return FLGR_RET_NULL_OBJECT;
03499 }
03500
03501 vector_test2 = flgr_vector_create(datout->spp,datout->type);
03502
03503 if((ret=flgr_vector_import_string(vector_test2, str_test2))!= FLGR_RET_OK) {
03504 POST_ERROR("String is not valid ""%s""\n",str_test2);
03505 flgr_vector_destroy(vector_test2);
03506 return ret;
03507 }
03508
03509
03510 ret = flgr2d_replace_I_with_C_I_I(datout,dattest1,test,vector_test2,dattrue,datfalse);
03511
03512 flgr_vector_destroy(vector_test2);
03513
03514 return ret;
03515
03516 }
03517
03518
03520
03535
03536 FLGR_Ret flgr2d_replace_I_with_S_I_S(FLGR_Data2D *datout,
03537 FLGR_Data2D *dattest1, char *test, char *str_test2,
03538 FLGR_Data2D *dattrue, char *str_false) {
03539 int ret;
03540 FLGR_Vector *vector_test2;
03541 FLGR_Vector *vector_false;
03542
03543
03544
03545 if((datout==NULL) || (dattest1==NULL) || (dattrue==NULL)) {
03546 POST_ERROR("Null objects!\n");
03547 return FLGR_RET_NULL_OBJECT;
03548 }
03549
03550 vector_test2 = flgr_vector_create(datout->spp,datout->type);
03551 vector_false = flgr_vector_create(datout->spp,datout->type);
03552
03553 if((ret=flgr_vector_import_string(vector_test2, str_test2))!= FLGR_RET_OK) {
03554 POST_ERROR("String is not valid ""%s""\n",str_test2);
03555 flgr_vector_destroy(vector_test2);
03556 return ret;
03557 }
03558
03559 if((ret=flgr_vector_import_string(vector_false, str_false))!= FLGR_RET_OK) {
03560 POST_ERROR("String is not valid ""%s""\n",str_false);
03561 flgr_vector_destroy(vector_false);
03562 return ret;
03563 }
03564
03565
03566 ret = flgr2d_replace_I_with_C_I_C(datout,dattest1,test,vector_test2,dattrue,vector_false);
03567
03568 flgr_vector_destroy(vector_test2);
03569 flgr_vector_destroy(vector_false);
03570
03571 return ret;
03572
03573 }
03574
03576
03591
03592 FLGR_Ret flgr2d_replace_I_with_S_S_I(FLGR_Data2D *datout,
03593 FLGR_Data2D *dattest1, char *test, char *str_test2,
03594 char *str_true,FLGR_Data2D *datfalse) {
03595 int ret;
03596 FLGR_Vector *vector_test2;
03597 FLGR_Vector *vector_true;
03598
03599
03600
03601 if((datout==NULL) || (dattest1==NULL) || (datfalse==NULL)) {
03602 POST_ERROR("Null objects!\n");
03603 return FLGR_RET_NULL_OBJECT;
03604 }
03605
03606 vector_test2 = flgr_vector_create(datout->spp,datout->type);
03607 vector_true = flgr_vector_create(datout->spp,datout->type);
03608
03609 if((ret=flgr_vector_import_string(vector_test2, str_test2))!= FLGR_RET_OK) {
03610 POST_ERROR("String is not valid ""%s""\n",str_test2);
03611 flgr_vector_destroy(vector_test2);
03612 return ret;
03613 }
03614
03615 if((ret=flgr_vector_import_string(vector_true, str_true))!= FLGR_RET_OK) {
03616 POST_ERROR("String is not valid ""%s""\n",str_true);
03617 flgr_vector_destroy(vector_true);
03618 return ret;
03619 }
03620
03621
03622 ret = flgr2d_replace_I_with_C_C_I(datout,dattest1,test,vector_test2,vector_true,datfalse);
03623
03624 flgr_vector_destroy(vector_test2);
03625 flgr_vector_destroy(vector_true);
03626
03627 return ret;
03628
03629 }
03630
03631
03632
03633
03635
03650
03651 FLGR_Ret flgr2d_replace_I_with_S_S_S(FLGR_Data2D *datout,
03652 FLGR_Data2D *dattest1, char *test, char *str_test2,
03653 char *str_true, char *str_false) {
03654 int ret;
03655 FLGR_Vector *vector_test2;
03656 FLGR_Vector *vector_true;
03657 FLGR_Vector *vector_false;
03658
03659
03660
03661 if((datout==NULL) || (dattest1==NULL)) {
03662 POST_ERROR("Null objects!\n");
03663 return FLGR_RET_NULL_OBJECT;
03664 }
03665
03666 vector_test2 = flgr_vector_create(datout->spp,datout->type);
03667 vector_true = flgr_vector_create(datout->spp,datout->type);
03668 vector_false = flgr_vector_create(datout->spp,datout->type);
03669
03670 if((ret=flgr_vector_import_string(vector_test2, str_test2))!= FLGR_RET_OK) {
03671 POST_ERROR("String is not valid ""%s""\n",str_test2);
03672 flgr_vector_destroy(vector_test2);
03673 return ret;
03674 }
03675
03676 if((ret=flgr_vector_import_string(vector_true, str_true))!= FLGR_RET_OK) {
03677 POST_ERROR("String is not valid ""%s""\n",str_true);
03678 flgr_vector_destroy(vector_true);
03679 return ret;
03680 }
03681
03682 if((ret=flgr_vector_import_string(vector_false, str_false))!= FLGR_RET_OK) {
03683 POST_ERROR("String is not valid ""%s""\n",str_false);
03684 flgr_vector_destroy(vector_false);
03685 return ret;
03686 }
03687
03688
03689 ret = flgr2d_replace_I_with_C_C_C(datout,dattest1,test,vector_test2,vector_true,vector_false);
03690
03691 flgr_vector_destroy(vector_test2);
03692 flgr_vector_destroy(vector_true);
03693 flgr_vector_destroy(vector_false);
03694
03695 return ret;
03696
03697 }
03698
03699
03700
03701
03702
03703