Skip to content

Commit

Permalink
Use explicit template types.
Browse files Browse the repository at this point in the history
  • Loading branch information
ye-luo committed Nov 9, 2023
1 parent 5036d7e commit 7840f96
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 8 deletions.
8 changes: 6 additions & 2 deletions src/QMCWaveFunctions/SPOSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,11 @@ void SPOSetT<VALUE>::evaluate_spin(const ParticleSet& P, int iat, ValueVector& p
"::evaluate_spin(P,iat,psi,dpsi) (vector quantities)\n");
}

template class SPOSetT<QMCTraits::QTBase::RealType>;
template class SPOSetT<QMCTraits::QTBase::ComplexType>;
#if !defined(MIXED_PRECISION)
template class SPOSetT<double>;
template class SPOSetT<std::complex<double>>;
#endif
template class SPOSetT<float>;
template class SPOSetT<std::complex<float>>;

} // namespace qmcplusplus
8 changes: 6 additions & 2 deletions src/QMCWaveFunctions/SPOSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,12 @@ class SPOSetT
friend opt_variables_type& testing::getMyVars<VALUE>(SPOSetT<VALUE>& spo);
};

extern template class SPOSetT<QMCTraits::QTBase::RealType>;
extern template class SPOSetT<QMCTraits::QTBase::ComplexType>;
#if !defined(MIXED_PRECISION)
extern template class SPOSetT<double>;
extern template class SPOSetT<std::complex<double>>;
#endif
extern template class SPOSetT<float>;
extern template class SPOSetT<std::complex<float>>;

using SPOSet = SPOSetT<QMCTraits::QTBase::ValueType>;
using SPOSetPtr = SPOSet*;
Expand Down
8 changes: 6 additions & 2 deletions src/QMCWaveFunctions/tests/FakeSPO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,11 @@ void FakeSPO<VALUE>::evaluate_notranspose(const ParticleSet& P,
}
}

template class FakeSPO<QMCTraits::QTBase::RealType>;
template class FakeSPO<QMCTraits::QTBase::ComplexType>;
#if !defined(MIXED_PRECISION)
template class FakeSPO<double>;
template class FakeSPO<std::complex<double>>;
#endif
template class FakeSPO<float>;
template class FakeSPO<std::complex<float>>;

} // namespace qmcplusplus
8 changes: 6 additions & 2 deletions src/QMCWaveFunctions/tests/FakeSPO.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,12 @@ class FakeSPO : public SPOSetT<VALUE>
using SPOSet::OrbitalSetSize;
};

extern template class FakeSPO<QMCTraits::QTBase::RealType>;
extern template class FakeSPO<QMCTraits::QTBase::ComplexType>;
#if !defined(MIXED_PRECISION)
extern template class FakeSPO<double>;
extern template class FakeSPO<std::complex<double>>;
#endif
extern template class FakeSPO<float>;
extern template class FakeSPO<std::complex<float>>;

} // namespace qmcplusplus
#endif

0 comments on commit 7840f96

Please sign in to comment.