lua-users home
lua-l archive

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


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