Skip to content

Commit

Permalink
Patch for mrc-ide#161 to silence false positive errors from Intel Ins…
Browse files Browse the repository at this point in the history
…pector
  • Loading branch information
cjgdev committed May 5, 2020
1 parent 60da1ec commit 67cce02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/SetupModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2219,10 +2219,10 @@ void AssignPeopleToPlaces(void)
l = Cells[i].InvCDF[(int)floor(s * 1024)];
while (Cells[i].cum_trans[l] < s) l++;
ct = CellLookup[l];
m = (int)(ranf() * ((double)ct->S));
j = -1;
#pragma omp critical
{
m = (int)(ranf() * ((double)ct->S));
if (ct->susceptible[m] >= 0)
if ((f3) || (Places[tp][ct->susceptible[m]].AvailByAge[HOST_AGE_YEAR(k)] > 0))
{
Expand All @@ -2237,6 +2237,7 @@ void AssignPeopleToPlaces(void)
ERR_CRITICAL("Out of bounds place link\n");
}
t = dist2_raw(Households[Hosts[k].hh].loc_x, Households[Hosts[k].hh].loc_y, Places[tp][j].loc_x, Places[tp][j].loc_y);
#pragma omp critical
s = ((double)ct->S) / ((double)ct->S0) * numKernel(t) / Cells[i].max_trans[l];
if ((P.DoAdUnits) && (P.InhibitInterAdunitPlaceAssignment[tp] > 0))
{
Expand Down

0 comments on commit 67cce02

Please sign in to comment.