Boost logo

Ublas :

Subject: Re: [ublas] patches for #7297, #7296, #6514, #6511 on trunk - please verify
From: sguazt (marco.guazzone_at_[hidden])
Date: 2012-08-28 04:04:58


On Tue, Aug 28, 2012 at 1:46 AM, Gunter Winkler <guwi17_at_[hidden]> wrote:
> Hello,
>
> I applied some small patches to trunk. Please verify that they work as expected.
>
> ------------------------------------------------------------------------
> r80267 | guwi17 | 2012-08-28 00:13:26 +0200 (Di, 28. Aug 2012) | 7 Zeilen
>
> boost/numeric/ublas/triangular.hpp - applied patch, see #4024
> libs/numeric/ublas/test/test_inplace_solve.cpp - fixed includes
>
> libs/numeric/ublas/test/utils.hpp - applied patch (after s/BOOST_UBLA_TEST/BOOST_UBLAS_TEST/g), see #7296
>
> ------------------------------------------------------------------------
> r80268 | guwi17 | 2012-08-28 00:34:03 +0200 (Di, 28. Aug 2012) | 3 Zeilen
>
> boost/numeric/ublas/traits.hpp - apply patch, see #6514
>
> ------------------------------------------------------------------------
> r80269 | guwi17 | 2012-08-28 01:29:31 +0200 (Di, 28. Aug 2012) | 4 Zeilen
>
> boost/numeric/ublas/operation: num_rows.hpp, num_columns.hpp - use matrix_traits, see #7297
>
> ------------------------------------------------------------------------
> r80270 | guwi17 | 2012-08-28 01:31:04 +0200 (Di, 28. Aug 2012) | 4 Zeilen
>
> boost/numeric/ublas/vector_expression.hpp - use enable_if for operator/(vector, scalar), see #6511
>
>
> If the patches work I can apply them to release branch.
>
> mfg
> Gunter
>

Hi,

Tests:
* begin_end
* num_columns
* num_rows size
* test_complex_norms
compiles correctly.

