-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSimulator.h
More file actions
31 lines (22 loc) · 813 Bytes
/
Simulator.h
File metadata and controls
31 lines (22 loc) · 813 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (c) Conni Bilham & Lucy Coward 2022, All Rights Reserved.
#ifndef GALAXYSIMULATION_SIMULATOR_H
#define GALAXYSIMULATION_SIMULATOR_H
#include "includes/logging.h"
#include "Star.h"
class Simulator {
public:
unsigned int thread_count = -1;
int star_per_thread = -1;
int left_over = -1;
std::vector<Star*> *star_list;
std::vector<std::vector<Star *>> *work_queue = new std::vector<std::vector<Star *>>();
Simulator(unsigned int thread_count, std::vector<Star*> *star_list) {
this->thread_count = thread_count;
this->star_list = star_list;
this->left_over = star_list->size() % thread_count;
this->star_per_thread = (star_list->size() - left_over) / thread_count;
}
void output_info();
void generateWorkQueue();
};
#endif //GALAXYSIMULATION_SIMULATOR_H