lsst.base
19.0.0-8-g082faa5
LSST Data Management Base Package
include
lsst
base
threads.h
Go to the documentation of this file.
1
#ifndef LSST_BASE_THREADS_H
2
#define LSST_BASE_THREADS_H
3
4
#include <stdexcept>
5
#include <string>
6
7
namespace
lsst
{
8
namespace
base {
9
10
extern
bool
const
haveOpenBlas
;
11
extern
bool
const
haveMkl
;
12
16
std::string
const
allowEnvvar
=
"LSST_ALLOW_IMPLICIT_THREADS"
;
17
18
20
class
NoThreadsException
:
public
std::runtime_error
{
21
public
:
22
NoThreadsException
() :
std
::
runtime_error
(
"No threading library is available"
) {};
23
};
24
26
bool
haveThreads
() {
return
haveOpenBlas
||
haveMkl
; }
27
31
void
setNumThreads
(
unsigned
int
numThreads);
32
37
unsigned
int
getNumThreads
();
38
55
bool
disableImplicitThreading
();
56
57
}}
// namespace lsst::base
58
59
60
#endif // include guard
lsst::base::haveThreads
bool haveThreads()
Are threaded packages available?
Definition:
threads.h:26
std::string
STL class.
lsst::base::allowEnvvar
std::string const allowEnvvar
Environment variable to allow implicit threading.
Definition:
threads.h:16
lsst::base::haveMkl
bool const haveMkl
Is MKL available?
Definition:
threads.cc:105
lsst::base::disableImplicitThreading
bool disableImplicitThreading()
Disable threading that has not been set explicitly.
Definition:
threads.cc:132
lsst::base::setNumThreads
void setNumThreads(unsigned int numThreads)
Set number of threads to use.
Definition:
threads.cc:107
std::runtime_error
STL class.
lsst
Definition:
mainpage.dox:1
std
STL namespace.
lsst::base::NoThreadsException::NoThreadsException
NoThreadsException()
Definition:
threads.h:22
lsst::base::haveOpenBlas
bool const haveOpenBlas
Is OpenBLAS available?
Definition:
threads.cc:104
lsst::base::getNumThreads
unsigned int getNumThreads()
Get maximum number of threads we might use.
Definition:
threads.cc:120
lsst::base::NoThreadsException
No threading library is available.
Definition:
threads.h:20
Generated on Fri Jun 19 2020 00:45:05 for lsst.base by
1.8.18