00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <math.h>
00023 #include <flgrCoreDispatch.h>
00024 #include <flgrCoreData.h>
00025 #include <flgrCoreIO.h>
00026 #include <flgrCoreMalloc.h>
00027 #include <flgrCoreArithDef.h>
00028 #include "flgrArithComplex.h"
00029
00030
00039
00040
00041
00042
00043
00045
00047 #define FLGR_MACRO_ARITH_COMPLEX_MODULE_1D(dtype,op) \
00048 dtype *isrc = (dtype*) cdatsrc->array; \
00049 dtype *rdest = (dtype*) rdatdest->array; \
00050 dtype result; \
00051 dtype val1,val2; \
00052 int spp = cdatsrc->spp; \
00053 int length = rdatdest->length; \
00054 int i,j; \
00055 \
00056 \
00057 \
00058 for(j=0,i=0 ; i<length ; j+=spp,i++) { \
00059 val1 = flgr_get_array_##dtype(isrc,j); \
00060 val2 = flgr_get_array_##dtype(isrc,j+1); \
00061 result = op(val1*val1+val2*val2); \
00062 flgr_set_array_##dtype(rdest,i,result); \
00063 } \
00064 \
00065 return
00066
00067
00068
00069 void flgr1d_arith_complex_module_fgBIT(FLGR_Data1D *rdatdest, FLGR_Data1D *cdatsrc) {
00070 flgr_no_define_type_function(FLGR_BIT);
00071 }
00072 void flgr1d_arith_complex_module_fgUINT8(FLGR_Data1D *rdatdest, FLGR_Data1D *cdatsrc) {
00073 flgr_no_define_type_function(FLGR_UINT8);
00074 }
00075 void flgr1d_arith_complex_module_fgUINT16(FLGR_Data1D *rdatdest, FLGR_Data1D *cdatsrc) {
00076 flgr_no_define_type_function(FLGR_UINT16);
00077 }
00078 void flgr1d_arith_complex_module_fgUINT32(FLGR_Data1D *rdatdest, FLGR_Data1D *cdatsrc) {
00079 flgr_no_define_type_function(FLGR_UINT32);
00080 }
00081 void flgr1d_arith_complex_module_fgINT8(FLGR_Data1D *rdatdest, FLGR_Data1D *cdatsrc) {
00082 flgr_no_define_type_function(FLGR_INT8);
00083 }
00084 void flgr1d_arith_complex_module_fgINT16(FLGR_Data1D *rdatdest, FLGR_Data1D *cdatsrc) {
00085 flgr_no_define_type_function(FLGR_INT16);
00086 }
00087 void flgr1d_arith_complex_module_fgINT32(FLGR_Data1D *rdatdest, FLGR_Data1D *cdatsrc) {
00088 flgr_no_define_type_function(FLGR_INT32);
00089 }
00090 void flgr1d_arith_complex_module_fgFLOAT32(FLGR_Data1D *rdatdest, FLGR_Data1D *cdatsrc) {
00091 FLGR_MACRO_ARITH_COMPLEX_MODULE_1D(fgFLOAT32,sqrtl);
00092 }
00093 void flgr1d_arith_complex_module_fgFLOAT64(FLGR_Data1D *rdatdest, FLGR_Data1D *cdatsrc) {
00094 FLGR_MACRO_ARITH_COMPLEX_MODULE_1D(fgFLOAT64,sqrt);
00095 }
00097
00102
00103 FLGR_Ret flgr1d_arith_complex_module(FLGR_Data1D *rdatdest, FLGR_Data1D *cdatsrc) {
00104 FLGR_Ret ret;
00105
00106
00107
00108 if((rdatdest==NULL) || (cdatsrc==NULL)) {
00109 POST_ERROR("Null objects!\n");
00110 return FLGR_RET_NULL_OBJECT;
00111 }
00112
00113 if(rdatdest->spp != 1) {
00114 POST_ERROR("destination must be scalar\n");
00115 return FLGR_RET_VECTOR_SIZE_ERROR;
00116 }
00117
00118 if(cdatsrc->spp != 2) {
00119 POST_ERROR("source must be complex (spp=2)\n");
00120 return FLGR_RET_VECTOR_SIZE_ERROR;
00121 }
00122
00123 if((ret = flgr1d_is_data_same_type(rdatdest,cdatsrc)) != FLGR_RET_OK) return ret;
00124 if((ret = flgr1d_is_data_same_length(rdatdest,cdatsrc)) != FLGR_RET_OK) return ret;
00125
00126 FLGR_DISPATCH_PROCEDURE(rdatdest->type,flgr1d_arith_complex_module,rdatdest,cdatsrc);
00127
00128 }
00129
00130
00131
00132
00133
00134
00136
00138 #define FLGR_MACRO_ARITH_COMPLEX_ARGUMENT_1D(dtype,op1) \
00139 dtype *isrc = (dtype*) cdatsrc->array; \
00140 dtype *rdest = (dtype*) rdatdest->array; \
00141 dtype result; \
00142 dtype val1,val2; \
00143 int spp = cdatsrc->spp; \
00144 int length = rdatdest->length; \
00145 int i,j; \
00146 \
00147 \
00148 \
00149 for(j=0,i=0 ; i<length ; j+=spp,i++) { \
00150 val1 = flgr_get_array_##dtype(isrc,j); \
00151 val2 = flgr_get_array_##dtype(isrc,j+1); \
00152 result = op1(val2,val1); \
00153 flgr_set_array_##dtype(rdest,i,result); \
00154 } \
00155 \
00156 return
00157
00158 void flgr1d_arith_complex_argument_fgBIT(FLGR_Data1D *rdatdest, FLGR_Data1D *cdatsrc) {
00159 flgr_no_define_type_function(FLGR_BIT);
00160 }
00161 void flgr1d_arith_complex_argument_fgUINT8(FLGR_Data1D *rdatdest, FLGR_Data1D *cdatsrc) {
00162 flgr_no_define_type_function(FLGR_UINT8);
00163 }
00164 void flgr1d_arith_complex_argument_fgUINT16(FLGR_Data1D *rdatdest, FLGR_Data1D *cdatsrc) {
00165 flgr_no_define_type_function(FLGR_UINT16);
00166 }
00167 void flgr1d_arith_complex_argument_fgUINT32(FLGR_Data1D *rdatdest, FLGR_Data1D *cdatsrc) {
00168 flgr_no_define_type_function(FLGR_UINT32);
00169 }
00170 void flgr1d_arith_complex_argument_fgINT8(FLGR_Data1D *rdatdest, FLGR_Data1D *cdatsrc) {
00171 flgr_no_define_type_function(FLGR_INT8);
00172 }
00173 void flgr1d_arith_complex_argument_fgINT16(FLGR_Data1D *rdatdest, FLGR_Data1D *cdatsrc) {
00174 flgr_no_define_type_function(FLGR_INT16);
00175 }
00176 void flgr1d_arith_complex_argument_fgINT32(FLGR_Data1D *rdatdest, FLGR_Data1D *cdatsrc) {
00177 flgr_no_define_type_function(FLGR_INT32);
00178 }
00179 void flgr1d_arith_complex_argument_fgFLOAT32(FLGR_Data1D *rdatdest, FLGR_Data1D *cdatsrc) {
00180 FLGR_MACRO_ARITH_COMPLEX_ARGUMENT_1D(fgFLOAT32,atan2f);
00181 }
00182 void flgr1d_arith_complex_argument_fgFLOAT64(FLGR_Data1D *rdatdest, FLGR_Data1D *cdatsrc) {
00183 FLGR_MACRO_ARITH_COMPLEX_ARGUMENT_1D(fgFLOAT64,atan2);
00184 }
00186
00191
00192 FLGR_Ret flgr1d_arith_complex_argument(FLGR_Data1D *rdatdest, FLGR_Data1D *cdatsrc) {
00193 FLGR_Ret ret;
00194
00195
00196
00197 if((rdatdest==NULL) || (cdatsrc==NULL)) {
00198 POST_ERROR("Null objects!\n");
00199 return FLGR_RET_NULL_OBJECT;
00200 }
00201
00202 if(rdatdest->spp != 1) {
00203 POST_ERROR("destination must be scalar\n");
00204 return FLGR_RET_VECTOR_SIZE_ERROR;
00205 }
00206
00207 if(cdatsrc->spp != 2) {
00208 POST_ERROR("source must be complex (spp=2)\n");
00209 return FLGR_RET_VECTOR_SIZE_ERROR;
00210 }
00211
00212 if((ret = flgr1d_is_data_same_type(rdatdest,cdatsrc)) != FLGR_RET_OK) return ret;
00213 if((ret = flgr1d_is_data_same_length(rdatdest,cdatsrc)) != FLGR_RET_OK) return ret;
00214
00215 FLGR_DISPATCH_PROCEDURE(rdatdest->type,flgr1d_arith_complex_argument,rdatdest,cdatsrc);
00216
00217 }
00218
00219
00220
00221
00223
00225 #define FLGR_MACRO_ARITH_COMPLEX_BUILD_1D(dtype,opcos,opsin) \
00226 dtype *parg = (dtype*) datarg->array; \
00227 dtype *pmod = (dtype*) datmodule->array; \
00228 dtype *idest = (dtype*) cdatdest->array; \
00229 dtype val_arg,val_mod; \
00230 int spp = cdatdest->spp; \
00231 int length = cdatdest->length; \
00232 int i,j; \
00233 \
00234 \
00235 \
00236 for(j=0,i=0 ; i<length ; j+=spp,i++) { \
00237 val_arg = flgr_get_array_##dtype(parg,i); \
00238 val_mod = flgr_get_array_##dtype(pmod,i); \
00239 flgr_set_array_##dtype(idest,j, val_mod * opcos(val_arg)); \
00240 flgr_set_array_##dtype(idest,j+1, val_mod * opsin(val_arg)); \
00241 } \
00242 \
00243 return
00244
00245 void flgr1d_arith_complex_build_fgBIT(FLGR_Data1D *cdatdest, FLGR_Data1D *datmodule, FLGR_Data1D *datarg) {
00246 flgr_no_define_type_function(FLGR_BIT);
00247 }
00248 void flgr1d_arith_complex_build_fgUINT8(FLGR_Data1D *cdatdest, FLGR_Data1D *datmodule, FLGR_Data1D *datarg) {
00249 flgr_no_define_type_function(FLGR_UINT8);
00250 }
00251 void flgr1d_arith_complex_build_fgUINT16(FLGR_Data1D *cdatdest, FLGR_Data1D *datmodule, FLGR_Data1D *datarg) {
00252 flgr_no_define_type_function(FLGR_UINT16);
00253 }
00254 void flgr1d_arith_complex_build_fgUINT32(FLGR_Data1D *cdatdest, FLGR_Data1D *datmodule, FLGR_Data1D *datarg) {
00255 flgr_no_define_type_function(FLGR_UINT32);
00256 }
00257 void flgr1d_arith_complex_build_fgINT8(FLGR_Data1D *cdatdest, FLGR_Data1D *datmodule, FLGR_Data1D *datarg) {
00258 flgr_no_define_type_function(FLGR_INT8);
00259 }
00260 void flgr1d_arith_complex_build_fgINT16(FLGR_Data1D *cdatdest, FLGR_Data1D *datmodule, FLGR_Data1D *datarg) {
00261 flgr_no_define_type_function(FLGR_INT16);
00262 }
00263 void flgr1d_arith_complex_build_fgINT32(FLGR_Data1D *cdatdest, FLGR_Data1D *datmodule, FLGR_Data1D *datarg) {
00264 flgr_no_define_type_function(FLGR_INT32);
00265 }
00266 void flgr1d_arith_complex_build_fgFLOAT32(FLGR_Data1D *cdatdest, FLGR_Data1D *datmodule, FLGR_Data1D *datarg) {
00267 FLGR_MACRO_ARITH_COMPLEX_BUILD_1D(fgFLOAT32,cosf,sinf);
00268 }
00269 void flgr1d_arith_complex_build_fgFLOAT64(FLGR_Data1D *cdatdest, FLGR_Data1D *datmodule, FLGR_Data1D *datarg) {
00270 FLGR_MACRO_ARITH_COMPLEX_BUILD_1D(fgFLOAT64,cos,sin);
00271 }
00273
00279
00280 FLGR_Ret flgr1d_arith_complex_build(FLGR_Data1D *cdatdest, FLGR_Data1D *datmodule, FLGR_Data1D *datarg) {
00281 FLGR_Ret ret;
00282
00283
00284
00285 if((cdatdest==NULL) || (datmodule==NULL) || (datarg==NULL)) {
00286 POST_ERROR("Null objects!\n");
00287 return FLGR_RET_NULL_OBJECT;
00288 }
00289
00290 if(cdatdest->spp != 2) {
00291 POST_ERROR("destination must be complex (spp=2)\n");
00292 return FLGR_RET_VECTOR_SIZE_ERROR;
00293 }
00294
00295 if(datmodule->spp != 1) {
00296 POST_ERROR("module must be real (spp=1)\n");
00297 return FLGR_RET_VECTOR_SIZE_ERROR;
00298 }
00299
00300 if(datarg->spp != 1) {
00301 POST_ERROR("argument must be real (spp=1)\n");
00302 return FLGR_RET_VECTOR_SIZE_ERROR;
00303 }
00304
00305 if((ret = flgr1d_is_data_same_attributes(datmodule,datarg,__FUNCTION__)) != FLGR_RET_OK) return ret;
00306
00307 if((ret = flgr1d_is_data_same_type(cdatdest,datmodule)) != FLGR_RET_OK) return ret;
00308 if((ret = flgr1d_is_data_same_length(cdatdest,datmodule)) != FLGR_RET_OK) return ret;
00309
00310 FLGR_DISPATCH_PROCEDURE(cdatdest->type,flgr1d_arith_complex_build,cdatdest,datmodule,datarg);
00311
00312 }
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322 #define FLGR_MACRO_ARITH_COMPLEX_MONOADIC(fct,dtype,dest,src) \
00323 FLGR_Data1D **pdest = dest->row; \
00324 FLGR_Data1D **p1 = src->row; \
00325 int i; \
00326 \
00327 \
00328 \
00329 for(i=0 ; i<src->size_y ; i++,pdest++,p1++) { \
00330 fct##_##dtype(*pdest,*p1); \
00331 } \
00332 \
00333 return
00334
00335 #define FLGR_MACRO_ARITH_COMPLEX_DIADIC(fct,dtype,dest,src1,src2) \
00336 FLGR_Data1D **pdest = dest->row; \
00337 FLGR_Data1D **p1 = src1->row; \
00338 FLGR_Data1D **p2 = src2->row; \
00339 int i; \
00340 \
00341 \
00342 \
00343 for(i=0 ; i<dest->size_y ; i++,pdest++,p1++,p2++) { \
00344 fct##_##dtype(*pdest,*p1,*p2); \
00345 } \
00346 \
00347 return
00348
00349
00350 void flgr2d_arith_complex_module_fgBIT(FLGR_Data2D *rdatdest, FLGR_Data2D *cdatsrc) {
00351 flgr_no_define_type_function(FLGR_BIT);
00352 }
00353 void flgr2d_arith_complex_module_fgUINT8(FLGR_Data2D *rdatdest, FLGR_Data2D *cdatsrc) {
00354 flgr_no_define_type_function(FLGR_UINT8);
00355 }
00356 void flgr2d_arith_complex_module_fgUINT16(FLGR_Data2D *rdatdest, FLGR_Data2D *cdatsrc) {
00357 flgr_no_define_type_function(FLGR_UINT16);
00358 }
00359 void flgr2d_arith_complex_module_fgUINT32(FLGR_Data2D *rdatdest, FLGR_Data2D *cdatsrc) {
00360 flgr_no_define_type_function(FLGR_UINT32);
00361 }
00362 void flgr2d_arith_complex_module_fgINT8(FLGR_Data2D *rdatdest, FLGR_Data2D *cdatsrc) {
00363 flgr_no_define_type_function(FLGR_INT8);
00364 }
00365 void flgr2d_arith_complex_module_fgINT16(FLGR_Data2D *rdatdest, FLGR_Data2D *cdatsrc) {
00366 flgr_no_define_type_function(FLGR_INT16);
00367 }
00368 void flgr2d_arith_complex_module_fgINT32(FLGR_Data2D *rdatdest, FLGR_Data2D *cdatsrc) {
00369 flgr_no_define_type_function(FLGR_INT32);
00370 }
00371 void flgr2d_arith_complex_module_fgFLOAT32(FLGR_Data2D *rdatdest, FLGR_Data2D *cdatsrc) {
00372 FLGR_MACRO_ARITH_COMPLEX_MONOADIC(flgr1d_arith_complex_module,fgFLOAT32,rdatdest,cdatsrc);
00373 }
00374 void flgr2d_arith_complex_module_fgFLOAT64(FLGR_Data2D *rdatdest, FLGR_Data2D *cdatsrc) {
00375 FLGR_MACRO_ARITH_COMPLEX_MONOADIC(flgr1d_arith_complex_module,fgFLOAT64,rdatdest,cdatsrc);
00376 }
00378
00383
00384 FLGR_Ret flgr2d_arith_complex_module(FLGR_Data2D *rdatdest, FLGR_Data2D *cdatsrc) {
00385 FLGR_Ret ret;
00386
00387
00388
00389 if((rdatdest==NULL) || (cdatsrc==NULL)) {
00390 POST_ERROR("Null objects!\n");
00391 return FLGR_RET_NULL_OBJECT;
00392 }
00393
00394 if(rdatdest->spp != 1) {
00395 POST_ERROR("destination must be scalar\n");
00396 return FLGR_RET_VECTOR_SIZE_ERROR;
00397 }
00398
00399 if(cdatsrc->spp != 2) {
00400 POST_ERROR("source must be complex (spp=2)\n");
00401 return FLGR_RET_VECTOR_SIZE_ERROR;
00402 }
00403
00404 if((ret = flgr2d_is_data_same_type(rdatdest,cdatsrc)) != FLGR_RET_OK) return ret;
00405 if((ret = flgr2d_is_data_same_size(rdatdest,cdatsrc)) != FLGR_RET_OK) return ret;
00406
00407 FLGR_DISPATCH_PROCEDURE(rdatdest->type,flgr2d_arith_complex_module,rdatdest,cdatsrc);
00408
00409 }
00410
00411
00412
00413
00414
00415
00416
00417
00418
00419 void flgr2d_arith_complex_argument_fgBIT(FLGR_Data2D *rdatdest, FLGR_Data2D *cdatsrc) {
00420 flgr_no_define_type_function(FLGR_BIT);
00421 }
00422 void flgr2d_arith_complex_argument_fgUINT8(FLGR_Data2D *rdatdest, FLGR_Data2D *cdatsrc) {
00423 flgr_no_define_type_function(FLGR_UINT8);
00424 }
00425 void flgr2d_arith_complex_argument_fgUINT16(FLGR_Data2D *rdatdest, FLGR_Data2D *cdatsrc) {
00426 flgr_no_define_type_function(FLGR_UINT16);
00427 }
00428 void flgr2d_arith_complex_argument_fgUINT32(FLGR_Data2D *rdatdest, FLGR_Data2D *cdatsrc) {
00429 flgr_no_define_type_function(FLGR_UINT32);
00430 }
00431 void flgr2d_arith_complex_argument_fgINT8(FLGR_Data2D *rdatdest, FLGR_Data2D *cdatsrc) {
00432 flgr_no_define_type_function(FLGR_INT8);
00433 }
00434 void flgr2d_arith_complex_argument_fgINT16(FLGR_Data2D *rdatdest, FLGR_Data2D *cdatsrc) {
00435 flgr_no_define_type_function(FLGR_INT16);
00436 }
00437 void flgr2d_arith_complex_argument_fgINT32(FLGR_Data2D *rdatdest, FLGR_Data2D *cdatsrc) {
00438 flgr_no_define_type_function(FLGR_INT32);
00439 }
00440 void flgr2d_arith_complex_argument_fgFLOAT32(FLGR_Data2D *rdatdest, FLGR_Data2D *cdatsrc) {
00441 FLGR_MACRO_ARITH_COMPLEX_MONOADIC(flgr1d_arith_complex_argument,fgFLOAT32,rdatdest,cdatsrc);
00442 }
00443 void flgr2d_arith_complex_argument_fgFLOAT64(FLGR_Data2D *rdatdest, FLGR_Data2D *cdatsrc) {
00444 FLGR_MACRO_ARITH_COMPLEX_MONOADIC(flgr1d_arith_complex_argument,fgFLOAT64,rdatdest,cdatsrc);
00445 }
00447
00452
00453 FLGR_Ret flgr2d_arith_complex_argument(FLGR_Data2D *rdatdest, FLGR_Data2D *cdatsrc) {
00454 FLGR_Ret ret;
00455
00456
00457
00458 if((rdatdest==NULL) || (cdatsrc==NULL)) {
00459 POST_ERROR("Null objects!\n");
00460 return FLGR_RET_NULL_OBJECT;
00461 }
00462
00463 if(rdatdest->spp != 1) {
00464 POST_ERROR("destination must be scalar\n");
00465 return FLGR_RET_VECTOR_SIZE_ERROR;
00466 }
00467
00468 if(cdatsrc->spp != 2) {
00469 POST_ERROR("source must be complex (spp=2)\n");
00470 return FLGR_RET_VECTOR_SIZE_ERROR;
00471 }
00472
00473 if((ret = flgr2d_is_data_same_type(rdatdest,cdatsrc)) != FLGR_RET_OK) return ret;
00474 if((ret = flgr2d_is_data_same_size(rdatdest,cdatsrc)) != FLGR_RET_OK) return ret;
00475
00476 FLGR_DISPATCH_PROCEDURE(rdatdest->type,flgr2d_arith_complex_argument,rdatdest,cdatsrc);
00477
00478 }
00479
00480
00481
00482
00483
00484
00485 void flgr2d_arith_complex_build_fgBIT(FLGR_Data2D *cdatdest, FLGR_Data2D *datmodule, FLGR_Data2D *datarg) {
00486 flgr_no_define_type_function(FLGR_BIT);
00487 }
00488 void flgr2d_arith_complex_build_fgUINT8(FLGR_Data2D *cdatdest, FLGR_Data2D *datmodule, FLGR_Data2D *datarg) {
00489 flgr_no_define_type_function(FLGR_UINT8);
00490 }
00491 void flgr2d_arith_complex_build_fgUINT16(FLGR_Data2D *cdatdest, FLGR_Data2D *datmodule, FLGR_Data2D *datarg) {
00492 flgr_no_define_type_function(FLGR_UINT16);
00493 }
00494 void flgr2d_arith_complex_build_fgUINT32(FLGR_Data2D *cdatdest, FLGR_Data2D *datmodule, FLGR_Data2D *datarg) {
00495 flgr_no_define_type_function(FLGR_UINT32);
00496 }
00497 void flgr2d_arith_complex_build_fgINT8(FLGR_Data2D *cdatdest, FLGR_Data2D *datmodule, FLGR_Data2D *datarg) {
00498 flgr_no_define_type_function(FLGR_INT8);
00499 }
00500 void flgr2d_arith_complex_build_fgINT16(FLGR_Data2D *cdatdest, FLGR_Data2D *datmodule, FLGR_Data2D *datarg) {
00501 flgr_no_define_type_function(FLGR_INT16);
00502 }
00503 void flgr2d_arith_complex_build_fgINT32(FLGR_Data2D *cdatdest, FLGR_Data2D *datmodule, FLGR_Data2D *datarg) {
00504 flgr_no_define_type_function(FLGR_INT32);
00505 }
00506 void flgr2d_arith_complex_build_fgFLOAT32(FLGR_Data2D *cdatdest, FLGR_Data2D *datmodule, FLGR_Data2D *datarg) {
00507 FLGR_MACRO_ARITH_COMPLEX_DIADIC(flgr1d_arith_complex_build,fgFLOAT32,cdatdest,datmodule,datarg);
00508 }
00509 void flgr2d_arith_complex_build_fgFLOAT64(FLGR_Data2D *cdatdest, FLGR_Data2D *datmodule, FLGR_Data2D *datarg) {
00510 FLGR_MACRO_ARITH_COMPLEX_DIADIC(flgr1d_arith_complex_build,fgFLOAT64,cdatdest,datmodule,datarg);
00511 }
00513
00519
00520 FLGR_Ret flgr2d_arith_complex_build(FLGR_Data2D *cdatdest, FLGR_Data2D *datmodule, FLGR_Data2D *datarg) {
00521 FLGR_Ret ret;
00522
00523
00524
00525 if((cdatdest==NULL) || (datmodule==NULL) || (datarg==NULL)) {
00526 POST_ERROR("Null objects!\n");
00527 return FLGR_RET_NULL_OBJECT;
00528 }
00529
00530 if(cdatdest->spp != 2) {
00531 POST_ERROR("destination must be complex (spp=2)\n");
00532 return FLGR_RET_VECTOR_SIZE_ERROR;
00533 }
00534
00535 if(datmodule->spp != 1) {
00536 POST_ERROR("module must be real (spp=1)\n");
00537 return FLGR_RET_VECTOR_SIZE_ERROR;
00538 }
00539
00540 if(datarg->spp != 1) {
00541 POST_ERROR("argument must be real (spp=1)\n");
00542 return FLGR_RET_VECTOR_SIZE_ERROR;
00543 }
00544
00545 if((ret = flgr2d_is_data_same_attributes(datmodule,datarg,__FUNCTION__)) != FLGR_RET_OK) return ret;
00546
00547 if((ret = flgr2d_is_data_same_type(cdatdest,datmodule)) != FLGR_RET_OK) return ret;
00548 if((ret = flgr2d_is_data_same_size(cdatdest,datmodule)) != FLGR_RET_OK) return ret;
00549
00550 FLGR_DISPATCH_PROCEDURE(cdatdest->type,flgr2d_arith_complex_build,cdatdest,datmodule,datarg);
00551
00552 }
00553
00554
00555
00556
00557
00559