Changeset 12431 for trunk/psLib/src/math/psBinaryOp.c
- Timestamp:
- Mar 13, 2007, 2:39:51 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psBinaryOp.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psBinaryOp.c
r10999 r12431 30 30 * @author Robert DeSonia, MHPCC 31 31 * 32 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $33 * @date $Date: 2007-0 1-09 22:38:52$32 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 33 * @date $Date: 2007-03-14 00:39:50 $ 34 34 * 35 35 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 323 323 DIM1##_##DIM2(OUT,IN1,OP,IN2,F64); \ 324 324 break; \ 325 case PS_TYPE_C32: \ 326 DIM1##_##DIM2(OUT,IN1,OP,IN2,C32); \ 327 break; \ 328 case PS_TYPE_C64: \ 329 DIM1##_##DIM2(OUT,IN1,OP,IN2,C64); \ 330 break; \ 331 default: \ 332 /* char* strType; \ 333 PS_TYPE_NAME(strType,IN1->type); \ 334 psError(PS_ERR_BAD_PARAMETER_TYPE, true, \ 335 _("Specified data type, %s, is not supported."), \ 336 strType); */ \ 337 if (OUT != IN1 && OUT != IN2) { \ 338 psFree(OUT); \ 325 default: { \ 326 char* strType; \ 327 PS_TYPE_NAME(strType,IN1->type); \ 328 psError(PS_ERR_BAD_PARAMETER_TYPE, true, \ 329 _("Specified data type, %s, is not supported."), \ 330 strType); \ 331 if (OUT != IN1 && OUT != IN2) { \ 332 psFree(OUT); \ 333 } \ 334 return NULL; \ 339 335 } \ 340 return NULL; \341 336 } 342 337 … … 364 359 } else { \ 365 360 psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ 366 "Types (%x,%x) are not appropriate for logical OR.\n", IN1->type, IN2->type); \361 "Types (%x,%x) are not appropriate for logical OR.\n", IN1->type, IN2->type); \ 367 362 return NULL; \ 368 363 } \ 369 364 } else if (!strncmp(OP, "^", 1)) { \ 370 if (PS_IS_PSELEMTYPE_COMPLEX(IN1->type)) { \ 371 BINARY_TYPE(DIM1,DIM2,OUT,IN1,cpow(*i1,*i2),IN2); \ 372 } else { \ 373 BINARY_TYPE(DIM1,DIM2,OUT,IN1,pow(*i1,*i2),IN2); \ 374 } \ 365 BINARY_TYPE(DIM1,DIM2,OUT,IN1,pow(*i1,*i2),IN2); \ 375 366 } else if (!strncmp(OP, "min", 3)) { \ 376 if (PS_IS_PSELEMTYPE_COMPLEX(IN1->type)) { \ 377 psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ 378 _("The minimum operation is not supported with complex data.")); \ 379 if (OUT != IN1 && OUT != IN2) { \ 380 psFree(OUT); \ 381 } \ 382 return NULL; \ 383 } else { \ 384 BINARY_TYPE(DIM1,DIM2,OUT,IN1,fmin(*i1,*i2),IN2); \ 385 } \ 367 BINARY_TYPE(DIM1,DIM2,OUT,IN1,fmin(*i1,*i2),IN2); \ 386 368 } else if (!strncmp(OP, "max", 3)) { \ 387 if (PS_IS_PSELEMTYPE_COMPLEX(IN1->type)) { \ 388 psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ 389 _("The maximum operation is not supported with complex data.")); \ 390 if (OUT != IN1 && OUT != IN2) { \ 391 psFree(OUT); \ 392 } \ 393 return NULL; \ 394 } else { \ 395 BINARY_TYPE(DIM1,DIM2,OUT,IN1,fmax(*i1,*i2),IN2); \ 396 } \ 369 BINARY_TYPE(DIM1,DIM2,OUT,IN1,fmax(*i1,*i2),IN2); \ 397 370 } else { \ 398 371 psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ 399 _("Specified operation, %s, is not supported."), \372 _("Specified operation, %s, is not supported."), \ 400 373 OP); \ 401 374 if (OUT != IN1 && OUT != IN2) { \
Note:
See TracChangeset
for help on using the changeset viewer.
