On Thu, Feb 3, 2011 at 11:09 AM, Dawid Weiss <[email protected]>wrote:
> > So, key step here would be to expose a native array from DenseMatrix, > right? > > What format do you require? Would row major order be OK? > > But when I looked at DenseMatrix its internals are: > > private double[][] values; > > and this doesn't map to a contiguous memory chunk, does it? > No, but that isn't all that hard to fix. > The whole > point of using Colt in C2 was so that we didn't have to do any copying > because Colt's internal representation was already a double[]. > Like I said, once we know what you need, it isn't a big deal to make it so. I am not sure we have zMult, but that is simple as well. > The > native blas we used could adapt its routines to row-major or > column-major by doing transformations of arguments, but not all > implementations do. If I remember right, AMD's ACML requires > column-major (right, sure it is Fortran :). > Do you use that? If not, I would rather stay with row major for now. We can look to see if flexibility is possible as well. > > > Sorry about that. I feel your pain, quite > > literally. But I also really appreciate your feedback. > > Staszek will be the right person to talk to. We would be very > interested in getting mahout-math to work so that it could perform > certain computations using, for example, AMD's ACML... Java is fast, > but these optimized native libraries are still way ahead for numerical > OK. Let's continue to discuss what is needed. My provisional plan would be to adapt our code to use a single block of memory with row and column strides and offsets to allow whatever we want in terms of internal order and efficient views.
