|
Ublas : |
From: Joe Gottman (jgottman_at_[hidden])
Date: 2007-02-28 20:05:13
I am getting some annoying warnings when I compile ublas code under MSVC
7.1. Given the following code:
boost::numeric::ublas::matrix<double> foo;
boost::numeic::ublas::vector<double> bar;
boost::numeric::ublas::vector<double> product(prod(foo, bar));
I get the following warning messages:
Is there any way to modify my code to get rid of these?
c:\code\boost\numeric\ublas\traits.hpp(42) : warning C4267: 'argument' :
conversion from 'size_t' to 'const unsigned int', possible loss of data
c:\code\boost\numeric\ublas\matrix_expression.hpp(3647) : see
reference to class template instantiation
'boost::numeric::ublas::promote_traits<X,Y>' being compiled
with
[
X=boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>::size_type,
Y=boost::numeric::ublas::matrix<double>::size_type
]
c:\code\fin46\fin46\correlated_uniform.cpp(47) : see reference
to class template instantiation
'boost::numeric::ublas::matrix_vector_binary2<E1,E2,F>' being compiled
with
[
E1=boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>,
E2=boost::numeric::ublas::matrix<double>,
F=boost::numeric::ublas::matrix_vector_prod2<double,double,boost::numeric::ublas::matrix_vector_binary2_traits<double,boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>,double,boost::numeric::ublas::matrix<double>>::promote_type>
]
c:\code\boost\numeric\ublas\traits.hpp(42) : warning C4244: 'argument' :
conversion from '__w64 int' to 'const int', possible loss of data
c:\code\boost\numeric\ublas\matrix_expression.hpp(3648) : see
reference to class template instantiation
'boost::numeric::ublas::promote_traits<X,Y>' being compiled
with
[
X=boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>::difference_type,
Y=boost::numeric::ublas::matrix<double>::difference_type
]
c:\code\boost\numeric\ublas\matrix_expression.hpp(3664) : warning C4267:
'return' : conversion from 'size_t' to
'boost::numeric::ublas::matrix_vector_binary2<E1,E2,F>::size_type',
possible loss of data
with
[
E1=boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>,
E2=boost::numeric::ublas::matrix<double>,
F=boost::numeric::ublas::matrix_vector_prod2<double,double,boost::numeric::ublas::matrix_vector_binary2_traits<double,boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>,double,boost::numeric::ublas::matrix<double>>::promote_type>
]
c:\code\boost\numeric\ublas\matrix_expression.hpp(3663) : while
compiling class-template member function
'boost::numeric::ublas::matrix_vector_binary2<E1,E2,F>::size_type
boost::numeric::ublas::matrix_vector_binary2<E1,E2,F>::size(void) const'
with
[
E1=boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>,
E2=boost::numeric::ublas::matrix<double>,
F=boost::numeric::ublas::matrix_vector_prod2<double,double,boost::numeric::ublas::matrix_vector_binary2_traits<double,boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>,double,boost::numeric::ublas::matrix<double>>::promote_type>
]
c:\code\fin46\fin46\correlated_uniform.cpp(47) : see reference
to class template instantiation
'boost::numeric::ublas::matrix_vector_binary2<E1,E2,F>' being compiled
with
[
E1=boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>,
E2=boost::numeric::ublas::matrix<double>,
F=boost::numeric::ublas::matrix_vector_prod2<double,double,boost::numeric::ublas::matrix_vector_binary2_traits<double,boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>,double,boost::numeric::ublas::matrix<double>>::promote_type>
]
c:\code\boost\numeric\ublas\detail\vector_assign.hpp(268) : warning
C4267: 'argument' : conversion from 'size_t' to
'boost::numeric::ublas::matrix_vector_binary2<E1,E2,F>::size_type',
possible loss of data
with
[
E1=boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>,
E2=boost::numeric::ublas::matrix<double>,
F=boost::numeric::ublas::matrix_vector_prod2<double,double,boost::numeric::ublas::matrix_vector_binary2_traits<double,boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>,double,boost::numeric::ublas::matrix<double>>::promote_type>
]
c:\code\boost\numeric\ublas\detail\vector_assign.hpp(280) : see
reference to function template instantiation 'void
boost::numeric::ublas::indexing_vector_assign<F,V,boost::numeric::ublas::matrix_vector_binary2<E1,E2,boost::numeric::ublas::matrix_vector_prod2<T1,T2,TR>>>(V
&,const boost::numeric::ublas::vector_expression<E> &)' being compiled
with
[
F=boost::numeric::ublas::scalar_assign,
V=boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>,
E1=boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>,
E2=boost::numeric::ublas::matrix<double>,
T1=double,
T2=double,
TR=boost::numeric::ublas::matrix_vector_binary2_traits<double,boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>,double,boost::numeric::ublas::matrix<double>>::promote_type,
E=boost::numeric::ublas::matrix_vector_binary2<boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>,boost::numeric::ublas::matrix<double>,boost::numeric::ublas::matrix_vector_prod2<double,double,boost::numeric::ublas::matrix_vector_binary2_traits<double,boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>,double,boost::numeric::ublas::matrix<double>>::promote_type>>
]
c:\code\boost\numeric\ublas\detail\vector_assign.hpp(448) : see
reference to function template instantiation 'void
boost::numeric::ublas::vector_assign<F,V,boost::numeric::ublas::matrix_vector_binary2<E1,E2,boost::numeric::ublas::matrix_vector_prod2<T1,T2,TR>>>(V
&,const boost::numeric::ublas::vector_expression<E>
&,boost::numeric::ublas::dense_proxy_tag)' being compiled
with
[
F=boost::numeric::ublas::scalar_assign,
V=boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>,
E1=boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_arr
ay<double>>,
E2=boost::numeric::ublas::matrix<double>,
T1=double,
T2=double,
TR=boost::numeric::ublas::matrix_vector_binary2_traits<double,boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>,double,boost::numeric::ublas::matrix<double>>::promote_type,
E=boost::numeric::ublas::matrix_vector_binary2<boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>,boost::numeric::ublas::matrix<double>,boost::numeric::ublas::matrix_vector_prod2<double,double,boost::numeric::ublas::matrix_vector_binary2_traits<double,boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>,double,boost::numeric::ublas::matrix<double>>::promote_type>>
]
c:\code\boost\numeric\ublas\vector.hpp(74) : see reference to
function template instantiation 'void
boost::numeric::ublas::vector_assign<boost::numeric::ublas::scalar_assign,boost::numeric::ublas::vector<T,A>,boost::numeric::ublas::matrix_vector_binary2<E1,E2,F>>(V
&,const boost::numeric::ublas::vector_expression<E> &)' being compiled
with
[
T=double,
A=boost::numeric::ublas::unbounded_array<double>,
E1=boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>,
E2=boost::numeric::ublas::matrix<double>,
F=boost::numeric::ublas::matrix_vector_prod2<double,double,boost::numeric::ublas::matrix_vector_binary2_traits<double,boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>,double,boost::numeric::ublas::matrix<double>>::promote_type>,
V=boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>,
E=boost::numeric::ublas::matrix_vector_binary2<boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>,boost::numeric::ublas::matrix<double>,boost::numeric::ublas::matrix_vector_prod2<double,double,boost::numeric::ublas::matrix_vector_
binary2_traits<double,boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>,double,boost::numeric::ublas::matrix<double>>::promote_type>>
]
c:\code\fin46\fin46\correlated_uniform.cpp(47) : see reference
to function template instantiation
'boost::numeric::ublas::vector<T,A>::vector<boost::numeric::ublas::matrix_vector_binary2<E1,E2,F>>(const
boost::numeric::ublas::vector_expression<E> &)' being compiled
with
[
T=double,
A=boost::numeric::ublas::unbounded_array<double>,
E1=boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>,
E2=boost::numeric::ublas::matrix<double>,
F=boost::numeric::ublas::matrix_vector_prod2<double,double,boost::numeric::ublas::matrix_vector_binary2_traits<double,boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>,double,boost::numeric::ublas::matrix<double>>::promote_type>,
E=boost::numeric::ublas::matrix_vector_binary2<boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>,boost::numeric::ublas::matrix<double>,boost::numeric::ublas::matrix_vector_prod2<double,double,boost::numeric::ublas::matrix_vector_binary2_traits<double,boost::numeric::ublas::vector<double,boost::numeric::ublas::unbounded_array<double>>,double,boost::numeric::ublas::matrix<double>>::promote_type>>
]