|
Ublas : |
From: VTK FAN (vtk_fan_at_[hidden])
Date: 2005-06-20 21:41:39
Hello, I was wondering if anyone could help me with
this issue. I am investigating using uBLAS as the
basis of container classes for solving partial
differential equations. I have a discretized mesh and
solution vectors associated with the mesh which I
would like to store and also make use of BLAS like
operations for computing sums, norms, axpy ops,
transforms, scaling, slicing etc, and also be able to
allocate, grow, shrink and destroy these solution
vectors during runtime.
The uBLAS interface to ATLAS also interested me. How
easy is it to deallocate and grow/shrink uBLAS
vectors? I could not find anything on the
Documentation page as many links seem to be broken. Is
there a big memory penalty as compared to STL's vector
class or regular C arrays? Would the c_vector and
c_matrix classes have any restrictions on use compared
to other uBLAS containers?
Is uBLAS being actively developed and will it be
maintained for the next few years? And one dumb
question, if I allocate a c_vector using new, how do I
delete it without any memory leaks? For example can I
do:
namespace mySolver = boost::numeric::ublas
mySolver::c_vector *pressure_vector = new
mySolver::c_vector(npoints_to_be_read);
...
...
bunch of solver code
...
...
delete pressure_vector;
pressure_vector = NULL;
I want to prevent any leaks and was not sure how to
allocate/delete pointers to these uBLAS templated
classes. I was not able to locate any such examples on
the Web using uBLAS in this fashion. Responses would
be much appreciated.
Thanks,
Srini
__________________________________________________________
Free antispam, antivirus and 1GB to save all your messages
Only in Yahoo! Mail: http://in.mail.yahoo.com