On Tue, Apr 3, 2012 at 6:20 AM, Cristi Cobzarenco <[email protected]> wrote: > > The point of these is to have light-weight element wise operation support. > It's true that in theory the built-in arrays do this. However, this library > is built on top BLAS/LAPACK, which means operations on large matrices will > be faster than on D arrays. >
I can't agree with building it on top of LAPACK or any other BLAS implementation, but perhaps I shouldn't complain because I'm not the one who's going to be implementing it. I like the approach Eigen has taken where it offers its own BLAS implementation and, iirc, other BLAS libraries can be used as optional back-ends. > Also, as far as I know, D doesn't support > allocating dynamic 2-D arrays (as in not arrays of arrays), not to mention > 2-D slicing (keeping track of leading dimension). > I fail to see why there is any need for 2D arrays. We need to make sure multidimensional arrays (matrices) have data in very good arrangements. This is called tiling and it requires 1D arrays: 2D arrays are stored as 1D arrays together with an indexing mechanism. > Also I'm not sure how a case like this will be compiled, it may or may not > allocate a temporary: > > a[] = b[] * c[] + d[] * 2.0; > > The expression templates in SciD mean there will be no temporary allocation > in this call. > Why are expression templates used? Are you pretty much rewriting Eigen in D ? I don't see why expression templates would be needed with D.
