Please help to move forward with ndslice
Ilya Yaroshenko via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jul 25 13:12:03 PDT 2016
On Monday, 25 July 2016 at 17:12:08 UTC, jmh530 wrote:
> On Sunday, 24 July 2016 at 17:30:24 UTC, Ilya Yaroshenko wrote:
>> Hello,
>>
>> I found a way how to correctly implement multidimensional
>> functional map for ndslices and for packed ndslices (tensors
>> composed of tensors). It allows
>> 1. a compiler to use vectorisation with SIMD instructions
>> like `fabs` or `sqrt` for example. But first [1] should be
>> merged
>> 2. to manage mapped ndslices as common ndslices.
>> In additional the future ndmap abstraction has zero
>> computational cost.
>>
>
>
> I'm a little confused. Why not just use slice.byElement.map!f?
>
> Anyway, I hope this work is related to multi-dimensional
> folding, as mentioned here
> https://github.com/libmir/mir/issues/209
1. ndmap is N-Dimensional Slice composed of lazy elements. a user
can use all nslice package to manage it.
2. byElement can not be vectorized
3. byElement adds few additional operations for each element, it
is slower than direct index access.
Just opened PR for ndmap :
https://github.com/dlang/phobos/pull/4652
[1] https://github.com/dlang/phobos/pull/4652
More information about the Digitalmars-d
mailing list