Changeset 5087
- Timestamp:
- Sep 21, 2005, 11:37:21 AM (21 years ago)
- Location:
- trunk/psLib
- Files:
-
- 6 edited
-
pslib.kdevelop (modified) (1 diff)
-
src/astro/psTime.h (modified) (2 diffs)
-
src/mathtypes/psVector.c (modified) (2 diffs)
-
src/mathtypes/psVector.h (modified) (2 diffs)
-
test/mathtypes/tst_psVector.c (modified) (4 diffs)
-
test/mathtypes/verified/tst_psVector.stderr (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/pslib.kdevelop
r5083 r5087 1 <?xml version = '1.0'?> 2 <kdevelop> 3 <general> 4 <author>Robert Daniel DeSonia</author> 5 <email>robert.desonia@mhpcc.hpc.mil</email> 6 <version>1.6</version> 7 <projectmanagement>KDevAutoProject</projectmanagement> 8 <primarylanguage>C</primarylanguage> 9 <keywords> 10 <keyword>C</keyword> 11 <keyword>Code</keyword> 12 </keywords> 13 <ignoreparts/> 14 <projectdirectory>.</projectdirectory> 15 <absoluteprojectpath>false</absoluteprojectpath> 16 <description/> 17 <secondaryLanguages/> 18 </general> 19 <kdevautoproject> 20 <general> 21 <activetarget>src/pslib</activetarget> 22 <useconfiguration>default</useconfiguration> 23 </general> 24 <run> 25 <mainprogram>src/pslib</mainprogram> 26 <terminal>true</terminal> 27 <directoryradio>executable</directoryradio> 28 </run> 29 <configurations> 30 <optimized> 31 <builddir>optimized</builddir> 32 <ccompiler>kdevgccoptions</ccompiler> 33 <cxxcompiler>kdevgppoptions</cxxcompiler> 34 <f77compiler>kdevg77options</f77compiler> 35 <cflags>-O2 -g0 </cflags> 36 </optimized> 37 <debug> 38 <configargs>--enable-debug=full</configargs> 39 <builddir>debug</builddir> 40 <ccompiler>kdevgccoptions</ccompiler> 41 <cxxcompiler>kdevgppoptions</cxxcompiler> 42 <f77compiler>kdevg77options</f77compiler> 43 <cflags>-O0 -g3 </cflags> 44 </debug> 45 </configurations> 46 <make> 47 <envvars> 48 <envvar value="1" name="WANT_AUTOCONF_2_5" /> 49 <envvar value="1" name="WANT_AUTOMAKE_1_6" /> 50 </envvars> 51 </make> 52 </kdevautoproject> 53 <kdevdoctreeview> 54 <ignoretocs> 55 <toc>ada</toc> 56 <toc>ada_bugs_gcc</toc> 57 <toc>bash</toc> 58 <toc>bash_bugs</toc> 59 <toc>clanlib</toc> 60 <toc>w3c-dom-level2-html</toc> 61 <toc>fortran_bugs_gcc</toc> 62 <toc>gnome1</toc> 63 <toc>gnustep</toc> 64 <toc>gtk</toc> 65 <toc>gtk_bugs</toc> 66 <toc>haskell</toc> 67 <toc>haskell_bugs_ghc</toc> 68 <toc>java_bugs_gcc</toc> 69 <toc>java_bugs_sun</toc> 70 <toc>kde2book</toc> 71 <toc>libstdc++</toc> 72 <toc>opengl</toc> 73 <toc>pascal_bugs_fp</toc> 74 <toc>php</toc> 75 <toc>php_bugs</toc> 76 <toc>perl</toc> 77 <toc>perl_bugs</toc> 78 <toc>python</toc> 79 <toc>python_bugs</toc> 80 <toc>qt-kdev3</toc> 81 <toc>ruby</toc> 82 <toc>ruby_bugs</toc> 83 <toc>sdl</toc> 84 <toc>stl</toc> 85 <toc>w3c-svg</toc> 86 <toc>sw</toc> 87 <toc>w3c-uaag10</toc> 88 <toc>wxwidgets_bugs</toc> 89 </ignoretocs> 90 <ignoreqt_xml> 91 <toc>Guide to the Qt Translation Tools</toc> 92 <toc>Qt Assistant Manual</toc> 93 <toc>Qt Designer Manual</toc> 94 <toc>Qt Reference Documentation</toc> 95 <toc>qmake User Guide</toc> 96 </ignoreqt_xml> 97 <ignoredoxygen> 98 <toc>KDE Libraries (Doxygen)</toc> 99 </ignoredoxygen> 100 </kdevdoctreeview> 101 <kdevfilecreate> 102 <useglobaltypes> 103 <type ext="c" /> 104 <type ext="h" /> 105 </useglobaltypes> 106 </kdevfilecreate> 107 <kdevfileview> 108 <groups> 109 <group pattern="*.h" name="Header files" /> 110 <group pattern="*.c" name="Source files" /> 111 <hidenonprojectfiles>false</hidenonprojectfiles> 112 <hidenonlocation>false</hidenonlocation> 113 </groups> 114 <tree> 115 <hidepatterns>*.o,*.lo,CVS</hidepatterns> 116 <hidenonprojectfiles>false</hidenonprojectfiles> 117 <showvcsfields>false</showvcsfields> 118 </tree> 119 </kdevfileview> 120 <kdevdocumentation> 121 <projectdoc> 122 <docsystem>Doxygen Documentation Collection</docsystem> 123 <docurl>${APPNAMELC}.tag</docurl> 124 </projectdoc> 125 </kdevdocumentation> 126 <substmap> 127 <APPNAME>psLib</APPNAME> 128 <APPNAMELC>pslib</APPNAMELC> 129 <APPNAMEUC>PSLIB</APPNAMEUC> 130 <AUTHOR>Robert Daniel DeSonia</AUTHOR> 131 <CFLAGS/> 132 <EMAIL>robert.desonia@mhpcc.hpc.mil</EMAIL> 133 <LICENSE>GPL</LICENSE> 134 <LICENSEFILE>COPYING</LICENSEFILE> 135 <OPT_INCS>-I/usr/include</OPT_INCS> 136 <OPT_LIBS>-lm</OPT_LIBS> 137 <VERSION>1.5</VERSION> 138 <dest>/home/desonia/pslib</dest> 139 </substmap> 140 <kdevcppsupport> 141 <references/> 142 <codecompletion> 143 <includeGlobalFunctions>true</includeGlobalFunctions> 144 <includeTypes>true</includeTypes> 145 <includeEnums>true</includeEnums> 146 <includeTypedefs>false</includeTypedefs> 147 <automaticCodeCompletion>true</automaticCodeCompletion> 148 <automaticArgumentsHint>true</automaticArgumentsHint> 149 <automaticHeaderCompletion>true</automaticHeaderCompletion> 150 <codeCompletionDelay>250</codeCompletionDelay> 151 <argumentsHintDelay>400</argumentsHintDelay> 152 <headerCompletionDelay>250</headerCompletionDelay> 153 </codecompletion> 154 <creategettersetter> 155 <prefixGet/> 156 <prefixSet>set</prefixSet> 157 <prefixVariable>m_,_</prefixVariable> 158 <parameterName>theValue</parameterName> 159 <inlineGet>true</inlineGet> 160 <inlineSet>true</inlineSet> 161 </creategettersetter> 162 </kdevcppsupport> 163 <cppsupportpart> 164 <filetemplates> 165 <interfacesuffix>.h</interfacesuffix> 166 <implementationsuffix>.cpp</implementationsuffix> 167 </filetemplates> 168 </cppsupportpart> 169 <kdevdebugger> 170 <general> 171 <programargs/> 172 <gdbpath/> 173 <dbgshell>libtool</dbgshell> 174 <configGdbScript/> 175 <runShellScript/> 176 <runGdbScript/> 177 <breakonloadinglibs>true</breakonloadinglibs> 178 <separatetty>false</separatetty> 179 <floatingtoolbar>false</floatingtoolbar> 180 </general> 181 <display> 182 <staticmembers>false</staticmembers> 183 <demanglenames>true</demanglenames> 184 <outputradix>10</outputradix> 185 </display> 186 </kdevdebugger> 187 <kdevcvsservice> 188 <recursivewhenupdate>true</recursivewhenupdate> 189 <prunedirswhenupdate>true</prunedirswhenupdate> 190 <createdirswhenupdate>true</createdirswhenupdate> 191 <recursivewhencommitremove>true</recursivewhencommitremove> 192 <revertoptions>-C</revertoptions> 193 </kdevcvsservice> 194 </kdevelop> -
trunk/psLib/src/astro/psTime.h
r5083 r5087 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.4 0$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-09-21 02:11:16$13 * @version $Revision: 1.41 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-09-21 21:37:20 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 375 375 char* p_psGetConfigFileName(); 376 376 377 /** 378 * 379 * 380 * 381 */ 377 382 psF64 p_psTimeSearchTables( 378 psF64 index, 379 psU64 column, 380 char *metadataTableNames[], 381 psU32 nTables, 382 psLookupStatusType* status 383 ); 384 383 psF64 index, ///< 384 psU64 column, ///< 385 char *metadataTableNames[], ///< 386 psU32 nTables, ///< 387 psLookupStatusType* status ///< 388 ); 389 390 /** Stores the current time in a psHash of timers, under the supplied name. 391 * 392 * @return bool: True if successful, otherwise false. 393 */ 385 394 bool psTimerStart( 386 char *name 387 ); 388 395 char *name ///< timer name to start 396 ); 397 398 /** Resets the named timer. 399 * 400 * @return psF64: The time elapsed since start. 401 */ 389 402 psF64 psTimerClear( 390 char *name 391 ); 392 403 char *name ///< timer name to clear 404 ); 405 406 /** Returns the elapsed time, in seconds, for the timer specified by name. 407 * 408 * @return psF64: The elapsed time in seconds since timer start. 409 */ 393 410 psF64 psTimerMark( 394 char *name 395 ); 396 411 char *name ///< timer name to mark 412 ); 413 414 /** Frees all memory associated with all timers and returns the expended time. 415 * 416 * @return psF64: The maximum time expended. 417 */ 397 418 psF64 psTimerStop(void); 398 419 -
trunk/psLib/src/mathtypes/psVector.c
r5064 r5087 9 9 * @author Robert DeSonia, MHPCC 10 10 * 11 * @version $Revision: 1.5 2$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-09- 16 23:56:51 $11 * @version $Revision: 1.53 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-09-21 21:37:21 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 745 745 } 746 746 747 747 #define FUNC_MACRO_VECTOR_CREATE(TYPE) \ 748 static psVector *vectorCreate##TYPE(double lower, double upper, double delta) \ 749 { \ 750 \ 751 int nBin = (upper - lower) / delta; \ 752 psVector *vec = psVectorAlloc(nBin, PS_TYPE_##TYPE); \ 753 for (int i = 0; i < nBin; i++) \ 754 { \ 755 vec->data.TYPE[i] = lower + (i * delta); \ 756 } \ 757 return vec; \ 758 } \ 759 760 FUNC_MACRO_VECTOR_CREATE(S8) 761 FUNC_MACRO_VECTOR_CREATE(S16) 762 FUNC_MACRO_VECTOR_CREATE(S32) 763 FUNC_MACRO_VECTOR_CREATE(S64) 764 FUNC_MACRO_VECTOR_CREATE(U8) 765 FUNC_MACRO_VECTOR_CREATE(U16) 766 FUNC_MACRO_VECTOR_CREATE(U32) 767 FUNC_MACRO_VECTOR_CREATE(U64) 768 FUNC_MACRO_VECTOR_CREATE(F32) 769 FUNC_MACRO_VECTOR_CREATE(F64) 770 771 psVector *psVectorCreate (double lower, 772 double upper, 773 double delta, 774 psElemType type) 775 { 776 psVector *out; 777 switch (type) { 778 case PS_TYPE_S8: 779 out = vectorCreateS8( lower, upper, delta); 780 break; 781 case PS_TYPE_S16: 782 out = vectorCreateS16(lower, upper, delta); 783 break; 784 case PS_TYPE_S32: 785 out = vectorCreateS32(lower, upper, delta); 786 break; 787 case PS_TYPE_S64: 788 out = vectorCreateS64(lower, upper, delta); 789 break; 790 case PS_TYPE_U8: 791 out = vectorCreateU8(lower, upper, delta); 792 break; 793 case PS_TYPE_U16: 794 out = vectorCreateU16(lower, upper, delta); 795 break; 796 case PS_TYPE_U32: 797 out = vectorCreateU32(lower, upper, delta); 798 break; 799 case PS_TYPE_U64: 800 out = vectorCreateU64(lower, upper, delta); 801 break; 802 case PS_TYPE_F32: 803 out = vectorCreateF32(lower, upper, delta); 804 break; 805 case PS_TYPE_F64: 806 out = vectorCreateF64(lower, upper, delta); 807 break; 808 default: 809 psError(PS_ERR_BAD_PARAMETER_TYPE, true, "Invalid psType for Vector Create\n"); 810 } 811 /* 812 for (int i = 0; i < nBin; i++) { 813 out->data.F64[i] = lower + i * delta; 814 } 815 */ 816 return (out); 817 } 818 -
trunk/psLib/src/mathtypes/psVector.h
r5064 r5087 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.4 5$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-09- 16 23:56:51 $13 * @version $Revision: 1.46 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-09-21 21:37:21 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 208 208 ); 209 209 210 /** Creates a new vector, or reallocates the provided vector if input is not NULL. 211 * 212 * The created vector consists of the data range starting at lower, running to upper, 213 * in steps of delta. The upper-end value is exclusive; the sequence is equivalent to 214 * for (x = lower; x <= upper - 1; x += delta). 215 * 216 * @return psVector*: the newly created psVector 217 */ 218 psVector *psVectorCreate ( 219 double lower, ///< lower bound 220 double upper, ///< upper bound 221 double delta, ///< size of increment 222 psElemType type ///< type of vector to create 223 ); 224 210 225 /// @} 211 226 -
trunk/psLib/test/mathtypes/tst_psVector.c
r4887 r5087 14 14 * @author Ross Harman, MHPCC 15 15 * 16 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $17 * @date $Date: 2005-0 8-26 23:01:17$16 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 17 * @date $Date: 2005-09-21 21:37:21 $ 18 18 * 19 19 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 28 28 static psS32 testVectorExtend(void); 29 29 static psS32 testVectorInit(void); 30 static psS32 testVectorCreate(void); 30 31 31 32 testDescription tests[] = { … … 34 35 {testVectorExtend,-3,"psVectorExtend",0,false}, 35 36 {testVectorInit,-4,"psVectorInit",0,false}, 37 {testVectorCreate,-5,"psVectorCreate",0,false}, 36 38 {NULL} 37 39 }; … … 357 359 return 0; 358 360 } 361 362 psS32 testVectorCreate(void) 363 { 364 psVector *test = NULL; 365 psVector *test2 = NULL; 366 367 test = psVectorCreate(0.0, 10.0, 1.0, PS_TYPE_S32); 368 test2 = psVectorCreate(0.0, 5.0, 0.5, PS_TYPE_F32); 369 370 for (int i = 0; i < 10; i++) { 371 if (test->data.S32[i] != i) { 372 fprintf(stderr, "Vector data does not match. i = %d, data=%d\n", i, test->data.S32[i]); 373 return 1; 374 } 375 if (test2->data.F32[i] != i*0.5) { 376 fprintf(stderr, "Vector data does not match. i = %d, data=%f\n", i, test->data.F32[i]); 377 return 1; 378 } 379 } 380 psFree(test); 381 psFree(test2); 382 return 0; 383 } 384 -
trunk/psLib/test/mathtypes/verified/tst_psVector.stderr
r4887 r5087 49 49 ---> TESTPOINT PASSED (psVector{psVectorInit} | tst_psVector.c) 50 50 51 /***************************** TESTPOINT ******************************************\ 52 * TestFile: tst_psVector.c * 53 * TestPoint: psVector{psVectorCreate} * 54 * TestType: Positive * 55 \**********************************************************************************/ 56 57 58 ---> TESTPOINT PASSED (psVector{psVectorCreate} | tst_psVector.c) 59
Note:
See TracChangeset
for help on using the changeset viewer.
