- Timestamp:
- Jun 15, 2021, 12:28:48 PM (5 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- b51e389c
- Parents:
- 4aba055 (diff), 4f1b8f3f (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:
- tests
- Files:
-
- 4 added
- 5 edited
- 1 moved
-
coroutine/fibonacci.cfa (modified) (1 diff)
-
device/.expect/cpu.txt (added)
-
device/cpu.cfa (added)
-
generator/fibonacci.cfa (modified) (3 diffs)
-
generator/fmtLines.cfa (modified) (1 diff)
-
generator/suspend_then.cfa (modified) (1 diff)
-
unified_locking/fast.cfa (modified) (2 diffs)
-
vector_math/.expect/vec2_ldouble.arm64.txt (added)
-
vector_math/.expect/vec2_ldouble.x64.txt (moved) (moved from tests/vector_math/.expect/vec2_ldouble.txt )
-
vector_math/.expect/vec2_ldouble.x86.txt (added)
Legend:
- Unmodified
- Added
- Removed
-
tests/coroutine/fibonacci.cfa
r4aba055 r2f19e03 31 31 } 32 32 33 int next( Fibonacci & fib ) with( fib ) {34 resume( fib ); // restart last suspend35 return fn;36 }37 38 33 int main() { 39 34 Fibonacci f1, f2; 40 35 for ( 10 ) { // print N Fibonacci values 41 sout | next( f1 ) | next( f2 );36 sout | resume( f1 ).fn | resume( f2 ).fn; 42 37 } // for 43 38 } -
tests/generator/fibonacci.cfa
r4aba055 r2f19e03 8 8 // 9 9 // Author : Thierry Delisle 10 // Created On : Mon Mar 1 16:54:23 202011 // Last Modified By : 12 // Last Modified On : 13 // Update Count : 10 // Created On : Mon Mar 1 16:54:23 2020 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jun 10 21:54:14 2021 13 // Update Count : 3 14 14 // 15 16 #include <fstream.hfa> 15 17 16 18 generator Fib { … … 18 20 }; 19 21 20 void main(Fib & b) with (b) {22 void main(Fib & fib) with (fib) { 21 23 [fn1, fn] = [1, 0]; 22 24 for () { … … 29 31 Fib f1, f2; 30 32 for ( 10 ) { 31 resume( f1 ); 32 resume( f2 );33 printf("%d %d\n", f1.fn, f2.fn);33 resume( f1 ); resume( f2 ); 34 sout | f1.fn | f2.fn; 35 // sout | resume( f1 ).fn | resume( f2 ).fn; // compiler bug 34 36 } 35 36 37 } 37 38 -
tests/generator/fmtLines.cfa
r4aba055 r2f19e03 9 9 // Author : Thierry Delisle 10 10 // Created On : Thu Mar 5 16:09:08 2020 11 // Last Modified By : 12 // Last Modified On : 13 // Update Count : 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jun 10 21:56:22 2021 13 // Update Count : 2 14 14 // 15 15 -
tests/generator/suspend_then.cfa
r4aba055 r2f19e03 9 9 // Author : Peter A. Buhr 10 10 // Created On : Mon Apr 29 12:01:35 2019 11 // Last Modified By : 12 // Last Modified On : 13 // Update Count : 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jun 10 21:55:51 2021 13 // Update Count : 1 14 14 // 15 15 -
tests/unified_locking/fast.cfa
r4aba055 r2f19e03 22 22 uint32_t cs() { 23 23 $thread * me = active_thread(); 24 uint32_t value = (uint32_t)me;24 uint32_t value; 25 25 lock(mo.l); 26 26 { … … 28 28 mo.id = me; 29 29 yield(random(5)); 30 value = ((uint32_t)random()) ^ ((uint32_t)me); 30 31 if(mo.id != me) sout | "Intruder!"; 31 32 mo.sum = tsum + value;
Note:
See TracChangeset
for help on using the changeset viewer.