lua-users home
lua-l archive

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


Sorry about the delay... still in the end-of-semester marathon. :)

> I have a few questions about numerical lua.
> 
> 1)  I am on a 32 bit x86 windows box and I'd like to link in tuned version
> of BLAS such as atlas.
> It's not clear how to do this with the current source.  What would be nice
> is to simply have a separate .dll containing the standard BLAS and perhaps
> LAPACK libraries that could be swapped out.  Is there any chance
> luamatrix.dll does this?  I notice that you have Fortran source which
> probably means you are not using the standard cblas wrappers for blas. In
> fact I did a dumpbin on luamatrix.dll and confirmed this.  Apparently
> luamatrix.dll includes additional routines other than the standard blas,
> which means swapping out  different blas libraries is not possible in the
> current setup.

There's actually an error in the Makefiles: only blas and lapack should be
linked to luamatrix.dll, but some other libraries are also being linked. I'll
fix that for the next release. I'm planning to release a quick fix version,
0.2.1, with a revamp of the Makefiles (including something suitable for MinGW)
and a few bug fixes.

You can link luamatrix.dll against dynamic/shared blas and lapack or any other
linear algebra kernel; check the Makefile in src for a few examples. I chose
Fortran sources to ease function calling and to offer more flexible linking
schemes (I guess. :)).


> 2)  Is there a convenient C or maybe C++ API for the library?  The thought
> here is to facilitate the ability to extend the library in a straightforward
> manner, perhaps with the help of tolua or SWIG.  Normally anything that
> needs to iterate over individual matrix elements should probably be written
> in C and then the interface extended to LUA.  The high level logic, gui's
> etc. could then remain in LUA.

Yes, there is. Check the include files (in your case, luamatrix.h
specifically) for the C API.

> I would dearly like to see a standard numerical library like this for LUA
> and it looks like you have a pretty good start here just playing around with
> it.  I actually implemented an interface like this between LUA blas and
> additional user defined libraries for a client, but alas can not release it
> since it's proprietary.

Bummer.

Cheers,
luis.

-- 
A mathematician is a device for turning coffee into theorems.
        -- P. Erdos 

-- 
Luis Carvalho
Applied Math PhD Student - Brown University
PGP Key: E820854A <carvalho@dam.brown.edu>