|
Ublas : |
From: Paul C. Leopardi (leopardi_at_[hidden])
Date: 2005-08-01 19:45:50
Hi all,
I have been testing uBLAS CVS using GluCat and g++ 4.0.1. If I compile without
inlining (eg. -O1), I see the following warning.
make[2]: Entering directory
`/home/leopardi/Documents/Working/Working-0.1.9/glucat/transforms'
if /usr/local/gcc/gcc-4.0.1/bin/g++ -DHAVE_CONFIG_H -I. -I. -I..
-Wstrict-aliasing=2 -Wall -ansi -DNDEBUG -g -O1 -finline-limit=400
-D_GLUCAT_HAVE_UBLAS_LU_H -D_GLUCAT_USE_GNU_CXX_HASH_MAP -fno-check-new
-fabi-version=0 -fexceptions -MT transforms.o -MD -MP -MF
".deps/transforms.Tpo" -c -o transforms.o transforms.cpp; \
then mv -f ".deps/transforms.Tpo" ".deps/transforms.Po"; else rm -f
".deps/transforms.Tpo"; exit 1; fi
../boost/numeric/ublas/operation_sparse.hpp: In function ‘M&
boost::numeric::ublas::sparse_prod(const
boost::numeric::ublas::matrix_expression<E2>&, const
boost::numeric::ublas::matrix_expression<E2>&, M&, TRI,
boost::numeric::ublas::row_major_tag) [with M =
boost::numeric::ublas::compressed_matrix<double,
boost::numeric::ublas::basic_row_major<size_t, ptrdiff_t>, 0ul,
boost::numeric::ublas::unbounded_array<size_t, std::allocator<size_t> >,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >, E1
= boost::numeric::ublas::compressed_matrix<double,
boost::numeric::ublas::basic_row_major<size_t, ptrdiff_t>, 0ul,
boost::numeric::ublas::unbounded_array<size_t, std::allocator<size_t> >,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >, E2
= boost::numeric::ublas::compressed_matrix<double,
boost::numeric::ublas::basic_row_major<size_t, ptrdiff_t>, 0ul,
boost::numeric::ublas::unbounded_array<size_t, std::allocator<size_t> >,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >,
TRI = boost::numeric::ublas::basic_full<size_t>]’:
../boost/numeric/ublas/operation_sparse.hpp:42: warning:
‘temporary$data_$data_’ may be used uninitialized in this function
Line 42 of operation_sparse.hpp has:
vector<value_type> temporary (e2 ().size2 ());
Using -O3 the warning disappears, leading me to guess that with -O3 the
optimizer is getting more information from the inlined call to
temporary.clear() on line 43 of operation_sparse.hpp.
Can and should the uBLAS code in operation_sparse.hpp be changed to prevent
this warning?
Best regards, Paul Leopardi