However, the compilation of test_inplace_solve (together with
test_coordinate_matrix_sort and test_assignment) still fails.
Here is the output of compiler that I get when I try to compile
test_inplace_solve (sorry it's very long):

--- [out] ---
/home/marco/sys/bin/g++ -I/home/marco/projects/svn/boost-trunk -Wall
-Wextra -ansi -pedantic test_inplace_solve.cpp -o
test_inplace_solve
test_inplace_solve.cpp: In function ‘int main()’:
test_inplace_solve.cpp:87:13: warning: unused variable ‘n’ [-Wunused-variable]
In file included from test_inplace_solve.cpp:5:0:
/home/marco/projects/svn/boost-trunk/boost/numeric/ublas/matrix_sparse.hpp:
In instantiation of
‘boost::numeric::ublas::mapped_vector_of_mapped_vector<T, L,
A>::mapped_vector_of_mapped_vector(boost::numeric::ublas::mapped_vector_of_mapped_vector<T,
L, A>::size_type,
boost::numeric::ublas::mapped_vector_of_mapped_vector<T, L,
A>::size_type, boost::numeric::ublas::mapped_vector_of_mapped_vector<T,
L, A>::size_type) [with T = double; L =
boost::numeric::ublas::basic_row_major<>; A =
boost::numeric::ublas::map_std<long unsigned int,
boost::numeric::ublas::map_std<long unsigned int, double,
std::allocator<std::pair<const long unsigned int, double> > >,
std::allocator<std::pair<const long unsigned int,
boost::numeric::ublas::map_std<long unsigned int, double,
std::allocator<std::pair<const long unsigned int, double> > > > > >;
boost::numeric::ublas::mapped_vector_of_mapped_vector<T, L,
A>::size_type = long unsigned int]’:
test_inplace_solve.cpp:55:13: required from ‘void
test_inplace_solve(unsigned int&) [with mat =
boost::numeric::ublas::mapped_vector_of_mapped_vector<double,
boost::numeric::ublas::basic_row_major<> >]’
test_inplace_solve.cpp:111:3: required from here
/home/marco/projects/svn/boost-trunk/boost/numeric/ublas/matrix_sparse.hpp:1376:9:
warning: unused parameter ‘non_zeros’ [-Wunused-parameter]
/home/marco/projects/svn/boost-trunk/boost/numeric/ublas/matrix_sparse.hpp:
In instantiation of
‘boost::numeric::ublas::mapped_vector_of_mapped_vector<T, L,
A>::mapped_vector_of_mapped_vector(boost::numeric::ublas::mapped_vector_of_mapped_vector<T,
L, A>::size_type,
boost::numeric::ublas::mapped_vector_of_mapped_vector<T, L,
A>::size_type, boost::numeric::ublas::mapped_vector_of_mapped_vector<T,
L, A>::size_type) [with T = double; L =
boost::numeric::ublas::basic_column_major<>; A =
boost::numeric::ublas::map_std<long unsigned int,
boost::numeric::ublas::map_std<long unsigned int, double,
std::allocator<std::pair<const long unsigned int, double> > >,
std::allocator<std::pair<const long unsigned int,
boost::numeric::ublas::map_std<long unsigned int, double,
std::allocator<std::pair<const long unsigned int, double> > > > > >;
boost::numeric::ublas::mapped_vector_of_mapped_vector<T, L,
A>::size_type = long unsigned int]’:
test_inplace_solve.cpp:55:13: required from ‘void
test_inplace_solve(unsigned int&) [with mat =
boost::numeric::ublas::mapped_vector_of_mapped_vector<double,
boost::numeric::ublas::basic_column_major<> >]’
test_inplace_solve.cpp:112:3: required from here
/home/marco/projects/svn/boost-trunk/boost/numeric/ublas/matrix_sparse.hpp:1376:9:
warning: unused parameter ‘non_zeros’ [-Wunused-parameter]
In file included from test_inplace_solve.cpp:6:0:
/home/marco/projects/svn/boost-trunk/boost/numeric/ublas/triangular.hpp:
In instantiation of ‘void boost::numeric::ublas::inplace_solve(const
boost::numeric::ublas::matrix_expression<E1>&,
boost::numeric::ublas::vector_expression<E2>&,
boost::numeric::ublas::upper_tag,
boost::numeric::ublas::row_major_tag,
boost::numeric::ublas::dense_proxy_tag) [with E1 =
boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_row_major<> >; E2 =
boost::numeric::ublas::vector<double>]’:
/home/marco/projects/svn/boost-trunk/boost/numeric/ublas/triangular.hpp:2246:9:
  required from ‘void boost::numeric::ublas::inplace_solve(const
boost::numeric::ublas::matrix_expression<E1>&,
boost::numeric::ublas::vector_expression<E2>&,
boost::numeric::ublas::upper_tag,
boost::numeric::ublas::row_major_tag) [with E1 =
boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_row_major<> >; E2 =
boost::numeric::ublas::vector<double>]’
/home/marco/projects/svn/boost-trunk/boost/numeric/ublas/triangular.hpp:2255:9:
  required from ‘void boost::numeric::ublas::inplace_solve(const
boost::numeric::ublas::matrix_expression<E1>&,
boost::numeric::ublas::vector_expression<E2>&,
boost::numeric::ublas::upper_tag) [with E1 =
boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_row_major<> >; E2 =
boost::numeric::ublas::vector<double>]’
test_inplace_solve.cpp:71:5: required from ‘void
test_inplace_solve(unsigned int&) [with mat =
boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_row_major<> >]’
test_inplace_solve.cpp:105:3: required from here
/home/marco/projects/svn/boost-trunk/boost/numeric/ublas/triangular.hpp:2165:42:
warning: comparison between signed and unsigned integer expressions
[-Wsign-compare]
/home/marco/projects/svn/boost-trunk/boost/numeric/ublas/triangular.hpp:
In instantiation of ‘void boost::numeric::ublas::inplace_solve(const
boost::numeric::ublas::matrix_expression<E1>&,
boost::numeric::ublas::vector_expression<E2>&,
boost::numeric::ublas::upper_tag,
boost::numeric::ublas::row_major_tag,
boost::numeric::ublas::dense_proxy_tag) [with E1 =
boost::numeric::ublas::matrix_unary2<const
boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_column_major<> >,
boost::numeric::ublas::scalar_identity<double> >; E2 =
boost::numeric::ublas::vector<double>]’:
/home/marco/projects/svn/boost-trunk/boost/numeric/ublas/triangular.hpp:2293:9:
  required from ‘void
boost::numeric::ublas::inplace_solve(boost::numeric::ublas::vector_expression<E1>&,
const boost::numeric::ublas::matrix_expression<E2>&,
boost::numeric::ublas::lower_tag,
boost::numeric::ublas::column_major_tag) [with E1 =
boost::numeric::ublas::vector<double>; E2 =
boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_column_major<> >]’
/home/marco/projects/svn/boost-trunk/boost/numeric/ublas/triangular.hpp:2302:9:
  required from ‘void
boost::numeric::ublas::inplace_solve(boost::numeric::ublas::vector_expression<E1>&,
const boost::numeric::ublas::matrix_expression<E2>&,
boost::numeric::ublas::lower_tag) [with E1 =
boost::numeric::ublas::vector<double>; E2 =
boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_column_major<> >]’
test_inplace_solve.cpp:76:5: required from ‘void
test_inplace_solve(unsigned int&) [with mat =
boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_column_major<> >]’
test_inplace_solve.cpp:106:3: required from here
/home/marco/projects/svn/boost-trunk/boost/numeric/ublas/triangular.hpp:2165:42:
warning: comparison between signed and unsigned integer expressions
[-Wsign-compare]
In file included from
/usr/lib/gcc/x86_64-redhat-linux/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h:64:0,
                 from
/usr/lib/gcc/x86_64-redhat-linux/4.7.0/../../../../include/c++/4.7.0/algorithm:63,
                 from
/home/marco/projects/svn/boost-trunk/boost/numeric/ublas/storage.hpp:16,
                 from
/home/marco/projects/svn/boost-trunk/boost/numeric/ublas/vector.hpp:10,
                 from test_inplace_solve.cpp:3:
/usr/lib/gcc/x86_64-redhat-linux/4.7.0/../../../../include/c++/4.7.0/bits/stl_tempbuf.h:
In instantiation of ‘std::_Temporary_buffer<_ForwardIterator,
_Tp>::_Temporary_buffer(_ForwardIterator, _ForwardIterator) [with
_ForwardIterator =
boost::numeric::ublas::indexed_iterator<boost::numeric::ublas::index_triple_array<boost::numeric::ublas::unbounded_array<long
unsigned int>, boost::numeric::ublas::unbounded_array<long unsigned
int>, boost::numeric::ublas::unbounded_array<double,
std::allocator<double> > >, std::random_access_iterator_tag>; _Tp =
boost::numeric::ublas::index_triple<boost::numeric::ublas::index_triple_array<boost::numeric::ublas::unbounded_array<long
unsigned int>, boost::numeric::ublas::unbounded_array<long unsigned
int>, boost::numeric::ublas::unbounded_array<double,
std::allocator<double> > > >]’:
/usr/lib/gcc/x86_64-redhat-linux/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h:3202:17:
  required from ‘void std::inplace_merge(_BIter, _BIter, _BIter) [with
_BIter = boost::numeric::ublas::indexed_iterator<boost::numeric::ublas::index_triple_array<boost::numeric::ublas::unbounded_array<long
unsigned int>, boost::numeric::ublas::unbounded_array<long unsigned
int>, boost::numeric::ublas::unbounded_array<double,
std::allocator<double> > >, std::random_access_iterator_tag>]’
/home/marco/projects/svn/boost-trunk/boost/numeric/ublas/matrix_sparse.hpp:4403:17:
  required from ‘void boost::numeric::ublas::coordinate_matrix<T, L,
IB, IA, TA>::sort() const [with T = double; L =
boost::numeric::ublas::basic_row_major<>; long unsigned int IB = 0ul;
IA = boost::numeric::ublas::unbounded_array<long unsigned int>; TA =
boost::numeric::ublas::unbounded_array<double, std::allocator<double>
>]’
/home/marco/projects/svn/boost-trunk/boost/numeric/ublas/matrix_sparse.hpp:4568:13:
  required from ‘boost::numeric::ublas::coordinate_matrix<T, L, IB,
IA, TA>::const_iterator2 boost::numeric::ublas::coordinate_matrix<T,
L, IB, IA, TA>::find2(int, boost::numeric::ublas::coordinate_matrix<T,
L, IB, IA, TA>::size_type, boost::numeric::ublas::coordinate_matrix<T,
L, IB, IA, TA>::size_type, int) const [with T = double; L =
boost::numeric::ublas::basic_row_major<>; long unsigned int IB = 0ul;
IA = boost::numeric::ublas::unbounded_array<long unsigned int>; TA =
boost::numeric::ublas::unbounded_array<double, std::allocator<double>
>; boost::numeric::ublas::coordinate_matrix<T, L, IB, IA,
TA>::size_type = long unsigned int]’
/home/marco/projects/svn/boost-trunk/boost/numeric/ublas/triangular.hpp:2015:70:
  required from ‘void boost::numeric::ublas::inplace_solve(const
boost::numeric::ublas::matrix_expression<E1>&,
boost::numeric::ublas::vector_expression<E2>&,
boost::numeric::ublas::lower_tag,
boost::numeric::ublas::row_major_tag,
boost::numeric::ublas::unknown_storage_tag) [with E1 =
boost::numeric::ublas::coordinate_matrix<double,
boost::numeric::ublas::basic_row_major<> >; E2 =
boost::numeric::ublas::vector<double>]’
/home/marco/projects/svn/boost-trunk/boost/numeric/ublas/triangular.hpp:2039:9:
  required from ‘void boost::numeric::ublas::inplace_solve(const
boost::numeric::ublas::matrix_expression<E1>&,
boost::numeric::ublas::vector_expression<E2>&,
boost::numeric::ublas::lower_tag,
boost::numeric::ublas::row_major_tag) [with E1 =
boost::numeric::ublas::coordinate_matrix<double,
boost::numeric::ublas::basic_row_major<> >; E2 =
boost::numeric::ublas::vector<double>]’
/home/marco/projects/svn/boost-trunk/boost/numeric/ublas/triangular.hpp:2048:9:
  required from ‘void boost::numeric::ublas::inplace_solve(const
boost::numeric::ublas::matrix_expression<E1>&,
boost::numeric::ublas::vector_expression<E2>&,
boost::numeric::ublas::lower_tag) [with E1 =
boost::numeric::ublas::coordinate_matrix<double,
boost::numeric::ublas::basic_row_major<> >; E2 =
boost::numeric::ublas::vector<double>]’
test_inplace_solve.cpp:66:5: required from ‘void
test_inplace_solve(unsigned int&) [with mat =
boost::numeric::ublas::coordinate_matrix<double,
boost::numeric::ublas::basic_row_major<> >]’
test_inplace_solve.cpp:109:3: required from here
/usr/lib/gcc/x86_64-redhat-linux/4.7.0/../../../../include/c++/4.7.0/bits/stl_tempbuf.h:258:6:
error: invalid initialization of non-const reference of type
‘boost::numeric::ublas::index_triple<boost::numeric::ublas::index_triple_array<boost::numeric::ublas::unbounded_array<long
unsigned int>, boost::numeric::ublas::unbounded_array<long unsigned
int>, boost::numeric::ublas::unbounded_array<double,
std::allocator<double> > > >&’ from an rvalue of type
‘boost::numeric::ublas::indexed_iterator<boost::numeric::ublas::index_triple_array<boost::numeric::ublas::unbounded_array<long
unsigned int>, boost::numeric::ublas::unbounded_array<long unsigned
int>, boost::numeric::ublas::unbounded_array<double,
std::allocator<double> > >,
std::random_access_iterator_tag>::reference {aka
boost::numeric::ublas::index_triple<boost::numeric::ublas::index_triple_array<boost::numeric::ublas::unbounded_array<long
unsigned int>, boost::numeric::ublas::unbounded_array<long unsigned
int>, boost::numeric::ublas::unbounded_array<double,
std::allocator<double> > > >}’
/usr/lib/gcc/x86_64-redhat-linux/4.7.0/../../../../include/c++/4.7.0/bits/stl_tempbuf.h:233:5:
error: in passing argument 3 of ‘void
std::__uninitialized_construct_buf(_ForwardIterator, _ForwardIterator,
_Tp&) [with _ForwardIterator =
boost::numeric::ublas::index_triple<boost::numeric::ublas::index_triple_array<boost::numeric::ublas::unbounded_array<long
unsigned int>, boost::numeric::ublas::unbounded_array<long unsigned
int>, boost::numeric::ublas::unbounded_array<double,
std::allocator<double> > > >*; _Tp =
boost::numeric::ublas::index_triple<boost::numeric::ublas::index_triple_array<boost::numeric::ublas::unbounded_array<long
unsigned int>, boost::numeric::ublas::unbounded_array<long unsigned
int>, boost::numeric::ublas::unbounded_array<double,
std::allocator<double> > > >]’
In file included from
/home/marco/projects/svn/boost-trunk/boost/numeric/ublas/vector.hpp:10:0,
                 from test_inplace_solve.cpp:3:
/home/marco/projects/svn/boost-trunk/boost/numeric/ublas/storage.hpp:
In instantiation of
‘boost::numeric::ublas::index_triple<M>::index_triple(const
self_type&) [with M =
boost::numeric::ublas::index_triple_array<boost::numeric::ublas::unbounded_array<long
unsigned int>, boost::numeric::ublas::unbounded_array<long unsigned
int>, boost::numeric::ublas::unbounded_array<double,
std::allocator<double> > >;
boost::numeric::ublas::index_triple<M>::self_type =
boost::numeric::ublas::index_triple<boost::numeric::ublas::index_triple_array<boost::numeric::ublas::unbounded_array<long
unsigned int>, boost::numeric::ublas::unbounded_array<long unsigned
int>, boost::numeric::ublas::unbounded_array<double,
std::allocator<double> > > >]’:
/usr/lib/gcc/x86_64-redhat-linux/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h:2166:11:
  required from ‘void std::__insertion_sort(_RandomAccessIterator,
_RandomAccessIterator) [with _RandomAccessIterator =
boost::numeric::ublas::indexed_iterator<boost::numeric::ublas::index_triple_array<boost::numeric::ublas::unbounded_array<long
unsigned int>, boost::numeric::ublas::unbounded_array<long unsigned
int>, boost::numeric::ublas::unbounded_array<double,
std::allocator<double> > >, std::random_access_iterator_tag>]’
/usr/lib/gcc/x86_64-redhat-linux/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h:2237:4:
  required from ‘void
std::__final_insertion_sort(_RandomAccessIterator,
_RandomAccessIterator) [with _RandomAccessIterator =
boost::numeric::ublas::indexed_iterator<boost::numeric::ublas::index_triple_array<boost::numeric::ublas::unbounded_array<long
unsigned int>, boost::numeric::ublas::unbounded_array<long unsigned
int>, boost::numeric::ublas::unbounded_array<double,
std::allocator<double> > >, std::random_access_iterator_tag>]’
/usr/lib/gcc/x86_64-redhat-linux/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h:5478:4:
  required from ‘void std::sort(_RAIter, _RAIter) [with _RAIter =
boost::numeric::ublas::indexed_iterator<boost::numeric::ublas::index_triple_array<boost::numeric::ublas::unbounded_array<long
unsigned int>, boost::numeric::ublas::unbounded_array<long unsigned
int>, boost::numeric::ublas::unbounded_array<double,
std::allocator<double> > >, std::random_access_iterator_tag>]’
/home/marco/projects/svn/boost-trunk/boost/numeric/ublas/matrix_sparse.hpp:4402:17:
  required from ‘void boost::numeric::ublas::coordinate_matrix<T, L,
IB, IA, TA>::sort() const [with T = double; L =
boost::numeric::ublas::basic_row_major<>; long unsigned int IB = 0ul;
IA = boost::numeric::ublas::unbounded_array<long unsigned int>; TA =
boost::numeric::ublas::unbounded_array<double, std::allocator<double>
>]’
/home/marco/projects/svn/boost-trunk/boost/numeric/ublas/matrix_sparse.hpp:4568:13:
  required from ‘boost::numeric::ublas::coordinate_matrix<T, L, IB,
IA, TA>::const_iterator2 boost::numeric::ublas::coordinate_matrix<T,
L, IB, IA, TA>::find2(int, boost::numeric::ublas::coordinate_matrix<T,
L, IB, IA, TA>::size_type, boost::numeric::ublas::coordinate_matrix<T,
L, IB, IA, TA>::size_type, int) const [with T = double; L =
boost::numeric::ublas::basic_row_major<>; long unsigned int IB = 0ul;
IA = boost::numeric::ublas::unbounded_array<long unsigned int>; TA =
boost::numeric::ublas::unbounded_array<double, std::allocator<double>
>; boost::numeric::ublas::coordinate_matrix<T, L, IB, IA,
TA>::size_type = long unsigned int]’
/home/marco/projects/svn/boost-trunk/boost/numeric/ublas/triangular.hpp:2015:70:
  required from ‘void boost::numeric::ublas::inplace_solve(const
boost::numeric::ublas::matrix_expression<E1>&,
boost::numeric::ublas::vector_expression<E2>&,
boost::numeric::ublas::lower_tag,
boost::numeric::ublas::row_major_tag,
boost::numeric::ublas::unknown_storage_tag) [with E1 =
boost::numeric::ublas::coordinate_matrix<double,
boost::numeric::ublas::basic_row_major<> >; E2 =
boost::numeric::ublas::vector<double>]’
/home/marco/projects/svn/boost-trunk/boost/numeric/ublas/triangular.hpp:2039:9:
  required from ‘void boost::numeric::ublas::inplace_solve(const
boost::numeric::ublas::matrix_expression<E1>&,
boost::numeric::ublas::vector_expression<E2>&,
boost::numeric::ublas::lower_tag,
boost::numeric::ublas::row_major_tag) [with E1 =
boost::numeric::ublas::coordinate_matrix<double,
boost::numeric::ublas::basic_row_major<> >; E2 =
boost::numeric::ublas::vector<double>]’
/home/marco/projects/svn/boost-trunk/boost/numeric/ublas/triangular.hpp:2048:9:
  required from ‘void boost::numeric::ublas::inplace_solve(const
boost::numeric::ublas::matrix_expression<E1>&,
boost::numeric::ublas::vector_expression<E2>&,
boost::numeric::ublas::lower_tag) [with E1 =
boost::numeric::ublas::coordinate_matrix<double,
boost::numeric::ublas::basic_row_major<> >; E2 =
boost::numeric::ublas::vector<double>]’
test_inplace_solve.cpp:66:5: required from ‘void
test_inplace_solve(unsigned int&) [with mat =
boost::numeric::ublas::coordinate_matrix<double,
boost::numeric::ublas::basic_row_major<> >]’
test_inplace_solve.cpp:109:3: required from here
/home/marco/projects/svn/boost-trunk/boost/numeric/ublas/storage.hpp:1755:9:
warning: base class ‘class boost::noncopyable_::noncopyable’ should be
explicitly initialized in the copy constructor [-Wextra]
--- [/out] ---

For now, I have no hint on how to solve it.

My system is Fedora Linux 17 x86_64 with GCC 4.7.0

Cheers,

-- Marco