Particle_Simulator/Cpp_Stuff/include/universe.hpp

40 lines
1013 B
C++
Raw Normal View History

2024-11-23 21:59:28 -05:00
#include <vector>
#include "ui_particles.hpp"
#include <cublas_v2.h>
#include <curand.h>
struct data3d{
float *data;
};
class universe
{
private:
std::vector<ui_particles> my_particles;
int num_of_particles;
int array_size;
cublasHandle_t cublas_handle;
float * device_ray_position;
float * device_ray_direction;
float * device_position;
float * device_velocity;
float * device_acceleration;
float * device_scratch_padA;
float * device_scratch_padB;
float * host_position;
float * host_velocity;
float * host_acceleration;
curandGenerator_t gen;
void process_collisions_with_other_particles(void);
void process_collisions_with_rays(void);
void process_particles(void);
/* data3d */
public:
universe(int size);
~universe();
void get_positions(float ** in_out_buffer, int * size, int * stride);
void process(void);
};