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 "flgrCoreMalloc.h"
00025 #include "flgrCoreDispatch.h"
00026 #include "flgrCoreVector.h"
00027 #include "flgrCoreIO.h"
00028
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00046
00051
00052 FLGR_Vector *flgr_vector_create(int spp, FLGR_Type type){
00053 FLGR_Vector *vct;
00054
00055
00056
00057 if(flgr_is_vector_type_valid(type)!=FLGR_RET_OK) {
00058 POST_ERROR("unknwon type\n");
00059 return NULL;
00060 }
00061
00062 if(spp<1) {
00063 POST_ERROR("Sample Per Pixel (spp) cannot be < 1\n");
00064 return NULL;
00065 }
00066
00067 vct = flgr_malloc(sizeof(FLGR_Vector));
00068
00069 vct->bps = flgr_get_bps_from_type(type);
00070 vct->spp = spp;
00071 vct->type = type;
00072
00073 vct->array = flgr_malloc_align((spp*vct->bps)/8+16,16);
00074
00075 if(vct->array == NULL) {
00076 POST_ERROR("Allocation error !\n");
00077 flgr_free(vct);
00078 return NULL;
00079 }
00080
00081 return vct;
00082 }
00083
00085
00089
00090 FLGR_Ret flgr_vector_destroy(FLGR_Vector *vct) {
00091
00092
00093 if(vct == NULL) {
00094 POST_ERROR("Null object\n");
00095 return FLGR_RET_NULL_OBJECT;
00096 }
00097
00098 if(vct->array == NULL) {
00099 POST_ERROR("Vector array is null\n");
00100 return FLGR_RET_NULL_OBJECT;
00101 }
00102
00103 flgr_free_align(vct->array);
00104
00105 flgr_free(vct);
00106
00107
00108
00109 return FLGR_RET_OK;
00110 }
00111
00112
00114
00118
00119 FLGR_Ret flgr_vector_clear(FLGR_Vector *vct) {
00120
00121
00122 if(vct == NULL) {
00123 POST_ERROR("Null object\n");
00124 return FLGR_RET_NULL_OBJECT;
00125 }
00126
00127 memset(vct->array, 0, vct->spp*(vct->bps>>3));
00128 return FLGR_RET_OK;
00129 }
00130
00131
00133
00135 #define FLGR_MACRO_VECTOR_GET_ELEMENT(dtype) \
00136 \
00137 *value= flgr_get_array_##dtype((dtype*) (vct->array),index)
00138
00139 void flgr_vector_get_element_fgBIT(FLGR_Vector *vct, int index, fgBIT *value) {
00140 FLGR_MACRO_VECTOR_GET_ELEMENT(fgBIT);
00141 }
00142 void flgr_vector_get_element_fgUINT8(FLGR_Vector *vct, int index, fgUINT8 *value) {
00143 FLGR_MACRO_VECTOR_GET_ELEMENT(fgUINT8);
00144 }
00145 void flgr_vector_get_element_fgUINT16(FLGR_Vector *vct, int index, fgUINT16 *value) {
00146 FLGR_MACRO_VECTOR_GET_ELEMENT(fgUINT16);
00147 }
00148 void flgr_vector_get_element_fgUINT32(FLGR_Vector *vct, int index, fgUINT32 *value) {
00149 FLGR_MACRO_VECTOR_GET_ELEMENT(fgUINT32);
00150 }
00151 void flgr_vector_get_element_fgUINT64(FLGR_Vector *vct, int index, fgUINT64 *value) {
00152 FLGR_MACRO_VECTOR_GET_ELEMENT(fgUINT64);
00153 }
00154 void flgr_vector_get_element_fgINT8(FLGR_Vector *vct, int index, fgINT8 *value) {
00155 FLGR_MACRO_VECTOR_GET_ELEMENT(fgINT8);
00156 }
00157 void flgr_vector_get_element_fgINT16(FLGR_Vector *vct, int index, fgINT16 *value) {
00158 FLGR_MACRO_VECTOR_GET_ELEMENT(fgINT16);
00159 }
00160 void flgr_vector_get_element_fgINT32(FLGR_Vector *vct, int index, fgINT32 *value) {
00161 FLGR_MACRO_VECTOR_GET_ELEMENT(fgINT32);
00162 }
00163 void flgr_vector_get_element_fgINT64(FLGR_Vector *vct, int index, fgINT64 *value) {
00164 FLGR_MACRO_VECTOR_GET_ELEMENT(fgINT64);
00165 }
00166 void flgr_vector_get_element_fgFLOAT32(FLGR_Vector *vct, int index, fgFLOAT32 *value) {
00167 FLGR_MACRO_VECTOR_GET_ELEMENT(fgFLOAT32);
00168 }
00169 void flgr_vector_get_element_fgFLOAT64(FLGR_Vector *vct, int index, fgFLOAT64 *value) {
00170 FLGR_MACRO_VECTOR_GET_ELEMENT(fgFLOAT64);
00171 }
00173
00179
00180 FLGR_Ret flgr_vector_get_element(FLGR_Vector *vct, int index, void *value) {
00181
00182
00183 if(vct==NULL) {
00184 POST_ERROR("Null Objects\n");
00185 return FLGR_RET_NULL_OBJECT;
00186 }
00187
00188 if((index<0) || (index>=vct->spp)) {
00189 POST_ERROR("index (%d) out of the vector\n",index);
00190 return FLGR_RET_UNDEFINED_ERROR;
00191 }
00192
00193 FLGR_FULL_DISPATCH_CONST_PTR_PROCEDURE(vct->type, flgr_vector_get_element, value, vct, index);
00194 }
00195
00196
00197
00199
00201 #define FLGR_MACRO_VECTOR_REVERT_ELEMENT(dtype) \
00202 int k,l; \
00203 int spp = vctdest->spp; \
00204 dtype *psrc = (dtype*) vctsrc->array; \
00205 dtype *pdest = (dtype*) vctdest->array; \
00206 dtype a1; \
00207 \
00208 \
00209 \
00210 for(k=0,l=spp-1 ; k<spp ; k++,l--) { \
00211 a1 = flgr_get_array_##dtype(psrc,k); \
00212 flgr_set_array_##dtype(pdest,l,a1); \
00213 } \
00214 return
00215
00216 void flgr_vector_revert_element_fgBIT(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
00217 FLGR_MACRO_VECTOR_REVERT_ELEMENT(fgBIT);
00218 }
00219 void flgr_vector_revert_element_fgUINT8(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
00220 FLGR_MACRO_VECTOR_REVERT_ELEMENT(fgUINT8);
00221 }
00222 void flgr_vector_revert_element_fgUINT16(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
00223 FLGR_MACRO_VECTOR_REVERT_ELEMENT(fgUINT16);
00224 }
00225 void flgr_vector_revert_element_fgUINT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
00226 FLGR_MACRO_VECTOR_REVERT_ELEMENT(fgUINT32);
00227 }
00228 void flgr_vector_revert_element_fgUINT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
00229 FLGR_MACRO_VECTOR_REVERT_ELEMENT(fgUINT64);
00230 }
00231 void flgr_vector_revert_element_fgINT8(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
00232 FLGR_MACRO_VECTOR_REVERT_ELEMENT(fgINT8);
00233 }
00234 void flgr_vector_revert_element_fgINT16(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
00235 FLGR_MACRO_VECTOR_REVERT_ELEMENT(fgINT16);
00236 }
00237 void flgr_vector_revert_element_fgINT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
00238 FLGR_MACRO_VECTOR_REVERT_ELEMENT(fgINT32);
00239 }
00240 void flgr_vector_revert_element_fgINT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
00241 FLGR_MACRO_VECTOR_REVERT_ELEMENT(fgINT64);
00242 }
00243 void flgr_vector_revert_element_fgFLOAT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
00244 FLGR_MACRO_VECTOR_REVERT_ELEMENT(fgFLOAT32);
00245 }
00246 void flgr_vector_revert_element_fgFLOAT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
00247 FLGR_MACRO_VECTOR_REVERT_ELEMENT(fgFLOAT64);
00248 }
00250
00255
00256 FLGR_Ret flgr_vector_revert_element(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
00257 FLGR_Ret ret;
00258
00259
00260
00261 if((vctdest==NULL) || (vctsrc==NULL)) {
00262 POST_ERROR("Null Objects\n");
00263 return FLGR_RET_NULL_OBJECT;
00264 }
00265
00266 ret = flgr_vector_is_same_type(vctsrc,vctdest);
00267 if(ret != FLGR_RET_OK) {
00268 POST_ERROR("Vector type different !\n");
00269 return FLGR_RET_TYPE_DIFFERENT;
00270 }
00271
00272 ret = flgr_vector_is_same_spp(vctdest,vctsrc);
00273 if(ret != FLGR_RET_OK) {
00274 POST_ERROR("Vector SPP different !\n");
00275 return FLGR_RET_UNDEFINED_ERROR;
00276 }
00277
00278 FLGR_FULL_PROCEDURE_DISPATCH(vctdest->type, flgr_vector_revert_element, vctdest, vctsrc);
00279
00280 }
00281
00282
00283
00284
00285
00286
00287
00288
00289
00291
00293 #define FLGR_MACRO_VECTOR_SET_ELEMENT(dtype) \
00294 \
00295 flgr_set_array_##dtype((dtype*) (vct->array),index,value)
00296
00297 void flgr_vector_set_element_fgBIT(FLGR_Vector *vct, int index, fgBIT value) {
00298 FLGR_MACRO_VECTOR_SET_ELEMENT(fgBIT);
00299 }
00300 void flgr_vector_set_element_fgUINT8(FLGR_Vector *vct, int index, fgUINT8 value) {
00301 FLGR_MACRO_VECTOR_SET_ELEMENT(fgUINT8);
00302 }
00303 void flgr_vector_set_element_fgUINT16(FLGR_Vector *vct, int index, fgUINT16 value) {
00304 FLGR_MACRO_VECTOR_SET_ELEMENT(fgUINT16);
00305 }
00306 void flgr_vector_set_element_fgUINT32(FLGR_Vector *vct, int index, fgUINT32 value) {
00307 FLGR_MACRO_VECTOR_SET_ELEMENT(fgUINT32);
00308 }
00309 void flgr_vector_set_element_fgUINT64(FLGR_Vector *vct, int index, fgINT64 value) {
00310 FLGR_MACRO_VECTOR_SET_ELEMENT(fgUINT64);
00311 }
00312 void flgr_vector_set_element_fgINT8(FLGR_Vector *vct, int index, fgINT8 value) {
00313 FLGR_MACRO_VECTOR_SET_ELEMENT(fgINT8);
00314 }
00315 void flgr_vector_set_element_fgINT16(FLGR_Vector *vct, int index, fgINT16 value) {
00316 FLGR_MACRO_VECTOR_SET_ELEMENT(fgINT16);
00317 }
00318 void flgr_vector_set_element_fgINT32(FLGR_Vector *vct, int index, fgINT32 value) {
00319 FLGR_MACRO_VECTOR_SET_ELEMENT(fgINT32);
00320 }
00321 void flgr_vector_set_element_fgINT64(FLGR_Vector *vct, int index, fgINT64 value) {
00322 FLGR_MACRO_VECTOR_SET_ELEMENT(fgINT64);
00323 }
00324 void flgr_vector_set_element_fgFLOAT32(FLGR_Vector *vct, int index, fgFLOAT32 value) {
00325 FLGR_MACRO_VECTOR_SET_ELEMENT(fgFLOAT32);
00326 }
00327 void flgr_vector_set_element_fgFLOAT64(FLGR_Vector *vct, int index, fgFLOAT64 value) {
00328 FLGR_MACRO_VECTOR_SET_ELEMENT(fgFLOAT64);
00329 }
00331
00337
00338 FLGR_Ret flgr_vector_set_element(FLGR_Vector *vct, int index, void *value) {
00339
00340
00341 if(vct==NULL) {
00342 POST_ERROR("Null Objects\n");
00343 return FLGR_RET_NULL_OBJECT;
00344 }
00345
00346 if((index<0) || (index>=vct->spp)) {
00347 POST_ERROR("index (%d) out of the vector\n",index);
00348 return FLGR_RET_UNDEFINED_ERROR;
00349 }
00350
00351 FLGR_FULL_DISPATCH_CONST_PROCEDURE(vct->type, flgr_vector_set_element, value, vct, index);
00352 }
00353
00354
00355
00356
00357
00358
00359
00360
00362
00364 #define FLGR_MACRO_VECTOR_IMPORT_RAW(dtype) \
00365 dtype *array_d = (dtype*) vctdest->array; \
00366 dtype *array_s = (dtype*) raw_src; \
00367 int i; \
00368 dtype val; \
00369 \
00370 \
00371 \
00372 for(i=0 ; i<vctdest->spp ; i++) { \
00373 val = flgr_get_array_##dtype(array_s,i); \
00374 flgr_set_array_##dtype(array_d,i,val); \
00375 } \
00376 \
00377 return
00378
00379 void flgr_vector_import_raw_fgBIT(FLGR_Vector *vctdest, void *raw_src) {
00380 fgBIT *array_d = (fgBIT*) vctdest->array;
00381 fgBIT *array_s = (fgBIT*) raw_src;
00382 int i;
00383 fgBIT val;
00384
00385
00386
00387 for(i=0 ; i<vctdest->spp ; i++) {
00388 val = array_s[i];
00389 flgr_set_array_fgBIT(array_d,i,val);
00390 }
00391 }
00392 void flgr_vector_import_raw_fgUINT8(FLGR_Vector *vctdest, void *raw_src) {
00393 FLGR_MACRO_VECTOR_IMPORT_RAW(fgUINT8);
00394 }
00395 void flgr_vector_import_raw_fgUINT16(FLGR_Vector *vctdest, void *raw_src) {
00396 FLGR_MACRO_VECTOR_IMPORT_RAW(fgUINT16);
00397 }
00398 void flgr_vector_import_raw_fgUINT32(FLGR_Vector *vctdest, void *raw_src) {
00399 FLGR_MACRO_VECTOR_IMPORT_RAW(fgUINT32);
00400 }
00401 void flgr_vector_import_raw_fgUINT64(FLGR_Vector *vctdest, void *raw_src) {
00402 FLGR_MACRO_VECTOR_IMPORT_RAW(fgUINT64);
00403 }
00404 void flgr_vector_import_raw_fgINT8(FLGR_Vector *vctdest, void *raw_src) {
00405 FLGR_MACRO_VECTOR_IMPORT_RAW(fgINT8);
00406 }
00407 void flgr_vector_import_raw_fgINT16(FLGR_Vector *vctdest, void *raw_src) {
00408 FLGR_MACRO_VECTOR_IMPORT_RAW(fgINT16);
00409 }
00410 void flgr_vector_import_raw_fgINT32(FLGR_Vector *vctdest, void *raw_src) {
00411 FLGR_MACRO_VECTOR_IMPORT_RAW(fgINT32);
00412 }
00413 void flgr_vector_import_raw_fgINT64(FLGR_Vector *vctdest, void *raw_src) {
00414 FLGR_MACRO_VECTOR_IMPORT_RAW(fgINT64);
00415 }
00416 void flgr_vector_import_raw_fgFLOAT32(FLGR_Vector *vctdest, void *raw_src) {
00417 FLGR_MACRO_VECTOR_IMPORT_RAW(fgFLOAT32);
00418 }
00419 void flgr_vector_import_raw_fgFLOAT64(FLGR_Vector *vctdest, void *raw_src) {
00420 FLGR_MACRO_VECTOR_IMPORT_RAW(fgFLOAT64);
00421 }
00422
00424
00431
00432 FLGR_Ret flgr_vector_import_raw(FLGR_Vector *vctdest, void *raw_src) {
00433
00434
00435 if(vctdest==NULL) {
00436 return FLGR_RET_NULL_OBJECT;
00437 }
00438
00439 FLGR_FULL_PROCEDURE_DISPATCH(vctdest->type, flgr_vector_import_raw, vctdest, raw_src);
00440
00441 return FLGR_RET_OK;
00442 }
00443
00444
00445
00446
00447
00448
00450
00452 #define FLGR_MACRO_VECTOR_IMPORT_STRING(dtype,dtype_scan,motif) \
00453 int k; \
00454 dtype *dest = (dtype*) vctdest->array; \
00455 dtype_scan var; \
00456 \
00457 \
00458 \
00459 for(k=0 ; k<vctdest->spp ; k++) { \
00460 sscanf(string_src,motif,&var); \
00461 flgr_set_array_##dtype(dest,k,(dtype) var); \
00462 while((*string_src!=' ') && (*string_src!='\0')) string_src++; \
00463 } \
00464 return
00465
00466 void flgr_vector_import_string_fgBIT(FLGR_Vector *vctdest, char *string_src) {
00467 FLGR_MACRO_VECTOR_IMPORT_STRING(fgBIT,fgUINT32,"%d");
00468 }
00469 void flgr_vector_import_string_fgUINT8(FLGR_Vector *vctdest, char *string_src) {
00470 FLGR_MACRO_VECTOR_IMPORT_STRING(fgUINT8,fgUINT32,"%d");
00471 }
00472 void flgr_vector_import_string_fgUINT16(FLGR_Vector *vctdest, char *string_src) {
00473 FLGR_MACRO_VECTOR_IMPORT_STRING(fgUINT16,fgUINT32,"%d");
00474 }
00475 void flgr_vector_import_string_fgUINT32(FLGR_Vector *vctdest, char *string_src) {
00476 FLGR_MACRO_VECTOR_IMPORT_STRING(fgUINT32,fgUINT32,"%d");
00477 }
00478 void flgr_vector_import_string_fgUINT64(FLGR_Vector *vctdest, char *string_src) {
00479 FLGR_MACRO_VECTOR_IMPORT_STRING(fgUINT64,fgUINT64,"%Ld");
00480 }
00481 void flgr_vector_import_string_fgINT8(FLGR_Vector *vctdest, char *string_src) {
00482 FLGR_MACRO_VECTOR_IMPORT_STRING(fgINT8,fgINT32,"%d");
00483 }
00484 void flgr_vector_import_string_fgINT16(FLGR_Vector *vctdest, char *string_src) {
00485 FLGR_MACRO_VECTOR_IMPORT_STRING(fgINT16,fgINT32,"%d");
00486 }
00487 void flgr_vector_import_string_fgINT32(FLGR_Vector *vctdest, char *string_src) {
00488 FLGR_MACRO_VECTOR_IMPORT_STRING(fgINT32,fgINT32,"%d");
00489 }
00490 void flgr_vector_import_string_fgINT64(FLGR_Vector *vctdest, char *string_src) {
00491 FLGR_MACRO_VECTOR_IMPORT_STRING(fgINT64,fgINT64,"%Ld");
00492 }
00493 void flgr_vector_import_string_fgFLOAT32(FLGR_Vector *vctdest, char *string_src) {
00494 FLGR_MACRO_VECTOR_IMPORT_STRING(fgFLOAT32,fgFLOAT32,"%f");
00495 }
00496 void flgr_vector_import_string_fgFLOAT64(FLGR_Vector *vctdest, char *string_src) {
00497 FLGR_MACRO_VECTOR_IMPORT_STRING(fgFLOAT64,fgFLOAT64,"%lf");
00498 }
00500
00509
00510 FLGR_Ret flgr_vector_import_string(FLGR_Vector *vctdest, char *string_src) {
00511
00512
00513 if(vctdest==NULL) {
00514 return FLGR_RET_NULL_OBJECT;
00515 }
00516
00517 FLGR_FULL_PROCEDURE_DISPATCH(vctdest->type, flgr_vector_import_string, vctdest, string_src);
00518 }
00519
00520
00521
00522
00523
00525
00527 #define FLGR_MACRO_VECTOR_EXPORT_RAW(dtype) \
00528 dtype *array_d = (dtype*) raw_dest; \
00529 dtype *array_s = (dtype*) vctsrc->array; \
00530 int i; \
00531 dtype val; \
00532 \
00533 \
00534 \
00535 for(i=0 ; i<vctsrc->spp ; i++) { \
00536 val = flgr_get_array_##dtype(array_s,i); \
00537 flgr_set_array_##dtype(array_d,i,val); \
00538 } \
00539 \
00540 return
00541
00542 void flgr_vector_export_raw_fgBIT(void *raw_dest, FLGR_Vector *vctsrc) {
00543 fgBIT *array_d = (fgBIT*) raw_dest;
00544 fgBIT *array_s = (fgBIT*) vctsrc->array;
00545 int i;
00546 fgBIT val;
00547
00548
00549
00550 for(i=0 ; i<vctsrc->spp ; i++) {
00551 val = flgr_get_array_fgBIT(array_s,i);
00552 array_d[i]=val;
00553 }
00554 }
00555 void flgr_vector_export_raw_fgUINT8(void *raw_dest, FLGR_Vector *vctsrc) {
00556 FLGR_MACRO_VECTOR_EXPORT_RAW(fgUINT8);
00557 }
00558 void flgr_vector_export_raw_fgUINT16(void *raw_dest, FLGR_Vector *vctsrc) {
00559 FLGR_MACRO_VECTOR_EXPORT_RAW(fgUINT16);
00560 }
00561 void flgr_vector_export_raw_fgUINT32(void *raw_dest, FLGR_Vector *vctsrc) {
00562 FLGR_MACRO_VECTOR_EXPORT_RAW(fgUINT32);
00563 }
00564 void flgr_vector_export_raw_fgUINT64(void *raw_dest, FLGR_Vector *vctsrc) {
00565 FLGR_MACRO_VECTOR_EXPORT_RAW(fgUINT64);
00566 }
00567 void flgr_vector_export_raw_fgINT8(void *raw_dest, FLGR_Vector *vctsrc) {
00568 FLGR_MACRO_VECTOR_EXPORT_RAW(fgINT8);
00569 }
00570 void flgr_vector_export_raw_fgINT16(void *raw_dest, FLGR_Vector *vctsrc) {
00571 FLGR_MACRO_VECTOR_EXPORT_RAW(fgINT16);
00572 }
00573 void flgr_vector_export_raw_fgINT32(void *raw_dest, FLGR_Vector *vctsrc) {
00574 FLGR_MACRO_VECTOR_EXPORT_RAW(fgINT32);
00575 }
00576 void flgr_vector_export_raw_fgINT64(void *raw_dest, FLGR_Vector *vctsrc) {
00577 FLGR_MACRO_VECTOR_EXPORT_RAW(fgINT64);
00578 }
00579 void flgr_vector_export_raw_fgFLOAT32(void *raw_dest, FLGR_Vector *vctsrc) {
00580 FLGR_MACRO_VECTOR_EXPORT_RAW(fgFLOAT32);
00581 }
00582 void flgr_vector_export_raw_fgFLOAT64(void *raw_dest, FLGR_Vector *vctsrc) {
00583 FLGR_MACRO_VECTOR_EXPORT_RAW(fgFLOAT64);
00584 }
00586
00593
00594 FLGR_Ret flgr_vector_export_raw(void *raw_dest, FLGR_Vector *vctsrc) {
00595
00596
00597 if(vctsrc==NULL) {
00598 return FLGR_RET_NULL_OBJECT;
00599 }
00600 FLGR_FULL_PROCEDURE_DISPATCH(vctsrc->type,flgr_vector_export_raw,raw_dest,vctsrc);
00601 }
00602
00603
00604
00605
00606
00607
00609
00611 #define FLGR_MACRO_FLGR_VECTOR_POPULATE_SCALAR(dtype) \
00612 int k; \
00613 dtype *vctar = (dtype*) vctdest->array; \
00614 \
00615 \
00616 \
00617 for(k=0 ; k<vctdest->spp ; k++) { \
00618 flgr_set_array_##dtype(vctar,k,scalar); \
00619 } \
00620 return
00621
00622 void flgr_vector_populate_from_scalar_fgBIT(FLGR_Vector *vctdest, fgBIT scalar) {
00623 FLGR_MACRO_FLGR_VECTOR_POPULATE_SCALAR(fgBIT);
00624 }
00625 void flgr_vector_populate_from_scalar_fgUINT8(FLGR_Vector *vctdest, fgUINT8 scalar) {
00626 FLGR_MACRO_FLGR_VECTOR_POPULATE_SCALAR(fgUINT8);
00627 }
00628 void flgr_vector_populate_from_scalar_fgUINT16(FLGR_Vector *vctdest, fgUINT16 scalar) {
00629 FLGR_MACRO_FLGR_VECTOR_POPULATE_SCALAR(fgUINT16);
00630 }
00631 void flgr_vector_populate_from_scalar_fgUINT32(FLGR_Vector *vctdest, fgUINT32 scalar) {
00632 FLGR_MACRO_FLGR_VECTOR_POPULATE_SCALAR(fgUINT32);
00633 }
00634 void flgr_vector_populate_from_scalar_fgUINT64(FLGR_Vector *vctdest, fgUINT64 scalar) {
00635 FLGR_MACRO_FLGR_VECTOR_POPULATE_SCALAR(fgUINT64);
00636 }
00637 void flgr_vector_populate_from_scalar_fgINT8(FLGR_Vector *vctdest, fgINT8 scalar) {
00638 FLGR_MACRO_FLGR_VECTOR_POPULATE_SCALAR(fgINT8);
00639 }
00640 void flgr_vector_populate_from_scalar_fgINT16(FLGR_Vector *vctdest, fgINT16 scalar) {
00641 FLGR_MACRO_FLGR_VECTOR_POPULATE_SCALAR(fgINT16);
00642 }
00643 void flgr_vector_populate_from_scalar_fgINT32(FLGR_Vector *vctdest, fgINT32 scalar) {
00644 FLGR_MACRO_FLGR_VECTOR_POPULATE_SCALAR(fgUINT32);
00645 }
00646 void flgr_vector_populate_from_scalar_fgINT64(FLGR_Vector *vctdest, fgINT64 scalar) {
00647 FLGR_MACRO_FLGR_VECTOR_POPULATE_SCALAR(fgINT64);
00648 }
00649 void flgr_vector_populate_from_scalar_fgFLOAT32(FLGR_Vector *vctdest, fgFLOAT32 scalar) {
00650 FLGR_MACRO_FLGR_VECTOR_POPULATE_SCALAR(fgFLOAT32);
00651 }
00652 void flgr_vector_populate_from_scalar_fgFLOAT64(FLGR_Vector *vctdest, fgFLOAT64 scalar) {
00653 FLGR_MACRO_FLGR_VECTOR_POPULATE_SCALAR(fgFLOAT64);
00654 }
00656
00661
00662 FLGR_Ret flgr_vector_populate_from_scalar(FLGR_Vector *vctdest, void *scalar) {
00663
00664
00665
00666 if(vctdest==NULL) {
00667 return FLGR_RET_NULL_OBJECT;
00668 }
00669
00670 switch(vctdest->type) {
00671 case FLGR_BIT:
00672 flgr_vector_populate_from_scalar_fgBIT(vctdest, FLGR_PVOID_VAL(fgBIT,scalar)); break;
00673
00674 case FLGR_UINT8:
00675 flgr_vector_populate_from_scalar_fgUINT8(vctdest, FLGR_PVOID_VAL(fgUINT8,scalar)); break;
00676
00677 case FLGR_UINT16:
00678 flgr_vector_populate_from_scalar_fgUINT16(vctdest, FLGR_PVOID_VAL(fgUINT16,scalar)); break;
00679
00680 case FLGR_UINT32:
00681 flgr_vector_populate_from_scalar_fgUINT32(vctdest, FLGR_PVOID_VAL(fgUINT32,scalar)); break;
00682
00683 case FLGR_UINT64:
00684 flgr_vector_populate_from_scalar_fgUINT64(vctdest, FLGR_PVOID_VAL(fgUINT64,scalar)); break;
00685
00686 case FLGR_INT8:
00687 flgr_vector_populate_from_scalar_fgINT8(vctdest, FLGR_PVOID_VAL(fgINT8,scalar)); break;
00688
00689 case FLGR_INT16:
00690 flgr_vector_populate_from_scalar_fgINT16(vctdest, FLGR_PVOID_VAL(fgINT16,scalar)); break;
00691
00692 case FLGR_INT32:
00693 flgr_vector_populate_from_scalar_fgINT32(vctdest, FLGR_PVOID_VAL(fgINT32,scalar)); break;
00694
00695 case FLGR_INT64:
00696 flgr_vector_populate_from_scalar_fgINT64(vctdest, FLGR_PVOID_VAL(fgINT64,scalar)); break;
00697
00698 case FLGR_FLOAT32:
00699 flgr_vector_populate_from_scalar_fgFLOAT32(vctdest, FLGR_PVOID_VAL(fgFLOAT32,scalar)); break;
00700
00701 case FLGR_FLOAT64:
00702 flgr_vector_populate_from_scalar_fgFLOAT64(vctdest, FLGR_PVOID_VAL(fgFLOAT64,scalar)); break;
00703
00704 default:
00705 POST_ERROR("Type unknow\n");
00706 return FLGR_RET_TYPE_UNKNOWN;
00707 }
00708
00709 return FLGR_RET_OK;
00710 }
00711
00713
00718
00719 FLGR_Ret flgr_vector_populate_from_string(FLGR_Vector *vctdest, char *string_val) {
00720 fgUINT64 val_fixed;
00721 fgFLOAT64 val_float;
00722
00723
00724
00725 if(vctdest==NULL) {
00726 return FLGR_RET_NULL_OBJECT;
00727 }
00728
00729 if(strlen(string_val) <= 0) {
00730 POST_ERROR("Null string\n");
00731 return FLGR_RET_UNDEFINED_ERROR;
00732 }
00733
00734 sscanf(string_val,"%Ld",&val_fixed);
00735 sscanf(string_val,"%lf",&val_float);
00736
00737 switch(vctdest->type) {
00738 case FLGR_BIT:
00739 flgr_vector_populate_from_scalar_fgBIT(vctdest, (fgBIT) val_fixed); break;
00740
00741 case FLGR_UINT8:
00742 flgr_vector_populate_from_scalar_fgUINT8(vctdest, (fgUINT8) val_fixed); break;
00743
00744 case FLGR_UINT16:
00745 flgr_vector_populate_from_scalar_fgUINT16(vctdest, (fgUINT16) val_fixed); break;
00746
00747 case FLGR_UINT32:
00748 flgr_vector_populate_from_scalar_fgUINT32(vctdest, (fgUINT32) val_fixed); break;
00749
00750 case FLGR_UINT64:
00751 flgr_vector_populate_from_scalar_fgUINT64(vctdest, (fgUINT64) val_fixed); break;
00752
00753 case FLGR_INT8:
00754 flgr_vector_populate_from_scalar_fgINT8(vctdest, (fgINT8) val_fixed); break;
00755
00756 case FLGR_INT16:
00757 flgr_vector_populate_from_scalar_fgINT16(vctdest, (fgINT16) val_fixed); break;
00758
00759 case FLGR_INT32:
00760 flgr_vector_populate_from_scalar_fgINT32(vctdest, (fgINT32) val_fixed); break;
00761
00762 case FLGR_INT64:
00763 flgr_vector_populate_from_scalar_fgINT64(vctdest, (fgINT64) val_fixed); break;
00764
00765 case FLGR_FLOAT32:
00766 flgr_vector_populate_from_scalar_fgFLOAT32(vctdest, (fgFLOAT32) val_float); break;
00767
00768 case FLGR_FLOAT64:
00769 flgr_vector_populate_from_scalar_fgFLOAT64(vctdest, (fgFLOAT64) val_float); break;
00770
00771 default:
00772 POST_ERROR("Type unknow\n");
00773 return FLGR_RET_TYPE_UNKNOWN;
00774 }
00775
00776 return FLGR_RET_OK;
00777 }
00778
00779
00780
00781
00782
00783
00784
00786
00788 #define FLGR_MACRO_VECTOR_IS_ZERO(dtype) \
00789 dtype *ar = (dtype*) vct->array; \
00790 int i,spp=vct->spp; \
00791 dtype v; \
00792 \
00793 \
00794 \
00795 for(i=0 ; i<spp ; i++) { \
00796 v = flgr_get_array_##dtype(ar,i); \
00797 if(v != 0) return FLGR_FALSE; \
00798 } \
00799 \
00800 return FLGR_TRUE
00801
00802 int flgr_vector_is_zero_fgBIT(FLGR_Vector *vct) {
00803 FLGR_MACRO_VECTOR_IS_ZERO(fgBIT);
00804 }
00805 int flgr_vector_is_zero_fgUINT8(FLGR_Vector *vct) {
00806 FLGR_MACRO_VECTOR_IS_ZERO(fgUINT8);
00807 }
00808 int flgr_vector_is_zero_fgUINT16(FLGR_Vector *vct) {
00809 FLGR_MACRO_VECTOR_IS_ZERO(fgUINT16);
00810 }
00811 int flgr_vector_is_zero_fgUINT32(FLGR_Vector *vct) {
00812 FLGR_MACRO_VECTOR_IS_ZERO(fgUINT32);
00813 }
00814 int flgr_vector_is_zero_fgUINT64(FLGR_Vector *vct) {
00815 FLGR_MACRO_VECTOR_IS_ZERO(fgUINT64);
00816 }
00817 int flgr_vector_is_zero_fgINT8(FLGR_Vector *vct) {
00818 FLGR_MACRO_VECTOR_IS_ZERO(fgINT8);
00819 }
00820 int flgr_vector_is_zero_fgINT16(FLGR_Vector *vct) {
00821 FLGR_MACRO_VECTOR_IS_ZERO(fgINT16);
00822 }
00823 int flgr_vector_is_zero_fgINT32(FLGR_Vector *vct) {
00824 FLGR_MACRO_VECTOR_IS_ZERO(fgINT32);
00825 }
00826 int flgr_vector_is_zero_fgINT64(FLGR_Vector *vct) {
00827 FLGR_MACRO_VECTOR_IS_ZERO(fgINT64);
00828 }
00829 int flgr_vector_is_zero_fgFLOAT32(FLGR_Vector *vct) {
00830 FLGR_MACRO_VECTOR_IS_ZERO(fgFLOAT32);
00831 }
00832 int flgr_vector_is_zero_fgFLOAT64(FLGR_Vector *vct) {
00833 FLGR_MACRO_VECTOR_IS_ZERO(fgFLOAT64);
00834 }
00836
00840
00841 int flgr_vector_is_zero(FLGR_Vector *vct) {
00842
00843
00844 if(vct==NULL) {
00845 POST_ERROR("Null object\n");
00846 return FLGR_FALSE;
00847 }
00848 FLGR_FULL_FUNCTION_DISPATCH(FLGR_FALSE,vct->type, flgr_vector_is_zero, vct);
00849 }
00850
00851
00852
00853
00854
00855
00856
00857
00859
00861 #define FLGR_MACRO_VECTOR_EQUAL(dtype) \
00862 dtype *ar1 = (dtype*) vct1->array; \
00863 dtype *ar2 = (dtype*) vct2->array; \
00864 int i,spp=vct1->spp; \
00865 dtype v1,v2; \
00866 \
00867 \
00868 \
00869 for(i=0 ; i<spp ; i++) { \
00870 v1 = flgr_get_array_##dtype(ar1,i); \
00871 v2 = flgr_get_array_##dtype(ar2,i); \
00872 \
00873 if(v1 != v2) return FLGR_FALSE; \
00874 } \
00875 \
00876 return FLGR_TRUE
00877
00878 int flgr_vector_equal_fgBIT(FLGR_Vector *vct1, FLGR_Vector *vct2) {
00879 FLGR_MACRO_VECTOR_EQUAL(fgBIT);
00880 }
00881 int flgr_vector_equal_fgUINT8(FLGR_Vector *vct1, FLGR_Vector *vct2) {
00882 FLGR_MACRO_VECTOR_EQUAL(fgUINT8);
00883 }
00884 int flgr_vector_equal_fgUINT16(FLGR_Vector *vct1, FLGR_Vector *vct2) {
00885 FLGR_MACRO_VECTOR_EQUAL(fgUINT16);
00886 }
00887 int flgr_vector_equal_fgUINT32(FLGR_Vector *vct1, FLGR_Vector *vct2) {
00888 FLGR_MACRO_VECTOR_EQUAL(fgUINT32);
00889 }
00890 int flgr_vector_equal_fgUINT64(FLGR_Vector *vct1, FLGR_Vector *vct2) {
00891 FLGR_MACRO_VECTOR_EQUAL(fgUINT64);
00892 }
00893 int flgr_vector_equal_fgINT8(FLGR_Vector *vct1, FLGR_Vector *vct2) {
00894 FLGR_MACRO_VECTOR_EQUAL(fgINT8);
00895 }
00896 int flgr_vector_equal_fgINT16(FLGR_Vector *vct1, FLGR_Vector *vct2) {
00897 FLGR_MACRO_VECTOR_EQUAL(fgINT16);
00898 }
00899 int flgr_vector_equal_fgINT32(FLGR_Vector *vct1, FLGR_Vector *vct2) {
00900 FLGR_MACRO_VECTOR_EQUAL(fgINT32);
00901 }
00902 int flgr_vector_equal_fgINT64(FLGR_Vector *vct1, FLGR_Vector *vct2) {
00903 FLGR_MACRO_VECTOR_EQUAL(fgINT64);
00904 }
00905 int flgr_vector_equal_fgFLOAT32(FLGR_Vector *vct1, FLGR_Vector *vct2) {
00906 FLGR_MACRO_VECTOR_EQUAL(fgFLOAT32);
00907 }
00908 int flgr_vector_equal_fgFLOAT64(FLGR_Vector *vct1, FLGR_Vector *vct2) {
00909 FLGR_MACRO_VECTOR_EQUAL(fgFLOAT64);
00910 }
00911
00913
00921
00922 int flgr_vector_equal(FLGR_Vector *vct1, FLGR_Vector *vct2) {
00923
00924
00925
00926 if(flgr_vector_is_type_valid(vct1) != FLGR_RET_OK) return FLGR_FALSE;
00927 if(flgr_vector_is_same_type(vct1, vct2) != FLGR_RET_OK) return FLGR_FALSE;
00928 if(flgr_vector_is_same_spp(vct1, vct2) != FLGR_RET_OK) return FLGR_FALSE;
00929
00930 FLGR_FULL_FUNCTION_DISPATCH(FLGR_FALSE,vct1->type,flgr_vector_equal,vct1,vct2);
00931 }
00932
00933
00934
00935
00936
00937
00938
00939
00941
00945
00946 FLGR_Ret flgr_vector_is_type_valid(FLGR_Vector *vct) {
00947
00948
00949 if(vct==NULL) {
00950 return FLGR_RET_NULL_OBJECT;
00951 }
00952
00953 switch(vct->type) {
00954 case FLGR_BIT: return FLGR_RET_OK;
00955 case FLGR_UINT8: return FLGR_RET_OK;
00956 case FLGR_UINT16: return FLGR_RET_OK;
00957 case FLGR_UINT32: return FLGR_RET_OK;
00958 case FLGR_UINT64: return FLGR_RET_OK;
00959 case FLGR_INT8: return FLGR_RET_OK;
00960 case FLGR_INT16: return FLGR_RET_OK;
00961 case FLGR_INT32: return FLGR_RET_OK;
00962 case FLGR_INT64: return FLGR_RET_OK;
00963 case FLGR_FLOAT32: return FLGR_RET_OK;
00964 case FLGR_FLOAT64: return FLGR_RET_OK;
00965 default:
00966 return FLGR_RET_TYPE_UNKNOWN;
00967 }
00968 return FLGR_RET_OK;
00969 }
00970
00972
00977
00978 FLGR_Ret flgr_vector_is_same_type(FLGR_Vector *vct1, FLGR_Vector *vct2) {
00979 FLGR_Ret ret;
00980
00981
00982
00983 if((vct1==NULL) || (vct2==NULL)) {
00984 return FLGR_RET_NULL_OBJECT;
00985 }
00986
00987 if((ret=flgr_vector_is_type_valid(vct1))!=FLGR_RET_OK) return ret;
00988 if((ret=flgr_vector_is_type_valid(vct2))!=FLGR_RET_OK) return ret;
00989
00990 if(vct1->type != vct2->type) {
00991 return FLGR_RET_TYPE_DIFFERENT;
00992 }
00993
00994 return FLGR_RET_OK;
00995 }
00996
00998
01003
01004 FLGR_Ret flgr_vector_is_same_spp(FLGR_Vector *vct1, FLGR_Vector *vct2) {
01005
01006
01007 if((vct1==NULL) || (vct2==NULL)) {
01008 return FLGR_RET_NULL_OBJECT;
01009 }
01010
01011 if(vct1->spp != vct2->spp) {
01012 return FLGR_RET_SIZE_ERROR;
01013 }
01014
01015 return FLGR_RET_OK;
01016 }
01017
01018
01019
01020
01021
01022
01023 int flgr_vector_is_type_fgBIT(FLGR_Vector *vct) {
01024 return (vct->type==FLGR_BIT);
01025 }
01026
01027 int flgr_vector_is_type_fgUINT8(FLGR_Vector *vct) {
01028 return (vct->type==FLGR_UINT8);
01029 }
01030
01031 int flgr_vector_is_type_fgUINT16(FLGR_Vector *vct) {
01032 return (vct->type==FLGR_UINT16);
01033 }
01034
01035 int flgr_vector_is_type_fgUINT32(FLGR_Vector *vct) {
01036 return (vct->type==FLGR_UINT32);
01037 }
01038
01039 int flgr_vector_is_type_fgUINT64(FLGR_Vector *vct) {
01040 return (vct->type==FLGR_UINT64);
01041 }
01042
01043 int flgr_vector_is_type_fgINT8(FLGR_Vector *vct) {
01044 return (vct->type==FLGR_INT8);
01045 }
01046
01047 int flgr_vector_is_type_fgINT16(FLGR_Vector *vct) {
01048 return (vct->type==FLGR_INT16);
01049 }
01050
01051 int flgr_vector_is_type_fgINT32(FLGR_Vector *vct) {
01052 return (vct->type==FLGR_INT32);
01053 }
01054
01055 int flgr_vector_is_type_fgINT64(FLGR_Vector *vct) {
01056 return (vct->type==FLGR_INT64);
01057 }
01058
01059 int flgr_vector_is_type_fgFLOAT32(FLGR_Vector *vct) {
01060 return (vct->type==FLGR_FLOAT32);
01061 }
01062
01063 int flgr_vector_is_type_fgFLOAT64(FLGR_Vector *vct) {
01064 return (vct->type==FLGR_FLOAT64);
01065 }
01066
01067
01068
01069
01070
01071
01072
01073
01074
01075
01076
01077
01078
01079
01081
01083 #define FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(dtype_dest, dtype_src) \
01084 int k; \
01085 int spp = vctdest->spp; \
01086 dtype_src *psrc = (dtype_src*) vctsrc->array; \
01087 dtype_dest *pdest = (dtype_dest*) vctdest->array; \
01088 dtype_dest v; \
01089 \
01090 \
01091 \
01092 for(k=0 ; k<spp ; k++) { \
01093 v = (dtype_dest) flgr_get_array_##dtype_src(psrc,k); \
01094 flgr_set_array_##dtype_dest(pdest,k,v); \
01095 } \
01096 \
01097 return
01098
01099 #define FLGR_MACRO_VECTOR_COPY(dtype) \
01100 int spp = vctdest->spp; \
01101 int bps = vctdest->bps; \
01102 \
01103 \
01104 \
01105 memcpy(vctdest->array, vctsrc->array, (spp*bps)/8+16); \
01106 \
01107 return
01108
01109 void flgr_vector_copy_fgBIT_fgBIT(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01110 FLGR_MACRO_VECTOR_COPY(fgBIT);
01111 }
01112 void flgr_vector_copy_fgBIT_fgUINT8(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01113 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgBIT,fgUINT8);
01114 }
01115 void flgr_vector_copy_fgBIT_fgUINT16(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01116 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgBIT,fgUINT16);
01117 }
01118 void flgr_vector_copy_fgBIT_fgUINT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01119 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgBIT,fgUINT32);
01120 }
01121 void flgr_vector_copy_fgBIT_fgUINT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01122 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgBIT,fgUINT64);
01123 }
01124 void flgr_vector_copy_fgBIT_fgINT8(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01125 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgBIT,fgINT8);
01126 }
01127 void flgr_vector_copy_fgBIT_fgINT16(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01128 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgBIT,fgINT16);
01129 }
01130 void flgr_vector_copy_fgBIT_fgINT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01131 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgBIT,fgINT32);
01132 }
01133 void flgr_vector_copy_fgBIT_fgINT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01134 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgBIT,fgINT64);
01135 }
01136 void flgr_vector_copy_fgBIT_fgFLOAT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01137 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgBIT,fgFLOAT32);
01138 }
01139 void flgr_vector_copy_fgBIT_fgFLOAT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01140 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgBIT,fgFLOAT64);
01141 }
01142
01143
01144 void flgr_vector_copy_fgUINT8_fgBIT(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01145 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT8,fgBIT);
01146 }
01147 void flgr_vector_copy_fgUINT8_fgUINT8(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01148 FLGR_MACRO_VECTOR_COPY(fgUINT8);
01149 }
01150 void flgr_vector_copy_fgUINT8_fgUINT16(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01151 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT8,fgUINT16);
01152 }
01153 void flgr_vector_copy_fgUINT8_fgUINT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01154 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT8,fgUINT32);
01155 }
01156 void flgr_vector_copy_fgUINT8_fgUINT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01157 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT8,fgUINT64);
01158 }
01159 void flgr_vector_copy_fgUINT8_fgINT8(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01160 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT8,fgINT8);
01161 }
01162 void flgr_vector_copy_fgUINT8_fgINT16(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01163 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT8,fgINT16);
01164 }
01165 void flgr_vector_copy_fgUINT8_fgINT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01166 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT8,fgINT32);
01167 }
01168 void flgr_vector_copy_fgUINT8_fgINT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01169 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT8,fgINT64);
01170 }
01171 void flgr_vector_copy_fgUINT8_fgFLOAT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01172 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT8,fgFLOAT32);
01173 }
01174 void flgr_vector_copy_fgUINT8_fgFLOAT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01175 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT8,fgFLOAT64);
01176 }
01177
01178
01179 void flgr_vector_copy_fgUINT16_fgBIT(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01180 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT16, fgBIT);
01181 }
01182 void flgr_vector_copy_fgUINT16_fgUINT8(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01183 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT16,fgUINT8);
01184 }
01185 void flgr_vector_copy_fgUINT16_fgUINT16(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01186 FLGR_MACRO_VECTOR_COPY(fgUINT16);
01187 }
01188 void flgr_vector_copy_fgUINT16_fgUINT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01189 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT16,fgUINT32);
01190 }
01191 void flgr_vector_copy_fgUINT16_fgUINT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01192 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT16,fgUINT64);
01193 }
01194 void flgr_vector_copy_fgUINT16_fgINT8(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01195 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT16,fgINT8);
01196 }
01197 void flgr_vector_copy_fgUINT16_fgINT16(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01198 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT16,fgINT16);
01199 }
01200 void flgr_vector_copy_fgUINT16_fgINT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01201 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT16,fgINT32);
01202 }
01203 void flgr_vector_copy_fgUINT16_fgINT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01204 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT16,fgINT64);
01205 }
01206 void flgr_vector_copy_fgUINT16_fgFLOAT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01207 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT16,fgFLOAT32);
01208 }
01209 void flgr_vector_copy_fgUINT16_fgFLOAT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01210 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT16,fgFLOAT64);
01211 }
01212
01213
01214
01215 void flgr_vector_copy_fgUINT32_fgBIT(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01216 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT32, fgBIT);
01217 }
01218 void flgr_vector_copy_fgUINT32_fgUINT8(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01219 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT32,fgUINT8);
01220 }
01221 void flgr_vector_copy_fgUINT32_fgUINT16(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01222 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT32, fgUINT16);
01223 }
01224 void flgr_vector_copy_fgUINT32_fgUINT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01225 FLGR_MACRO_VECTOR_COPY(fgUINT32);
01226 }
01227 void flgr_vector_copy_fgUINT32_fgUINT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01228 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT32,fgUINT64);
01229 }
01230 void flgr_vector_copy_fgUINT32_fgINT8(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01231 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT32,fgINT8);
01232 }
01233 void flgr_vector_copy_fgUINT32_fgINT16(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01234 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT32,fgINT16);
01235 }
01236 void flgr_vector_copy_fgUINT32_fgINT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01237 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT32,fgINT32);
01238 }
01239 void flgr_vector_copy_fgUINT32_fgINT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01240 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT32,fgINT64);
01241 }
01242 void flgr_vector_copy_fgUINT32_fgFLOAT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01243 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT32,fgFLOAT32);
01244 }
01245 void flgr_vector_copy_fgUINT32_fgFLOAT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01246 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT32,fgFLOAT64);
01247 }
01248
01249
01250 void flgr_vector_copy_fgUINT64_fgBIT(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01251 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT64, fgBIT);
01252 }
01253 void flgr_vector_copy_fgUINT64_fgUINT8(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01254 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT64,fgUINT8);
01255 }
01256 void flgr_vector_copy_fgUINT64_fgUINT16(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01257 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT64, fgUINT16);
01258 }
01259 void flgr_vector_copy_fgUINT64_fgUINT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01260 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT64,fgUINT32);
01261 }
01262 void flgr_vector_copy_fgUINT64_fgUINT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01263 FLGR_MACRO_VECTOR_COPY(fgUINT64);
01264 }
01265 void flgr_vector_copy_fgUINT64_fgINT8(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01266 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT64,fgINT8);
01267 }
01268 void flgr_vector_copy_fgUINT64_fgINT16(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01269 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT64,fgINT16);
01270 }
01271 void flgr_vector_copy_fgUINT64_fgINT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01272 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT64,fgINT32);
01273 }
01274 void flgr_vector_copy_fgUINT64_fgINT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01275 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT64,fgINT64);
01276 }
01277 void flgr_vector_copy_fgUINT64_fgFLOAT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01278 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT64,fgFLOAT32);
01279 }
01280 void flgr_vector_copy_fgUINT64_fgFLOAT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01281 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgUINT64,fgFLOAT64);
01282 }
01283
01284
01285 void flgr_vector_copy_fgINT8_fgBIT(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01286 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT8, fgBIT);
01287 }
01288 void flgr_vector_copy_fgINT8_fgUINT8(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01289 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT8,fgUINT8);
01290 }
01291 void flgr_vector_copy_fgINT8_fgUINT16(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01292 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT8, fgUINT16);
01293 }
01294 void flgr_vector_copy_fgINT8_fgUINT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01295 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT8,fgUINT32);
01296 }
01297 void flgr_vector_copy_fgINT8_fgUINT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01298 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT8, fgUINT64);
01299 }
01300 void flgr_vector_copy_fgINT8_fgINT8(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01301 FLGR_MACRO_VECTOR_COPY(fgINT8);
01302 }
01303 void flgr_vector_copy_fgINT8_fgINT16(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01304 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT8,fgINT16);
01305 }
01306 void flgr_vector_copy_fgINT8_fgINT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01307 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT8,fgINT32);
01308 }
01309 void flgr_vector_copy_fgINT8_fgINT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01310 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT8,fgINT64);
01311 }
01312 void flgr_vector_copy_fgINT8_fgFLOAT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01313 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT8,fgFLOAT32);
01314 }
01315 void flgr_vector_copy_fgINT8_fgFLOAT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01316 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT8,fgFLOAT64);
01317 }
01318
01319
01320
01321 void flgr_vector_copy_fgINT16_fgBIT(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01322 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT16, fgBIT);
01323 }
01324 void flgr_vector_copy_fgINT16_fgUINT8(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01325 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT16,fgUINT8);
01326 }
01327 void flgr_vector_copy_fgINT16_fgUINT16(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01328 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT16, fgUINT16);
01329 }
01330 void flgr_vector_copy_fgINT16_fgUINT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01331 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT16,fgUINT32);
01332 }
01333 void flgr_vector_copy_fgINT16_fgUINT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01334 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT16, fgUINT64);
01335 }
01336 void flgr_vector_copy_fgINT16_fgINT8(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01337 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT16,fgINT8);
01338 }
01339 void flgr_vector_copy_fgINT16_fgINT16(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01340 FLGR_MACRO_VECTOR_COPY(fgINT16);
01341 }
01342 void flgr_vector_copy_fgINT16_fgINT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01343 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT16,fgINT32);
01344 }
01345 void flgr_vector_copy_fgINT16_fgINT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01346 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT16,fgINT64);
01347 }
01348 void flgr_vector_copy_fgINT16_fgFLOAT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01349 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT16,fgFLOAT32);
01350 }
01351 void flgr_vector_copy_fgINT16_fgFLOAT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01352 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT16,fgFLOAT64);
01353 }
01354
01355
01356
01357 void flgr_vector_copy_fgINT32_fgBIT(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01358 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT32, fgBIT);
01359 }
01360 void flgr_vector_copy_fgINT32_fgUINT8(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01361 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT32,fgUINT8);
01362 }
01363 void flgr_vector_copy_fgINT32_fgUINT16(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01364 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT32, fgUINT16);
01365 }
01366 void flgr_vector_copy_fgINT32_fgUINT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01367 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT32,fgUINT32);
01368 }
01369 void flgr_vector_copy_fgINT32_fgUINT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01370 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT32, fgUINT64);
01371 }
01372 void flgr_vector_copy_fgINT32_fgINT8(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01373 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT32,fgINT8);
01374 }
01375 void flgr_vector_copy_fgINT32_fgINT16(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01376 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT32,fgINT16);
01377 }
01378 void flgr_vector_copy_fgINT32_fgINT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01379 FLGR_MACRO_VECTOR_COPY(fgINT32);
01380 }
01381 void flgr_vector_copy_fgINT32_fgINT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01382 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT32,fgINT64);
01383 }
01384 void flgr_vector_copy_fgINT32_fgFLOAT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01385 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT32,fgFLOAT32);
01386 }
01387 void flgr_vector_copy_fgINT32_fgFLOAT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01388 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT32,fgFLOAT64);
01389 }
01390
01391
01392
01393 void flgr_vector_copy_fgINT64_fgBIT(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01394 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT64, fgBIT);
01395 }
01396 void flgr_vector_copy_fgINT64_fgUINT8(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01397 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT64,fgUINT8);
01398 }
01399 void flgr_vector_copy_fgINT64_fgUINT16(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01400 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT64, fgUINT16);
01401 }
01402 void flgr_vector_copy_fgINT64_fgUINT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01403 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT64,fgUINT32);
01404 }
01405 void flgr_vector_copy_fgINT64_fgUINT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01406 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT64, fgUINT64);
01407 }
01408 void flgr_vector_copy_fgINT64_fgINT8(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01409 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT64,fgINT8);
01410 }
01411 void flgr_vector_copy_fgINT64_fgINT16(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01412 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT64,fgINT16);
01413 }
01414 void flgr_vector_copy_fgINT64_fgINT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01415 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT64, fgINT32);
01416 }
01417 void flgr_vector_copy_fgINT64_fgINT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01418 FLGR_MACRO_VECTOR_COPY(fgINT64);
01419 }
01420 void flgr_vector_copy_fgINT64_fgFLOAT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01421 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT64,fgFLOAT32);
01422 }
01423 void flgr_vector_copy_fgINT64_fgFLOAT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01424 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgINT64,fgFLOAT64);
01425 }
01426
01427
01428 void flgr_vector_copy_fgFLOAT32_fgBIT(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01429 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgFLOAT32, fgBIT);
01430 }
01431 void flgr_vector_copy_fgFLOAT32_fgUINT8(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01432 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgFLOAT32,fgUINT8);
01433 }
01434 void flgr_vector_copy_fgFLOAT32_fgUINT16(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01435 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgFLOAT32, fgUINT16);
01436 }
01437 void flgr_vector_copy_fgFLOAT32_fgUINT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01438 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgFLOAT32,fgUINT32);
01439 }
01440 void flgr_vector_copy_fgFLOAT32_fgUINT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01441 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgFLOAT32, fgUINT64);
01442 }
01443 void flgr_vector_copy_fgFLOAT32_fgINT8(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01444 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgFLOAT32,fgINT8);
01445 }
01446 void flgr_vector_copy_fgFLOAT32_fgINT16(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01447 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgFLOAT32,fgINT16);
01448 }
01449 void flgr_vector_copy_fgFLOAT32_fgINT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01450 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgFLOAT32, fgINT32);
01451 }
01452 void flgr_vector_copy_fgFLOAT32_fgINT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01453 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgFLOAT32, fgINT64);
01454 }
01455 void flgr_vector_copy_fgFLOAT32_fgFLOAT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01456 FLGR_MACRO_VECTOR_COPY(fgFLOAT32);
01457 }
01458 void flgr_vector_copy_fgFLOAT32_fgFLOAT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01459 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgFLOAT32,fgFLOAT64);
01460 }
01461
01462
01463
01464 void flgr_vector_copy_fgFLOAT64_fgBIT(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01465 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgFLOAT64, fgBIT);
01466 }
01467 void flgr_vector_copy_fgFLOAT64_fgUINT8(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01468 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgFLOAT64,fgUINT8);
01469 }
01470 void flgr_vector_copy_fgFLOAT64_fgUINT16(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01471 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgFLOAT64, fgUINT16);
01472 }
01473 void flgr_vector_copy_fgFLOAT64_fgUINT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01474 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgFLOAT64,fgUINT32);
01475 }
01476 void flgr_vector_copy_fgFLOAT64_fgUINT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01477 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgFLOAT64, fgUINT64);
01478 }
01479 void flgr_vector_copy_fgFLOAT64_fgINT8(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01480 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgFLOAT64,fgINT8);
01481 }
01482 void flgr_vector_copy_fgFLOAT64_fgINT16(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01483 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgFLOAT64,fgINT16);
01484 }
01485 void flgr_vector_copy_fgFLOAT64_fgINT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01486 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgFLOAT64, fgINT32);
01487 }
01488 void flgr_vector_copy_fgFLOAT64_fgINT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01489 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgFLOAT64, fgINT64);
01490 }
01491 void flgr_vector_copy_fgFLOAT64_fgFLOAT32(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01492 FLGR_MACRO_VECTOR_COPY_TDEST_TSRC(fgFLOAT64,fgFLOAT32);
01493 }
01494 void flgr_vector_copy_fgFLOAT64_fgFLOAT64(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01495 FLGR_MACRO_VECTOR_COPY(fgFLOAT64);
01496 }
01497
01499
01501 #define FLGR_MACRO_VECTOR_COPY_TEST_TYPE(dtype_src, \
01502 dtype1,dtype2,dtype3,dtype4, \
01503 dtype5,dtype6,dtype7,dtype8, \
01504 dtype9,dtype10,dtype11) \
01505 \
01506 if(flgr_vector_is_type_##dtype1(vctdest)) { \
01507 flgr_vector_copy_##dtype1##_##dtype_src( vctdest , vctsrc); \
01508 \
01509 }else if(flgr_vector_is_type_##dtype2(vctdest)) { \
01510 flgr_vector_copy_##dtype2##_##dtype_src( vctdest , vctsrc); \
01511 \
01512 }else if(flgr_vector_is_type_##dtype3(vctdest)) { \
01513 flgr_vector_copy_##dtype3##_##dtype_src( vctdest , vctsrc); \
01514 \
01515 }else if(flgr_vector_is_type_##dtype4(vctdest)) { \
01516 flgr_vector_copy_##dtype4##_##dtype_src( vctdest , vctsrc); \
01517 \
01518 }else if(flgr_vector_is_type_##dtype5(vctdest)) { \
01519 flgr_vector_copy_##dtype5##_##dtype_src( vctdest , vctsrc); \
01520 \
01521 }else if(flgr_vector_is_type_##dtype6(vctdest)) { \
01522 flgr_vector_copy_##dtype6##_##dtype_src( vctdest , vctsrc); \
01523 \
01524 }else if(flgr_vector_is_type_##dtype7(vctdest)) { \
01525 flgr_vector_copy_##dtype7##_##dtype_src( vctdest , vctsrc); \
01526 \
01527 }else if(flgr_vector_is_type_##dtype8(vctdest)) { \
01528 flgr_vector_copy_##dtype8##_##dtype_src( vctdest , vctsrc); \
01529 \
01530 }else if(flgr_vector_is_type_##dtype9(vctdest)) { \
01531 flgr_vector_copy_##dtype9##_##dtype_src( vctdest , vctsrc); \
01532 \
01533 }else if(flgr_vector_is_type_##dtype10(vctdest)) { \
01534 flgr_vector_copy_##dtype10##_##dtype_src( vctdest , vctsrc); \
01535 \
01536 }else if(flgr_vector_is_type_##dtype11(vctdest)) { \
01537 flgr_vector_copy_##dtype11##_##dtype_src( vctdest , vctsrc); \
01538 \
01539 }else error=1
01540
01541
01542
01544
01550
01551 FLGR_Ret flgr_vector_copy(FLGR_Vector *vctdest, FLGR_Vector *vctsrc) {
01552 int error=0;
01553 FLGR_Ret ret;
01554
01555
01556
01557 if((vctdest==NULL) || (vctsrc==NULL)) {
01558 POST_ERROR("Null objects!\n");
01559 return FLGR_RET_NULL_OBJECT;
01560 }
01561
01562 if((ret=flgr_vector_is_same_spp(vctdest,vctsrc))!=FLGR_RET_OK) {
01563 POST_ERROR("Vector Size Different\n");
01564 return ret;
01565 }
01566
01567 if(vctsrc->type==FLGR_UINT8) {
01568 FLGR_MACRO_VECTOR_COPY_TEST_TYPE(fgUINT8,fgBIT,fgUINT8,fgUINT16,fgUINT32,fgUINT64,
01569 fgINT8,fgINT16,fgINT32,fgUINT64,fgFLOAT32,fgFLOAT64);
01570
01571 }else if(vctsrc->type==FLGR_UINT16) {
01572 FLGR_MACRO_VECTOR_COPY_TEST_TYPE(fgUINT16,fgBIT,fgUINT8,fgUINT16,fgUINT32,fgUINT64,
01573 fgINT8,fgINT16,fgINT32,fgUINT64,fgFLOAT32,fgFLOAT64);
01574
01575 }else if(vctsrc->type==FLGR_UINT32) {
01576 FLGR_MACRO_VECTOR_COPY_TEST_TYPE(fgUINT32,fgBIT,fgUINT8,fgUINT16,fgUINT32,fgUINT64,
01577 fgINT8,fgINT16,fgINT32,fgUINT64,fgFLOAT32,fgFLOAT64);
01578
01579 }else if(vctsrc->type==FLGR_UINT64) {
01580 FLGR_MACRO_VECTOR_COPY_TEST_TYPE(fgUINT64,fgBIT,fgUINT8,fgUINT16,fgUINT32,fgUINT64,
01581 fgINT8,fgINT16,fgINT32,fgUINT64,fgFLOAT32,fgFLOAT64);
01582
01583 }else if(vctsrc->type==FLGR_INT8) {
01584 FLGR_MACRO_VECTOR_COPY_TEST_TYPE(fgINT8,fgBIT,fgUINT8,fgUINT16,fgUINT32,fgUINT64,
01585 fgINT8,fgINT16,fgINT32,fgUINT64,fgFLOAT32,fgFLOAT64);
01586
01587 }else if(vctsrc->type==FLGR_INT16) {
01588 FLGR_MACRO_VECTOR_COPY_TEST_TYPE(fgINT16,fgBIT,fgUINT8,fgUINT16,fgUINT32,fgUINT64,
01589 fgINT8,fgINT16,fgINT32,fgUINT64,fgFLOAT32,fgFLOAT64);
01590
01591 }else if(vctsrc->type==FLGR_INT32) {
01592 FLGR_MACRO_VECTOR_COPY_TEST_TYPE(fgINT32,fgBIT,fgUINT8,fgUINT16,fgUINT32,fgUINT64,
01593 fgINT8,fgINT16,fgINT32,fgUINT64,fgFLOAT32,fgFLOAT64);
01594
01595 }else if(vctsrc->type==FLGR_INT64) {
01596 FLGR_MACRO_VECTOR_COPY_TEST_TYPE(fgINT64,fgBIT,fgUINT8,fgUINT16,fgUINT32,fgUINT64,
01597 fgINT8,fgINT16,fgINT32,fgUINT64,fgFLOAT32,fgFLOAT64);
01598
01599 }else if(vctsrc->type==FLGR_FLOAT32) {
01600 FLGR_MACRO_VECTOR_COPY_TEST_TYPE(fgFLOAT32,fgBIT,fgUINT8,fgUINT16,fgUINT32,fgUINT64,
01601 fgINT8,fgINT16,fgINT32,fgUINT64,fgFLOAT32,fgFLOAT64);
01602
01603 }else if(vctsrc->type==FLGR_FLOAT64) {
01604 FLGR_MACRO_VECTOR_COPY_TEST_TYPE(fgFLOAT64,fgBIT,fgUINT8,fgUINT16,fgUINT32,fgUINT64,
01605 fgINT8,fgINT16,fgINT32,fgUINT64,fgFLOAT32,fgFLOAT64);
01606
01607 }else if(vctsrc->type==FLGR_BIT) {
01608 FLGR_MACRO_VECTOR_COPY_TEST_TYPE(fgBIT,fgBIT,fgUINT8,fgUINT16,fgUINT32,fgUINT64,
01609 fgINT8,fgINT16,fgINT32,fgUINT64,fgFLOAT32,fgFLOAT64);
01610
01611 }else {
01612 error=1;
01613 }
01614
01615 if(error==1) {
01616 POST_ERROR("type unknown!\n");
01617 return FLGR_RET_TYPE_UNKNOWN;
01618 }
01619
01620 return FLGR_RET_OK;
01621
01622 }
01623
01624
01625
01626
01627
01628
01629
01630
01631
01632
01633
01634
01635
01636
01637
01638
01639