Skip to content

Commit

Permalink
Added preprocessor conditionals
Browse files Browse the repository at this point in the history
  • Loading branch information
orbitfold committed Aug 6, 2015
1 parent 911b6d2 commit b96182f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tardis/montecarlo/src/cmontecarlo.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,8 +479,10 @@ montecarlo_one_packet (storage_model_t * storage, rpacket_t * packet,
if ((virt_packet.nu < storage->spectrum_end_nu) &&
(virt_packet.nu > storage->spectrum_start_nu))
{
#ifdef WITHOPENMP
#pragma omp critical
{
#endif
if (storage->virt_packet_count >= storage->virt_array_size)
{
storage->virt_array_size *= 2;
Expand All @@ -496,7 +498,9 @@ montecarlo_one_packet (storage_model_t * storage, rpacket_t * packet,
storage->spectrum_delta_nu);
storage->spectrum_virt_nu[virt_id_nu] +=
virt_packet.energy * weight;
#ifdef WITHOPENMP
}
#endif
}
}
}
Expand Down

0 comments on commit b96182f

Please sign in to comment.