Parallel Programming - Start OpenMP Version
[matches/honours.git] / course / semester2 / pprog / assignment1 / single-thread / nbody.h
index b8c9813..fc19d05 100644 (file)
 #define SINGLE_THREADED
 
 //These macros will be undefined by the multithreaded versions
-#define Simulation_Run() //Sets up the simulation; in multithreaded versions, will spawn threads
+#define Simulation_Run(argc, argv) (Graphics_Run(argc, argv)) //Sets up the simulation; in multithreaded versions, will spawn threads
 #define QuitProgram(error) (runstate = (error == true) ? QUIT : QUIT_ERROR) //Prepares to exit program, is thread safe in multithreaded versions
 
 #define M_PI        3.14159265358979323846264338327950288   /* pi */
 #define G 6.67428E-11
 #define DELTA_T 0.05
 #define DIMENSIONS 3
+#define LINE_SIZE 1000
 #define square(x) ((x)*(x))
 
 
@@ -95,6 +96,8 @@ void Universe_Cleanup(); //Cleanup universe and write bodies to file
 void DisplayStatistics(); // Print information about steps computed, total (real) runtime, and CPU cycles
 
 
+bool ExitCondition(void); //Checks whether the program is supposed to exit automatically yet (ie: other than the user pressing "quit")
+
 
 typedef enum {RUN, QUIT, QUIT_ERROR} RUNSTATE;
 extern RUNSTATE runstate; // Set runstate to QUIT or QUIT_ERROR and the simulation will stop on the next step.

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