C++ Logo


Advanced search

Re: [SG14] [EXTERNAL] Re: SG14 Features

From: Andrew Lumsdaine <al75_at_[hidden]>
Date: Mon, 16 Dec 2019 21:26:55 +0000
We should loop Peter Gottschling into this discussion as he implemented this for MTL4.

Best Regards,
Andrew Lumsdaine
(Sent from portable device, please excuse brevity and typos.)

On Dec 16, 2019, at 1:18 PM, Hoemmen, Mark via SG14 <sg14_at_[hidden]> wrote:

On 12/11/19, 2:24 PM, "SG14 on behalf of Jeremy Ong via SG14" <sg14-bounces_at_[hidden]<mailto:sg14-bounces_at_[hidden]> on behalf of sg14_at_[hidden]<mailto:sg14_at_[hidden]>> wrote:
> This is a bit out of left field, but I'd be interested in a data structure adapter which packs its elements based on Morton codes (or some other space-filling Hilbert curve, see https://en.wikipedia.org/wiki/Z-order_curve).

Greetings! It should be possible to write an mdspan (P0009) Layout that uses a space-filling curve to order its elements. I’ll be happy to talk with you more if you’re interested. The main purpose of mdspan’s Layout customization point is to optimize array layout for the computer architecture and parallelization scheme – e.g., to ensure coalesced access on GPUs and improve spatial locality on CPUs. Users can write custom Layouts, but if you think a space-filling curve Layout should be part of the standard, please let me know and I’ll bring it up with the other P0009 authors. That would likely be offered as a follow-on paper.

Mark Hoemmen
SG14 mailing list

Received on 2019-12-16 15:30:35