Recapture const-ness on variables in a parallel section
问题 I have the following code: const W = (f.IsUnit() ? U : modq.Multiply(m_pre_2_3q, U)); const Integer t = modp.Multiply(modp.Exponentiate(V, 3), eh); const X = (f.IsUnit() ? t : modp.Multiply(m_pre_2_9p, t)); When converted to OpenMP, the const-ness is lost: Integer W, X; #pragma omp parallel sections { #pragma omp section { W = (f.IsUnit() ? U : modq.Multiply(m_pre_2_3q, U)); } #pragma omp section { const Integer t = modp.Multiply(modp.Exponentiate(V, 3), eh); X = (f.IsUnit() ? t : modp