Boost logo

Ublas :

From: rustinc (cedric.rustin_at_[hidden])
Date: 2008-02-04 11:27:59


Hi, I'm a new Ublas user.
I wish to do the following thing: I want to create a new matrix specifying its
size (m rows, n columns) and a pointer to the data contained in the matrix.
These data naturally fit the UBLAS storage. It is maybe a little bit strange
but I necessary need this functionality.
I explain why...
In fact I implement a program in which two processes run in parallel (thanks
to pthreads,shared memory or MPI). It exists some common interface between
the two processes. In the first process a UBLAS matrix is created and
assigned, the interface is created and it contains the matrix data. The other
process knows the size of the matrix but I really don't wish to copy the data
of the interface in a new matrix. The size of the interface is really big and
the update of the quantities at the interface occurs very often.
I assume it exists in the vector/matrix class a pointer to the data. If yes
what? May I to assigned it? Or is it protected???
How have I to do?

-- 
Rustin Cédric
Aspirant F.N.R.S.
065/37.42.17.
0479/42.60.82.
Faculté Polytechnique de Mons (FPMs)
Service de Mécanique rationnelle, Dynamique et Vibrations
Boulevard Dolez 31
7000 Mons (Belgique)