[PPL-devel] [GIT] ppl/ppl(sparse_matrices): Wrap a few long lines.
Enea Zaffanella
zaffanella at cs.unipr.it
Tue Apr 17 16:22:38 CEST 2012
Module: ppl/ppl
Branch: sparse_matrices
Commit: beeeb4d650fb00620b1fe97c483722ae1dfb500c
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=beeeb4d650fb00620b1fe97c483722ae1dfb500c
Author: Enea Zaffanella <zaffanella at cs.unipr.it>
Date: Tue Apr 17 16:15:54 2012 +0200
Wrap a few long lines.
---
src/Sparse_Row.cc | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/Sparse_Row.cc b/src/Sparse_Row.cc
index d9afe77..c5c63a6 100644
--- a/src/Sparse_Row.cc
+++ b/src/Sparse_Row.cc
@@ -31,7 +31,8 @@ namespace {
class Sparse_Row_from_Dense_Row_helper_iterator {
public:
- Sparse_Row_from_Dense_Row_helper_iterator(const PPL::Dense_Row& row1, PPL::dimension_type sz)
+ Sparse_Row_from_Dense_Row_helper_iterator(const PPL::Dense_Row& row1,
+ PPL::dimension_type sz)
: row(row1), sz(sz), i(0) {
if (row.size() != 0 && row[0] == 0)
++(*this);
@@ -472,7 +473,8 @@ PPL::Sparse_Row::linear_combine(const Sparse_Row& y,
if (coeff2 == 1) {
// Optimized implementation for coeff1==1, coeff2==1.
iterator i = this->end();
- for (const_iterator j = y.lower_bound(start), j_end = y.lower_bound(end); j != j_end; ++j) {
+ for (const_iterator j = y.lower_bound(start),
+ j_end = y.lower_bound(end); j != j_end; ++j) {
i = insert(i, j.index());
*i += *j;
if (*i == 0)
@@ -483,7 +485,8 @@ PPL::Sparse_Row::linear_combine(const Sparse_Row& y,
if (coeff2 == -1) {
// Optimized implementation for coeff1==1, coeff2==-1.
iterator i = this->end();
- for (const_iterator j = y.lower_bound(start), j_end = y.lower_bound(end); j != j_end; ++j) {
+ for (const_iterator j = y.lower_bound(start),
+ j_end = y.lower_bound(end); j != j_end; ++j) {
i = insert(i, j.index());
*i -= *j;
if (*i == 0)
@@ -493,7 +496,8 @@ PPL::Sparse_Row::linear_combine(const Sparse_Row& y,
}
// Optimized implementation for coeff1==1.
iterator i = this->end();
- for (const_iterator j = y.lower_bound(start), j_end = y.lower_bound(end); j != j_end; ++j) {
+ for (const_iterator j = y.lower_bound(start),
+ j_end = y.lower_bound(end); j != j_end; ++j) {
i = insert(i, j.index());
add_mul_assign(*i, *j, coeff2);
if (*i == 0)
@@ -928,7 +932,8 @@ PPL::linear_combine(Dense_Row& x, const Sparse_Row& y,
Coefficient_traits::const_reference coeff2) {
PPL_ASSERT(x.size() == y.size());
if (coeff1 == 1) {
- for (Sparse_Row::const_iterator i = y.begin(), i_end = y.end(); i != i_end; ++i)
+ for (Sparse_Row::const_iterator i = y.begin(),
+ i_end = y.end(); i != i_end; ++i)
add_mul_assign(x[i.index()], *i, coeff2);
return;
}
More information about the PPL-devel
mailing list