[shark] 53/79: removed same_closure, it is never going to work well
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Thu Nov 26 15:41:01 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch master
in repository shark.
commit 265942127f9728fb23cd37886178d6852fae439b
Author: Oswin <oswin.krause at di.ku.dk>
Date: Sat Oct 17 13:07:17 2015 +0200
removed same_closure, it is never going to work well
---
include/shark/LinAlg/BLAS/detail/iterator.hpp | 3 ---
.../shark/LinAlg/BLAS/kernels/matrix_assign.hpp | 5 ----
include/shark/LinAlg/BLAS/matrix_expression.hpp | 28 --------------------
include/shark/LinAlg/BLAS/matrix_proxy.hpp | 30 ----------------------
include/shark/LinAlg/BLAS/vector_expression.hpp | 11 --------
include/shark/LinAlg/BLAS/vector_proxy.hpp | 15 -----------
6 files changed, 92 deletions(-)
diff --git a/include/shark/LinAlg/BLAS/detail/iterator.hpp b/include/shark/LinAlg/BLAS/detail/iterator.hpp
index ddf97a5..c7190c5 100644
--- a/include/shark/LinAlg/BLAS/detail/iterator.hpp
+++ b/include/shark/LinAlg/BLAS/detail/iterator.hpp
@@ -220,7 +220,6 @@ public:
}
template<class T>
difference_type operator - (indexed_iterator<T> const& it) const {
- RANGE_CHECK(m_closure.same_closure(it.m_closure));
return m_index - it.m_index;
}
@@ -250,12 +249,10 @@ public:
// Comparison
template<class T>
bool operator == (indexed_iterator<T> const& it) const {
- RANGE_CHECK(m_closure.same_closure(it.m_closure));
return m_index == it.m_index;
}
template<class T>
bool operator < (indexed_iterator<T> const& it) const {
- RANGE_CHECK(m_closure.same_closure(it.m_closure));
return m_index < it.m_index;
}
diff --git a/include/shark/LinAlg/BLAS/kernels/matrix_assign.hpp b/include/shark/LinAlg/BLAS/kernels/matrix_assign.hpp
index 3dfe886..fcf31d7 100644
--- a/include/shark/LinAlg/BLAS/kernels/matrix_assign.hpp
+++ b/include/shark/LinAlg/BLAS/kernels/matrix_assign.hpp
@@ -58,11 +58,6 @@ public:
return m_expression(j, i);
}
- // Closure comparison
- bool same_closure(internal_transpose_proxy const& mu2) const {
- return m_expression.same_closure(mu2.m_expression);
- }
-
typedef typename matrix_closure_type::const_column_iterator const_row_iterator;
typedef typename matrix_closure_type::column_iterator row_iterator;
typedef typename matrix_closure_type::const_row_iterator const_column_iterator;
diff --git a/include/shark/LinAlg/BLAS/matrix_expression.hpp b/include/shark/LinAlg/BLAS/matrix_expression.hpp
index 14f7c7c..91bc864 100644
--- a/include/shark/LinAlg/BLAS/matrix_expression.hpp
+++ b/include/shark/LinAlg/BLAS/matrix_expression.hpp
@@ -92,12 +92,6 @@ public:
return m_functor(m_expression1(i), m_expression2(j));
}
- // Closure comparison
- bool same_closure(const vector_matrix_binary &vmb) const {
- return expression1().same_closure(vmb.expression1()) &&
- expression2().same_closure(vmb.expression2());
- }
-
typedef transform_iterator<typename E2::const_iterator,Binder1> const_row_iterator;
typedef transform_iterator<typename E1::const_iterator,Binder2> const_column_iterator;
typedef const_row_iterator row_iterator;
@@ -206,11 +200,6 @@ public:
return m_vector(j);
}
- // Closure comparison
- bool same_closure (const vector_repeater &other) const {
- return (*this).expression ().same_closure (other.expression ());
- }
-
// Iterator types
typedef typename V::const_iterator const_row_iterator;
typedef const_row_iterator row_iterator;
@@ -296,11 +285,6 @@ public:
return m_functor(m_expression(i, j));
}
- // Closure comparison
- bool same_closure(matrix_unary const &other) const {
- return m_expression.same_closure(other.m_expression);
- }
-
// Iterator types
typedef transform_iterator<typename E::const_row_iterator, F> const_row_iterator;
typedef transform_iterator<typename E::const_column_iterator, F> const_column_iterator;
@@ -444,12 +428,6 @@ public:
return m_functor( m_expression1 (i, j), m_expression2(i,j));
}
- // Closure comparison
- bool same_closure (matrix_binary const&mbs2) const {
- return m_expression1.same_closure (mbs2.m_expression1) ||
- m_expression2.same_closure (mbs2.m_expression2);
- }
-
// Iterator types
private:
typedef typename E1::const_row_iterator const_row_iterator1_type;
@@ -587,12 +565,6 @@ public:
return functor_type::apply(m_expression1, m_expression2, i);
}
- // Closure comparison
- bool same_closure(const matrix_vector_binary1 &mvb1) const {
- return (*this).expression1().same_closure(mvb1.expression1()) &&
- (*this).expression2().same_closure(mvb1.expression2());
- }
-
// Iterator types
private:
typedef typename E1::const_row_iterator const_subrow_iterator_type;
diff --git a/include/shark/LinAlg/BLAS/matrix_proxy.hpp b/include/shark/LinAlg/BLAS/matrix_proxy.hpp
index c9150ed..086c60a 100644
--- a/include/shark/LinAlg/BLAS/matrix_proxy.hpp
+++ b/include/shark/LinAlg/BLAS/matrix_proxy.hpp
@@ -255,11 +255,6 @@ public:
return *this;
}
- // Closure comparison
- bool same_closure(const matrix_reference& mr) const {
- return& m_expression ==& mr.m_expression;
- }
-
// Iterator types
typedef typename row_iterator<M>::type row_iterator;
typedef row_iterator const_row_iterator;
@@ -463,11 +458,6 @@ public:
expression().set_element(j,i,t);
}
- // Closure comparison
- bool same_closure(matrix_transpose const& mu2) const {
- return expression().same_closure(mu2.m_expression);
- }
-
typedef typename matrix_closure_type::const_column_iterator const_row_iterator;
typedef typename matrix_closure_type::column_iterator row_iterator;
typedef typename matrix_closure_type::const_row_iterator const_column_iterator;
@@ -813,11 +803,6 @@ public:
return *this;
}
- // Closure comparison
- bool same_closure(const matrix_row& mr) const {
- return expression().same_closure(mr.m_expression);
- }
-
// Iterator types
typedef typename M::const_row_iterator const_iterator;
typedef typename row_iterator<M>::type iterator;
@@ -1113,11 +1098,6 @@ public:
return *this;
}
- // Closure comparison
- bool same_closure(matrix_column const& mr) const {
- return m_wrapper.same_closure(mr.m_wrapper);
- }
-
// Iterator types
typedef typename wrapper_type::const_iterator const_iterator;
typedef typename wrapper_type::iterator iterator;
@@ -1337,11 +1317,6 @@ public:
return *this;
}
- // Closure comparison
- bool same_closure(const matrix_vector_range& mvr) const {
- return expression().same_closure(mvr.m_expression);
- }
-
typedef indexed_iterator<closure_type> iterator;
typedef indexed_iterator<const_closure_type> const_iterator;
@@ -1582,11 +1557,6 @@ public:
return *this;
}
- // Closure comparison
- bool same_closure(const self_type& mr) const {
- return (*this).expression().same_closure(mr.m_expression);
- }
-
// Iterator types
typedef subrange_iterator<typename row_iterator<M>::type> row_iterator;
typedef subrange_iterator<typename column_iterator<M>::type> column_iterator;
diff --git a/include/shark/LinAlg/BLAS/vector_expression.hpp b/include/shark/LinAlg/BLAS/vector_expression.hpp
index cb23923..2ce6a56 100644
--- a/include/shark/LinAlg/BLAS/vector_expression.hpp
+++ b/include/shark/LinAlg/BLAS/vector_expression.hpp
@@ -142,11 +142,6 @@ public:
return m_functor(m_expression[i]);
}
- // Closure comparison
- bool same_closure(vector_unary const &vu) const {
- return expression().same_closure(vu.expression());
- }
-
typedef transform_iterator<typename E::const_iterator,functor_type> const_iterator;
typedef const_iterator iterator;
@@ -294,12 +289,6 @@ public:
return m_functor(m_expression1(i),m_expression2(i));
}
- // Closure comparison
- bool same_closure (vector_binary const& vu) const {
- return expression1 ().same_closure (vu.expression1())
- && expression2 ().same_closure (vu.expression2());
- }
-
// Iterator types
// Iterator enhances the iterator of the referenced expressions
diff --git a/include/shark/LinAlg/BLAS/vector_proxy.hpp b/include/shark/LinAlg/BLAS/vector_proxy.hpp
index 7c1bbc5..e85a2a6 100644
--- a/include/shark/LinAlg/BLAS/vector_proxy.hpp
+++ b/include/shark/LinAlg/BLAS/vector_proxy.hpp
@@ -205,11 +205,6 @@ public:
return *this;
}
- // Closure comparison
- bool same_closure(vector_reference const& vr) const{
- return m_expression == vr.m_expression;
- }
-
// Iterator types
typedef typename V::const_iterator const_iterator;
typedef typename boost::mpl::if_<boost::is_const<V>,
@@ -413,11 +408,6 @@ public:
return *this;
}
- // Closure comparison
- bool same_closure(vector_range const& vr) const{
- return m_expression.same_closure(vr.m_expression);
- }
-
typedef subrange_iterator< typename vector_closure_type::iterator> iterator;
typedef subrange_iterator< typename vector_closure_type::const_iterator> const_iterator;
@@ -589,11 +579,6 @@ public:
// High level interface
// ---------
- bool same_closure(self_type const& t) const {
- //same closure if the values segments are overlapping
- return (t.storage()+t.size()) > storage() && (t.storage() < storage()+size());
- }
-
// --------------
// Element access
// --------------
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/shark.git
More information about the debian-science-commits
mailing list