From feb1ff349413d98ffcc720f69c682d33633375d5 Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Thu, 21 Nov 2019 20:03:39 +0000 Subject: [PATCH] Fix nocompilee under NVCC --- Grid/qcd/utils/BaryonUtils.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Grid/qcd/utils/BaryonUtils.h b/Grid/qcd/utils/BaryonUtils.h index 73d41422..25c91342 100644 --- a/Grid/qcd/utils/BaryonUtils.h +++ b/Grid/qcd/utils/BaryonUtils.h @@ -42,8 +42,8 @@ public: typedef typename FImpl::SitePropagator pobj; typedef typename ComplexField::vector_object vobj; - static constexpr int epsilon[6][3] = {{0,1,2},{1,2,0},{2,0,1},{0,2,1},{2,1,0},{1,0,2}}; - static constexpr Complex epsilon_sgn[6]= {1,1,1,-1,-1,-1}; + static const int epsilon[6][3] ; + static const Complex epsilon_sgn[6]; private: template @@ -83,10 +83,15 @@ public: robj &result); }; -template -constexpr int BaryonUtils::epsilon[6][3]; -template -constexpr Complex BaryonUtils::epsilon_sgn[6]; +template +const int BaryonUtils::epsilon[6][3] = {{0,1,2},{1,2,0},{2,0,1},{0,2,1},{2,1,0},{1,0,2}}; +template +const Complex BaryonUtils::epsilon_sgn[6] = {Complex(1), + Complex(1), + Complex(1), + Complex(-1), + Complex(-1), + Complex(-1)}; template template