Changeset 1139 for trunk/psLib/src/dataManip/psMatrixVectorArithmetic.c
- Timestamp:
- Jun 29, 2004, 3:31:15 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/dataManip/psMatrixVectorArithmetic.c
r1125 r1139 29 29 * @author Ross Harman, MHPCC 30 30 * 31 * @version $Revision: 1.1 3$ $Name: not supported by cvs2svn $32 * @date $Date: 2004-06- 29 20:28:47$31 * @version $Revision: 1.14 $ $Name: not supported by cvs2svn $ 32 * @date $Date: 2004-06-30 01:31:15 $ 33 33 * 34 34 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 78 78 79 79 // Conversion for degrees to radians 80 #define D2R M_PI/ 360.080 #define D2R M_PI/180.0 81 81 82 82 // Conversion for radians to degrees 83 #define R2D 360.0/M_PI83 #define R2D 180.0/M_PI 84 84 85 85 // Division with NAN checking … … 444 444 } 445 445 446 if(dim1 == PS_DIMEN_VECTOR) { 447 if(((psVector*)in1)->n == 0) { 448 psError(__func__, ": Line %d - Vector contains zero elements"); 449 } 450 } else if(dim1 == PS_DIMEN_IMAGE) { 451 if(((psImage*)in1)->numCols==0 || ((psImage*)in1)->numRows==0) { 452 psError(__func__, ": Line %d - Image contains zero length row or cols"); 453 } 454 } 455 456 if(dim2 == PS_DIMEN_VECTOR) { 457 if(((psVector*)in2)->n == 0) { 458 psError(__func__, ": Line %d - Vector contains zero elements"); 459 } 460 } else if(dim2 == PS_DIMEN_IMAGE) { 461 if(((psImage*)in2)->numCols==0 || ((psImage*)in2)->numRows==0) { 462 psError(__func__, ": Line %d - Image contains zero length row or cols"); 463 } 464 } 465 446 466 if(dim1 == PS_DIMEN_SCALAR) { 447 467 if(dim2 == PS_DIMEN_SCALAR) { … … 592 612 } else if(!strncmp(OP, "ten", 3)) { \ 593 613 if(PS_IS_PSELEMTYPE_COMPLEX(IN->type)) { \ 594 UNARY_TYPE(DIM,OUT,IN,cpow( *i1,10.0)); \614 UNARY_TYPE(DIM,OUT,IN,cpow(10.0,*i1)); \ 595 615 } else { \ 596 616 UNARY_TYPE(DIM,OUT,IN,exp10(*i1)); \ … … 721 741 } 722 742 743 if(dimIn == PS_DIMEN_VECTOR) { 744 if(((psVector*)in)->n == 0) { 745 psError(__func__, ": Line %d - Vector contains zero elements"); 746 } 747 } else if(dimIn == PS_DIMEN_IMAGE) { 748 if(((psImage*)in)->numCols==0 || ((psImage*)in)->numRows==0) { 749 psError(__func__, ": Line %d - Image contains zero length row or cols"); 750 } 751 } 752 753 if(dimOut == PS_DIMEN_VECTOR) { 754 if(((psVector*)out)->n == 0) { 755 psError(__func__, ": Line %d - Vector contains zero elements"); 756 } 757 } else if(dimOut == PS_DIMEN_IMAGE) { 758 if(((psImage*)out)->numCols==0 || ((psImage*)out)->numRows==0) { 759 psError(__func__, ": Line %d - Image contains zero length row or cols"); 760 } 761 } 762 723 763 if(dimIn == PS_DIMEN_SCALAR) { 724 764 UNARY_OP(SCALAR,out,psTypeIn,op); // scalar
Note:
See TracChangeset
for help on using the changeset viewer.
