Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
VectorHelper.cpp
Go to the documentation of this file.
2
5
9
11
15
16namespace storm {
17namespace utility {
18
19template<typename ValueType>
20VectorHelper<ValueType>::VectorHelper() : doParallelize(storm::settings::getModule<storm::settings::modules::CoreSettings>().isUseIntelTbbSet()) {
21#ifndef STORM_HAVE_INTELTBB
22 STORM_LOG_THROW(!doParallelize, storm::exceptions::InvalidSettingsException, "Cannot parallelize without TBB.");
23#endif
24}
25
26template<typename ValueType>
28 return doParallelize;
29}
30
31template<typename ValueType>
32void VectorHelper<ValueType>::reduceVector(storm::solver::OptimizationDirection dir, std::vector<ValueType> const& source, std::vector<ValueType>& target,
33 std::vector<uint_fast64_t> const& rowGrouping, std::vector<uint_fast64_t>* choices) const {
34#ifdef STORM_HAVE_INTELTBB
35 if (this->parallelize()) {
36 storm::utility::vector::reduceVectorMinOrMaxParallel(dir, source, target, rowGrouping, choices);
37 } else {
38 storm::utility::vector::reduceVectorMinOrMax(dir, source, target, rowGrouping, choices);
39 }
40#else
41 storm::utility::vector::reduceVectorMinOrMax(dir, source, target, rowGrouping, choices);
42#endif
43}
44
45template<>
47 std::vector<storm::RationalFunction>&, std::vector<uint_fast64_t> const&,
48 std::vector<uint_fast64_t>*) const {
49 STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "This operation is not supported.");
50}
51
52template class VectorHelper<double>;
56} // namespace utility
57} // namespace storm
void reduceVector(storm::solver::OptimizationDirection dir, std::vector< ValueType > const &source, std::vector< ValueType > &target, std::vector< uint_fast64_t > const &rowGrouping, std::vector< uint_fast64_t > *choices=nullptr) const
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:30
void reduceVectorMinOrMax(storm::solver::OptimizationDirection dir, std::vector< T > const &source, std::vector< T > &target, std::vector< uint_fast64_t > const &rowGrouping, std::vector< uint_fast64_t > *choices=nullptr)
Reduces the given source vector by selecting either the smallest or the largest out of each row group...
Definition vector.h:852
LabParser.cpp.
Definition cli.cpp:18