Skip to content
Generate indexing expressions into common, arbitrarily-nested data layouts.
Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
images
.gitignore
README.md
lil.py

README.md

Logical Indexing Library

Generate Indexing Expressions into Arbitrarily-Nested Row-Major, Column-Major, Z-Morton, and Hilbert Layouts

Requires z3 python module.

Usage:

$ python2.7 lil.py "ROWMAJ(8, 8, 1)"
Concrete args:  f(3, 7) = 31
Symbolic args:  f(i, j) = 8*i + j
Mixed args:     f(i*3, j + m) = 24*i + j + m

argv[1] should contain a layout descriptor of the form:

LAYOUT(n, m, k)

where:

  • LAYOUT can be ROWMAJ, COLMAJ, ZMORTON, or HILBERT,
  • n is the number of rows,
  • m is the number of columns,
  • k is the element size, or another layout descriptor.

Examples:

  • ROWMAJ(4, 4, 1): a four-by-four block of elements in row-major order r44
  • ZMORTON(4, 4, 1) : a four-by-four block of elements in z-morton order z44
  • ZMORTON(4, 4, ROWMAJ(4, 4, 1)) : sixteen four-by-four blocks of row-major-ordered elements ordered along a Z-Morton curve. z44r44
Something went wrong with that request. Please try again.