Vectorization examples

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Mon Apr 20 13:01:11 PDT 2015


On 4/20/2015 2:41 AM, bearophile wrote:
> "Utilizing the other 80% of your system's performance: Starting with
> Vectorization" by Ulrich Drepper:
>
> https://www.youtube.com/watch?v=DXPfE2jGqg0
>
> It shows two still missing parts of the D type system: a way to define strongly
> typed byte alignments for arrays (something better than the aligned() shown
> here, because I prefer the alignment to be part of the type),

Use arrays of double2, float4, int4, etc., declared in core.simd. Those will be 
aligned appropriately.


> and a way to tell
> the type system that some array slices are fully distinct (the __restrict seen
> here, I think this information doesn't need to be part of a type).

A runtime test is sufficient.


More information about the Digitalmars-d mailing list