473,756 Members | 7,560 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using boostbindings with lapack

Hi,

don't know if this is the correct group, but try anyway.

I would like to use boostbindings from the boost sandbox together with
my project where I use boost::numeric: :ublas vectors and matrices.

I would guess that I could use these directly with the bindings in the
boost sandbox like:

----
#include <boost/numeric/bindings/lapack/gesv.hpp>
#include "MechComputer.h pp"

#include <iostream>

using namespace boost::numeric;
namespace lapack = boost::numeric: :bindings::lapa ck;
using namespace std;
namespace rw {
namespace dynamics {
MechComputer::M echComputer(con st MechSystem& msystem,
const ublas::vector<d ouble>& q0,
const ublas::vector<d ouble>& v0)
: _system(msystem ), _q(q0), _v(v0) {
}
const ublas::vector<d ouble>& MechComputer::s tep(double h) {
ublas::matrix<d oubledG = _system.DConstr aints(_q);
std::vector<ubl as::matrix<doub le ddG =
_system.DDConst raints(_q);
ublas::vector<d oubledV = _system.DV(_q);
ublas::vector<d oublem = _system.GetMass ();

ublas::matrix<d oublemM = M(dG, m);
ublas::vector<d oublevFT = mFmT(dG, ddG, dV, _v, m);

ublas::matrix<d oubleB(vFT.size (), 1);

lapack::gesv(M, B); // Result in B

return m; // Just return something
}
}
}
----

Compiling with this command-line:
----
preben@thinkgen ~/working/master/src $ icc -I
/home/preben/working/boost-sandbox -c MechComputer.cp p
MechComputer.cp p(31): error: no instance of overloaded function
"boost::numeric ::bindings::lap ack::gesv" matches the argument list
argument types are: (boost::numeric ::ublas::matrix <double,
boost::numeric: :ublas::row_maj or,
boost::numeric: :ublas::unbound ed_array<double , std::allocator< double>>>
(const boost::numeric: :ublas::matrix< double,
boost::numeric: :ublas::row_maj or,
boost::numeric: :ublas::unbound ed_array<double , std::allocator< double>>>
&, const boost::numeric: :ublas::vector< double,
boost::numeric: :ublas::unbound ed_array<double , std::allocator< double>>>
&), boost::numeric: :ublas::matrix< double,
boost::numeric: :ublas::row_maj or,
boost::numeric: :ublas::unbound ed_array<double , std::allocator< double>>>)
lapack::gesv(M, B); // Result in B
^

compilation aborted for MechComputer.cp p (code 2)
preben@thinkgen ~/working/master/src $
----

I don't understand the error and why it's wrong.
g++ complains even more and the error message is even more unclear for me.
/ Preben
Dec 30 '06 #1
1 5120
Preben wrote:
don't know if this is the correct group, but try anyway.

I would like to use boostbindings from the boost sandbox together with
my project where I use boost::numeric: :ublas vectors and matrices.

I would guess that I could use these directly with the bindings in the
boost sandbox like:

----
#include <boost/numeric/bindings/lapack/gesv.hpp>
#include "MechComputer.h pp"

#include <iostream>

using namespace boost::numeric;
namespace lapack = boost::numeric: :bindings::lapa ck;
using namespace std;
namespace rw {
namespace dynamics {
MechComputer::M echComputer(con st MechSystem& msystem,
const ublas::vector<d ouble>& q0,
const ublas::vector<d ouble>& v0)
: _system(msystem ), _q(q0), _v(v0) {
}
const ublas::vector<d ouble>& MechComputer::s tep(double h) {
ublas::matrix<d oubledG = _system.DConstr aints(_q);
std::vector<ubl as::matrix<doub le ddG =
_system.DDConst raints(_q);
ublas::vector<d oubledV = _system.DV(_q);
ublas::vector<d oublem = _system.GetMass ();

ublas::matrix<d oublemM = M(dG, m);
ublas::vector<d oublevFT = mFmT(dG, ddG, dV, _v, m);

ublas::matrix<d oubleB(vFT.size (), 1);

lapack::gesv(M, B); // Result in B

return m; // Just return something
}
}
}
----

