- Timestamp:
- May 25, 2018, 1:37:38 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
- Children:
- 58e822a
- Parents:
- 13073be (diff), 34ca532 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src/tests
- Files:
-
- 4 added
- 23 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
src/tests/.expect/io2.txt
r13073be r8dbedfc 1 9 6 28 0 7 1 22 1 2 33 1234 1235 6 opening delimiters7 x (1 x [2 x {3 x =4 x $5 x £6 x ¥7 x ¡8 x ¿9 x «108 9 closing delimiters10 1, x 2. x 3; x 4! x 5? x 6% x 7¢ x 8» x 9) x 10] x 11} x11 12 opening/closing delimiters13 x`1`x'2'x"3"x:4:x 5 x 6 x14 715 x16 817 x18 919 x20 1021 x22 23 override opening/closing delimiters24 x ( 1 ) x 2 , x 3 :x: 425 26 1 input bacis types 27 2 -
src/tests/.expect/math1.x64.txt
r13073be r8dbedfc 12 12 \ 16 256 13 13 \ 912673 256 64 -64 0.015625 -0.015625 18.3791736799526 0.264715-1.1922i 14 log:0 0 0 0.346574+0.785398i 0.346573590279973+0.785398163397448i 0.346573590279972655+0.78539816339744831i15 log2:3 3 316 log10:2 2 217 log1p:0.693147 0.693147180559945 0.69314718055994530918 ilogb:0 0 019 logb:3 3 320 sqrt:1 1 1 1.09868+0.45509i 1.09868411346781+0.455089860562227i 1.09868411346780997+0.455089860562227341i21 cbrt:3 3 322 hypot:1.41421 1.4142135623731 1.41421356237309505 -
src/tests/.expect/math1.x86.txt
r13073be r8dbedfc 12 12 \ 16 256 13 13 \ 912673 256 64 -64 0.015625 -0.015625 18.3791736799526 0.264715-1.1922i 14 log:0 0 0 0.346574+0.785398i 0.346573590279973+0.785398163397448i 0.346573590279972655+0.78539816339744831i15 log2:3 3 316 log10:2 2 217 log1p:0.693147 0.693147180559945 0.69314718055994530918 ilogb:0 0 019 logb:3 3 320 sqrt:1 1 1 1.09868+0.45509i 1.09868411346781+0.455089860562227i 1.09868411346780997+0.455089860562227341i21 cbrt:3 3 322 hypot:1.41421 1.4142135623731 1.41421356237309505 -
src/tests/.expect/math2.x64.txt
r13073be r8dbedfc 1 log:0 0 0 0.346574+0.785398i 0.346573590279973+0.785398163397448i 0.346573590279972655+0.78539816339744831i 2 log2:3 3 3 3 log10:2 2 2 4 log1p:0.693147 0.693147180559945 0.693147180559945309 5 ilogb:0 0 0 6 logb:3 3 3 7 sqrt:1 1 1 1.09868+0.45509i 1.09868411346781+0.455089860562227i 1.09868411346780997+0.455089860562227341i 8 cbrt:3 3 3 9 hypot:1.41421 1.4142135623731 1.41421356237309505 1 10 sin:0.841471 0.841470984807897 0.841470984807896507 1.29846+0.634964i 1.29845758141598+0.634963914784736i 1.29845758141597729+0.634963914784736108i 2 11 cos:0.540302 0.54030230586814 0.540302305868139717 0.83373-0.988898i 0.833730025131149-0.988897705762865i 0.833730025131149049-0.988897705762865096i … … 6 15 atan:0.785398 0.785398163397448 0.78539816339744831 1.01722+0.402359i 1.01722196789785+0.402359478108525i 1.01722196789785137+0.402359478108525094i 7 16 atan2:0.785398 0.785398163397448 0.78539816339744831 atan:0.785398 0.785398163397448 0.78539816339744831 8 sinh:1.1752 1.1752011936438 1.17520119364380146 0.634964+1.29846i 0.634963914784736+1.29845758141598i 0.634963914784736108+1.29845758141597729i9 cosh:1.54308 1.54308063481524 1.54308063481524378 0.83373+0.988898i 0.833730025131149+0.988897705762865i 0.833730025131149049+0.988897705762865096i10 tanh:0.761594 0.761594155955765 0.761594155955764888 1.08392+0.271753i 1.08392332733869+0.271752585319512i 1.08392332733869454+0.271752585319511717i11 acosh:0 0 0 1.06128+0.904557i 1.06127506190504+0.904556894302381i 1.06127506190503565+0.904556894302381364i12 asinh:0.881374 0.881373587019543 0.881373587019543025 1.06128+0.666239i 1.06127506190504+0.666239432492515i 1.06127506190503565+0.666239432492515255i13 atanh:inf inf inf 0.402359+1.01722i 0.402359478108525+1.01722196789785i 0.402359478108525094+1.01722196789785137i14 erf:0.842701 0.842700792949715 0.84270079294971486915 erfc:0.157299 0.157299207050285 0.15729920705028513116 lgamma:1.79176 1.79175946922805 1.79175946922805517 lgamma:1.79176 1 1.79175946922805 1 1.791759469228055 118 tgamma:6 6 6 -
src/tests/.expect/math2.x86.txt
r13073be r8dbedfc 1 log:0 0 0 0.346574+0.785398i 0.346573590279973+0.785398163397448i 0.346573590279972655+0.78539816339744831i 2 log2:3 3 3 3 log10:2 2 2 4 log1p:0.693147 0.693147180559945 0.693147180559945309 5 ilogb:0 0 0 6 logb:3 3 3 7 sqrt:1 1 1 1.09868+0.45509i 1.09868411346781+0.455089860562227i 1.09868411346780997+0.455089860562227341i 8 cbrt:3 3 3 9 hypot:1.41421 1.4142135623731 1.41421356237309505 1 10 sin:0.841471 0.841470984807897 0.841470984807896507 1.29846+0.634964i 1.29845758141598+0.634963914784736i 1.29845758141597729+0.634963914784736108i 2 11 cos:0.540302 0.54030230586814 0.540302305868139717 0.83373-0.988898i 0.833730025131149-0.988897705762865i 0.833730025131149049-0.988897705762865096i … … 6 15 atan:0.785398 0.785398163397448 0.78539816339744831 1.01722+0.402359i 1.01722196789785+0.402359478108525i 1.01722196789785137+0.402359478108525094i 7 16 atan2:0.785398 0.785398163397448 0.78539816339744831 atan:0.785398 0.785398163397448 0.78539816339744831 8 sinh:1.1752 1.1752011936438 1.17520119364380146 0.634964+1.29846i 0.634963914784736+1.29845758141598i 0.634963914784736108+1.29845758141597729i9 cosh:1.54308 1.54308063481524 1.54308063481524378 0.83373+0.988898i 0.833730025131149+0.988897705762865i 0.833730025131149049+0.988897705762865096i10 tanh:0.761594 0.761594155955765 0.761594155955764888 1.08392+0.271753i 1.08392332733869+0.271752585319512i 1.08392332733869454+0.271752585319511717i11 acosh:0 0 0 1.06128+0.904557i 1.06127506190504+0.904556894302381i 1.06127506190503565+0.904556894302381364i12 asinh:0.881374 0.881373587019543 0.881373587019543025 1.06128+0.666239i 1.06127506190504+0.666239432492515i 1.06127506190503565+0.666239432492515255i13 atanh:inf inf inf 0.402359+1.01722i 0.402359478108525+1.01722196789785i 0.402359478108525094+1.01722196789785137i14 erf:0.842701 0.842700792949715 0.84270079294971486915 erfc:0.157299 0.157299207050285 0.15729920705028513116 lgamma:1.79176 1.79175946922805 1.79175946922805517 lgamma:1.79176 1 1.79175946922805 1 1.791759469228055 118 tgamma:6 6 6 -
src/tests/.expect/math3.x64.txt
r13073be r8dbedfc 1 floor:1 1 1 2 ceil:2 2 2 3 trunc:3 3 3 4 rint:2 2 2 5 rint:2 2 2 6 rint:2 2 2 7 lrint:2 2 2 8 llrint:2 2 2 9 nearbyint:4 4 4 10 round:2 2 2 11 round:2 2 2 12 round:2 2 2 13 lround:2 2 2 14 llround:2 2 2 15 copysign:-1 -1 -1 16 frexp:0.5 3 0.5 3 0.5 3 17 ldexp:8 8 8 18 modf:2 0.3 2 0.3 2 0.3 19 modf:2, 0.3 2, 0.3 2, 0.3 20 nextafter:2 2 2 21 nexttoward:2 2 2 22 scalbn:16 16 16 23 scalbln:16 16 16 1 sinh:1.1752 1.1752011936438 1.17520119364380146 0.634964+1.29846i 0.634963914784736+1.29845758141598i 0.634963914784736108+1.29845758141597729i 2 cosh:1.54308 1.54308063481524 1.54308063481524378 0.83373+0.988898i 0.833730025131149+0.988897705762865i 0.833730025131149049+0.988897705762865096i 3 tanh:0.761594 0.761594155955765 0.761594155955764888 1.08392+0.271753i 1.08392332733869+0.271752585319512i 1.08392332733869454+0.271752585319511717i 4 acosh:0 0 0 1.06128+0.904557i 1.06127506190504+0.904556894302381i 1.06127506190503565+0.904556894302381364i 5 asinh:0.881374 0.881373587019543 0.881373587019543025 1.06128+0.666239i 1.06127506190504+0.666239432492515i 1.06127506190503565+0.666239432492515255i 6 atanh:inf inf inf 0.402359+1.01722i 0.402359478108525+1.01722196789785i 0.402359478108525094+1.01722196789785137i 7 erf:0.842701 0.842700792949715 0.842700792949714869 8 erfc:0.157299 0.157299207050285 0.157299207050285131 9 lgamma:1.79176 1.79175946922805 1.791759469228055 10 lgamma:1.79176 1 1.79175946922805 1 1.791759469228055 1 11 tgamma:6 6 6 -
src/tests/.expect/math3.x86.txt
r13073be r8dbedfc 1 floor:1 1 1 2 ceil:2 2 2 3 trunc:3 3 3 4 rint:2 2 2 5 rint:2 2 2 6 rint:2 2 2 7 lrint:2 2 2 8 llrint:2 2 2 9 nearbyint:4 4 4 10 round:2 2 2 11 round:2 2 2 12 round:2 2 2 13 lround:2 2 2 14 llround:2 2 2 15 copysign:-1 -1 -1 16 frexp:0.5 3 0.5 3 0.5 3 17 ldexp:8 8 8 18 modf:2 0.3 2 0.3 2 0.3 19 modf:2, 0.3 2, 0.3 2, 0.3 20 nextafter:2 2 2 21 nexttoward:2 2 2 22 scalbn:16 16 16 23 scalbln:16 16 16 1 sinh:1.1752 1.1752011936438 1.17520119364380146 0.634964+1.29846i 0.634963914784736+1.29845758141598i 0.634963914784736108+1.29845758141597729i 2 cosh:1.54308 1.54308063481524 1.54308063481524378 0.83373+0.988898i 0.833730025131149+0.988897705762865i 0.833730025131149049+0.988897705762865096i 3 tanh:0.761594 0.761594155955765 0.761594155955764888 1.08392+0.271753i 1.08392332733869+0.271752585319512i 1.08392332733869454+0.271752585319511717i 4 acosh:0 0 0 1.06128+0.904557i 1.06127506190504+0.904556894302381i 1.06127506190503565+0.904556894302381364i 5 asinh:0.881374 0.881373587019543 0.881373587019543025 1.06128+0.666239i 1.06127506190504+0.666239432492515i 1.06127506190503565+0.666239432492515255i 6 atanh:inf inf inf 0.402359+1.01722i 0.402359478108525+1.01722196789785i 0.402359478108525094+1.01722196789785137i 7 erf:0.842701 0.842700792949715 0.842700792949714869 8 erfc:0.157299 0.157299207050285 0.157299207050285131 9 lgamma:1.79176 1.79175946922805 1.791759469228055 10 lgamma:1.79176 1 1.79175946922805 1 1.791759469228055 1 11 tgamma:6 6 6 -
src/tests/concurrent/coroutineYield.c
r13073be r8dbedfc 3 3 #include <stdlib> 4 4 #include <thread> 5 #include <time> 6 7 #ifndef PREEMPTION_RATE 8 #define PREEMPTION_RATE 10`ms 9 #endif 10 11 Duration default_preemption() { 12 return PREEMPTION_RATE; 13 } 5 14 6 15 #ifdef LONG_TEST -
src/tests/concurrent/examples/matrixSum.c
r13073be r8dbedfc 11 11 // Created On : Mon Oct 9 08:29:28 2017 12 12 // Last Modified By : Peter A. Buhr 13 // Last Modified On : Tue Dec 5 22:56:46 201714 // Update Count : 413 // Last Modified On : Fri May 25 09:34:27 2018 14 // Update Count : 10 15 15 // 16 16 … … 20 20 21 21 thread Adder { 22 int * row, cols, *subtotal; // communication22 int * row, cols, & subtotal; // communication 23 23 }; 24 24 25 25 void ?{}( Adder & adder, int row[], int cols, int & subtotal ) { 26 adder.row = row; 27 adder.cols = cols; 28 adder.subtotal = &subtotal; 26 adder.[ row, cols ] = [ row, cols ]; // expression disallowed in multi-member access 27 &adder.subtotal = &subtotal; 29 28 } 30 29 31 void main( Adder & adder ) with( adder ) { 32 *subtotal = 0;33 34 *subtotal += row[c];35 30 void main( Adder & adder ) with( adder ) { // thread starts here 31 subtotal = 0; 32 for ( int c = 0; c < cols; c += 1 ) { 33 subtotal += row[c]; 34 } // for 36 35 } 37 36 38 37 int main() { 39 40 41 processor p; // extrakernel thread38 const int rows = 10, cols = 1000; 39 int matrix[rows][cols], subtotals[rows], total = 0; 40 processor p; // add kernel thread 42 41 43 42 for ( int r = 0; r < rows; r += 1 ) { 44 43 for ( int c = 0; c < cols; c += 1 ) { 45 44 matrix[r][c] = 1; 46 45 } // for 47 48 49 46 } // for 47 Adder * adders[rows]; 48 for ( int r = 0; r < rows; r += 1 ) { // start threads to sum rows 50 49 adders[r] = &(*malloc()){ matrix[r], cols, subtotals[r] }; 51 50 // adders[r] = new( matrix[r], cols, &subtotals[r] ); 52 53 51 } // for 52 for ( int r = 0; r < rows; r += 1 ) { // wait for threads to finish 54 53 delete( adders[r] ); 55 54 total += subtotals[r]; // total subtotals 56 57 55 } // for 56 sout | total | endl; 58 57 } 59 58 -
src/tests/concurrent/signal/block.c
r13073be r8dbedfc 14 14 #include <time> 15 15 16 #ifdef LONG_TEST17 static const unsigned long N = 150_000ul;18 #else19 static const unsigned long N = 5_000ul;20 #endif21 22 16 #ifndef PREEMPTION_RATE 23 17 #define PREEMPTION_RATE 10`ms … … 27 21 return PREEMPTION_RATE; 28 22 } 23 24 #ifdef LONG_TEST 25 static const unsigned long N = 150_000ul; 26 #else 27 static const unsigned long N = 5_000ul; 28 #endif 29 29 30 30 enum state_t { WAITED, SIGNAL, BARGE }; -
src/tests/concurrent/signal/disjoint.c
r13073be r8dbedfc 4 4 #include <thread> 5 5 #include <time> 6 7 #ifdef LONG_TEST8 static const unsigned long N = 300_000ul;9 #else10 static const unsigned long N = 10_000ul;11 #endif12 6 13 7 #ifndef PREEMPTION_RATE … … 18 12 return PREEMPTION_RATE; 19 13 } 14 15 #ifdef LONG_TEST 16 static const unsigned long N = 300_000ul; 17 #else 18 static const unsigned long N = 10_000ul; 19 #endif 20 20 21 21 enum state_t { WAIT, SIGNAL, BARGE }; -
src/tests/concurrent/signal/wait.c
r13073be r8dbedfc 12 12 #include <time> 13 13 14 #ifdef LONG_TEST15 static const unsigned long N = 375_000ul;16 #else17 static const unsigned long N = 2_500ul;18 #endif19 20 14 #ifndef PREEMPTION_RATE 21 15 #define PREEMPTION_RATE 10`ms … … 25 19 return PREEMPTION_RATE; 26 20 } 21 22 #ifdef LONG_TEST 23 static const unsigned long N = 375_000ul; 24 #else 25 static const unsigned long N = 2_500ul; 26 #endif 27 27 28 28 monitor global_t {}; -
src/tests/io2.c
r13073be r8dbedfc 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // io .c --7 // io2.c -- 8 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Wed Mar 2 16:56:02 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jan 26 15:19:34201813 // Update Count : 10 012 // Last Modified On : Thu May 24 21:17:41 2018 13 // Update Count : 103 14 14 // 15 15 … … 37 37 enum { size = 10 }; 38 38 char s1[size], s2[size]; 39 40 int x = 3, y = 5, z = 7;41 sout | x * 3 | y + 1 | z << 2 | x == y | (x | y) | (x || y) | (x > z ? 1 : 2) | endl;42 sout | 1 | 2 | 3 | endl;43 sout | '1' | '2' | '3' | endl;44 sout | 1 | "" | 2 | "" | 3 | endl;45 sout | endl;46 47 sout | "opening delimiters" | endl;48 sout49 | "x (" | 150 | "x [" | 251 | "x {" | 352 | "x =" | 453 | "x $" | 554 | "x £" | 655 | "x ¥" | 756 | "x ¡" | 857 | "x ¿" | 958 | "x «" | 1059 | endl | endl;60 61 sout | "closing delimiters" | endl;62 sout63 | 1 | ", x"64 | 2 | ". x"65 | 3 | "; x"66 | 4 | "! x"67 | 5 | "? x"68 | 6 | "% x"69 | 7 | "¢ x"70 | 8 | "» x"71 | 9 | ") x"72 | 10 | "] x"73 | 11 | "} x"74 | endl | endl;75 76 sout | "opening/closing delimiters" | endl;77 sout78 | "x`" | 1 | "`x'" | 279 | "'x\"" | 3 | "\"x:" | 480 | ":x " | 5 | " x\t" | 681 | "\tx\f" | 7 | "\fx\v" | 882 | "\vx\n" | 9 | "\nx\r" | 1083 | "\rx"84 | endl | endl;85 86 sout | "override opening/closing delimiters" | endl;87 sout | "x ( " | 1 | " ) x" | 2 | " , x" | 3 | " :x: " | 4 | endl;88 sout | endl;89 39 90 40 ifstream in = { "io.data" }; // create / open file … … 181 131 // Local Variables: // 182 132 // tab-width: 4 // 183 // compile-command: "cfa io .c" //133 // compile-command: "cfa io2.c" // 184 134 // End: // -
src/tests/math1.c
r13073be r8dbedfc 10 10 // Created On : Fri Apr 22 14:59:21 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Aug 11 15:16:41 201713 // Update Count : 8 412 // Last Modified On : Thu May 24 21:01:15 2018 13 // Update Count : 85 14 14 // 15 15 … … 48 48 sout | "\\" | b | b \ e | endl; 49 49 sout | "\\" | 'a' \ 3u | 2 \ 8u | 4 \ 3u | -4 \ 3u | 4 \ -3 | -4 \ -3 | 4.0 \ 2.1 | (1.0f+2.0fi) \ (3.0f+2.0fi) | endl; 50 51 //---------------------- Logarithm ----------------------52 53 sout | "log:" | log( 1.0F ) | log( 1.0D ) | log( 1.0L ) | log( 1.0F+1.0FI ) | log( 1.0D+1.0DI ) | log( 1.0DL+1.0LI ) | endl;54 sout | "log2:" | log2( 8.0F ) | log2( 8.0D ) | log2( 8.0L ) | endl;55 sout | "log10:" | log10( 100.0F ) | log10( 100.0D ) | log10( 100.0L ) | endl;56 sout | "log1p:" | log1p( 1.0F ) | log1p( 1.0D ) | log1p( 1.0L ) | endl;57 sout | "ilogb:" | ilogb( 1.0F ) | ilogb( 1.0D ) | ilogb( 1.0L ) | endl;58 sout | "logb:" | logb( 8.0F ) | logb( 8.0D ) | logb( 8.0L ) | endl;59 60 sout | "sqrt:" | sqrt( 1.0F ) | sqrt( 1.0D ) | sqrt( 1.0L ) | sqrt( 1.0F+1.0FI ) | sqrt( 1.0D+1.0DI ) | sqrt( 1.0DL+1.0LI ) | endl;61 sout | "cbrt:" | cbrt( 27.0F ) | cbrt( 27.0D ) | cbrt( 27.0L ) | endl;62 sout | "hypot:" | hypot( 1.0F, -1.0F ) | hypot( 1.0D, -1.0D ) | hypot( 1.0L, -1.0L ) | endl;63 50 } // main 64 51 -
src/tests/math2.c
r13073be r8dbedfc 10 10 // Created On : Fri Apr 22 14:59:21 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Aug 11 15:40:04 201713 // Update Count : 8 112 // Last Modified On : Thu May 24 21:06:10 2018 13 // Update Count : 82 14 14 // 15 15 … … 21 21 double d; 22 22 long double l; 23 24 //---------------------- Logarithm ---------------------- 25 26 sout | "log:" | log( 1.0F ) | log( 1.0D ) | log( 1.0L ) | log( 1.0F+1.0FI ) | log( 1.0D+1.0DI ) | log( 1.0DL+1.0LI ) | endl; 27 sout | "log2:" | log2( 8.0F ) | log2( 8.0D ) | log2( 8.0L ) | endl; 28 sout | "log10:" | log10( 100.0F ) | log10( 100.0D ) | log10( 100.0L ) | endl; 29 sout | "log1p:" | log1p( 1.0F ) | log1p( 1.0D ) | log1p( 1.0L ) | endl; 30 sout | "ilogb:" | ilogb( 1.0F ) | ilogb( 1.0D ) | ilogb( 1.0L ) | endl; 31 sout | "logb:" | logb( 8.0F ) | logb( 8.0D ) | logb( 8.0L ) | endl; 32 33 sout | "sqrt:" | sqrt( 1.0F ) | sqrt( 1.0D ) | sqrt( 1.0L ) | sqrt( 1.0F+1.0FI ) | sqrt( 1.0D+1.0DI ) | sqrt( 1.0DL+1.0LI ) | endl; 34 sout | "cbrt:" | cbrt( 27.0F ) | cbrt( 27.0D ) | cbrt( 27.0L ) | endl; 35 sout | "hypot:" | hypot( 1.0F, -1.0F ) | hypot( 1.0D, -1.0D ) | hypot( 1.0L, -1.0L ) | endl; 23 36 24 37 //---------------------- Trigonometric ---------------------- … … 32 45 sout | "atan2:" | atan2( 1.0F, 1.0F ) | atan2( 1.0D, 1.0D ) | atan2( 1.0L, 1.0L ); 33 46 sout | "atan:" | atan( 1.0F, 1.0F ) | atan( 1.0D, 1.0D ) | atan( 1.0L, 1.0L ) | endl; 34 35 //---------------------- Hyperbolic ----------------------36 37 sout | "sinh:" | sinh( 1.0F ) | sinh( 1.0D ) | sinh( 1.0L ) | sinh( 1.0F+1.0FI ) | sinh( 1.0D+1.0DI ) | sinh( 1.0DL+1.0LI ) | endl;38 sout | "cosh:" | cosh( 1.0F ) | cosh( 1.0D ) | cosh( 1.0L ) | cosh( 1.0F+1.0FI ) | cosh( 1.0D+1.0DI ) | cosh( 1.0DL+1.0LI ) | endl;39 sout | "tanh:" | tanh( 1.0F ) | tanh( 1.0D ) | tanh( 1.0L ) | tanh( 1.0F+1.0FI ) | tanh( 1.0D+1.0DI ) | tanh( 1.0DL+1.0LI ) | endl;40 sout | "acosh:" | acosh( 1.0F ) | acosh( 1.0D ) | acosh( 1.0L ) | acosh( 1.0F+1.0FI ) | acosh( 1.0D+1.0DI ) | acosh( 1.0DL+1.0LI ) | endl;41 sout | "asinh:" | asinh( 1.0F ) | asinh( 1.0D ) | asinh( 1.0L ) | asinh( 1.0F+1.0FI ) | asinh( 1.0D+1.0DI ) | asinh( 1.0DL+1.0LI ) | endl;42 sout | "atanh:" | atanh( 1.0F ) | atanh( 1.0D ) | atanh( 1.0L ) | atanh( 1.0F+1.0FI ) | atanh( 1.0D+1.0DI ) | atanh( 1.0DL+1.0LI ) | endl;43 44 //---------------------- Error / Gamma ----------------------45 46 sout | "erf:" | erf( 1.0F ) | erf( 1.0D ) | erf( 1.0L ) | endl;47 sout | "erfc:" | erfc( 1.0F ) | erfc( 1.0D ) | erfc( 1.0L ) | endl;48 sout | "lgamma:" | lgamma( 4.0F ) | lgamma( 4.0D ) | lgamma( 4.0L ) | endl;49 int sign;50 f = lgamma( 4.0F, &sign );51 sout | "lgamma:" | f | sign;52 d = lgamma( 4.0D, &sign );53 sout | d | sign;54 l = lgamma( 4.0L, &sign );55 sout | l | sign | endl;56 sout | "tgamma:" | tgamma( 4.0F ) | tgamma( 4.0D ) | tgamma( 4.0L ) | endl;57 47 } // main 58 48 -
src/tests/math3.c
r13073be r8dbedfc 10 10 // Created On : Fri Apr 22 14:59:21 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Aug 11 15:40:03 201713 // Update Count : 8 112 // Last Modified On : Thu May 24 21:06:12 2018 13 // Update Count : 82 14 14 // 15 15 … … 22 22 long double l; 23 23 24 //---------------------- Nearest Integer----------------------24 //---------------------- Hyperbolic ---------------------- 25 25 26 sout | "floor:" | floor( 1.2F ) | floor( 1.2D ) | floor( 1.2L ) | endl; 27 sout | "ceil:" | ceil( 1.6F ) | ceil( 1.6D ) | ceil( 1.6L ) | endl; 28 sout | "trunc:" | trunc( 3.5F ) | trunc( 3.5D ) | trunc( 3.5L ) | endl; 29 sout | "rint:" | (float)rint( 1.5F ) | (double)rint( 1.5D ) | (long double)rint( 1.5L ) | endl; 30 sout | "rint:" | (long int)rint( 1.5F ) | (long int)rint( 1.5D ) | (long int)rint( 1.5L ) | endl; 31 sout | "rint:" | (long long int)rint( 1.5F ) | (long long int)rint( 1.5D ) | (long long int)rint( 1.5L ) | endl; 32 sout | "lrint:" | lrint( 1.5F ) | lrint( 1.5D ) | lrint( 1.5L ) | endl; 33 sout | "llrint:" | llrint( 1.5F ) | llrint( 1.5D ) | llrint( 1.5L ) | endl; 34 sout | "nearbyint:" | nearbyint( 3.5F ) | nearbyint( 3.5D ) | nearbyint( 3.5L ) | endl; 35 sout | "round:" | (float)round( 1.5F ) | (double)round( 1.5D ) | (long double)round( 1.5L ) | endl; 36 sout | "round:" | (long int)round( 1.5F ) | (long int)round( 1.5D ) | (long int)round( 1.5L ) | endl; 37 sout | "round:" | (long long int)round( 1.5F ) | (long long int)round( 1.5D ) | (long long int)round( 1.5L ) | endl; 38 sout | "lround:" | lround( 1.5F ) | lround( 1.5D ) | lround( 1.5L ) | endl; 39 sout | "llround:" | llround( 1.5F ) | llround( 1.5D ) | llround( 1.5L ) | endl; 26 sout | "sinh:" | sinh( 1.0F ) | sinh( 1.0D ) | sinh( 1.0L ) | sinh( 1.0F+1.0FI ) | sinh( 1.0D+1.0DI ) | sinh( 1.0DL+1.0LI ) | endl; 27 sout | "cosh:" | cosh( 1.0F ) | cosh( 1.0D ) | cosh( 1.0L ) | cosh( 1.0F+1.0FI ) | cosh( 1.0D+1.0DI ) | cosh( 1.0DL+1.0LI ) | endl; 28 sout | "tanh:" | tanh( 1.0F ) | tanh( 1.0D ) | tanh( 1.0L ) | tanh( 1.0F+1.0FI ) | tanh( 1.0D+1.0DI ) | tanh( 1.0DL+1.0LI ) | endl; 29 sout | "acosh:" | acosh( 1.0F ) | acosh( 1.0D ) | acosh( 1.0L ) | acosh( 1.0F+1.0FI ) | acosh( 1.0D+1.0DI ) | acosh( 1.0DL+1.0LI ) | endl; 30 sout | "asinh:" | asinh( 1.0F ) | asinh( 1.0D ) | asinh( 1.0L ) | asinh( 1.0F+1.0FI ) | asinh( 1.0D+1.0DI ) | asinh( 1.0DL+1.0LI ) | endl; 31 sout | "atanh:" | atanh( 1.0F ) | atanh( 1.0D ) | atanh( 1.0L ) | atanh( 1.0F+1.0FI ) | atanh( 1.0D+1.0DI ) | atanh( 1.0DL+1.0LI ) | endl; 40 32 41 //---------------------- Manipulation----------------------33 //---------------------- Error / Gamma ---------------------- 42 34 43 sout | "copysign:" | copysign( 1.0F, -1.0F ) | copysign( 1.0D, -1.0D ) | copysign( 1.0L, -1.0L ) | endl; 44 int exp; 45 f = frexp( 4.0F, &exp ); 46 sout | "frexp:" | f | exp; 47 d = frexp( 4.0D, &exp ); 48 sout | d | exp; 49 l = frexp( 4.0L, &exp ); 50 sout | l | exp | endl; 51 sout | "ldexp:" | ldexp( 2.0F, 2 ) | ldexp( 2.0D, 2 ) | ldexp( 2.0L, 2 ) | endl; 52 float fi; 53 double di; 54 long double ldi; 55 f = modf( 2.3F, &fi ); 56 sout | "modf:" | fi | f; 57 d = modf( 2.3D, &di ); 58 sout | di | d; 59 l = modf( 2.3L, &ldi ); 60 sout | ldi | l | endl; 61 sout | "modf:" | modf( 2.3F ) | modf( 2.3D ) | modf( 2.3L ) | endl; 62 sout | "nextafter:" | nextafter( 2.0F, 3.0F ) | nextafter( 2.0D, 3.0D ) | nextafter( 2.0L, 3.0L ) | endl; 63 sout | "nexttoward:" | nexttoward( 2.0F, 3.0F ) | nexttoward( 2.0D, 3.0D ) | nexttoward( 2.0L, 3.0L ) | endl; 64 65 sout | "scalbn:" | scalbn( 2.0F, 3 ) | scalbn( 2.0D, 3 ) | scalbn( 2.0L, 3 ) | endl; 66 sout | "scalbln:" | scalbln( 2.0F, 3L ) | scalbln( 2.0D, 3L ) | scalbln( 2.0L, 3L ) | endl; 35 sout | "erf:" | erf( 1.0F ) | erf( 1.0D ) | erf( 1.0L ) | endl; 36 sout | "erfc:" | erfc( 1.0F ) | erfc( 1.0D ) | erfc( 1.0L ) | endl; 37 sout | "lgamma:" | lgamma( 4.0F ) | lgamma( 4.0D ) | lgamma( 4.0L ) | endl; 38 int sign; 39 f = lgamma( 4.0F, &sign ); 40 sout | "lgamma:" | f | sign; 41 d = lgamma( 4.0D, &sign ); 42 sout | d | sign; 43 l = lgamma( 4.0L, &sign ); 44 sout | l | sign | endl; 45 sout | "tgamma:" | tgamma( 4.0F ) | tgamma( 4.0D ) | tgamma( 4.0L ) | endl; 67 46 } // main 68 47 -
src/tests/preempt_longrun/Makefile.am
r13073be r8dbedfc 17 17 repeats=10 18 18 max_time=600 19 preempt=1 _000ul19 preempt=10ul\`ms 20 20 debug=-debug 21 21 -
src/tests/preempt_longrun/Makefile.in
r13073be r8dbedfc 450 450 repeats = 10 451 451 max_time = 600 452 preempt = 1 _000ul452 preempt = 10ul\`ms 453 453 debug = -debug 454 454 REPEAT = ${abs_top_srcdir}/tools/repeat -
src/tests/preempt_longrun/create.c
r13073be r8dbedfc 1 1 #include <kernel> 2 2 #include <thread> 3 4 static const unsigned long N = 60_000ul; 3 #include <time> 5 4 6 5 #ifndef PREEMPTION_RATE 7 # define PREEMPTION_RATE 10`ms6 #error PREEMPTION_RATE not defined in makefile 8 7 #endif 9 8 … … 11 10 return PREEMPTION_RATE; 12 11 } 12 13 static const unsigned long N = 60_000ul; 13 14 14 15 thread worker_t {}; -
src/tests/preempt_longrun/enter.c
r13073be r8dbedfc 2 2 #include <monitor> 3 3 #include <thread> 4 5 static const unsigned long N = 2_100_000ul; 4 #include <time> 6 5 7 6 #ifndef PREEMPTION_RATE 8 # define PREEMPTION_RATE 10`ms7 #error PREEMPTION_RATE not defined in makefile 9 8 #endif 10 9 … … 12 11 return PREEMPTION_RATE; 13 12 } 13 14 static const unsigned long N = 2_100_000ul; 14 15 15 16 monitor mon_t {}; -
src/tests/preempt_longrun/enter3.c
r13073be r8dbedfc 2 2 #include <monitor> 3 3 #include <thread> 4 5 static const unsigned long N = 500_000ul; 4 #include <time> 6 5 7 6 #ifndef PREEMPTION_RATE 8 # define PREEMPTION_RATE 10`ms7 #error PREEMPTION_RATE not defined in makefile 9 8 #endif 10 9 … … 12 11 return PREEMPTION_RATE; 13 12 } 13 14 static const unsigned long N = 500_000ul; 14 15 15 16 monitor mon_t {}; -
src/tests/preempt_longrun/processor.c
r13073be r8dbedfc 1 1 #include <kernel> 2 2 #include <thread> 3 4 static const unsigned long N = 5_000ul; 3 #include <time> 5 4 6 5 #ifndef PREEMPTION_RATE 7 # define PREEMPTION_RATE 10`ms6 #error PREEMPTION_RATE not defined in makefile 8 7 #endif 9 8 … … 11 10 return PREEMPTION_RATE; 12 11 } 12 13 static const unsigned long N = 5_000ul; 13 14 14 15 int main(int argc, char* argv[]) { -
src/tests/preempt_longrun/stack.c
r13073be r8dbedfc 1 1 #include <kernel> 2 #include <math> 2 3 #include <thread> 3 4 #include <math> 4 #include <time> 5 5 6 6 #ifndef PREEMPTION_RATE 7 # define PREEMPTION_RATE 10`ms7 #error PREEMPTION_RATE not defined in makefile 8 8 #endif 9 9 -
src/tests/preempt_longrun/yield.c
r13073be r8dbedfc 1 1 #include <kernel> 2 2 #include <thread> 3 #include <time> 4 5 #ifndef PREEMPTION_RATE 6 #error PREEMPTION_RATE not defined in makefile 7 #endif 8 9 Duration default_preemption() { 10 return PREEMPTION_RATE; 11 } 3 12 4 13 #ifdef LONG_TEST … … 7 16 static const unsigned long N = 325_000ul; 8 17 #endif 9 10 #ifndef PREEMPTION_RATE11 #define PREEMPTION_RATE 10`ms12 #endif13 14 Duration default_preemption() {15 return PREEMPTION_RATE;16 }17 18 18 19 thread worker_t {}; -
src/tests/test.py
r13073be r8dbedfc 78 78 else : 79 79 print('ERROR: No expected file for test %s, ignoring it' % testname, file=sys.stderr) 80 81 # make sure we have at least some test to run82 if not tests :83 print('ERROR: No valid test to run', file=sys.stderr)84 sys.exit(1)85 80 86 81 return tests … … 266 261 tests = validTests( options ) 267 262 263 # make sure we have at least some test to run 264 if not tests : 265 print('ERROR: No valid test to run', file=sys.stderr) 266 sys.exit(1) 267 268 268 269 # sort the test alphabetically for convenience 269 270 tests.sort(key=lambda t: (t.arch if t.arch else '') + t.target())
Note: See TracChangeset
for help on using the changeset viewer.