skip to main content

SciTech ConnectSciTech Connect

Title: Library API for Z-Order Memory Layout

This library provides a simple-to-use API for implementing an altnerative to traditional row-major order in-memory layout, one based on a Morton- order space filling curve (SFC) , specifically, a Z-order variant of the Morton order curve. The library enables programmers to, after a simple initialization step, to convert a multidimensional array from row-major to Z- order layouts, then use a single, generic API call to access data from any arbitrary (i,j,k) location from within the array, whether it it be stored in row- major or z-order format. The motivation for using a SFC in-memory layout is for improved spatial locality, which results in increased use of local high speed cache memory. The basic idea is that with row-major order layouts, a data access to some location that is nearby in index space is likely far away in physical memory, resulting in poor spatial locality and slow runtime. On the other hand, with a SFC-based layout, accesses that are nearby in index space are much more likely to also be nearby in physical memory, resulting in much better spatial locality, and better runtime performance. Numerous studies over the years have shown significant runtime performance gains are realized by using a SFC-basedmore » memory layout compared to a row-major layout, sometimes by as much as 50%, which result from the better use of the memory and cache hierarchy that are attendant with a SFC-based layout (see, for example, [Beth2012]). This library implementation is intended for use with codes that work with structured, array-based data in 2 or 3 dimensions. It is not appropriate for use with unstructured or point-based data.« less
Publication Date:
OSTI Identifier:
Report Number(s):
R&D Project: KJ0402000; 2015-044
DOE Contract Number:
Software Revision:
Software Package Number:
Software Package Contents:
Software CPU:
Open Source:
Source Code Available:
Research Org:
Lawrence Berkeley National Laboratory
Sponsoring Org:
United States Department of Energy
Country of Publication:
United States

To initiate an order for this software, request consultation services, or receive further information, fill out the request form below. You may also reach us by email at: .

ESTSC staff will begin to process an order for scientific and technical software once the payment and signed site license agreement are received. If the forms are not in order, ESTSC will contact you. No further action will be taken until all required information and/or payment is received. Orders are processed within three to five business days.

Software Request