|
|
@ -20,6 +20,7 @@ namespace storm { |
|
|
|
template<typename ValueType> |
|
|
|
GmmxxMultiplier<ValueType>::GmmxxMultiplier(storm::storage::SparseMatrix<ValueType> const& matrix) : Multiplier<ValueType>(matrix) { |
|
|
|
// Intentionally left empty.
|
|
|
|
//STORM_LOG_DEBUG("\n" << matrix);
|
|
|
|
} |
|
|
|
|
|
|
|
template<typename ValueType> |
|
|
@ -181,6 +182,7 @@ namespace storm { |
|
|
|
uint64_t currentRowGroup = backwards ? rowGroupIndices.size() - 1 : 0; |
|
|
|
auto row_group_it = backwards ? rowGroupIndices.end() - 2 : rowGroupIndices.begin(); |
|
|
|
auto row_group_ite = backwards ? rowGroupIndices.begin() - 1 : rowGroupIndices.end() - 1; |
|
|
|
//if(choices) STORM_LOG_DEBUG(" ");
|
|
|
|
while (row_group_it != row_group_ite) { |
|
|
|
ValueType currentValue = storm::utility::zero<ValueType>(); |
|
|
|
|
|
|
@ -213,6 +215,10 @@ namespace storm { |
|
|
|
|
|
|
|
// Process the (rowGroupSize-1) remaining rows within the current row Group
|
|
|
|
uint64_t rowGroupSize = *(row_group_it + 1) - *row_group_it; |
|
|
|
uint choiceforprintout = 0; |
|
|
|
//std::cout << currentRowGroup << ": " << currentValue << ", ";
|
|
|
|
//STORM_LOG_DEBUG(std::setprecision(3) << vect_sp(gmm::linalg_traits<MatrixType>::row(itr), x) << " + " << *add_it << "; ");
|
|
|
|
//STORM_LOG_DEBUG(std::setprecision(3) << vect_sp(gmm::linalg_traits<MatrixType>::row(itr), x) << " + " << *add_it << "; ");
|
|
|
|
for (uint64_t i = 1; i < rowGroupSize; ++i) { |
|
|
|
ValueType newValue = b ? *add_it : storm::utility::zero<ValueType>(); |
|
|
|
newValue += vect_sp(gmm::linalg_traits<MatrixType>::row(itr), x); |
|
|
@ -220,12 +226,13 @@ namespace storm { |
|
|
|
if (choices && currentRow == *choice_it + *row_group_it) { |
|
|
|
oldSelectedChoiceValue = newValue; |
|
|
|
} |
|
|
|
|
|
|
|
if(this->isOverridden(currentRowGroup) ? !compare(newValue, currentValue) : compare(newValue, currentValue)) { |
|
|
|
//std::cout << newValue << ", ";
|
|
|
|
//STORM_LOG_DEBUG(std::setprecision(3) << vect_sp(gmm::linalg_traits<MatrixType>::row(itr), x) << " + " << *add_it << "; ");
|
|
|
|
currentValue = newValue; |
|
|
|
if (choices) { |
|
|
|
selectedChoice = currentRow - *row_group_it; |
|
|
|
} |
|
|
|
choiceforprintout = currentRow - *row_group_it; |
|
|
|
} |
|
|
|
// move row-based iterators to the next row
|
|
|
|
if (backwards) { |
|
|
@ -238,7 +245,8 @@ namespace storm { |
|
|
|
++add_it; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//STORM_LOG_DEBUG("\t= " << currentValue << "\tchoice: " << choiceforprintout);
|
|
|
|
//std::cout << std::fixed << std::setprecision(2) << " | v(" << currentRowGroup << ")=" << currentValue << " c: " << choiceforprintout << " |\n" ;
|
|
|
|
// Finally write value to target vector.
|
|
|
|
*target_it = currentValue; |
|
|
|
if(choices) { |
|
|
@ -261,6 +269,7 @@ namespace storm { |
|
|
|
++currentRowGroup; |
|
|
|
} |
|
|
|
} |
|
|
|
//std::cout << std::endl;
|
|
|
|
} |
|
|
|
|
|
|
|
template<> |
|
|
|