QMCPACK
OMPThreadCountProtectorLA.hpp
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) 2023 QMCPACK developers.
6 //
7 // File developed by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
8 //
9 // File created by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
10 //
11 //////////////////////////////////////////////////////////////////////////////////////
12 
13 #ifndef QMCPLUSPLUS_LATHREADPROTECTOR_H
14 #define QMCPLUSPLUS_LATHREADPROTECTOR_H
15 
16 #include <memory>
18 
19 namespace qmcplusplus
20 {
21 /** For linear algebra only. A service class to restore active avaiable threads upon destruction as the thread count recorded during construction
22  * It protects any side effects from linear algebra library calls changing the number of active avaiable threads.
23  * Known trouble maker: OpenBLAS https://github.com/xianyi/OpenBLAS/issues/3940
24  */
26 {
28  std::unique_ptr<Protector> handle_;
29 
30 public:
33 };
34 } // namespace qmcplusplus
35 #endif
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
utility functions for executors