Parallel Programming - Final version
[matches/honours.git] / course / semester2 / pprog / assignment1 / nbody-bh / nbody.h~
1 #ifndef _NBODY_BARNES_HUT_H
2 #define _NBODY_BARNES_HUT_H
3
4 /**
5  * @file nbody.h
6  * @purpose OpenMP version of N-Body simulator, declarations
7  * @author Sam Moore (20503628) - 2012
8  */
9
10 #include "../single-thread/nbody.h" //Include original code
11 #include <omp.h>
12
13
14 #undef SINGLE_THREADED
15 #define BARNES_HUT
16
17 // Define to simultaneously Brute force a copy of the universe, and display together
18 //#define DUAL_UNIVERSE 
19
20
21 // Replace default macros with thread-safe functions
22 #undef Simulation_Run
23 void Simulation_Run(int argc, char ** argv);
24 //#undef QuitProgram
25 //#define QuitProgram(x) break
26
27 #undef BeforeDraw
28 #ifdef DUAL_UNIVERSE
29         System alternate_universe;
30         void BeforeDraw();
31 #else
32         #define BeforeDraw() (void)0 // Do nothing (apparently this is how to do nothing with a macro)
33 #endif //DUAL_UNIVERSE
34
35 #undef AfterDraw 
36 #define AfterDraw() (void)0
37 //void AfterDraw();
38
39 #undef QuitProgram
40 void QuitProgram(bool error);
41
42 void Compute(void);
43
44 #endif //_NBODY_BARNES_HUT_H
45
46 //EOF

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