Boost logo

Ublas :

From: Marco (brbromo_at_[hidden])
Date: 2006-09-12 09:09:53


Atlas bindings available on

http://news.tiker.net/filebrowser/software/boost-bindings

and described in

http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Linear_Algebra_With_UBLAS

are rising a lot of problems on my debian box.

- they are searching for ublas.h and clapack.h in the wrong place
- if I correct their includes, I still get

/tmp/ccW4mZZR.o: In function
`boost::numeric::bindings::atlas::detail::getrf(CBLAS_ORDER, int, int,
double*, int, int*)':
a.cpp:(.gnu.linkonce.t._ZN5boost7numeric8bindings5atlas6detail5getrfE11CBLAS_ORDERiiPdiPi[boost::numeric::bindings::atlas::detail::getrf(CBLAS_ORDER,
int, int, double*, int, int*)]+0x30): undefined reference to
`clapack_dgetrf'
/tmp/ccW4mZZR.o: In function
`boost::numeric::bindings::atlas::detail::getri(CBLAS_ORDER, int,
double*, int, int const*)':
a.cpp:(.gnu.linkonce.t._ZN5boost7numeric8bindings5atlas6detail5getriE11CBLAS_ORDERiPdiPKi[boost::numeric::bindings::atlas::detail::getri(CBLAS_ORDER,
int, double*, int, int const*)]+0x29): undefined reference to
`clapack_dgetri

with the example source code

#include <boost/numeric/bindings/atlas/clapack.hpp>
#include <boost/numeric/bindings/traits/ublas_matrix.hpp>
#include <boost/numeric/bindings/traits/std_vector.hpp>

namespace ublas = boost::numeric::ublas;
namespace atlas = boost::numeric::bindings::atlas;

int main() {
     std::size_t n = 5;
     ublas::matrix<double> A (n, n);
     // fill matrix A

     std::vector<int> ipiv (n); // pivot vector
     atlas::lu_factor (A, ipiv); // alias for getrf()
     atlas::lu_invert (A, ipiv); // alias for getri()
 }

How could I use ATLAS (I need SVD) with uBLAS?

Thanks,
Marco