Skip to content

Commit

Permalink
Hack v2
Browse files Browse the repository at this point in the history
  • Loading branch information
willGraham01 committed Jun 6, 2023
1 parent bd98430 commit 5b0fa47
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ void SimulationManager::compute_detector_functions(unsigned int tind,
#pragma omp parallel default(shared) private(lambda_an_t, Idxt, Idyt, kprop, \
phaseTermE, cphaseTermE)
{
#pragma omp for
// For each frequency
/* https://stackoverflow.com/questions/2820621/why-arent-unsigned-openmp-index-variables-allowed
On Windows, we are forced to unsafe cast between unsigned and signed integer
Expand All @@ -95,8 +94,11 @@ unsigned vector size.
*/
#if (_OPENMP < 200805)
long long int loop_upper_index = inputs.f_ex_vec.size();

#pragma omp for
for (int ifx = 0; ifx < loop_upper_index; ifx++) {
#else
#pragma omp for
for (unsigned int ifx = 0; ifx < inputs.f_ex_vec.size(); ifx++) {
#endif
// determine wavelength at this frequency
Expand Down

0 comments on commit 5b0fa47

Please sign in to comment.