#include <qle/math/computeenvironment.hpp>
Definition at line 39 of file computeenvironment.hpp.
◆ ComputeEnvironment()
◆ ~ComputeEnvironment()
◆ getAvailableDevices()
std::set< std::string > getAvailableDevices |
( |
| ) |
const |
Definition at line 45 of file computeenvironment.cpp.
45 {
46 std::set<std::string> result;
48 auto tmp = f->getAvailableDevices();
49 result.insert(tmp.begin(), tmp.end());
50 }
51 return result;
52}
std::vector< ComputeFramework * > frameworks_
◆ hasContext()
bool hasContext |
( |
| ) |
const |
◆ selectContext()
void selectContext |
( |
const std::string & |
deviceName | ) |
|
Definition at line 56 of file computeenvironment.cpp.
56 {
58 return;
60 if (auto tmp = f->getAvailableDevices(); tmp.find(deviceName) != tmp.end()) {
64 return;
65 }
66 }
67 QL_FAIL("ComputeEnvironment::selectContext(): device '"
68 << deviceName <<
"' not found. Available devices: " << boost::join(
getAvailableDevices(),
","));
69}
std::set< std::string > getAvailableDevices() const
std::string currentContextDeviceName_
◆ context()
◆ reset()
Definition at line 37 of file computeenvironment.cpp.
37 {
41 for (auto& c : ComputeFrameworkRegistry::instance().getAll())
43}
◆ releaseFrameworks()
void releaseFrameworks |
( |
| ) |
|
|
private |
◆ frameworks_
◆ currentContext_
◆ currentContextDeviceName_
std::string currentContextDeviceName_ |
|
private |