1 #ifndef __NBODYCUDA_H__
2 #define __NBODYCUDA_H__
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)
12 #include <5_Simulations/nbody/bodysystem.h>
13 #include <5_Simulations/nbody/bodysystemcuda.h>
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); }
32 class N_BodySystem : public BodySystemCUDA<float>
35 N_BodySystem(int n_bodies, int n_devs, int blockSize)
36 : BodySystemCUDA<float>(n_bodies, n_devs, blockSize, 1) {}
38 virtual void loadTipsyFile(const std::string &filename) {}