lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 8/4/09, Juris Kalnins <juris@mt.lv> wrote:
> On Mon, 03 Aug 2009 23:17:08 +0300, Leo Razoumov <slonik.az@gmail.com>
> wrote:
>
>
> > 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)
>  end
>

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
boiler-plate stuff.

Give me "do_what_I_mean()" function call, pleease!:-)

--Leo--