Boost logo

Boost :

Subject: Re: [boost] RFC: runtime-flexible arrays
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2012-02-16 09:21:33

On 02/16/2012 01:40 PM, Larry Evans wrote:
> How would NT2 do a transpose like the one on line 00201 of:

What you can do is change the "storage order", i.e. consider that a
transposed matrix in row-major is the same as the same matrix
reinterpreted in column-major.
I assume this library (marray) does just that.

But mixing operations between different storage orders just causes
massive amount of problems if you want to vectorize and use the cache
efficiently, so we don't support it.

I don't think we really have native support for transposed views other
than with the actual type of the expression template trans(a).

> ? Judging from a brief look at:
> which suggests an iliffe data structure contains pointer
> to subarrays, I'd guess that would be more difficult than
> if a dope vector data structure, described on the same
> web page, were used. With a dope vector, a transpose
> would just mean reversing the dope vector. I'm guessing
> marray using something like a dope vector. However,
> with the iliffe data structure, I'd guess you'd have
> to recalculate several pointers. Right?

We don't have a special function for in-place transposition, just
transpose copy (which is fused with all other element-wise operations).

In any case rebuilding the index of the result is necessary whenever the
size or shape changes.

Boost list run by bdawes at, gregod at, cpdaniel at, john at