Skip to content

Commit

Permalink
Further template propagation to fix offload build
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipFackler committed Sep 7, 2023
1 parent 944f95b commit d0affff
Show file tree
Hide file tree
Showing 15 changed files with 2,664 additions and 110 deletions.
9 changes: 7 additions & 2 deletions src/Numerics/OneDimGridFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,21 @@


#include "OneDimGridFactory.h"
#include "Configuration.h"
#include "OhmmsData/AttributeSet.h"
#include "Message/UniformCommunicateError.h"

namespace qmcplusplus
{
std::unique_ptr<OneDimGridFactory::GridType> OneDimGridFactory::createGrid(xmlNodePtr cur)
template <typename T>
std::unique_ptr<typename OneDimGridFactory<T>::GridType> OneDimGridFactory<T>::createGrid(xmlNodePtr cur)
{
std::unique_ptr<GridType> agrid;
RealType ri = 1e-5;
RealType rf = 100.0;
RealType ascale = -1.0e0;
RealType astep = 1.25e-2;
IndexType npts = 1001;
QMCTraits::IndexType npts = 1001;
std::string gridType("log");
std::string gridID("invalid");
OhmmsAttributeSet radAttrib;
Expand Down Expand Up @@ -74,4 +76,7 @@ std::unique_ptr<OneDimGridFactory::GridType> OneDimGridFactory::createGrid(xmlNo
}
return agrid;
}

template struct OneDimGridFactory<double>;
template struct OneDimGridFactory<float>;
} // namespace qmcplusplus
6 changes: 4 additions & 2 deletions src/Numerics/OneDimGridFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@

#ifndef QMCPLUSPLUS_ONEDIMGRIDFACTORY_H
#define QMCPLUSPLUS_ONEDIMGRIDFACTORY_H
#include "Configuration.h"
#include "Numerics/OneDimGridFunctor.h"
#include "Numerics/LibxmlNumericIO.h"

namespace qmcplusplus
{
/** Factory class using Singleton pattern
*/
struct OneDimGridFactory : public QMCTraits
template <typename T>
struct OneDimGridFactory
{
using RealType = T;
///typedef of the one-dimensional grid
using GridType = OneDimGridBase<RealType>;

Expand Down
2 changes: 1 addition & 1 deletion src/Numerics/SoaCartesianTensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace qmcplusplus
template<class T>
struct SoaCartesianTensor
{
using value_type = T;
using ValueType = T;
using ggg_type = TinyVector<Tensor<T, 3>, 3>;

///maximum angular momentum
Expand Down
2 changes: 2 additions & 0 deletions src/Numerics/SoaSphericalTensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ namespace qmcplusplus
template<typename T>
struct SoaSphericalTensor
{
using ValueType = T;

///maximum angular momentum for the center
int Lmax;
/// Normalization factors
Expand Down
4 changes: 3 additions & 1 deletion src/QMCWaveFunctions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ if(OHMMS_DIM MATCHES 3)
LCAO/LCAOrbitalBuilderT.cpp
LCAO/MultiQuinticSpline1D.cpp
LCAO/AOBasisBuilder.cpp
LCAO/SoaLocalizedBasisSet.cpp)
LCAO/AOBasisBuilderT.cpp
LCAO/SoaLocalizedBasisSet.cpp
LCAO/SoaLocalizedBasisSetT.cpp)
if(QMC_COMPLEX)
set(FERMION_SRCS ${FERMION_SRCS} LCAO/LCAOSpinorBuilder.cpp LCAO/LCAOSpinorBuilder.cpp)
else(QMC_COMPLEX)
Expand Down
Loading

0 comments on commit d0affff

Please sign in to comment.