optimized queue and backup queue a bit
This commit is contained in:
@@ -34,11 +34,8 @@ class Simulation {
|
||||
void init(Parameter& parameter);
|
||||
void start();
|
||||
void finalize();
|
||||
void processEvents(int events, std::vector<particle::Particle>& backup_queue,
|
||||
const int time_resolution_events);
|
||||
void processUntilTermination(particle::Particle& particle,
|
||||
std::vector<particle::Particle>& particle_queue,
|
||||
std::vector<particle::Particle>& backup_queue);
|
||||
void processEvents(int events, const int time_resolution_events);
|
||||
void processUntilTermination(particle::Particle& particle);
|
||||
|
||||
private:
|
||||
std::vector<particle::Particle> determineInjectedParticles(
|
||||
@@ -71,6 +68,10 @@ class Simulation {
|
||||
|
||||
std::shared_ptr<SimulationOutput> output_;
|
||||
std::shared_ptr<CpuSynchronizer> cpu_synchronizer_;
|
||||
|
||||
std::vector<particle::Particle> queues_[2];
|
||||
int active_queue_;
|
||||
int non_active_queue_;
|
||||
};
|
||||
|
||||
#endif /* SIMULATION_H */
|
||||
|
||||
Reference in New Issue
Block a user