ttypt/islet.h(3)islet

NAME

ttypt/islet.h - Public API for libislet โ€” spatial indexing with Morton codes.

SYNOPSIS

#include <stdint.h>
#include <stdbool.h>
#include <ttypt/corm.h>
#include 'morton.h'

Data Structures

struct islet_ops_t

Per-dimension operation table.

Macros

#define ISLET_MISS UINT32_MAX
#define ISLET_FILL_MAX_VOL 1048576u
#define ISLET_AXIS_MAX_POINTS 1024u

Functions

void islet_init (void)

Initialize the islet subsystem.

uint32_t islet_open (char *filename, char *database, uint32_t mask)

Open or create a spatial database.

uint32_t islet_iter_1 (uint32_t pdb_hd, int16_t *s, uint16_t *l)

Create an iterator for all points within a rectangular bounding box.

uint32_t islet_iter_2_32 (uint32_t pdb_hd, int32_t *s, int32_t *l)

2D x 32-bit box iterator. Same contract as islet_iter_N(), on int32_t lanes (start AND lengths). Use with islet_next32().

int islet_next (int16_t *p, uint32_t *ref, uint32_t cur)

Advance iterator and retrieve the next point/value pair.

int islet_next32 (int32_t *p, uint32_t *ref, uint32_t cur)

Advance a 2D x 32-bit iterator (islet_iter_2_32 handle).

static void islet_del_1 (uint32_t pdb_hd, int16_t *p)

Delete the first value stored at a spatial coordinate.

static void islet_del_2 (uint32_t pdb_hd, int16_t *p)

2D delete. See islet_del_1() for the family docs.

static void islet_del_3 (uint32_t pdb_hd, int16_t *p)

3D delete. See islet_del_1() for the family docs.

static void islet_del_4 (uint32_t pdb_hd, int16_t *p)

4D delete. See islet_del_1() for the family docs.

static void islet_del_2_32 (uint32_t pdb_hd, int32_t *p)

2D x 32-bit delete. See islet_del_1() for the family docs.

static uint32_t islet_del_all_1 (uint32_t pdb_hd, int16_t *p)

Delete every value stored at a spatial coordinate.

static uint32_t islet_del_all_2 (uint32_t pdb_hd, int16_t *p)

2D delete-all. See islet_del_all_1() for the family docs.

static uint32_t islet_del_all_3 (uint32_t pdb_hd, int16_t *p)

3D delete-all. See islet_del_all_1() for the family docs.

static uint32_t islet_del_all_4 (uint32_t pdb_hd, int16_t *p)

4D delete-all. See islet_del_all_1() for the family docs.

static uint32_t islet_del_all_2_32 (uint32_t pdb_hd, int32_t *p)

2D x 32-bit delete-all. See islet_del_all_1() for the family docs.

uint32_t islet_del_value_2_32 (uint32_t pdb_hd, int32_t *p, uint32_t thing)

2D x 32-bit delete-by-value. See islet_del_value_1() for the family docs.

static uint32_t islet_get_1 (uint32_t pdb_hd, int16_t *p)

Retrieve the value stored at a spatial coordinate.

static uint32_t islet_get_2 (uint32_t pdb_hd, int16_t *p)

2D retrieve. See islet_get_1() for the family docs.

static uint32_t islet_get_3 (uint32_t pdb_hd, int16_t *p)

3D retrieve. See islet_get_1() for the family docs.

static uint32_t islet_get_4 (uint32_t pdb_hd, int16_t *p)

4D retrieve. See islet_get_1() for the family docs.

static uint32_t islet_get_2_32 (uint32_t pdb_hd, int32_t *p)

2D x 32-bit retrieve. See islet_get_1() for the family docs.

static uint32_t islet_cell_count_1 (uint32_t pdb_hd, int16_t *p)

Count the values stored at a spatial coordinate.

static uint32_t islet_cell_count_2 (uint32_t pdb_hd, int16_t *p)

2D cell count. See islet_cell_count_1() for the family docs.

static uint32_t islet_cell_count_3 (uint32_t pdb_hd, int16_t *p)

3D cell count. See islet_cell_count_1() for the family docs.

static uint32_t islet_cell_count_4 (uint32_t pdb_hd, int16_t *p)

4D cell count. See islet_cell_count_1() for the family docs.

static uint32_t islet_cell_count_2_32 (uint32_t pdb_hd, int32_t *p)

