configure.ac add with-cuda/nv, update cakewalk theme, add cuda/plugins=mandel+nbody...
[goodguy/cinelerra.git] / cinelerra-5.1 / plugins / nbodycuda / nbodycuda.h
1 #ifndef __NBODYCUDA_H__
2 #define __NBODYCUDA_H__
3
4 #include <vector>
5 template <typename T>
6 void read_tipsy_file(std::vector<T> &bodyPositions, std::vector<T> &bodyVelocities,
7                 std::vector<int> &bodiesIDs, const std::string &fileName,
8                 int &NTotal, int &NFirst, int &NSecond, int &NThird)
9 {
10 }
11
12 #include <5_Simulations/nbody/bodysystem.h>
13 #include <5_Simulations/nbody/bodysystemcuda.h>
14
15 class N_BodyCuda
16 {
17 public:
18         N_BodyCuda();
19         ~N_BodyCuda();
20         void init_dev();
21         void init();
22         void finish();
23
24         int version, numSMs;
25
26         cudaEvent_t startEvent, stopEvent, hostMemSyncEvent;
27         void start_event() { cudaEventRecord(startEvent, 0); }
28         void stop_event() { cudaEventRecord(stopEvent, 0); }
29         void draw_event() { cudaEventRecord(hostMemSyncEvent, 0); }
30 };
31
32 class N_BodySystem : public BodySystemCUDA<float>
33 {
34 public:
35         N_BodySystem(int n_bodies, int n_devs, int blockSize)
36          : BodySystemCUDA<float>(n_bodies, n_devs, blockSize, 1) {}
37         N_BodySystem() {};
38         virtual void loadTipsyFile(const std::string &filename) {}
39 };
40
41 #endif