From f276f8e1e2bab6a9e3d608073fce273bf0c60005 Mon Sep 17 00:00:00 2001
From: Andreas Schenk <andreas_schenk@hms.harvard.edu>
Date: Fri, 8 Aug 2014 17:03:36 -0400
Subject: [PATCH] added some explicit template instantiations needed for Intel
 compiler

---
 modules/img/alg/src/fft.cc                |  4 ++++
 modules/img/base/src/image_state/binop.cc | 15 ++++++++++++++-
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/modules/img/alg/src/fft.cc b/modules/img/alg/src/fft.cc
index 955f21834..468bc4992 100644
--- a/modules/img/alg/src/fft.cc
+++ b/modules/img/alg/src/fft.cc
@@ -267,6 +267,10 @@ ImageStateBasePtr FFTFnc::VisitState(const ImageStateImpl<T,D>& s) const
   throw FFTException(ostr.str());
 }
 
+// force explicit instantiation to make intel compiler happy
+template ImageStateBasePtr FFTFnc::VisitState<float,FrequencyDomain>(const ImageStateImpl<float,FrequencyDomain>& ) const;
+template ImageStateBasePtr FFTFnc::VisitState<unsigned short,SpatialDomain>(const ImageStateImpl<unsigned short,SpatialDomain>& ) const;
+
 }  //alg ns
 
 template class TEMPLATE_DEF_EXPORT image_state::ImageStateConstModOPAlgorithm<alg::FFTFnc>;
diff --git a/modules/img/base/src/image_state/binop.cc b/modules/img/base/src/image_state/binop.cc
index 16ff05ea2..dc3339aa2 100644
--- a/modules/img/base/src/image_state/binop.cc
+++ b/modules/img/base/src/image_state/binop.cc
@@ -103,7 +103,20 @@ template struct fnc_paste_ip<Word,SpatialDomain,Complex,HalfFrequencyDomain>;
 template struct fnc_paste_ip<Real,FrequencyDomain,Complex,HalfFrequencyDomain>;
 template struct fnc_paste_ip<Complex,FrequencyDomain,Complex,HalfFrequencyDomain>;
 template struct fnc_paste_ip<Complex,HalfFrequencyDomain,Complex,HalfFrequencyDomain>;
-
+template struct fnc_paste_ip<Real,FrequencyDomain,Complex,SpatialDomain>;
+template struct fnc_paste_ip<Real,FrequencyDomain,unsigned short,SpatialDomain>;
+template struct fnc_paste_ip<Complex,FrequencyDomain,unsigned short,SpatialDomain>;
+template struct fnc_paste_ip<Complex,HalfFrequencyDomain,unsigned short,SpatialDomain>;
+template struct fnc_paste_ip<Complex,HalfFrequencyDomain,Real,SpatialDomain>;
+template struct fnc_paste_ip<Complex,HalfFrequencyDomain,Complex,SpatialDomain>;
+template struct fnc_paste_ip<Complex,FrequencyDomain,Complex,SpatialDomain>;
+template struct fnc_paste_ip<Complex,FrequencyDomain,Real,SpatialDomain>;
+template struct fnc_paste_ip<Real,FrequencyDomain,Real,SpatialDomain>;
+
+template struct fnc_add_ip<Real,SpatialDomain,Real,SpatialDomain>;
+template struct fnc_sub_ip<Real,SpatialDomain,Real,SpatialDomain>;
+template struct fnc_mul_ip<Real,SpatialDomain,Real,SpatialDomain>;
+template struct fnc_div_ip<Real,SpatialDomain,Real,SpatialDomain>;
 }
 
 template struct dispatch::binary_dispatch_ip<binop::fnc_add_ip>;
-- 
GitLab