LSST Applications g070148d5b3+33e5256705,g0d53e28543+25c8b88941,g0da5cf3356+2dd1178308,g1081da9e2a+62d12e78cb,g17e5ecfddb+7e422d6136,g1c76d35bf8+ede3a706f7,g295839609d+225697d880,g2e2c1a68ba+cc1f6f037e,g2ffcdf413f+853cd4dcde,g38293774b4+62d12e78cb,g3b44f30a73+d953f1ac34,g48ccf36440+885b902d19,g4b2f1765b6+7dedbde6d2,g5320a0a9f6+0c5d6105b6,g56b687f8c9+ede3a706f7,g5c4744a4d9+ef6ac23297,g5ffd174ac0+0c5d6105b6,g6075d09f38+66af417445,g667d525e37+2ced63db88,g670421136f+2ced63db88,g71f27ac40c+2ced63db88,g774830318a+463cbe8d1f,g7876bc68e5+1d137996f1,g7985c39107+62d12e78cb,g7fdac2220c+0fd8241c05,g96f01af41f+368e6903a7,g9ca82378b8+2ced63db88,g9d27549199+ef6ac23297,gabe93b2c52+e3573e3735,gb065e2a02a+3dfbe639da,gbc3249ced9+0c5d6105b6,gbec6a3398f+0c5d6105b6,gc9534b9d65+35b9f25267,gd01420fc67+0c5d6105b6,geee7ff78d7+a14128c129,gf63283c776+ede3a706f7,gfed783d017+0c5d6105b6,w.2022.47
LSST Data Management Base Package
|
Namespaces | |
namespace | version |
Classes | |
class | LibraryException |
Unable to load library. More... | |
class | ModuleImporter |
Base class that defines an interface for importing Python modules. More... | |
class | NoThreadsException |
No threading library is available. More... | |
class | PythonModuleImporter |
Functions | |
std::string | libraryExtension () |
Return filename extension for libraries. More... | |
std::string | getLibraryFilename (std::string const &name) |
Get filename for library. More... | |
bool | canLoadLibrary (std::string const &libName) |
Return whether we can load a library. More... | |
template<typename T > | |
T * | loadSymbol (std::string const &libName, std::string const &symName) |
Load a symbol from a dynamic library. More... | |
bool | haveThreads () |
Are threaded packages available? More... | |
void | setNumThreads (unsigned int numThreads) |
Set number of threads to use. More... | |
unsigned int | getNumThreads () |
Get maximum number of threads we might use. More... | |
bool | disableImplicitThreading () |
Disable threading that has not been set explicitly. More... | |
void | installPythonModuleImporter () |
PYBIND11_MODULE (cppimport, mod) | |
PYBIND11_MODULE (threads, mod) | |
Variables | |
bool const | haveOpenBlas = loadOpenBlas() |
Is OpenBLAS available? More... | |
bool const | haveMkl = loadMkl() |
Is MKL available? More... | |
std::string const | allowEnvvar = "LSST_ALLOW_IMPLICIT_THREADS" |
Environment variable to allow implicit threading. More... | |
bool lsst::base::canLoadLibrary | ( | std::string const & | libName | ) |
Return whether we can load a library.
The proper filename extension will be added to the library name unless one is specified.
libName | Library name |
Definition at line 37 of file library.cc.
bool lsst::base::disableImplicitThreading | ( | ) |
Disable threading that has not been set explicitly.
Some threaded packages implicitly use multiple threads if the user doesn't explicitly state the number of desired threads. However, this can interfere with operations that are parallelised at a higher level. This function will disable threading unless the user has explicitly specified the number of desired threads through environment variables.
This behavior may be disabled by setting the environment variable specified by allowEnvvar.
This is principally intended for Linux machines (we explicitly load .so dynamic libraries); MacOS has its own way of doing threading (Grand Central Dispatch) that throttles threads to avoid overwhelming the machine.
@ return whether we disabled threading
Definition at line 132 of file threads.cc.
std::string lsst::base::getLibraryFilename | ( | std::string const & | name | ) |
Get filename for library.
We'll add the typical filename extension for the platform unless the user specifies a ".so" or ".dylib" extension.
Definition at line 27 of file library.cc.
unsigned int lsst::base::getNumThreads | ( | ) |
Get maximum number of threads we might use.
Returns the maximum value of the number of threads being used by the threading libraries that are available.
Definition at line 120 of file threads.cc.
bool lsst::base::haveThreads | ( | ) |
void lsst::base::installPythonModuleImporter | ( | ) |
Definition at line 60 of file cppimport.cc.
std::string lsst::base::libraryExtension | ( | ) |
Return filename extension for libraries.
Typically ".so" for Linux and ".dylib" for Mac.
Definition at line 17 of file library.cc.
T * lsst::base::loadSymbol | ( | std::string const & | libName, |
std::string const & | symName | ||
) |
Load a symbol from a dynamic library.
The proper filename extension will be added to the library name unless one is specified.
No mangling is performed on the symbol name.
libName | Library name (NOT including ".so" or ".dylib") |
symName | Symbol name |
Definition at line 51 of file library.h.
lsst::base::PYBIND11_MODULE | ( | cppimport | , |
mod | |||
) |
Definition at line 62 of file cppimport.cc.
lsst::base::PYBIND11_MODULE | ( | threads | , |
mod | |||
) |
Definition at line 32 of file threads.cc.
void lsst::base::setNumThreads | ( | unsigned int | numThreads | ) |
Set number of threads to use.
NoThreadsException | if no threading library is available |
Definition at line 107 of file threads.cc.
std::string const lsst::base::allowEnvvar = "LSST_ALLOW_IMPLICIT_THREADS" |
|
extern |
Is MKL available?
Definition at line 105 of file threads.cc.
|
extern |
Is OpenBLAS available?
Definition at line 104 of file threads.cc.