Sho looks great!
I have a question on how sho arrays are stored in memory. Do they use managed arrays underneath? Or somethin unmanaged based on the MKL data strucutres?
I'm asking because I had quite some trouble with large standard managed double arrays in .Net. Once your array has more than 1000 elements, the memory gets allocated on the large object heap and if one has a lot of allocations one is in total memory defragmentation/allocation hell. In my previous own homegrown matrix classes I resorted to all sorts of nasty tricks (splitting large arrays into smaller jagged ones, using object pools etc). I would much appreciate some info how this is handled in Sho.
If they are based on managed code memory structures, how do you deal with large arrays and the large object heap problem? If they are based on unmanaged stuff, do they implement the IDisposable pattern, or how do things work?
The Sho numeric (double, float, int) arrays use unmanaged memory. We did that primarily to get around the memory limit for .NET objects, as it's not uncommon for us to want matrices larger than 2GB. Sho arrays implement the IDisposable pattern.
- 回答としてマーク davidacoder 2011年4月2日 5:07