|
Ublas : |
From: Karl Meerbergen (Karl.Meerbergen_at_[hidden])
Date: 2005-10-13 04:10:32
Hi,
The bindings use specializations of the matrix traits.
For ublas, these are
#include <boost/numeric/bindings/traits/ublas_matrix.hpp>
Have you included this file?
Best,
Karl
On Thursday 13 October 2005 10:45, Jianwei Han wrote:
> Hi:
> I'm trying to compile lapack sample using ublas bindings, but failed:(
> The sample is very simple:
>
> int main()
> {
> typedef ublas::matrix<double, ublas::column_major> mat;
>
> mat A(5,5);
> mat b(5, 1);
>
> // Construct a simple matrix
> for (int i=0; i<5; ++i)
> for (int j=0; j<5; ++j)
> A(i,j) = i<=j ? 5.0+i-j : 0.0;
>
> std::cout << A << std::endl;
>
> for (int i=0; i<5; ++i)
> b(i,0) = i;
>
> boost::numeric::bindings::lapack::gesv(A, b);
>
> // .... Other staff ...
>
> return 0;
> }
>
> Is there anyone successfully using ublas lapack bindings under VC 7.1?
>
> But I get the following error (it seems something wrong with
>
> "matrix_traits.hpp"):
> >-------------------------------------------------------------------------
> >-------------------------------------------------------------------------
> >-------------
>
>
> d:\Develop\Project\Libraries\boost-sandbox\boost\numeric\bindings\lapack\ge
>sv.hpp(102): error C2027: use of undefined type
> 'boost::STATIC_ASSERTION_FAILURE<x>' with
> [
> x=false
> ]
>
>
> d:\Develop\Project\Libraries\boost-sandbox\boost\numeric\bindings\lapack\ge
>sv.hpp(102)
>
> : see reference to class template instantiation
>
> 'boost::STATIC_ASSERTION_FAILURE<x>' being compiled
> with
> [
> x=false
> ]
>
> d:\Develop\Project\Libraries\boost-sandbox\boost\numeric\bindings\lapack\ge
>sv.hpp(98): error C2027: use of undefined type
> 'boost::STATIC_ASSERTION_FAILURE<x>' with
> [
> x=false
> ]
>
>
> d:\Develop\Project\Libraries\boost-sandbox\boost\numeric\bindings\lapack\ge
>sv.hpp(98)
>
> : see reference to class template instantiation
>
> 'boost::STATIC_ASSERTION_FAILURE<x>' being compiled
> with
> [
> x=false
> ]
>
> d:\Develop\Project\Libraries\boost-sandbox\boost\numeric\bindings\lapack\ge
>sv.hpp(102): error C2039: 'matrix_structure' : is not a member of
> 'boost::numeric::bindings::traits::matrix_traits<M>'
> with
> [
> M=mat
> ]
>
> d:\Develop\Project\Libraries\boost-sandbox\boost\numeric\bindings\lapack\ge
>sv.hpp(98): error C2039: 'matrix_structure' : is not a member of
> 'boost::numeric::bindings::traits::matrix_traits<M>'
> with
> [
> M=mat
> ]
>
>
> d:\Develop\Project\Libraries\boost-sandbox\boost\numeric\bindings\lapack\ge
>sv.hpp(137)
>
> : see reference to function template instantiation 'int
>
>
> boost::numeric::bindings::lapack::gesv<MatrA,MatrB,boost::numeric::bindings
>::traits::detail::array<T>>(MatrA &,IVec &,MatrB &)' being compiled
> with
> [
> MatrA=mat,
> MatrB=mat,
> T=int,
> IVec=boost::numeric::bindings::traits::detail::array<int>
> ]
>
> d:\Develop\Project\Libraries\boost-sandbox\boost\numeric\bindings\traits\ma
>trix_traits.hpp(102): error C2039: 'size1' : is not a member of
> 'boost::numeric::bindings::traits::matrix_traits<M>'
> with
> [
> M=mat
> ]
>
> d:\Develop\Project\Libraries\boost-sandbox\boost\numeric\bindings\lapack\ge
>sv.hpp(98): error C2065: 'matrix_structure' : undeclared identifier
>
> d:\Develop\Project\Libraries\boost-sandbox\boost\numeric\bindings\lapack\ge
>sv.hpp(98): error C2146: syntax error : missing ',' before identifier
> 'matrix_structure'
>
> d:\Develop\Project\Libraries\boost-sandbox\boost\numeric\bindings\lapack\ge
>sv.hpp(102): error C2146: syntax error : missing ',' before identifier
> 'matrix_structure'
>
> d:\Develop\Project\Libraries\boost-sandbox\boost\numeric\bindings\lapack\ge
>sv.hpp(115): error C2893: Failed to specialize function template
> 'matrix_traits<M>::pointer
> boost::numeric::bindings::traits::matrix_storage(M &)'
> With the following template arguments:
> 'mat'
>
> d:\Develop\Project\Libraries\boost-sandbox\boost\numeric\bindings\lapack\ge
>sv.hpp(118): error C2893: Failed to specialize function template
> 'matrix_traits<M>::pointer
> boost::numeric::bindings::traits::matrix_storage(M &)'
> With the following template arguments:
> 'mat'
>
> d:\Develop\Project\Libraries\boost-sandbox\boost\numeric\bindings\lapack\ge
>sv.hpp(98): error C2955: 'boost::is_same' : use of class template requires
> template argument list
>
> d:\Develop\Project\Libraries\boost-sandbox\boost\numeric\bindings\lapack\ge
>sv.hpp(102): error C2955: 'boost::is_same' : use of class template requires
> template argument list
>
>
> d:\Develop\Project\Libraries\Boost_Compile\Boost_1_33\include\boost-1_33\bo
>ost\type_traits\is_same.hpp(37)
>
> : see declaration of 'boost::is_same'
>
>
> d:\Develop\Project\Libraries\boost-sandbox\boost\numeric\bindings\lapack\ge
>sv.hpp(98): error C2976: 'boost::is_same' : too few template arguments
>
>
> d:\Develop\Project\Libraries\Boost_Compile\Boost_1_33\include\boost-1_33\bo
>ost\type_traits\is_same.hpp(37)
>
> : see declaration of 'boost::is_same'
>
>
> d:\Develop\Project\Libraries\boost-sandbox\boost\numeric\bindings\lapack\ge
>sv.hpp(102): error C2976: 'boost::is_same' : too few template arguments
>
>
> d:\Develop\Project\Libraries\Boost_Compile\Boost_1_33\include\boost-1_33\bo
>ost\type_traits\is_same.hpp(37)
>
> : see declaration of 'boost::is_same'
>
>
> d:\Develop\Project\Libraries\boost-sandbox\boost\numeric\bindings\lapack\ge
>sv.hpp(102): error C3861: 'matrix_structure': identifier not found, even
> with argument-dependent lookup
>
> d:\Develop\Project\Libraries\boost-sandbox\boost\numeric\bindings\traits\ma
>trix_traits.hpp(102): error C3861: 'size1': identifier not found, even with
> argument-dependent lookup
>
> >-------------------------------------------------------------------------
> >-------------------------------------------------------------------------
> >-------------
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
-- ============================================== Look at our unique training program and Register on-line at http://www.fft.be/?id=35 ---------------------------------------------- Karl Meerbergen Free Field Technologies 16 place de l'Université B-1348 Louvain-la-Neuve - BELGIUM Company Phone: +32 10 45 12 26 Company Fax: +32 10 45 46 26 Mobile Phone: +32 474 26 66 59 Home Phone: +32 2 306 38 10 mailto:Karl.Meerbergen_at_[hidden] http://www.fft.be ==============================================