- Timestamp:
- Jul 26, 2017, 12:19:41 PM (8 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, resolv-new, with_gc
- Children:
- b947fb2
- Parents:
- e0a653d (diff), ea91c42 (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:
-
- 2 deleted
- 24 edited
-
.expect/32/math.txt (modified) (2 diffs)
-
.expect/64/math.txt (modified) (2 diffs)
-
.expect/concurrent/sched-int-barge.txt (deleted)
-
alloc.c (modified) (1 diff)
-
attributes.c (modified) (2 diffs)
-
avltree/avl-private.h (modified) (2 diffs)
-
avltree/avl.h (modified) (2 diffs)
-
gmp.c (modified) (2 diffs)
-
math.c (modified) (3 diffs)
-
maybe.c (modified) (1 diff)
-
preempt_longrun/Makefile.am (modified) (2 diffs)
-
preempt_longrun/Makefile.in (modified) (5 diffs)
-
preempt_longrun/barge.c (deleted)
-
preempt_longrun/create.c (modified) (2 diffs)
-
preempt_longrun/enter.c (modified) (1 diff)
-
preempt_longrun/enter3.c (modified) (1 diff)
-
preempt_longrun/processor.c (modified) (2 diffs)
-
preempt_longrun/yield.c (modified) (2 diffs)
-
result.c (modified) (1 diff)
-
sched-int-barge.c (modified) (5 diffs)
-
sched-int-block.c (modified) (2 diffs)
-
sched-int-disjoint.c (modified) (1 diff)
-
sched-int-wait.c (modified) (2 diffs)
-
test.py (modified) (1 diff)
-
vector/array.h (modified) (2 diffs)
-
vector/vector_int.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/tests/.expect/32/math.txt
re0a653d r33218c6 9 9 exp2:2 2 2 10 10 expm1:1.71828 1.71828182845905 1.71828182845904524 11 pow:1 1 1 0.273957+0.583701i 0.273957253830121+0.583700758758615i 0.273957253830121071+0.583700758758614628i 12 16 256 13 912673 256 64 -64 0.015625 -0.015625 18.3791736799526 0.264715-1.1922i 11 14 log:0 0 0 0.346574+0.785398i 0.346573590279973+0.785398163397448i 0.346573590279972655+0.78539816339744831i 12 15 log2:3 3 3 … … 18 21 cbrt:3 3 3 19 22 hypot:1.41421 1.4142135623731 1.41421356237309505 20 pow:1 1 1 0.273957+0.583701i 0.273957253830121+0.583700758758615i 0.273957253830121071+0.583700758758614628i21 23 sin:0.841471 0.841470984807897 0.841470984807896507 1.29846+0.634964i 1.29845758141598+0.634963914784736i 1.29845758141597729+0.634963914784736108i 22 24 cos:0.540302 0.54030230586814 0.540302305868139717 0.83373-0.988898i 0.833730025131149-0.988897705762865i 0.833730025131149049-0.988897705762865096i -
src/tests/.expect/64/math.txt
re0a653d r33218c6 9 9 exp2:2 2 2 10 10 expm1:1.71828 1.71828182845905 1.71828182845904524 11 pow:1 1 1 0.273957+0.583701i 0.273957253830121+0.583700758758615i 0.273957253830121071+0.583700758758614627i 12 16 256 13 912673 256 64 -64 0.015625 -0.015625 18.3791736799526 0.264715-1.1922i 11 14 log:0 0 0 0.346574+0.785398i 0.346573590279973+0.785398163397448i 0.346573590279972655+0.78539816339744831i 12 15 log2:3 3 3 … … 18 21 cbrt:3 3 3 19 22 hypot:1.41421 1.4142135623731 1.41421356237309505 20 pow:1 1 1 0.273957+0.583701i 0.273957253830121+0.583700758758615i 0.273957253830121071+0.583700758758614628i21 23 sin:0.841471 0.841470984807897 0.841470984807896507 1.29846+0.634964i 1.29845758141598+0.634963914784736i 1.29845758141597729+0.634963914784736108i 22 24 cos:0.540302 0.54030230586814 0.540302305868139717 0.83373-0.988898i 0.833730025131149-0.988897705762865i 0.833730025131149049-0.988897705762865096i -
src/tests/alloc.c
re0a653d r33218c6 10 10 // Created On : Wed Feb 3 07:56:22 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jun 2 15:13:03201713 // Update Count : 31 612 // Last Modified On : Thu Jul 20 16:01:10 2017 13 // Update Count : 318 14 14 // 15 15 16 #include <assert> 17 extern "C" { 16 #include <assert.h> 18 17 #include <malloc.h> // malloc_usable_size 19 18 #include <stdint.h> // uintptr_t 20 19 #include <stdlib.h> // posix_memalign 21 } // extern22 20 #include <fstream> 23 21 #include <stdlib> // access C malloc, realloc -
src/tests/attributes.c
re0a653d r33218c6 1 // -*- Mode: C -*-2 1 // 3 2 // Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo … … 11 10 // Created On : Mon Feb 6 16:07:02 2017 12 11 // Last Modified By : Peter A. Buhr 13 // Last Modified On : Mon Feb 6 16:08:21201714 // Update Count : 212 // Last Modified On : Fri Jul 21 23:05:52 2017 13 // Update Count : 3 15 14 // 16 15 -
src/tests/avltree/avl-private.h
re0a653d r33218c6 1 # ifndef AVL_PRIVATE_H1 #pragma once 2 2 #include "avl.h" 3 3 … … 14 14 forall(otype K | Comparable(K), otype V) 15 15 int height(tree(K, V) * t); 16 17 #endif -
src/tests/avltree/avl.h
re0a653d r33218c6 1 #ifndef AVL_TREE_H 2 #define AVL_TREE_H 1 #pragma once 3 2 4 3 extern "C" { … … 104 103 // printTree(t, 0); 105 104 // } 106 107 108 #endif -
src/tests/gmp.c
re0a653d r33218c6 10 10 // Created On : Tue Apr 19 08:55:51 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed May 24 22:05:38201713 // Update Count : 54 012 // Last Modified On : Thu Jul 13 16:35:01 2017 13 // Update Count : 541 14 14 // 15 15 … … 95 95 // Local Variables: // 96 96 // tab-width: 4 // 97 // compile-command: "cfa gmp.c -l gmp" //97 // compile-command: "cfa gmp.c -lgmp" // 98 98 // End: // -
src/tests/math.c
re0a653d r33218c6 10 10 // Created On : Fri Apr 22 14:59:21 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed May 24 13:04:33201713 // Update Count : 7 112 // Last Modified On : Fri Jul 21 10:32:04 2017 13 // Update Count : 73 14 14 // 15 15 … … 46 46 sout | "exp2:" | exp2( 1.0F ) | exp2( 1.0D ) | exp2( 1.0L ) | endl; 47 47 sout | "expm1:" | expm1( 1.0F ) | expm1( 1.0D ) | expm1( 1.0L ) | endl; 48 sout | "pow:" | pow( 1.0F, 1.0F ) | pow( 1.0D, 1.0D ) | pow( 1.0L, 1.0L ) | pow( 1.0F+1.0FI, 1.0F+1.0FI ) | pow( 1.0D+1.0DI, 1.0D+1.0DI ) | pow( 1.0DL+1.0LI, 1.0DL+1.0LI ) | endl; 49 50 int b = 4; 51 unsigned int e = 2; 52 b \= e; 53 sout | b | b \ e | endl; 54 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; 55 56 //---------------------- Logarithm ---------------------- 57 48 58 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; 49 59 sout | "log2:" | log2( 8.0F ) | log2( 8.0D ) | log2( 8.0L ) | endl; … … 53 63 sout | "logb:" | logb( 8.0F ) | logb( 8.0D ) | logb( 8.0L ) | endl; 54 64 55 //---------------------- Power ----------------------56 57 65 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; 58 66 sout | "cbrt:" | cbrt( 27.0F ) | cbrt( 27.0D ) | cbrt( 27.0L ) | endl; 59 67 sout | "hypot:" | hypot( 1.0F, -1.0F ) | hypot( 1.0D, -1.0D ) | hypot( 1.0L, -1.0L ) | endl; 60 sout | "pow:" | pow( 1.0F, 1.0F ) | pow( 1.0D, 1.0D ) | pow( 1.0L, 1.0L ) | pow( 1.0F+1.0FI, 1.0F+1.0FI ) | pow( 1.0D+1.0DI, 1.0D+1.0DI ) | pow( 1.0DL+1.0LI, 1.0DL+1.0LI ) | endl;61 68 62 69 //---------------------- Trigonometric ---------------------- -
src/tests/maybe.c
re0a653d r33218c6 9 9 // Author : Andrew Beach 10 10 // Created On : Thr May 25 16:02:00 2017 11 // Last Modified By : Andrew Beach12 // Last Modified On : Fri May 16 15:43:00201713 // Update Count : 011 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jul 20 15:24:07 2017 13 // Update Count : 1 14 14 // 15 15 16 #include <assert >16 #include <assert.h> 17 17 #include <containers/maybe> 18 18 -
src/tests/preempt_longrun/Makefile.am
re0a653d r33218c6 16 16 17 17 repeats=10 18 max_time= 3018 max_time=600 19 19 preempt=1_000ul 20 20 … … 25 25 CC = @CFA_BINDIR@/@CFA_NAME@ 26 26 27 TESTS = b arge block create disjoint enter enter3 processor stack wait yield27 TESTS = block create disjoint enter enter3 processor stack wait yield 28 28 29 29 .INTERMEDIATE: ${TESTS} 30 30 31 31 all-local: ${TESTS:=.run} 32 33 clean-local: 34 rm -f ${TESTS} 32 35 33 36 % : %.c ${CC} -
src/tests/preempt_longrun/Makefile.in
re0a653d r33218c6 449 449 top_srcdir = @top_srcdir@ 450 450 repeats = 10 451 max_time = 30451 max_time = 600 452 452 preempt = 1_000ul 453 453 REPEAT = ${abs_top_srcdir}/tools/repeat -s 454 454 BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -debug -O2 -DPREEMPTION_RATE=${preempt} 455 TESTS = b arge block create disjoint enter enter3 processor stack wait yield455 TESTS = block create disjoint enter enter3 processor stack wait yield 456 456 all: all-am 457 457 … … 635 635 TEST_LOGS="$$log_list"; \ 636 636 exit $$? 637 barge.log: barge638 @p='barge'; \639 b='barge'; \640 $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \641 --log-file $$b.log --trs-file $$b.trs \642 $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \643 "$$tst" $(AM_TESTS_FD_REDIRECT)644 637 block.log: block 645 638 @p='block'; \ … … 790 783 clean: clean-am 791 784 792 clean-am: clean-generic mostlyclean-am785 clean-am: clean-generic clean-local mostlyclean-am 793 786 794 787 distclean: distclean-am … … 857 850 858 851 .PHONY: all all-am all-local check check-TESTS check-am clean \ 859 clean-generic c scopelist-am ctags-am distclean \852 clean-generic clean-local cscopelist-am ctags-am distclean \ 860 853 distclean-generic distdir dvi dvi-am html html-am info info-am \ 861 854 install install-am install-data install-data-am install-dvi \ … … 875 868 all-local: ${TESTS:=.run} 876 869 870 clean-local: 871 rm -f ${TESTS} 872 877 873 % : %.c ${CC} 878 874 ${AM_V_GEN}${CC} ${CFLAGS} ${<} -o ${@} -
src/tests/preempt_longrun/create.c
re0a653d r33218c6 1 1 #include <kernel> 2 2 #include <thread> 3 4 static const unsigned long N = 2_000ul; 3 5 4 6 #ifndef PREEMPTION_RATE … … 15 17 16 18 int main(int argc, char* argv[]) { 17 for(int i = 0; i < 10_000ul; i++) { 19 processor p; 20 for(int i = 0; i < N; i++) { 18 21 worker_t w[7]; 19 22 } -
src/tests/preempt_longrun/enter.c
re0a653d r33218c6 3 3 #include <thread> 4 4 5 #undef N6 5 static const unsigned long N = 70_000ul; 7 6 -
src/tests/preempt_longrun/enter3.c
re0a653d r33218c6 3 3 #include <thread> 4 4 5 #undef N6 5 static const unsigned long N = 50_000ul; 7 6 -
src/tests/preempt_longrun/processor.c
re0a653d r33218c6 1 1 #include <kernel> 2 2 #include <thread> 3 4 static const unsigned long N = 5_000ul; 3 5 4 6 #ifndef PREEMPTION_RATE … … 15 17 16 18 int main(int argc, char* argv[]) { 17 for(int i = 0; i < 10_000ul; i++) {19 for(int i = 0; i < N; i++) { 18 20 processor p; 19 21 } -
src/tests/preempt_longrun/yield.c
re0a653d r33218c6 1 1 #include <kernel> 2 2 #include <thread> 3 4 static const unsigned long N = 325_000ul; 3 5 4 6 #ifndef PREEMPTION_RATE … … 13 15 14 16 void main(worker_t * this) { 15 for(int i = 0; i < 325_000ul; i++) {17 for(int i = 0; i < N; i++) { 16 18 yield(); 17 19 } -
src/tests/result.c
re0a653d r33218c6 9 9 // Author : Andrew Beach 10 10 // Created On : Thr May 25 16:50:00 2017 11 // Last Modified By : Andrew Beach12 // Last Modified On : Fri Jun 16 15:42:00201713 // Update Count : 011 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jul 20 15:24:12 2017 13 // Update Count : 1 14 14 // 15 15 16 #include <assert >16 #include <assert.h> 17 17 #include <containers/result> 18 18 -
src/tests/sched-int-barge.c
re0a653d r33218c6 5 5 #include <thread> 6 6 7 static const unsigned long N = 50_000ul; 8 9 #ifndef PREEMPTION_RATE 10 #define PREEMPTION_RATE 10_000ul 11 #endif 12 13 unsigned int default_preemption() { 14 return 0; 15 } 7 16 enum state_t { WAIT, SIGNAL, BARGE }; 8 17 … … 10 19 11 20 monitor global_data_t { 12 bool done;21 volatile bool done; 13 22 int counter; 14 23 state_t state; … … 51 60 c->do_wait2 = ((unsigned)rand48()) % (c->do_signal); 52 61 53 //if(c->do_wait1 == c->do_wait2) sout | "Same" | endl;62 if(c->do_wait1 == c->do_wait2) sout | "Same" | endl; 54 63 } 55 64 … … 73 82 } 74 83 75 if( c->counter >= 100_000) c->done = true;84 if( c->counter >= N ) c->done = true; 76 85 return !c->done; 77 86 } … … 89 98 } 90 99 100 static thread_desc * volatile the_threads; 101 91 102 int main(int argc, char* argv[]) { 92 rand48seed(0); 93 processor p; 94 { 95 Threads t[17]; 96 } 103 rand48seed(0); 104 processor p; 105 { 106 Threads t[17]; 107 the_threads = (thread_desc*)t; 108 } 97 109 } -
src/tests/sched-int-block.c
re0a653d r33218c6 5 5 #include <thread> 6 6 7 #ifndef N 8 #define N 10_000 7 #include <time.h> 8 9 static const unsigned long N = 5_000ul; 10 11 #ifndef PREEMPTION_RATE 12 #define PREEMPTION_RATE 10_000ul 9 13 #endif 14 15 unsigned int default_preemption() { 16 return PREEMPTION_RATE; 17 } 10 18 11 19 enum state_t { WAITED, SIGNAL, BARGE }; … … 101 109 102 110 int main(int argc, char* argv[]) { 103 rand48seed( 0);111 rand48seed( time( NULL ) ); 104 112 done = false; 105 113 processor p; -
src/tests/sched-int-disjoint.c
re0a653d r33218c6 4 4 #include <thread> 5 5 6 #ifndef N 7 #define N 10_000 6 static const unsigned long N = 10_000ul; 7 8 #ifndef PREEMPTION_RATE 9 #define PREEMPTION_RATE 10_000ul 8 10 #endif 11 12 unsigned int default_preemption() { 13 return PREEMPTION_RATE; 14 } 9 15 10 16 enum state_t { WAIT, SIGNAL, BARGE }; -
src/tests/sched-int-wait.c
re0a653d r33218c6 5 5 #include <thread> 6 6 7 #ifndef N 8 #define N 10_000 7 static const unsigned long N = 10_000ul; 8 9 #ifndef PREEMPTION_RATE 10 #define PREEMPTION_RATE 10_000ul 9 11 #endif 12 13 unsigned int default_preemption() { 14 return PREEMPTION_RATE; 15 } 10 16 11 17 monitor global_t {}; … … 114 120 int main(int argc, char* argv[]) { 115 121 waiter_left = 4; 116 processor p ;122 processor p[2]; 117 123 sout | "Starting" | endl; 118 124 { -
src/tests/test.py
re0a653d r33218c6 221 221 if retcode == TestResult.SUCCESS: result_txt = "Done" 222 222 elif retcode == TestResult.TIMEOUT: result_txt = "TIMEOUT" 223 else : result_txt = "ERROR "223 else : result_txt = "ERROR code %d" % retcode 224 224 else : 225 225 if retcode == TestResult.SUCCESS: result_txt = "PASSED" 226 226 elif retcode == TestResult.TIMEOUT: result_txt = "TIMEOUT" 227 else : result_txt = "FAILED "227 else : result_txt = "FAILED with code %d" % retcode 228 228 229 229 #print result with error if needed -
src/tests/vector/array.h
re0a653d r33218c6 9 9 // Author : Richard C. Bilson 10 10 // Created On : Wed May 27 17:56:53 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Wed Apr 27 17:26:04 201613 // Update Count : 511 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jul 22 10:04:20 2017 13 // Update Count : 6 14 14 // 15 15 16 #ifndef ARRAY_H 17 #define ARRAY_H 16 #pragma once 18 17 19 18 //#include <iterator> … … 45 44 elt_type * end( array_type * array ); 46 45 47 #endif // ARRAY_H48 49 46 // Local Variables: // 50 47 // tab-width: 4 // -
src/tests/vector/vector_int.h
re0a653d r33218c6 9 9 // Author : Richard C. Bilson 10 10 // Created On : Wed May 27 17:56:53 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Wed Apr 27 17:26:59 201613 // Update Count : 211 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jul 22 10:04:02 2017 13 // Update Count : 4 14 14 // 15 15 16 #ifndef VECTOR_INT_H 17 #define VECTOR_INT_H 16 #pragma once 18 17 19 18 // A flexible array, similar to a C++ vector, that holds integers and can be resized dynamically … … 26 25 27 26 void ?{}( vector_int * ); // allocate vector with default capacity 28 void ?{}( vector_int *, int reserve ); // allocate vector with specified capacity29 void ?{}( vector_int * vec, vector_int other ); // copy constructor27 void ?{}( vector_int *, int reserve ); // allocate vector with specified capacity 28 void ?{}( vector_int * vec, vector_int other ); // copy constructor 30 29 void ^?{}( vector_int * ); // deallocate vector's storage 31 30 … … 36 35 37 36 lvalue int ?[?]( vector_int * vec, int index ); // access to arbitrary element (does not resize) 38 int last( vector_int * vec ); // return last element 39 40 #endif // VECTOR_INT_H 37 int last( vector_int * vec ); // return last element 41 38 42 39 // Local Variables: //
Note:
See TracChangeset
for help on using the changeset viewer.