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 12, 2023
1 parent 268b182 commit 9d7395b
Show file tree
Hide file tree
Showing 88 changed files with 19,254 additions and 8,060 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
9 changes: 9 additions & 0 deletions src/Particle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,30 @@
set(PARTICLE
InitMolecularSystem.cpp
SimulationCell.cpp
SimulationCellT.cpp
ParticleSetPool.cpp
ParticleSet.cpp
ParticleSetT.cpp
PSdispatcher.cpp
VirtualParticleSet.cpp
VirtualParticleSetT.cpp
ParticleSet.BC.cpp
DynamicCoordinatesBuilder.cpp
DynamicCoordinatesT.cpp
MCCoords.cpp
MCCoordsT.cpp
MCWalkerConfiguration.cpp
WalkerConfigurations.cpp
SpeciesSet.cpp
SampleStack.cpp
createDistanceTableAA.cpp
createDistanceTableAB.cpp
createDistanceTableT.cpp
HDFWalkerInputManager.cpp
LongRange/KContainer.cpp
LongRange/KContainerT.cpp
LongRange/StructFact.cpp
LongRange/StructFactT.cpp
LongRange/LPQHIBasis.cpp
LongRange/LPQHISRCoulombBasis.cpp
LongRange/EwaldHandlerQuasi2D.cpp
Expand All @@ -51,6 +59,7 @@ target_include_directories(qmcparticle PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
target_link_libraries(qmcparticle PRIVATE platform_cpu_LA)
target_link_libraries(qmcparticle PUBLIC qmcnumerics qmcutil platform_runtime)
set(PARTICLE_OMPTARGET_SRCS
createDistanceTableTOMPTarget.cpp
createDistanceTableAAOMPTarget.cpp
createDistanceTableABOMPTarget.cpp)

Expand Down
Loading

0 comments on commit 9d7395b

Please sign in to comment.