Пример #1
0
int main(int argc, char** argv) {

	cba_print_code();

	// for now this is simply testing the primitives
	cba_dump_thread_regions();
	cba_dump_execution_net();
	cba_dump_state_graph();

	cba_dump_equations();

	#pragma omp parallel
	{
		#pragma omp single
		{
			int x = 1;
		}
	}

	// also test some cilk stuff ..
	spawn doSomething();
	spawn doSomething();
	sync;
	
	return 0;
}
Пример #2
0
int main(int argc, char** argv) {

	cba_print_code();

	// for now this is simply testing the primitives
	cba_dump_thread_regions();
	cba_dump_execution_net();
	cba_dump_state_graph();

	f(10);

	return 0;
}
Пример #3
0
int main(int argc, char** argv) {

	ull a = 2;
	ull b = 5;

	int c = a + b;

	cba_print_code();
	cba_expect_eq_int(a, 2);
	cba_expect_eq_int(b, 5);
	cba_expect_eq_int(c, 7);
	cba_expect_eq_int(a+b, 7);
	
	return 0;
}
Пример #4
0
int main(int argc, char** argv) {

	cba_print_code();


	// check whether ticks are properly analyzed
	cba_expect_eq_int(1,s());
	cba_expect_eq_int(2,s());
	cba_expect_eq_int(3,s());

	cba_expect_eq_int(5,d());

//	cba_dump_equations();
	
	return 0;
}
Пример #5
0
int main(int argc, char** argv) {

	cba_print_code();

	// create an image
	Image i = create_image(20,40);

	cba_print_int(i.data);

	i.data[2][4] = 5;

	cba_print_int(i.data);
	cba_print_int(i.data[2]);
	cba_print_int(i.data[2][4]);
	cba_expect_eq_int(i.data[2][4], 5);
	cba_dump_equations();

	return 0;
}