Changeset 1440 for trunk/psLib/src/dataManip/psFFT.c
- Timestamp:
- Aug 9, 2004, 1:34:58 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/dataManip/psFFT.c (modified) (30 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/dataManip/psFFT.c
r1407 r1440 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1. 19$ $Name: not supported by cvs2svn $9 * @date $Date: 2004-08-0 7 00:06:06$8 * @version $Revision: 1.20 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2004-08-09 23:34:57 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 28 28 static bool p_fftwWisdomImported = false; 29 29 30 psImage *psImageFFT(psImage * out, const psImage* in, psFftDirection direction)30 psImage* psImageFFT(psImage* out, const psImage* in, psFftDirection direction) 31 31 { 32 32 unsigned int numCols; … … 93 93 } 94 94 95 psImage *psImageReal(psImage * out, const psImage* in)95 psImage* psImageReal(psImage* out, const psImage* in) 96 96 { 97 97 psElemType type; … … 117 117 118 118 if (type == PS_TYPE_C32) { 119 psF32 *outRow;120 psC32 *inRow;119 psF32* outRow; 120 psC32* inRow; 121 121 122 122 out = psImageRecycle(out, numCols, numRows, PS_TYPE_F32); … … 130 130 } 131 131 } else if (type == PS_TYPE_C64) { 132 psF64 *outRow;133 psC64 *inRow;132 psF64* outRow; 133 psC64* inRow; 134 134 135 135 out = psImageRecycle(out, numCols, numRows, PS_TYPE_F64); … … 151 151 } 152 152 153 psImage *psImageImaginary(psImage * out, const psImage* in)153 psImage* psImageImaginary(psImage* out, const psImage* in) 154 154 { 155 155 psElemType type; … … 177 177 178 178 if (type == PS_TYPE_C32) { 179 psF32 *outRow;180 psC32 *inRow;179 psF32* outRow; 180 psC32* inRow; 181 181 182 182 out = psImageRecycle(out, numCols, numRows, PS_TYPE_F32); … … 190 190 } 191 191 } else if (type == PS_TYPE_C64) { 192 psF64 *outRow;193 psC64 *inRow;192 psF64* outRow; 193 psC64* inRow; 194 194 195 195 out = psImageRecycle(out, numCols, numRows, PS_TYPE_F64); … … 211 211 } 212 212 213 psImage *psImageComplex(psImage * out, psImage * real, const psImage* imag)213 psImage* psImageComplex(psImage* out, psImage* real, const psImage* imag) 214 214 { 215 215 psElemType type; … … 251 251 252 252 if (type == PS_TYPE_F32) { 253 psC32 *outRow;254 psF32 *realRow;255 psF32 *imagRow;253 psC32* outRow; 254 psF32* realRow; 255 psF32* imagRow; 256 256 257 257 out = psImageRecycle(out, numCols, numRows, PS_TYPE_C32); … … 267 267 } 268 268 } else if (type == PS_TYPE_F64) { 269 psC64 *outRow;270 psF64 *realRow;271 psF64 *imagRow;269 psC64* outRow; 270 psF64* realRow; 271 psF64* imagRow; 272 272 273 273 out = psImageRecycle(out, numCols, numRows, PS_TYPE_C64); … … 290 290 } 291 291 292 psImage *psImageConjugate(psImage * out, const psImage* in)292 psImage* psImageConjugate(psImage* out, const psImage* in) 293 293 { 294 294 psElemType type; … … 314 314 315 315 if (type == PS_TYPE_C32) { 316 psC32 *outRow;317 psC32 *inRow;316 psC32* outRow; 317 psC32* inRow; 318 318 319 319 out = psImageRecycle(out, numCols, numRows, PS_TYPE_C32); … … 327 327 } 328 328 } else if (type == PS_TYPE_C64) { 329 psC64 *outRow;330 psC64 *inRow;329 psC64* outRow; 330 psC64* inRow; 331 331 332 332 out = psImageRecycle(out, numCols, numRows, PS_TYPE_C64); … … 348 348 } 349 349 350 psImage *psImagePowerSpectrum(psImage * out, const psImage* in)350 psImage* psImagePowerSpectrum(psImage* out, const psImage* in) 351 351 { 352 352 psElemType type; … … 373 373 374 374 if (type == PS_TYPE_C32) { 375 psF32 *outRow;376 psC32 *inRow;375 psF32* outRow; 376 psC32* inRow; 377 377 psF32 real; 378 378 psF32 imag; … … 390 390 } 391 391 } else if (type == PS_TYPE_C64) { 392 psF64 *outRow;393 psC64 *inRow;392 psF64* outRow; 393 psC64* inRow; 394 394 psF64 real; 395 395 psF64 imag; … … 418 418 /************************************** Vector Functions ***************************************/ 419 419 420 psVector *psVectorFFT(psVector * out, const psVector* in, psFftDirection direction)420 psVector* psVectorFFT(psVector* out, const psVector* in, psFftDirection direction) 421 421 { 422 422 unsigned int numElements; … … 464 464 if (type == PS_TYPE_F32) { 465 465 // need to convert to complex 466 psC32 *outVec = out->data.C32;467 psF32 *inVec = in->data.F32;466 psC32* outVec = out->data.C32; 467 psF32* inVec = in->data.F32; 468 468 469 469 for (unsigned int i = 0; i < numElements; i++) { … … 471 471 } 472 472 } else { 473 psC32 *outVec = out->data.C32;474 psC32 *inVec = in->data.C32;473 psC32* outVec = out->data.C32; 474 psC32* inVec = in->data.C32; 475 475 476 476 for (unsigned int i = 0; i < numElements; i++) { … … 498 498 } 499 499 500 psVector *psVectorReal(psVector * out, const psVector* in)500 psVector* psVectorReal(psVector* out, const psVector* in) 501 501 { 502 502 psElemType type; … … 523 523 524 524 if (type == PS_TYPE_C32) { 525 psF32 *outVec;526 psC32 *inVec = in->data.C32;525 psF32* outVec; 526 psC32* inVec = in->data.C32; 527 527 528 528 out = psVectorRecycle(out, numElements, PS_TYPE_F32); … … 542 542 } 543 543 544 psVector *psVectorImaginary(psVector * out, const psVector* in)544 psVector* psVectorImaginary(psVector* out, const psVector* in) 545 545 { 546 546 psElemType type; … … 567 567 568 568 if (type == PS_TYPE_C32) { 569 psF32 *outVec;570 psC32 *inVec = in->data.C32;569 psF32* outVec; 570 psC32* inVec = in->data.C32; 571 571 572 572 out = psVectorRecycle(out, numElements, PS_TYPE_F32); … … 586 586 } 587 587 588 psVector *psVectorComplex(psVector * out, psVector * real, const psVector* imag)588 psVector* psVectorComplex(psVector* out, psVector* real, const psVector* imag) 589 589 { 590 590 psElemType type; … … 616 616 617 617 if (type == PS_TYPE_F32) { 618 psC32 *outVec;619 psF32 *realVec = real->data.F32;620 psF32 *imagVec = imag->data.F32;618 psC32* outVec; 619 psF32* realVec = real->data.F32; 620 psF32* imagVec = imag->data.F32; 621 621 622 622 out = psVectorRecycle(out, numElements, PS_TYPE_C32); … … 636 636 } 637 637 638 psVector *psVectorConjugate(psVector * out, const psVector* in)638 psVector* psVectorConjugate(psVector* out, const psVector* in) 639 639 { 640 640 psElemType type; … … 662 662 663 663 if (type == PS_TYPE_C32) { 664 psC32 *outVec;665 psC32 *inVec = in->data.C32;664 psC32* outVec; 665 psC32* inVec = in->data.C32; 666 666 667 667 out = psVectorRecycle(out, numElements, PS_TYPE_C32); … … 681 681 } 682 682 683 psVector *psVectorPowerSpectrum(psVector * out, const psVector* in)683 psVector* psVectorPowerSpectrum(psVector* out, const psVector* in) 684 684 { 685 685 psElemType type; … … 708 708 709 709 if (type == PS_TYPE_C32) { 710 psF32 *outVec;711 psC32 *inVec = in->data.C32;710 psF32* outVec; 711 psC32* inVec = in->data.C32; 712 712 psF32 inAbs1; 713 713 psF32 inAbs2;
Note:
See TracChangeset
for help on using the changeset viewer.
