Changeset 3232 for trunk/psLib/test/dataManip
- Timestamp:
- Feb 15, 2005, 2:22:05 PM (21 years ago)
- Location:
- trunk/psLib/test/dataManip
- Files:
-
- 2 edited
-
tst_psMatrixVectorArithmetic02.c (modified) (5 diffs)
-
tst_psVectorFFT.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/dataManip/tst_psMatrixVectorArithmetic02.c
r2392 r3232 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1. 9$ $Name: not supported by cvs2svn $13 * @date $Date: 200 4-11-22 21:02:51$12 * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-02-16 00:22:05 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 131 131 testUnaryOpM( log, F64, 1000.0, 0.0, 3, 2, 3 ); 132 132 testUnaryOpM( log, C32, 1000.0 + 0.0i, 0.0 + 0.0i, 3, 2, 3 ); 133 testUnaryOpM( sin, S32, M_PI_2, 0, 3, 2, 1 );134 testUnaryOpM( sin, F32, M_PI_2, 0.0, 3, 2, 1.0 );135 testUnaryOpM( sin, F64, M_PI_2, 0.0, 3, 2, 1.0 );136 testUnaryOpM( sin, C32, M_PI_2 + 0.0i, 0.0 + 0.0i, 3, 2, 1.0 );133 testUnaryOpM( sin, S32, PS_PI_2, 0, 3, 2, 1 ); 134 testUnaryOpM( sin, F32, PS_PI_2, 0.0, 3, 2, 1.0 ); 135 testUnaryOpM( sin, F64, PS_PI_2, 0.0, 3, 2, 1.0 ); 136 testUnaryOpM( sin, C32, PS_PI_2 + 0.0i, 0.0 + 0.0i, 3, 2, 1.0 ); 137 137 testUnaryOpM( dsin, S32, 90, 0, 3, 2 , 1); 138 138 testUnaryOpM( dsin, F32, 90.0, 0.0, 3, 2, 1.0 ); … … 147 147 testUnaryOpM( dcos, F64, 0.0, 0.0, 3, 2, 1.0 ); 148 148 testUnaryOpM( dcos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3, 2, 1.0 ); 149 testUnaryOpM( tan, S32, M_PI_4, 0, 3, 2, 1);150 testUnaryOpM( tan, F32, M_PI_4, 0.0, 3, 2, 1.0 );151 testUnaryOpM( tan, F64, M_PI_4, 0.0, 3, 2, 1.0 );152 testUnaryOpM( tan, C32, M_PI_4 + 0.0i, 0.0 + 0.0i, 3, 2, 1 );149 testUnaryOpM( tan, S32, PS_PI_4, 0, 3, 2, 1); 150 testUnaryOpM( tan, F32, PS_PI_4, 0.0, 3, 2, 1.0 ); 151 testUnaryOpM( tan, F64, PS_PI_4, 0.0, 3, 2, 1.0 ); 152 testUnaryOpM( tan, C32, PS_PI_4 + 0.0i, 0.0 + 0.0i, 3, 2, 1 ); 153 153 testUnaryOpM( dtan, S32, 45, 0, 3, 2, 1 ); 154 154 testUnaryOpM( dtan, F32, 45.0, 0.0, 3, 2, 1.0 ); 155 155 testUnaryOpM( dtan, F64, 45.0, 0.0, 3, 2, 1.0 ); 156 156 testUnaryOpM( dtan, C32, 45.0 + 45.0i, 0.0 + 0.0i, 3, 2, 1.0 ); 157 testUnaryOpM( asin, S32, 1, 0, 3, 2, M_PI_2);158 testUnaryOpM( asin, F32, 1.0, 0.0, 3, 2, M_PI_2 );159 testUnaryOpM( asin, F64, 1.0, 0.0, 3, 2, M_PI_2);160 testUnaryOpM( asin, C32, 1.0 + 1.0i, 0.0 + 0.0i, 3, 2, M_PI_2);157 testUnaryOpM( asin, S32, 1, 0, 3, 2, PS_PI_2); 158 testUnaryOpM( asin, F32, 1.0, 0.0, 3, 2, PS_PI_2 ); 159 testUnaryOpM( asin, F64, 1.0, 0.0, 3, 2, PS_PI_2); 160 testUnaryOpM( asin, C32, 1.0 + 1.0i, 0.0 + 0.0i, 3, 2, PS_PI_2); 161 161 testUnaryOpM( dasin, S32, 1.0, 0, 3, 2, 90 ); 162 162 testUnaryOpM( dasin, F32, 1.0, 0.0, 3, 2, 90.0 ); 163 163 testUnaryOpM( dasin, F64, 1.0, 0.0, 3, 2, 90.0 ); 164 164 testUnaryOpM( dasin, C32, 1.0 + 1.0i, 0.0 + 0.0i, 3, 2, 90.0 ); 165 testUnaryOpM( acos, S32, 0, 0, 3, 2, M_PI_2);166 testUnaryOpM( acos, F32, 0.0, 0.0, 3, 2, M_PI_2 );167 testUnaryOpM( acos, F64, 0.0, 0.0, 3, 2, M_PI_2 );168 testUnaryOpM( acos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3, 2, M_PI_2 );165 testUnaryOpM( acos, S32, 0, 0, 3, 2, PS_PI_2); 166 testUnaryOpM( acos, F32, 0.0, 0.0, 3, 2, PS_PI_2 ); 167 testUnaryOpM( acos, F64, 0.0, 0.0, 3, 2, PS_PI_2 ); 168 testUnaryOpM( acos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3, 2, PS_PI_2 ); 169 169 testUnaryOpM( dacos, S32, 0, 0, 3, 2, 90 ); 170 170 testUnaryOpM( dacos, F32, 0.0, 0.0, 3, 2, 90.0 ); 171 171 testUnaryOpM( dacos, F64, 0.0, 0.0, 3, 2, 90.0 ); 172 172 testUnaryOpM( dacos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3, 2, 90.0 ); 173 testUnaryOpM( atan, S32, 1, 0, 3, 2, M_PI_4);174 testUnaryOpM( atan, F32, 1.0, 0.0, 3, 2, M_PI_4 );175 testUnaryOpM( atan, F64, 1.0, 0.0, 3, 2, M_PI_4);176 testUnaryOpM( atan, C32, 1.0 + 0.0i, 0.0 + 0.0i, 3, 2, M_PI_4);173 testUnaryOpM( atan, S32, 1, 0, 3, 2, PS_PI_4); 174 testUnaryOpM( atan, F32, 1.0, 0.0, 3, 2, PS_PI_4 ); 175 testUnaryOpM( atan, F64, 1.0, 0.0, 3, 2, PS_PI_4); 176 testUnaryOpM( atan, C32, 1.0 + 0.0i, 0.0 + 0.0i, 3, 2, PS_PI_4); 177 177 testUnaryOpM( datan, S32, 1, 0, 3, 2, 45 ); 178 178 testUnaryOpM( datan, F32, 1.0, 0.0, 3, 2, 45.0 ); … … 216 216 testUnaryOpV( log, F64, 1000.0, 0.0, 3, 3 ); 217 217 testUnaryOpV( log, C32, 1000.0 + 0.0i, 0.0 + 0.0i, 3, 3 ); 218 testUnaryOpV( sin, S32, M_PI_2, 0, 3, 1 );219 testUnaryOpV( sin, F32, M_PI_2, 0.0, 3, 1.0 );220 testUnaryOpV( sin, F64, M_PI_2, 0.0, 3, 1.0 );221 testUnaryOpV( sin, C32, M_PI_2 + 0.0i, 0.0 + 0.0i, 3, 1.0 );218 testUnaryOpV( sin, S32, PS_PI_2, 0, 3, 1 ); 219 testUnaryOpV( sin, F32, PS_PI_2, 0.0, 3, 1.0 ); 220 testUnaryOpV( sin, F64, PS_PI_2, 0.0, 3, 1.0 ); 221 testUnaryOpV( sin, C32, PS_PI_2 + 0.0i, 0.0 + 0.0i, 3, 1.0 ); 222 222 testUnaryOpV( dsin, S32, 90, 0, 3, 1); 223 223 testUnaryOpV( dsin, F32, 90.0, 0.0, 3, 1.0 ); … … 232 232 testUnaryOpV( dcos, F64, 0.0, 0.0, 3, 1.0 ); 233 233 testUnaryOpV( dcos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3, 1.0 ); 234 testUnaryOpV( tan, S32, M_PI_4, 0, 3, 1);235 testUnaryOpV( tan, F32, M_PI_4, 0.0, 3, 1.0 );236 testUnaryOpV( tan, F64, M_PI_4, 0.0, 3, 1.0 );237 testUnaryOpV( tan, C32, M_PI_4 + 0.0i, 0.0 + 0.0i, 3, 1 );234 testUnaryOpV( tan, S32, PS_PI_4, 0, 3, 1); 235 testUnaryOpV( tan, F32, PS_PI_4, 0.0, 3, 1.0 ); 236 testUnaryOpV( tan, F64, PS_PI_4, 0.0, 3, 1.0 ); 237 testUnaryOpV( tan, C32, PS_PI_4 + 0.0i, 0.0 + 0.0i, 3, 1 ); 238 238 testUnaryOpV( dtan, S32, 45, 0, 3, 1 ); 239 239 testUnaryOpV( dtan, F32, 45.0, 0.0, 3, 1.0 ); 240 240 testUnaryOpV( dtan, F64, 45.0, 0.0, 3, 1.0 ); 241 241 testUnaryOpV( dtan, C32, 45.0 + 45.0i, 0.0 + 0.0i, 3, 1.0 ); 242 testUnaryOpV( asin, S32, 1, 0, 3, M_PI_2);243 testUnaryOpV( asin, F32, 1.0, 0.0, 3, M_PI_2 );244 testUnaryOpV( asin, F64, 1.0, 0.0, 3, M_PI_2);245 testUnaryOpV( asin, C32, 1.0 + 1.0i, 0.0 + 0.0i, 3, M_PI_2);242 testUnaryOpV( asin, S32, 1, 0, 3, PS_PI_2); 243 testUnaryOpV( asin, F32, 1.0, 0.0, 3, PS_PI_2 ); 244 testUnaryOpV( asin, F64, 1.0, 0.0, 3, PS_PI_2); 245 testUnaryOpV( asin, C32, 1.0 + 1.0i, 0.0 + 0.0i, 3, PS_PI_2); 246 246 testUnaryOpV( dasin, S32, 1.0, 0, 3, 90 ); 247 247 testUnaryOpV( dasin, F32, 1.0, 0.0, 3, 90.0 ); 248 248 testUnaryOpV( dasin, F64, 1.0, 0.0, 3, 90.0 ); 249 249 testUnaryOpV( dasin, C32, 1.0 + 1.0i, 0.0 + 0.0i, 3, 90.0 ); 250 testUnaryOpV( acos, S32, 0, 0, 3, M_PI_2);251 testUnaryOpV( acos, F32, 0.0, 0.0, 3, M_PI_2 );252 testUnaryOpV( acos, F64, 0.0, 0.0, 3, M_PI_2 );253 testUnaryOpV( acos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3, M_PI_2 );250 testUnaryOpV( acos, S32, 0, 0, 3, PS_PI_2); 251 testUnaryOpV( acos, F32, 0.0, 0.0, 3, PS_PI_2 ); 252 testUnaryOpV( acos, F64, 0.0, 0.0, 3, PS_PI_2 ); 253 testUnaryOpV( acos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3, PS_PI_2 ); 254 254 testUnaryOpV( dacos, S32, 0, 0, 3, 90 ); 255 255 testUnaryOpV( dacos, F32, 0.0, 0.0, 3, 90.0 ); 256 256 testUnaryOpV( dacos, F64, 0.0, 0.0, 3, 90.0 ); 257 257 testUnaryOpV( dacos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3, 90.0 ); 258 testUnaryOpV( atan, S32, 1, 0, 3, M_PI_4);259 testUnaryOpV( atan, F32, 1.0, 0.0, 3, M_PI_4 );260 testUnaryOpV( atan, F64, 1.0, 0.0, 3, M_PI_4);261 testUnaryOpV( atan, C32, 1.0 + 0.0i, 0.0 + 0.0i, 3, M_PI_4);258 testUnaryOpV( atan, S32, 1, 0, 3, PS_PI_4); 259 testUnaryOpV( atan, F32, 1.0, 0.0, 3, PS_PI_4 ); 260 testUnaryOpV( atan, F64, 1.0, 0.0, 3, PS_PI_4); 261 testUnaryOpV( atan, C32, 1.0 + 0.0i, 0.0 + 0.0i, 3, PS_PI_4); 262 262 testUnaryOpV( datan, S32, 1, 0, 3, 45 ); 263 263 testUnaryOpV( datan, F32, 1.0, 0.0, 3, 45.0 ); -
trunk/psLib/test/dataManip/tst_psVectorFFT.c
r2979 r3232 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-0 1-13 21:25:44$8 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-02-16 00:22:05 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 68 68 vec->n = vec->nalloc; 69 69 for ( psU32 n = 0; n < 100; n++ ) { 70 vec->data.F32[ n ] = sinf( ( psF32 ) n / 50.0f * M_PI );70 vec->data.F32[ n ] = sinf( ( psF32 ) n / 50.0f * PS_PI ); 71 71 } 72 72 … … 111 111 } 112 112 for ( psU32 n = 0; n < 100; n++ ) { 113 psF32 val = sinf( ( psF32 ) n / 50.0f * M_PI );113 psF32 val = sinf( ( psF32 ) n / 50.0f * PS_PI ); 114 114 psF32 vecVal = crealf( vec3->data.C32[ n ] ) / 100; 115 115 if ( fabsf( vecVal - val ) > 0.1f ) { … … 548 548 vec3->n = vec3->nalloc; 549 549 for ( psU32 n = 0; n < 100; n++ ) { 550 vec->data.C32[ n ] = n + I * sinf( ( ( psF32 ) n ) / 50.f * M_PI );551 vec3->data.C64[ n ] = n + I * sinf( ( ( psF64 ) n ) / 50.f * M_PI );550 vec->data.C32[ n ] = n + I * sinf( ( ( psF32 ) n ) / 50.f * PS_PI ); 551 vec3->data.C64[ n ] = n + I * sinf( ( ( psF64 ) n ) / 50.f * PS_PI ); 552 552 } 553 553
Note:
See TracChangeset
for help on using the changeset viewer.
