[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: matrix operations and temporary objects?
- From: Leo Razoumov <slonik.az@...>
- Date: Tue, 4 Aug 2009 08:50:35 -0400
On 8/4/09, Juris Kalnins <email@example.com> wrote:
> On Mon, 03 Aug 2009 23:17:08 +0300, Leo Razoumov <firstname.lastname@example.org>
> > In the older days of numerics from 60-es to 80-es this problem was
> > easily resolved by shifting *all* resource management to a user.
> > ..
> > The underlying math library API is of the older variety and
> > expects user to do all the resource allocations.
> Don't fight the library, then.
> function matrix.add(arg1, arg2, dst)
> function matrix.mul(arg1, arg2, dst)
> for n=1,1000 do
> mul(m, m1, t)
> add(t, m2, m)
The intended audience of my efforts is "Matlab crowd" who are
accustomed to a concept of free lunch. Of course, a "real programmer"
will allocate all the memory manually:-) Seriously, though, I do agree
with you. It is for a good reason that time honored high performance
libraries such as BLAS or LAPACK let users manually handle the
resources. It gives them full control and after some practice is not
that hard. But in today's world of shortcuts and instant gratification
it is expected that the "platform" is smart enough to do all sort of
Give me "do_what_I_mean()" function call, pleease!:-)