From 5b0fa4726d2aa77d6a31b5158688fd4a56c99ae6 Mon Sep 17 00:00:00 2001 From: willGraham01 <1willgraham@gmail.com> Date: Tue, 6 Jun 2023 10:40:42 +0100 Subject: [PATCH] Hack v2 --- tdms/src/simulation_manager/execute_detector_subfunctions.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tdms/src/simulation_manager/execute_detector_subfunctions.cpp b/tdms/src/simulation_manager/execute_detector_subfunctions.cpp index 911893b0..fc3b6e72 100644 --- a/tdms/src/simulation_manager/execute_detector_subfunctions.cpp +++ b/tdms/src/simulation_manager/execute_detector_subfunctions.cpp @@ -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 @@ -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