Compiling with this command-line:
----
preben@thinkgen ~/working/master/src $ icc -I
/home/preben/working/boost-sandbox -c MechComputer.cp p
MechComputer.cp p(31): error: no instance of overloaded function
"boost::numeric ::bindings::lap ack::gesv" matches the argument list
argument types are: (boost::numeric ::ublas::matrix <double,
boost::numeric: :ublas::row_maj or,
boost::numeric: :ublas::unbound ed_array<double , std::allocator< double>>>
(const boost::numeric: :ublas::matrix< double,
boost::numeric: :ublas::row_maj or,
boost::numeric: :ublas::unbound ed_array<double , std::allocator< double>>>
&, const boost::numeric: :ublas::vector< double,
boost::numeric: :ublas::unbound ed_array<double , std::allocator< double>>>
&), boost::numeric: :ublas::matrix< double,
boost::numeric: :ublas::row_maj or,
boost::numeric: :ublas::unbound ed_array<double , std::allocator< double>>>)
lapack::gesv(M, B); // Result in B
^

compilation aborted for MechComputer.cp p (code 2)
preben@thinkgen ~/working/master/src $
----

I don't understand the error and why it's wrong.
g++ complains even more and the error message is even more unclear for me.
Probably better to try the Boost User list. Also, you might consider
using STLFilt to make template error messages more readable.

Cheers! --M

Dec 31 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
3080
by: drife | last post by:
Hello, Could someone please provide instructions for install Numeric with ATLAS and LAPACK? I've actually done this correctly, I think. But I don't see any difference in the speed. I'm calculating eigenvalues for a 3600 X 3600 covariance matrix.
1
1540
by: Edward C. Jones | last post by:
I have a PC with Debian sid installed. I install all my Python stuff in /usr/local. I just installed numarray 1.3.1. Blaslite and lapacklite were compiled. Did the installation process search for blas and lapack?
1
3245
by: pervinder | last post by:
Hi, I am building a c++ executable which uses fortan math libs. blas, lapack etc. But when i build this on HP-UX, i get below linker errors while it build without anyissues on Sun and Linux platforms. dgetrs_ (first referenced in .../../output/HPUX_32/lib/acc352/dbg/libmtx.a(denseMatrix.o)) (code) dsytrs_ (first referenced in
6
3697
by: Santosh | last post by:
Hello all, I am trying to interface c++ and fortran, the fortran code is already there and I was successful in calling the subroutines and functions, but was not able to send the fortran module data into my C++ code and viceversa. I used gcc 3.3 and g95 for c++ and fortran resp. Here is a little made up sample code so that u could understand my problem. $cat fort.f90
3
3110
by: eri | last post by:
Hi all I need to convert a Fortran program I wrote some months ago. I need BLAS / LAPACK routines and it seems to be very difficult to make it work under Win + MingW32 + DevCPP; so I wonder if there is someone who has managed to install them and has written a sort of HOWTO. I've already downloaded the .zip packages from netlib. What I couldn't find is how to fit them to my needs: I mean, which libs are needed, which header, how to link...
7
2148
by: taoyangsjtu | last post by:
Dear friends, Now, I have just installed the system with full fedora core 4. I had to use lapack, but I don't know how to install and use it. Can anybody tell me the installation process in detail. Thank you! I have downloaded the lapack.tgz and the fortran compiler (g77) is on my computer. Thank you! Tao Yang
1
3457
by: Ken Dere | last post by:
I am trying to install numpy-0.9.8 prior to installing scipy (0.4.9) on a machine running Suse 10.0 with Python 2.4 I am able to get numpy installed to the point when I import it I can do the following: numpy.show_config() atlas_threads_info: NOT AVAILABLE
2
2562
by: Frédéric Degraeve | last post by:
Hello, My compiler is visual 7.1 ( Microsoft Visual C++ .NET ). I work on a c++ library for a big company which do many scientific computes. I want to integrate lapack++ inside the library by replacing a Matrix-like type by LaGenMatDouble and an Array-like type by LaVectorDouble. May be later, i will integrate also the complex types. On the c++ library, there is a strange event where a pointer seems to be changed and i really dont get...
2
2999
by: aberte | last post by:
Hi, i'm learning how to use lapack library (in particular, Intel MKL). I wish to know how I have to format the my inputs. I'm calling lapack functions from c++ (zhetri, zhemm, zgemm, zhseqr, ztrevc). I declare the 3x3 matrix (in c++) in this way: complex MyMatrix; I intend MyMatrix, MyMatrix, MyMatrix
0
9462
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9287
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10046
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9722
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8723
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7259
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6542
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5155
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5318
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.