C++ Logo

sg14

Advanced search

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

From: Hoemmen, Mark <mhoemme_at_[hidden]>
Date: Mon, 16 Dec 2019 21:18:15 +0000
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.

Thanks!
Mark Hoemmen

Received on 2019-12-16 15:20:42