egi-megi / porr-pso

2 stars 0 forks source link

Swarm::computeGbest(Particle *particle) parallelization #6

Closed mpiku closed 3 years ago

mpiku commented 3 years ago

Please analyse if this part is thread-safe. Maybe there is some possibility to parallelize it.

https://github.com/egi-megi/rojCzastek_Szczepanski_Jurkiewicz_Pikulinski/blob/3a730fc57c51f2a00332cec6067e04f5e872b4b5/src/Swarm.cpp#L80-L92

At the moment it is computed sequentially thanks to the following lines: https://github.com/egi-megi/rojCzastek_Szczepanski_Jurkiewicz_Pikulinski/blob/3a730fc57c51f2a00332cec6067e04f5e872b4b5/src/Swarm.cpp#L112-L115