2D x 32-bit cell count. See islet_cell_count_1() for the family docs.

uint32_t islet_last_scan_count (void)

Diagnostic: index entries examined by the last box walk.

uint32_t islet_get_multi_1 (uint32_t pdb_hd, int16_t *p)

Create an iterator for all values stored at one coordinate.

uint32_t islet_get_multi_2_32 (uint32_t pdb_hd, int32_t *p)

2D x 32-bit cell iterator. Same contract as islet_get_multi_N() (use the shared islet_cell_next() to read values).

int islet_cell_next (uint32_t *ref, uint32_t cur)

Advance a cell iterator and retrieve the next value.

uint32_t islet_del_value_1 (uint32_t pdb_hd, int16_t *p, uint32_t thing)

Delete one value from a spatial coordinate (phase-2A adapter primitive).

static void islet_put_1 (uint32_t pdb_hd, int16_t *p, uint32_t thing)

Store a value at a spatial coordinate (append).

static void islet_put_2 (uint32_t pdb_hd, int16_t *p, uint32_t thing)

2D append. See islet_put_1() for the family docs.

static void islet_put_3 (uint32_t pdb_hd, int16_t *p, uint32_t thing)

3D append. See islet_put_1() for the family docs.

static void islet_put_4 (uint32_t pdb_hd, int16_t *p, uint32_t thing)

4D append. See islet_put_1() for the family docs.

static void islet_put_2_32 (uint32_t pdb_hd, int32_t *p, uint32_t thing)

2D x 32-bit append. See islet_put_1() for the family docs.

static void islet_set_1 (uint32_t pdb_hd, int16_t *p, uint32_t thing)

Store a value at a spatial coordinate (replace).

static void islet_set_2 (uint32_t pdb_hd, int16_t *p, uint32_t thing)

2D replace. See islet_set_1() for the family docs.

static void islet_set_3 (uint32_t pdb_hd, int16_t *p, uint32_t thing)

3D replace. See islet_set_1() for the family docs.

static void islet_set_4 (uint32_t pdb_hd, int16_t *p, uint32_t thing)

4D replace. See islet_set_1() for the family docs.

static void islet_set_2_32 (uint32_t pdb_hd, int32_t *p, uint32_t thing)

2D x 32-bit replace. See islet_set_1() for the family docs.

int rec_axis_fill_bbox_1 (uint32_t pdb_hd, int16_t *s, uint16_t *l, rec_set_t *out)

Fill a recall candidate set with the values in a bounding box.

int rec_axis_fill_bbox_2_32 (uint32_t pdb_hd, int32_t *s, int32_t *l, rec_set_t *out)

2D x 32-bit box fill. Same contract as rec_axis_fill_bbox_N(), on int32_t lanes (start AND lengths). ISLET_FILL_MAX_VOL caps every config alike.

uint32_t morton_set_bulk (uint64_t *out, int16_t points[][3], uint32_t n)

Batch-encode multiple 3D points to Morton codes using SIMD.

uint32_t morton_set_bulk4 (uint64_t *out, int16_t points[][4], uint32_t n)

Batch-encode multiple 4D points to Morton codes using SIMD.

uint32_t morton_get_bulk (int16_t points[][3], const uint64_t *codes, uint32_t n)

Batch-decode multiple 3D Morton codes to points using SIMD.

uint32_t morton_get_bulk4 (int16_t points[][4], const uint64_t *codes, uint32_t n)

Batch-decode multiple 4D Morton codes to points using SIMD.

bool islet_box_is_empty (uint32_t pdb_hd, int16_t x, int16_t y, uint16_t size)

Test if an axis-aligned 2D bounding box contains any discrete data.

Variables

const islet_ops_t islet_ops [5]

The per-dimension operation table (islet_ops[0] = all NULL).

Detailed Description

Public API for libislet โ€” spatial indexing with Morton codes.

Islet provides efficient spatial database operations using Morton codes (Z-order space-filling curves) for multi-dimensional coordinate indexing. Built on top of libcorm for persistence and hash table operations.

Coordinates are signed 16-bit integers (int16_t) ranging from -32768 to 32767, suitable for game worlds, voxel engines, and spatial simulations.

Note

Depends on libcorm >= 0.8.0 (per-key multi-value chains, corm_get_multi, rec.h) and libstele.

Author

Generated automatically by Doxygen for islet from the source code.