int main(int argc, char **argv) { printf("N=%d, CL_DEVICE=%d\n", N, CL_DEVICE); steps = 0; totalTime = 0; // distribute bodies in space (randomly) for(int i=0; i<N; i++) { B[i].m = rand_val(8,20); // (8,20) B[i].pos = vec_rand(); B[i].v = vec_zero(); } // ocl initialization init_ocl(); // ogl stuff init_gl(&argc, argv); glutDisplayFunc(&display); atexit(&exit_cb); glutMainLoop(); return EXIT_SUCCESS; }
Normal3f normal3f_rand() { return normalise(vec_rand(), vec_rand(), vec_rand()); }