Skip to content

Commit bd5d50f

Browse files
authored
Merge pull request #30 from PhilipFackler/fix-OffloadBuildErrors
Further template propagation to fix offload build
2 parents 268b182 + 9d7395b commit bd5d50f

File tree

88 files changed

+19254
-8060
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+19254
-8060
lines changed

Diff for: src/Numerics/OneDimGridFactory.cpp

+7-2
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,21 @@
1313

1414

1515
#include "OneDimGridFactory.h"
16+
#include "Configuration.h"
1617
#include "OhmmsData/AttributeSet.h"
1718
#include "Message/UniformCommunicateError.h"
1819

1920
namespace qmcplusplus
2021
{
21-
std::unique_ptr<OneDimGridFactory::GridType> OneDimGridFactory::createGrid(xmlNodePtr cur)
22+
template <typename T>
23+
std::unique_ptr<typename OneDimGridFactory<T>::GridType> OneDimGridFactory<T>::createGrid(xmlNodePtr cur)
2224
{
2325
std::unique_ptr<GridType> agrid;
2426
RealType ri = 1e-5;
2527
RealType rf = 100.0;
2628
RealType ascale = -1.0e0;
2729
RealType astep = 1.25e-2;
28-
IndexType npts = 1001;
30+
QMCTraits::IndexType npts = 1001;
2931
std::string gridType("log");
3032
std::string gridID("invalid");
3133
OhmmsAttributeSet radAttrib;
@@ -74,4 +76,7 @@ std::unique_ptr<OneDimGridFactory::GridType> OneDimGridFactory::createGrid(xmlNo
7476
}
7577
return agrid;
7678
}
79+
80+
template struct OneDimGridFactory<double>;
81+
template struct OneDimGridFactory<float>;
7782
} // namespace qmcplusplus

Diff for: src/Numerics/OneDimGridFactory.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,17 @@
1414

1515
#ifndef QMCPLUSPLUS_ONEDIMGRIDFACTORY_H
1616
#define QMCPLUSPLUS_ONEDIMGRIDFACTORY_H
17-
#include "Configuration.h"
1817
#include "Numerics/OneDimGridFunctor.h"
18+
#include "Numerics/LibxmlNumericIO.h"
1919

2020
namespace qmcplusplus
2121
{
2222
/** Factory class using Singleton pattern
2323
*/
24-
struct OneDimGridFactory : public QMCTraits
24+
template <typename T>
25+
struct OneDimGridFactory
2526
{
27+
using RealType = T;
2628
///typedef of the one-dimensional grid
2729
using GridType = OneDimGridBase<RealType>;
2830

Diff for: src/Numerics/SoaCartesianTensor.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ namespace qmcplusplus
3737
template<class T>
3838
struct SoaCartesianTensor
3939
{
40-
using value_type = T;
40+
using ValueType = T;
4141
using ggg_type = TinyVector<Tensor<T, 3>, 3>;
4242

4343
///maximum angular momentum

Diff for: src/Numerics/SoaSphericalTensor.h

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ namespace qmcplusplus
3737
template<typename T>
3838
struct SoaSphericalTensor
3939
{
40+
using ValueType = T;
41+
4042
///maximum angular momentum for the center
4143
int Lmax;
4244
/// Normalization factors

Diff for: src/Particle/CMakeLists.txt

+9
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,30 @@
1515
set(PARTICLE
1616
InitMolecularSystem.cpp
1717
SimulationCell.cpp
18+
SimulationCellT.cpp
1819
ParticleSetPool.cpp
1920
ParticleSet.cpp
21+
ParticleSetT.cpp
2022
PSdispatcher.cpp
2123
VirtualParticleSet.cpp
24+
VirtualParticleSetT.cpp
2225
ParticleSet.BC.cpp
2326
DynamicCoordinatesBuilder.cpp
27+
DynamicCoordinatesT.cpp
2428
MCCoords.cpp
29+
MCCoordsT.cpp
2530
MCWalkerConfiguration.cpp
2631
WalkerConfigurations.cpp
2732
SpeciesSet.cpp
2833
SampleStack.cpp
2934
createDistanceTableAA.cpp
3035
createDistanceTableAB.cpp
36+
createDistanceTableT.cpp
3137
HDFWalkerInputManager.cpp
3238
LongRange/KContainer.cpp
39+
LongRange/KContainerT.cpp
3340
LongRange/StructFact.cpp
41+
LongRange/StructFactT.cpp
3442
LongRange/LPQHIBasis.cpp
3543
LongRange/LPQHISRCoulombBasis.cpp
3644
LongRange/EwaldHandlerQuasi2D.cpp
@@ -51,6 +59,7 @@ target_include_directories(qmcparticle PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
5159
target_link_libraries(qmcparticle PRIVATE platform_cpu_LA)
5260
target_link_libraries(qmcparticle PUBLIC qmcnumerics qmcutil platform_runtime)
5361
set(PARTICLE_OMPTARGET_SRCS
62+
createDistanceTableTOMPTarget.cpp
5463
createDistanceTableAAOMPTarget.cpp
5564
createDistanceTableABOMPTarget.cpp)
5665

0 commit comments

Comments
 (0)