Next milestone. To help you bite your teeth into the design problem, we ask that for the next milestone (this Friday 9pm) you post on your blogs three programs that you want to demo at the poster session.Program 1: Fibonacci
Code:

Bytecode:

Parallel bytecode:

Output:
1
1
89
Program 2: Loops
Code:

Bytecode:

Parallel bytecode:

Output:
0
1
2
3
4
z is 2
0
-1
-2
-3
-4
z is 3
0
-1
-2
-3
-4
z is 4
0
-1
-2
-3
-4
z is 5
0
-1
-2
-3
-4
z is 6
0
-1
-2
-3
-4
5
Program 3: Merge Sort
Code:

Function dependence graph:

Parallel bytecode:

Output:
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
No comments:
Post a Comment