diff --git a/Checkpoint/arith_gt_float.dat b/Checkpoint/arith_gt_float.dat new file mode 100755 index 0000000..3710028 --- /dev/null +++ b/Checkpoint/arith_gt_float.dat @@ -0,0 +1,3 @@ +funct: arith +gin: x, float, 19 +gin: y, float, 2.5 diff --git a/Checkpoint/arith_gt_float.glsl b/Checkpoint/arith_gt_float.glsl new file mode 100755 index 0000000..c64a684 --- /dev/null +++ b/Checkpoint/arith_gt_float.glsl @@ -0,0 +1,7 @@ +float x; +float y; + +bool arith() +{ + return x > y; +} diff --git a/Checkpoint/arith_gt_float.out b/Checkpoint/arith_gt_float.out new file mode 100755 index 0000000..bbb3397 --- /dev/null +++ b/Checkpoint/arith_gt_float.out @@ -0,0 +1 @@ +Result: -1 diff --git a/Checkpoint/arith_post_dec_int.dat b/Checkpoint/arith_post_dec_int.dat new file mode 100755 index 0000000..2cf86f6 --- /dev/null +++ b/Checkpoint/arith_post_dec_int.dat @@ -0,0 +1,3 @@ +funct: arith +gin: x, int, 10 +gin: y, int, 3 diff --git a/Checkpoint/arith_post_dec_int.glsl b/Checkpoint/arith_post_dec_int.glsl new file mode 100755 index 0000000..edb98cd --- /dev/null +++ b/Checkpoint/arith_post_dec_int.glsl @@ -0,0 +1,8 @@ +int x; +int y; + +int arith() +{ + x--; + return x--; +} diff --git a/Checkpoint/arith_post_dec_int.out b/Checkpoint/arith_post_dec_int.out new file mode 100755 index 0000000..ee120b0 --- /dev/null +++ b/Checkpoint/arith_post_dec_int.out @@ -0,0 +1 @@ +Result: 9 diff --git a/Checkpoint/arith_pre_inc_int.dat b/Checkpoint/arith_pre_inc_int.dat new file mode 100755 index 0000000..2cf86f6 --- /dev/null +++ b/Checkpoint/arith_pre_inc_int.dat @@ -0,0 +1,3 @@ +funct: arith +gin: x, int, 10 +gin: y, int, 3 diff --git a/Checkpoint/arith_pre_inc_int.glsl b/Checkpoint/arith_pre_inc_int.glsl new file mode 100755 index 0000000..4db32b7 --- /dev/null +++ b/Checkpoint/arith_pre_inc_int.glsl @@ -0,0 +1,8 @@ +int x; +int y; + +int arith() +{ + ++x; + return ++x; +} diff --git a/Checkpoint/arith_pre_inc_int.out b/Checkpoint/arith_pre_inc_int.out new file mode 100755 index 0000000..a0b6728 --- /dev/null +++ b/Checkpoint/arith_pre_inc_int.out @@ -0,0 +1 @@ +Result: 12 diff --git a/Checkpoint/for_loop.dat b/Checkpoint/for_loop.dat new file mode 100755 index 0000000..9e96dea --- /dev/null +++ b/Checkpoint/for_loop.dat @@ -0,0 +1,3 @@ +funct: fortest +gin: a, int, 10 +gin: v, float, 1.0 diff --git a/Checkpoint/for_loop.glsl b/Checkpoint/for_loop.glsl new file mode 100755 index 0000000..6b6277c --- /dev/null +++ b/Checkpoint/for_loop.glsl @@ -0,0 +1,14 @@ +float v; +int a; + +float fortest() +{ + int i; + float sum; + + sum = v; + for ( i = 0; i < a; i += 1 ) + sum *= 2.0; + + return sum; +} diff --git a/Checkpoint/for_loop.out b/Checkpoint/for_loop.out new file mode 100755 index 0000000..5030baf --- /dev/null +++ b/Checkpoint/for_loop.out @@ -0,0 +1 @@ +Result: 1.024000e+03 diff --git a/Checkpoint/func_ret_bool.dat b/Checkpoint/func_ret_bool.dat new file mode 100755 index 0000000..9182397 --- /dev/null +++ b/Checkpoint/func_ret_bool.dat @@ -0,0 +1 @@ +funct: foo diff --git a/Checkpoint/func_ret_bool.glsl b/Checkpoint/func_ret_bool.glsl new file mode 100755 index 0000000..21c0fe4 --- /dev/null +++ b/Checkpoint/func_ret_bool.glsl @@ -0,0 +1,4 @@ +bool foo() +{ + return true; +} diff --git a/Checkpoint/func_ret_bool.out b/Checkpoint/func_ret_bool.out new file mode 100755 index 0000000..bbb3397 --- /dev/null +++ b/Checkpoint/func_ret_bool.out @@ -0,0 +1 @@ +Result: -1 diff --git a/Checkpoint/if_test.dat b/Checkpoint/if_test.dat new file mode 100755 index 0000000..2d284ae --- /dev/null +++ b/Checkpoint/if_test.dat @@ -0,0 +1,2 @@ +funct: iftest +gin: a, float, 0.5 diff --git a/Checkpoint/if_test.glsl b/Checkpoint/if_test.glsl new file mode 100755 index 0000000..1519309 --- /dev/null +++ b/Checkpoint/if_test.glsl @@ -0,0 +1,12 @@ +float a; + +float iftest() +{ + float f; + if ( a > 1.0 ) { + f = 2.0; + } else { + f = 1.0; + } + return f; +} diff --git a/Checkpoint/if_test.out b/Checkpoint/if_test.out new file mode 100755 index 0000000..8a56137 --- /dev/null +++ b/Checkpoint/if_test.out @@ -0,0 +1 @@ +Result: 1.000000e+00 diff --git a/Checkpoint/multi_ret.dat b/Checkpoint/multi_ret.dat new file mode 100755 index 0000000..ee2c67a --- /dev/null +++ b/Checkpoint/multi_ret.dat @@ -0,0 +1,2 @@ +funct: multiret +param: int, 2 diff --git a/Checkpoint/multi_ret.glsl b/Checkpoint/multi_ret.glsl new file mode 100755 index 0000000..16a7956 --- /dev/null +++ b/Checkpoint/multi_ret.glsl @@ -0,0 +1,20 @@ + +int multiret(int a) +{ + if ( a > 1 ) + return 1; + else + return 0; +} + +int multiret2(int a) +{ + int b; + + if ( a > 1 ) + b = 1; + else + return 0; + + return b; +} diff --git a/Checkpoint/multi_ret.out b/Checkpoint/multi_ret.out new file mode 100755 index 0000000..5589610 --- /dev/null +++ b/Checkpoint/multi_ret.out @@ -0,0 +1 @@ +Result: 1 diff --git a/Checkpoint/switch_basic.dat b/Checkpoint/switch_basic.dat new file mode 100755 index 0000000..1193087 --- /dev/null +++ b/Checkpoint/switch_basic.dat @@ -0,0 +1,2 @@ +funct: switchtest +gin: a, int, 2 diff --git a/Checkpoint/switch_basic.glsl b/Checkpoint/switch_basic.glsl new file mode 100755 index 0000000..484b815 --- /dev/null +++ b/Checkpoint/switch_basic.glsl @@ -0,0 +1,14 @@ +int a; +float switchtest() +{ + float f; + + switch( a ) { + case 0: f = 0.0; break; + case 1: f = 1.0; break; + case 2: f = 2.0; break; + default: f = 3.0; break; + } + + return f; +} diff --git a/Checkpoint/switch_basic.out b/Checkpoint/switch_basic.out new file mode 100755 index 0000000..406b873 --- /dev/null +++ b/Checkpoint/switch_basic.out @@ -0,0 +1 @@ +Result: 2.000000e+00 diff --git a/Checkpoint/vect_assign.dat b/Checkpoint/vect_assign.dat new file mode 100755 index 0000000..4adc6f8 --- /dev/null +++ b/Checkpoint/vect_assign.dat @@ -0,0 +1,2 @@ +funct: vectassign +gin: v, vec2, 0.5, 1.5 diff --git a/Checkpoint/vect_assign.glsl b/Checkpoint/vect_assign.glsl new file mode 100755 index 0000000..523abf6 --- /dev/null +++ b/Checkpoint/vect_assign.glsl @@ -0,0 +1,9 @@ +vec2 v; + +float vectassign() +{ + vec2 t; + t = v; + return t.x * t.y; +} + diff --git a/Checkpoint/vect_assign.out b/Checkpoint/vect_assign.out new file mode 100755 index 0000000..50975bc --- /dev/null +++ b/Checkpoint/vect_assign.out @@ -0,0 +1 @@ +Result: 7.500000e-01 diff --git a/Checkpoint/while_loop.dat b/Checkpoint/while_loop.dat new file mode 100755 index 0000000..6281e5c --- /dev/null +++ b/Checkpoint/while_loop.dat @@ -0,0 +1,2 @@ +funct: whiletest +gin: b, int, 101 diff --git a/Checkpoint/while_loop.glsl b/Checkpoint/while_loop.glsl new file mode 100755 index 0000000..436c5c4 --- /dev/null +++ b/Checkpoint/while_loop.glsl @@ -0,0 +1,15 @@ +int b; +int whiletest() +{ + + int i; + int sum; + + i = 0; + sum = 0; + while ( i < b ) { + sum = sum + i; + i = i + 1; + } + return sum; +} diff --git a/Checkpoint/while_loop.out b/Checkpoint/while_loop.out new file mode 100755 index 0000000..a9cabb4 --- /dev/null +++ b/Checkpoint/while_loop.out @@ -0,0 +1 @@ +Result: 5050