From 3e804ac42e0e003bfe8a6f2e159eb7357ae16e48 Mon Sep 17 00:00:00 2001
From: Juan ESCOBAR <juan.escobar@aero.obs-mip.fr>
Date: Fri, 4 Nov 2022 18:44:43 +0100
Subject: [PATCH] Juan 04/11/2022:br_transcendentals.cpp, BUG for CCE > 14.X &&
 nvidia70 target, missing const in "#pragma omp declare target"

---
 src/LIB/BITREP/br_transcendentals.cpp | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/LIB/BITREP/br_transcendentals.cpp b/src/LIB/BITREP/br_transcendentals.cpp
index f0ce340a7..b837517f9 100644
--- a/src/LIB/BITREP/br_transcendentals.cpp
+++ b/src/LIB/BITREP/br_transcendentals.cpp
@@ -20,9 +20,12 @@ namespace bitrep
 /*************
  * CONSTANTS *
  *************/
- 
-static const double const_2_over_pi = 6.3661977236758138e-1;
 
+#ifdef MNH_BITREP_OMP
+#pragma omp declare target
+#endif    
+static const double const_2_over_pi = 6.3661977236758138e-1;
+  
 static const double __sin_cos_coefficient[16] =
 {
    1.590307857061102704e-10,  /* sin0 */
@@ -43,7 +46,9 @@ static const double __sin_cos_coefficient[16] =
   -5.000000000000000000e-01,  /* cos6 */
    1.000000000000000000e+00,  /* cos7 */
 };
-
+#ifdef MNH_BITREP_OMP
+#pragma omp end declare target
+#endif
 
 
 /*****************************************
-- 
GitLab