Commit e6416f6c authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

fixes usage of thread local p2p computer

parent bbab5baf
...@@ -652,6 +652,7 @@ public: ...@@ -652,6 +652,7 @@ public:
#pragma omp task default(shared) firstprivate(idxPart, nb_parts_in_cell, current_cell_idx) #pragma omp task default(shared) firstprivate(idxPart, nb_parts_in_cell, current_cell_idx)
{ {
computer_class& computer_thread_task = (omp_get_thread_num() == 0 ? in_computer : *computer_for_all_threads[omp_get_thread_num()-1]);
const std::vector<std::pair<partsize_t,partsize_t>>* neighbors[27]; const std::vector<std::pair<partsize_t,partsize_t>>* neighbors[27];
long int neighbors_indexes[27]; long int neighbors_indexes[27];
std::array<real_number,3> shift[27]; std::array<real_number,3> shift[27];
...@@ -684,7 +685,7 @@ public: ...@@ -684,7 +685,7 @@ public:
diff_y, diff_y,
diff_z); diff_z);
if(dist_r2 < cutoff_radius_compute*cutoff_radius_compute){ if(dist_r2 < cutoff_radius_compute*cutoff_radius_compute){
computer_thread.template compute_interaction<size_particle_positions, size_particle_rhs>( computer_thread_task.template compute_interaction<size_particle_positions, size_particle_rhs>(
descriptor.indexes[(idxPart+idx_p1)], descriptor.indexes[(idxPart+idx_p1)],
&descriptor.toCompute[(idxPart+idx_p1)*size_particle_positions], &descriptor.toCompute[(idxPart+idx_p1)*size_particle_positions],
&descriptor.results[(idxPart+idx_p1)*size_particle_rhs], &descriptor.results[(idxPart+idx_p1)*size_particle_rhs],
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment