QMCPACK
createBsplineReal.cpp
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////////////
2 // This file is distributed under the University of Illinois/NCSA Open Source License.
3 // See LICENSE file in top directory for details.
4 //
5 // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 //
7 // File developed by:
8 //
9 // File created by: Jeongnim Kim, jeongnim.kim@intel.com, Intel Corp.
10 //////////////////////////////////////////////////////////////////////////////////////
11 
12 
14 #include <PlatformSelector.hpp>
15 #include "SplineSetReader.h"
16 #include "HybridRepSetReader.h"
17 
18 namespace qmcplusplus
19 {
20 /** create a reader which handles real splines, R2R case
21  * spline storage and computation precision is ST
22  */
23 template<typename ST>
24 std::unique_ptr<BsplineReader> createBsplineReal(EinsplineSetBuilder* e, bool hybrid_rep, const std::string& useGPU)
25 {
26  app_summary() << " Using real valued spline SPOs with real " << SplineStoragePrecision<ST>::value
27  << " precision storage (R2R)." << std::endl;
29  app_summary() << "OpenMP offload has not been implemented to support real valued spline SPOs with real storage!"
30  << std::endl;
31  app_summary() << " Running on CPU." << std::endl;
32 
33  std::unique_ptr<BsplineReader> aReader;
34  if (hybrid_rep)
35  {
36  app_summary() << " Using hybrid orbital representation." << std::endl;
37  aReader = std::make_unique<HybridRepSetReader<HybridRepReal<SplineR2R<ST>>>>(e);
38  }
39  else
40  aReader = std::make_unique<SplineSetReader<SplineR2R<ST>>>(e);
41  return aReader;
42 }
43 
44 std::unique_ptr<BsplineReader> createBsplineReal(EinsplineSetBuilder* e,
45  bool use_single,
46  bool hybrid_rep,
47  const std::string& useGPU)
48 {
49  if (use_single)
50  return createBsplineReal<float>(e, hybrid_rep, useGPU);
51  else
52  return createBsplineReal<double>(e, hybrid_rep, useGPU);
53 }
54 
55 } // namespace qmcplusplus
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
std::ostream & app_summary()
Definition: OutputManager.h:63
std::unique_ptr< BsplineReader > createBsplineReal(EinsplineSetBuilder *e, bool use_single, bool hybrid_rep, const std::string &useGPU)
create a reader which handles real splines, R2R case spline storage and computation precision is doub...
static PlatformKind selectPlatform(std::string_view value)
The most general reader class for the following classes using the full single grid for the supercell...
derived from BsplineReader