From fd425317b3d7042d5e9c65fccfb1c5ee7f8200ac Mon Sep 17 00:00:00 2001
From: Giovanni Bussi <giovanni.bussi@gmail.com>
Date: Tue, 28 Jul 2015 12:01:27 +0200
Subject: [PATCH] Fixes #163

Properly instantiate templates when using high optimization flags
with gcc
---
 src/tools/RMSD.cpp | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/src/tools/RMSD.cpp b/src/tools/RMSD.cpp
index a8bdfcef7..8747a5a2a 100644
--- a/src/tools/RMSD.cpp
+++ b/src/tools/RMSD.cpp
@@ -1223,5 +1223,27 @@ Tensor RMSDCoreData::getRotationMatrixPositionsToReference(){
 }
 
 
+template double RMSD::optimalAlignment<true,true>(const  std::vector<double>  & align,
+                                     const  std::vector<double>  & displace,
+                                     const std::vector<Vector> & positions,
+                                     const std::vector<Vector> & reference ,
+                                     std::vector<Vector>  & derivatives, bool squared)const;
+template double RMSD::optimalAlignment<true,false>(const  std::vector<double>  & align,
+                                     const  std::vector<double>  & displace,
+                                     const std::vector<Vector> & positions,
+                                     const std::vector<Vector> & reference ,
+                                     std::vector<Vector>  & derivatives, bool squared)const;
+template double RMSD::optimalAlignment<false,true>(const  std::vector<double>  & align,
+                                     const  std::vector<double>  & displace,
+                                     const std::vector<Vector> & positions,
+                                     const std::vector<Vector> & reference ,
+                                     std::vector<Vector>  & derivatives, bool squared)const;
+template double RMSD::optimalAlignment<false,false>(const  std::vector<double>  & align,
+                                     const  std::vector<double>  & displace,
+                                     const std::vector<Vector> & positions,
+                                     const std::vector<Vector> & reference ,
+                                     std::vector<Vector>  & derivatives, bool squared)const;
+
+
 
 }
-- 
GitLab