Loading cmake/dca_config.cmake +7 −7 Original line number Diff line number Diff line Loading @@ -237,12 +237,12 @@ endif() ################################################################################ # Single precision measurements # TODO: change to ON by default after merging and testing the two particle accumulator. option(DCA_WITH_SINGLE_PRECISION_MEASUREMENTS "Measure in single precision." OFF) mark_as_advanced(DCA_WITH_SINGLE_PRECISION_MEASUREMENTS) # TODO: maybe change to ON by default. option(DCA_WITH_SINGLE_PRECISION_TP_MEASUREMENTS "Measure in single precision." OFF) mark_as_advanced(DCA_WITH_SINGLE_PRECISION_TP_MEASUREMENTS) if (DCA_WITH_SINGLE_PRECISION_MEASUREMENTS) dca_add_config_define(DCA_WITH_SINGLE_PRECISION_MEASUREMENTS) if (DCA_WITH_SINGLE_PRECISION_TP_MEASUREMENTS) dca_add_config_define(DCA_WITH_SINGLE_PRECISION_TP_MEASUREMENTS) endif() ################################################################################ Loading Loading @@ -278,9 +278,9 @@ else() endif() if (DCA_WITH_SINGLE_PRECISION_MEASUREMENTS) set(MC_ACCUMULATION_SCALAR float) set(TP_ACCUMULATION_SCALAR float) else() set(MC_ACCUMULATION_SCALAR double) set(TP_ACCUMULATION_SCALAR double) endif() option(DCA_WITH_MANAGED_MEMORY "Use managed memory allocator." OFF) Loading include/dca/config/accumulation_options.hpp.in +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ namespace config { // dca::config:: struct AccumulationOptions { using MCAccumulationScalar = @MC_ACCUMULATION_SCALAR@; using TPAccumulationScalar = @TP_ACCUMULATION_SCALAR@; static constexpr bool memory_savings = @MEMORY_SAVINGS@; Loading include/dca/config/cmake_options.hpp +1 −2 Original line number Diff line number Diff line Loading @@ -40,8 +40,7 @@ struct CMakeOptions { static const std::string dca_profiler; static const std::string dca_with_autotuning; static const std::string dca_with_gnuplot; static const std::string dca_with_reduced_vertex_function; static const std::string dca_with_single_precision_measurements; static const std::string dca_with_single_precision_tp_measurements; static const std::string dca_with_memory_savings; static const std::string dca_with_managed_memory; Loading include/dca/io/hdf5/hdf5_reader.hpp +7 −3 Original line number Diff line number Diff line Loading @@ -33,7 +33,9 @@ class HDF5Reader { public: typedef H5::H5File file_type; HDF5Reader() : my_file(NULL), my_paths(0) {} // In: verbose. If true, the reader outputs a short log whenever it is executed. HDF5Reader(bool verbose = true) : my_file(NULL), my_paths(0), verbose_(verbose) {} ~HDF5Reader(); bool is_reader() { Loading Loading @@ -99,6 +101,8 @@ private: H5::H5File* my_file; std::vector<std::string> my_paths; bool verbose_; }; template <typename arbitrary_struct_t> Loading Loading @@ -276,7 +280,7 @@ void HDF5Reader::execute(std::string name, dca::linalg::Matrix<scalar_type, dca: } } } // io } // dca } // namespace io } // namespace dca #endif // DCA_IO_HDF5_HDF5_READER_HPP include/dca/io/hdf5/hdf5_writer.hpp +14 −7 Original line number Diff line number Diff line Loading @@ -36,7 +36,10 @@ public: typedef H5::H5File file_type; public: HDF5Writer() : my_file(NULL), file_id(-1), my_group(0), my_paths(0) {} // In: verbose. If true, the writer outputs a short log whenever it is executed. HDF5Writer(bool verbose = true) : my_file(NULL), file_id(-1), my_group(0), my_paths(0), verbose_(verbose) {} ~HDF5Writer(); bool is_reader() { Loading Loading @@ -125,6 +128,8 @@ private: std::vector<H5::Group*> my_group; std::vector<std::string> my_paths; bool verbose_; }; template <typename arbitrary_struct_t> Loading Loading @@ -353,6 +358,7 @@ void HDF5Writer::execute(const func::function<scalar_type, domain_type>& f) { if (f.size() == 0) return; if (verbose_) std::cout << "\t starts writing function : " << f.get_name() << "\n"; execute(f.get_name(), f); Loading @@ -363,6 +369,7 @@ void HDF5Writer::execute(const func::function<std::complex<scalar_type>, domain_ if (f.size() == 0) return; if (verbose_) std::cout << "\t starts writing function : " << f.get_name() << "\n"; execute(f.get_name(), f); Loading Loading @@ -646,7 +653,7 @@ void HDF5Writer::execute(const std::unique_ptr<T>& obj) { execute(*obj); } } // io } // dca } // namespace io } // namespace dca #endif // DCA_IO_HDF5_HDF5_WRITER_HPP Loading
cmake/dca_config.cmake +7 −7 Original line number Diff line number Diff line Loading @@ -237,12 +237,12 @@ endif() ################################################################################ # Single precision measurements # TODO: change to ON by default after merging and testing the two particle accumulator. option(DCA_WITH_SINGLE_PRECISION_MEASUREMENTS "Measure in single precision." OFF) mark_as_advanced(DCA_WITH_SINGLE_PRECISION_MEASUREMENTS) # TODO: maybe change to ON by default. option(DCA_WITH_SINGLE_PRECISION_TP_MEASUREMENTS "Measure in single precision." OFF) mark_as_advanced(DCA_WITH_SINGLE_PRECISION_TP_MEASUREMENTS) if (DCA_WITH_SINGLE_PRECISION_MEASUREMENTS) dca_add_config_define(DCA_WITH_SINGLE_PRECISION_MEASUREMENTS) if (DCA_WITH_SINGLE_PRECISION_TP_MEASUREMENTS) dca_add_config_define(DCA_WITH_SINGLE_PRECISION_TP_MEASUREMENTS) endif() ################################################################################ Loading Loading @@ -278,9 +278,9 @@ else() endif() if (DCA_WITH_SINGLE_PRECISION_MEASUREMENTS) set(MC_ACCUMULATION_SCALAR float) set(TP_ACCUMULATION_SCALAR float) else() set(MC_ACCUMULATION_SCALAR double) set(TP_ACCUMULATION_SCALAR double) endif() option(DCA_WITH_MANAGED_MEMORY "Use managed memory allocator." OFF) Loading
include/dca/config/accumulation_options.hpp.in +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ namespace config { // dca::config:: struct AccumulationOptions { using MCAccumulationScalar = @MC_ACCUMULATION_SCALAR@; using TPAccumulationScalar = @TP_ACCUMULATION_SCALAR@; static constexpr bool memory_savings = @MEMORY_SAVINGS@; Loading
include/dca/config/cmake_options.hpp +1 −2 Original line number Diff line number Diff line Loading @@ -40,8 +40,7 @@ struct CMakeOptions { static const std::string dca_profiler; static const std::string dca_with_autotuning; static const std::string dca_with_gnuplot; static const std::string dca_with_reduced_vertex_function; static const std::string dca_with_single_precision_measurements; static const std::string dca_with_single_precision_tp_measurements; static const std::string dca_with_memory_savings; static const std::string dca_with_managed_memory; Loading
include/dca/io/hdf5/hdf5_reader.hpp +7 −3 Original line number Diff line number Diff line Loading @@ -33,7 +33,9 @@ class HDF5Reader { public: typedef H5::H5File file_type; HDF5Reader() : my_file(NULL), my_paths(0) {} // In: verbose. If true, the reader outputs a short log whenever it is executed. HDF5Reader(bool verbose = true) : my_file(NULL), my_paths(0), verbose_(verbose) {} ~HDF5Reader(); bool is_reader() { Loading Loading @@ -99,6 +101,8 @@ private: H5::H5File* my_file; std::vector<std::string> my_paths; bool verbose_; }; template <typename arbitrary_struct_t> Loading Loading @@ -276,7 +280,7 @@ void HDF5Reader::execute(std::string name, dca::linalg::Matrix<scalar_type, dca: } } } // io } // dca } // namespace io } // namespace dca #endif // DCA_IO_HDF5_HDF5_READER_HPP
include/dca/io/hdf5/hdf5_writer.hpp +14 −7 Original line number Diff line number Diff line Loading @@ -36,7 +36,10 @@ public: typedef H5::H5File file_type; public: HDF5Writer() : my_file(NULL), file_id(-1), my_group(0), my_paths(0) {} // In: verbose. If true, the writer outputs a short log whenever it is executed. HDF5Writer(bool verbose = true) : my_file(NULL), file_id(-1), my_group(0), my_paths(0), verbose_(verbose) {} ~HDF5Writer(); bool is_reader() { Loading Loading @@ -125,6 +128,8 @@ private: std::vector<H5::Group*> my_group; std::vector<std::string> my_paths; bool verbose_; }; template <typename arbitrary_struct_t> Loading Loading @@ -353,6 +358,7 @@ void HDF5Writer::execute(const func::function<scalar_type, domain_type>& f) { if (f.size() == 0) return; if (verbose_) std::cout << "\t starts writing function : " << f.get_name() << "\n"; execute(f.get_name(), f); Loading @@ -363,6 +369,7 @@ void HDF5Writer::execute(const func::function<std::complex<scalar_type>, domain_ if (f.size() == 0) return; if (verbose_) std::cout << "\t starts writing function : " << f.get_name() << "\n"; execute(f.get_name(), f); Loading Loading @@ -646,7 +653,7 @@ void HDF5Writer::execute(const std::unique_ptr<T>& obj) { execute(*obj); } } // io } // dca } // namespace io } // namespace dca #endif // DCA_IO_HDF5_HDF5_WRITER_HPP