Rank: 304253 based on 0 downloads (last 30 days) and 0 file submitted
photo

Kevin Stone

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Kevin View all
Updated File Comments Rating
25 Nov 2013 sharedmatrix SHAREDMATRIX Allows any Matlab object to be shared between Matlab sessions (w/o using file I/O). Author: Joshua Dillon

dominik, sharedmatrix doesn't support class objects. Only numeric (dense/sparse/complex are all supported), logical, and character matrices, as well as cell arrays and structs consisting of those types of matrices.

17 Jun 2013 sharedmatrix SHAREDMATRIX Allows any Matlab object to be shared between Matlab sessions (w/o using file I/O). Author: Joshua Dillon

This function was exactly what I've been looking for! I work with large matrices that only need read access, and having each worker store the whole thing wastes a ridiculous amount of memory.

However, I did notice a few bugs in the windows implementation. One was with alignment -- I have a lot of SSE mex code that needs 16 byte aligned arrays -- setting align_size in the header wasn't working as intended. Another was the handling of empty matrices and uninitialized cells in cell arrays. Also, to keep matlab from crashing (due to detach not being called) on ctrl-c or when an error occurs I wrapped the SharedMemory calls in handle classes, and made use of James Tursa's mxGetPropertyPtr submission.

The modified code/scripts are at:

http://bengal.missouri.edu/~kes25c/SharedMemory-Windows.zip

It includes precompiled binaries for windows 64 (made with Visual Studio 2010 sp1 and Boost 1.53). Maybe it will help someone else.

Contact us