Parallel Programming - Finished OpenMP
[matches/honours.git] / course / semester2 / pprog / assignment1 / openmp / nbody.h
index 3e3d271..aea97bf 100644 (file)
 #undef Simulation_Run
 void Simulation_Run(int argc, char ** argv);
 //#undef QuitProgram
-//void QuitProgram(bool error); 
+//#define QuitProgram(x) break
 
 #undef BeforeDraw
-void BeforeDraw();
-#undef AfterDraw
-void AfterDraw();
+#define BeforeDraw() (void)0 // Do nothing (apparently this is how to do nothing with a macro)
+//void BeforeDraw();
 
-void Compute(); //Compute a single step
+#undef AfterDraw 
+#define AfterDraw() (void)0
+//void AfterDraw();
+
+
+
+void Compute(void);
+void Compute2(void);
+
+//#define OVER_ENGINEERED 
+// define to (my original approach) manually split the System array (same as pthread version) between threads
+//     Manually splitting the System array is not required in openmp, since "#pragma omp for" automatically does it
+//     I still like doing it this way, since you can explicitly see what each thread is doing, but it would probably lose me marks.
+//     However I can't bring myself to delete it. Hence, compromise.
 
 #endif //_NBODY_OPENMP_H
 

UCC git Repository :: git.ucc.asn.au