lua-users home
lua-l archive

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



I sign up to the high performance matrix math interest group. :)

Currently, my work involves parallel processing of big multidimensional matrices in C++. There is interest in expanding the libraries to be usable from Lua, and it's sure interesting to read where people have been banging their heads until now.

In the long run, it would be meaningful to have a base matrix math library akin to what LuaSocket is for networking. LuaMatrix could be a good name. Intel Threading Building Blocks is an interesting piece of API to make use of multiple cores doing matrix calculations.

-asko


Chris kirjoitti 20.2.2008 kello 3:57:

On Feb 19, 2008 8:37 PM, Jean-Claude Wippler <jcw@equi4.com> wrote:
The following can be made to work:

        vertex_vector(20, 'x').value = 2.5

by having the call return a table or userdata with a suitable
__newindex.

This is exactly the problem I'm trying to avoid.  The problem is when
you call this millions of times you get millions of temporary objects.
 It's slow (lots of memory allocation) and causes garbage collector
thrashing.

Technically with that same approach it can look "proper":

   vertex_vector[20].x = 2.5

It's the same problem though with needing temporary objects.

CR