NAME
islet_core - Islet core API
- Spatial map operations using Morton code indexing.
SYNOPSIS
Data Structures
Per-dimension operation table.
Macros
Functions
Initialize the islet subsystem.
Open or create a spatial database.
Create an iterator for all points within a rectangular bounding box.
2D x 32-bit box iterator. Same contract as islet_iter_N(), on int32_t lanes (start AND lengths). Use with islet_next32().
Advance iterator and retrieve the next point/value pair.
Advance a 2D x 32-bit iterator (islet_iter_2_32 handle).
Delete the first value stored at a spatial coordinate.
2D delete. See islet_del_1() for the family docs.
3D delete. See islet_del_1() for the family docs.
4D delete. See islet_del_1() for the family docs.
2D x 32-bit delete. See islet_del_1() for the family docs.
Delete every value stored at a spatial coordinate.
2D delete-all. See islet_del_all_1() for the family docs.
3D delete-all. See islet_del_all_1() for the family docs.
4D delete-all. See islet_del_all_1() for the family docs.
2D x 32-bit delete-all. See islet_del_all_1() for the family docs.
2D x 32-bit delete-by-value. See islet_del_value_1() for the family docs.
Retrieve the value stored at a spatial coordinate.
2D retrieve. See islet_get_1() for the family docs.
3D retrieve. See islet_get_1() for the family docs.
4D retrieve. See islet_get_1() for the family docs.
2D x 32-bit retrieve. See islet_get_1() for the family docs.
Count the values stored at a spatial coordinate.
2D cell count. See islet_cell_count_1() for the family docs.
3D cell count. See islet_cell_count_1() for the family docs.
4D cell count. See islet_cell_count_1() for the family docs.
2D x 32-bit cell count. See islet_cell_count_1() for the family docs.
Diagnostic: index entries examined by the last box walk.
Create an iterator for all values stored at one coordinate.
2D x 32-bit cell iterator. Same contract as islet_get_multi_N() (use the shared islet_cell_next() to read values).
Advance a cell iterator and retrieve the next value.
Delete one value from a spatial coordinate (phase-2A adapter primitive).
Store a value at a spatial coordinate (append).
2D append. See islet_put_1() for the family docs.
3D append. See islet_put_1() for the family docs.
4D append. See islet_put_1() for the family docs.
2D x 32-bit append. See islet_put_1() for the family docs.
Store a value at a spatial coordinate (replace).
2D replace. See islet_set_1() for the family docs.
3D replace. See islet_set_1() for the family docs.
4D replace. See islet_set_1() for the family docs.
2D x 32-bit replace. See islet_set_1() for the family docs.
Fill a recall candidate set with the values in a bounding box.
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.
Batch-encode multiple 3D points to Morton codes using SIMD.
Batch-encode multiple 4D points to Morton codes using SIMD.
Batch-decode multiple 3D Morton codes to points using SIMD.
Batch-decode multiple 4D Morton codes to points using SIMD.
Test if an axis-aligned 2D bounding box contains any discrete data.
Variables
The per-dimension operation table (islet_ops[0] = all NULL).
Detailed Description
Spatial map operations using Morton code indexing.
Islet provides a spatial database that maps multi-dimensional coordinates to arbitrary uint32_t values. Internally, coordinates are converted to Morton codes (Z-order) for efficient spatial queries and storage.
Value Semantics (multi-value cells):
- A grid cell may hold MULTIPLE values (CM_MULTIVALUE map). islet_put_N() appends; islet_get_N() returns the first value; islet_get_multi_N() iterates all values in insertion order; islet_del_N() removes the first value; islet_del_all_N() removes every value; islet_set_N() replaces all values with a single new one (N = 1..4).
Coordinate System:
- Type: int16_t (signed 16-bit integers)
- Range: -32768 to 32767 per dimension
- Dimensions 1..4 supported; optimized for 3D (dim=3) with 4D (dim=4) support. 1D/2D/3D codes are bit-identical to v0.5.0; 4D codes densely fill all 64 key bits.
The 2D x 32-bit config (int32_t lanes, islet_*_2_32 / morton_*_2_32) is a second dense family member: 2 x 32 = 64 key bits, no reserved bits, lane range -2147483648..2147483647.
Note
Keyspace: all dimensions and configs share the uint64 Morton key space. Use one dimension AND one config per database, and never reopen a database with a different config's functions: the file carries no config tag, so a cross-config reopen silently decodes garbage.
islet_ops[] covers the int16-lane configs (1..4) only; the 2D x 32-bit config is reached through its suffixed monomorphs (islet_put_2_32(), islet_iter_2_32(), ...) directly.
Preferred surface: the config objects in pointcfg.h (Point1_2..Point4_2, Point2_4) group everything above per config as static-method structs. This header's flat functions remain the ABI and the tight-loop fast path.
Thread Safety: Islet inherits libcorm's thread-safety properties. It uses global state and is NOT thread-safe. Use external synchronization if accessing from multiple threads.
Capacity: The mask parameter sizes the initial hash table (capacity = mask + 1). The map AUTO-GROWS by doubling when it fills (inherited from libcorm; libislet never passes CM_NOGROW), so exceeding the initial capacity is safe. Choose a mask near your expected entry count to avoid early regrows.
Memory: Malloc failures terminate the process immediately via CBUG(). There is no graceful error handling for out-of-memory conditions.
ID-uniformity contract (see RECALL-KERNEL.md): the per-cell stored value ("thing"/"ref") is intentionally uint32_t, not the wider rec_ref_t โ which is itself uint32_t (from rec.h), matching what libsepal/liblemma use natively and libjoint widens to at its fill boundary, so the fill widen is now an identity cast. Islet's storage/SIMD paths are tuned around the 4-byte value; doubling it is a real cost, not a free uniformity win. The uniformity boundary is enforced only at rec_axis_fill_bbox_N(), which already widens every stored uint32_t to rec_ref_t before pushing it into the caller's rec_set_t. Do not assume ids above UINT32_MAX round-trip through islet_put_N()/islet_get_N().
Warning
File Persistence: File-backed databases are automatically saved at process exit via libcorm. Explicit corm_save() calls are only needed for mid-execution checkpointing.
See also
Morton code helpers
Point utilities
Macro Definition Documentation
#define ISLET_AXIS_MAX_POINTS 1024u
Maximum point count accepted by the phase-2A rec_axis_store value grammar ("x,y[,z];x2,y2"). A value listing more points is rejected with -1 (errno = ERANGE): almost certainly a caller bug, and the grid + rev writes would be large. The point count is the number of ;-separated points, whatever their dimension.
#define ISLET_FILL_MAX_VOL 1048576u
Maximum bounding-box volume (in cells) accepted by the rec_axis_fill_bbox family (including rec_axis_fill_bbox_2_32). Boxes whose volume exceeds this are rejected with -1: they are almost certainly a caller bug, and the sealed set would be huge. Raw islet_iter_N() carries no such cap โ it only allocates for entries found.
#define ISLET_MISS UINT32_MAX
Sentinel value returned by islet_get when no entry exists.
Function Documentation
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. Uses Morton Z-order box iteration to detect if any points exist in [x..x+size-1, y..y+size-1]. Returns true if the box is completely empty (pure procedural wilderness), false if discrete points or structures are present.
Parameters
pdb_hd Database handle from islet_open().
x Minimum X coordinate.
y Minimum Y coordinate.
size Physical extent along X and Y.
Returns
true if completely empty, false if any point exists.
uint32_t islet_cell_count_1 (uint32_t pdb_hd, int16_t * p) [inline], [static]
Count the values stored at a spatial coordinate.
Parameters
pdb_hd Database handle from islet_open().
p Point coordinate. Array of int16_t with at least the dimension count of the function used.
Returns
Number of values stored at this coordinate (0 if empty).
See also
islet_get_1 islet_get_2 islet_get_3 islet_get_4
islet_get_multi_1 islet_get_multi_2 islet_get_multi_3 islet_get_multi_4
corm_count
int islet_cell_next (uint32_t * ref, uint32_t cur)
Advance a cell iterator and retrieve the next value. Retrieves the next value from the iterator created by islet_get_multi_N(). When all values have been returned, returns 0 and automatically frees the iterator.
Parameters
ref Output pointer for the stored value (uint32_t).
cur Iterator handle from islet_get_multi_N().
Returns
1 if a value was retrieved. 0 when iteration is complete; the iterator is automatically freed on return 0.
Warning
After this function returns 0, the iterator handle becomes invalid.
See also
islet_get_multi_1 islet_get_multi_2 islet_get_multi_3 islet_get_multi_4
void islet_del_1 (uint32_t pdb_hd, int16_t * p) [inline], [static]
Delete the first value stored at a spatial coordinate. Per-dimension variants (islet_del_1..4); the function name carries the dimension count. Removes the first value stored at the given point from the database. Internally converts the coordinate to a Morton code and calls corm_del(). If no entry exists at the coordinate, this is a no-op (safe to call). When several values share the cell, only the earliest-inserted one is removed; use islet_del_all_3() to clear the cell.
Parameters
pdb_hd Database handle from islet_open().
p Point coordinate. Array of int16_t with at least the dimension count of the function used.
Note
This operation invalidates any pointers obtained from islet_get_3() or islet_next() that refer to this coordinate.
Safe to call on non-existent coordinates (no error, no effect).
Example:
int16_t pos[3] = {10, 20, 30};
islet_del_3(db, pos); // Remove entry at (10,20,30)
See also
islet_get_3
islet_put_3
corm_del
uint32_t islet_del_all_1 (uint32_t pdb_hd, int16_t * p) [inline], [static]
Delete every value stored at a spatial coordinate. Per-dimension variants (islet_del_all_1..4). Removes all values stored at the given point from the database. Internally converts the coordinate to a Morton code and calls corm_del_all(). If no entry exists at the coordinate, this is a no-op (safe to call, returns 0).
Parameters
pdb_hd Database handle from islet_open().
p Point coordinate. Array of int16_t with at least the dimension count of the function used.
Returns
Number of values removed (0 if the cell was empty).
Example:
int16_t pos[3] = {10, 20, 30};
uint32_t n = islet_del_all_3(db, pos); // Clear the cell
See also
islet_del_3
islet_set_3
corm_del_all
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). Per-dimension variants (islet_del_value_1..4). Removes every entry holding thing from the cell at the given point, leaving the cell's other values untouched (in their relative order). Where islet_del_N() removes the first value and islet_del_all_N() clears the cell, this one removes by value โ exactly what rec_axis_unstore needs when several refs share one cell.
Parameters
pdb_hd Database handle from islet_open().
p Point coordinate. Array of int16_t with at least the dimension count of the function used.
thing Value to remove (uint32_t).
Returns
Number of entries removed (0 when the cell is empty or holds no such value).
Note
A pure cell primitive: it knows nothing of the phase-2A rev manifest. The rec_axis_unstore adapter (the rev-aware path) keeps cell and manifest in sync; callers manipulating the grid directly own that sync themselves.
Example:
int16_t pos[3] = {10, 20, 30};
islet_put_3(db, pos, 7);
islet_put_3(db, pos, 9);
islet_del_value_3(db, pos, 9); // Cell now holds exactly {7}
See also
islet_del_1 islet_del_all_1 islet_cell_count_1
uint32_t islet_get_1 (uint32_t pdb_hd, int16_t * p) [inline], [static]
Retrieve the value stored at a spatial coordinate. Per-dimension variants (islet_get_1..4). Looks up the value at the given point in the database. Internally converts the coordinate to a Morton code and calls corm_get().
Parameters
pdb_hd Database handle from islet_open().
p Point coordinate. Array of int16_t with at least the dimension count of the function used. Coordinates are signed 16-bit integers ranging from -32768 to 32767.
Returns
The first stored uint32_t value at this coordinate, or ISLET_MISS (UINT32_MAX) if no entry exists at this point. When several values share the cell, the earliest-inserted one is returned; use islet_get_multi_3() to retrieve them all.
Note
ISLET_MISS equals UINT32_MAX (0xFFFFFFFF), the same as CM_MISS. This is the standard sentinel value for missing entries.
The returned value is a copy, not a pointer. Unlike corm_get() which returns a pointer, islet_get_3() returns the actual uint32_t value.
Example:
int16_t pos[3] = {10, 20, 30};
uint32_t value = islet_get_3(db, pos);
if (value == ISLET_MISS) {
printf("No entry at (10,20,30)\n");
} else {
printf("Value at (10,20,30) = %u\n", value);
}
See also
islet_put_3
islet_del_3
ISLET_MISS
corm_get
uint32_t islet_get_multi_1 (uint32_t pdb_hd, int16_t * p)
Create an iterator for all values stored at one coordinate. Opens a chain-aware cursor over every value stored at the given point, in insertion order. Use islet_cell_next() to retrieve the values.
Parameters
pdb_hd Database handle from islet_open().
p Point coordinate. Array of int16_t with at least the dimension count of the function used.
Note
Per-dimension variants islet_get_multi_1..4.
Returns
Iterator handle for use with islet_cell_next(), or CM_MISS when the cell holds no values.
Example:
int16_t pos[3] = {10, 20, 30};
uint32_t cur = islet_get_multi_3(db, pos);
if (cur != CM_MISS) {
uint32_t value;
while (islet_cell_next(&value, cur))
printf("value %u\n", value);
}
See also
islet_cell_next
islet_cell_count_1 islet_cell_count_2 islet_cell_count_3 islet_cell_count_4
void islet_init (void )
Initialize the islet subsystem. Registers custom types with libcorm (uint64_t for Morton codes, uint32_t for values) and sets up the Morton code comparator for sorted iteration. Also initializes the internal IDM (ID Manager) for iterator handles.
Warning
Must be called before any other islet functions. Calling other functions without initialization results in undefined behavior.
Note
This function can be called multiple times safely (idempotent if corm types are already registered).
Example:
int main() {
islet_init(); // Always call first
uint32_t db = islet_open(NULL, NULL, 0xFF);
// ... use database
return 0;
}
See also
islet_open
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. Queries the spatial database for all entries within the axis-aligned bounding box defined by start point 's' and lengths 'l'. The iterator pre-allocates and collects all matching results using Morton code range queries internally.
Parameters
pdb_hd Database handle from islet_open().
s Start point (minimum corner of bounding box). Array of int16_t with at least the dimension count of the function used.
l Lengths of bounding box per dimension (unsigned). Array of uint16_t with at least the dimension count of the function used. The box covers s[i]..s[i]+l[i] inclusive per dimension.
Note
Per-dimension variants islet_iter_1..4; the function name carries the dimension count (1..4).
Returns
Iterator handle for use with islet_next(). The handle is automatically freed when islet_next() returns 0.
Note
Results are collected in Morton code order (Z-order space-filling curve), NOT spatial order. Nearby points may not be adjacent in iteration sequence.
Every stored (point, value) pair is returned exactly once, including multiple values stored at the same cell. Results are NOT deduplicated.
Memory: Allocates a flat list that grows with the number of matching entries (not the bounding box volume), so sparse queries over large boxes stay cheap.
Warning
The volume calculation can overflow for very large boxes. Reasonable box sizes are recommended (< 1 million points).
Example (2D region):
int16_t start[2] = {0, 0};
uint16_t lengths[2] = {100, 100}; // 100x100 region
uint32_t iter = islet_iter_2(db, start, lengths);
Example (3D region):
int16_t start[3] = {-10, -10, -10};
uint16_t lengths[3] = {20, 20, 20}; // 20x20x20 cube (8000 points)
uint32_t iter = islet_iter_3(db, start, lengths);
See also
islet_next
morton_set_1 morton_set_2 morton_set_3 morton_set_4
uint32_t islet_last_scan_count (void )
Diagnostic: index entries examined by the last box walk. Returns the number of index entries examined by the most recent islet_iter_N()/rec_axis_fill_bbox_N() box walk in this process. Tests and benchmarks use it to prove the Z-interval skip engages (entries examined well below the morton-interval width on sparse boxes).
Returns
Entry-examination count of the last box walk (0 if none ran yet).
int islet_next (int16_t * p, uint32_t * ref, uint32_t cur)
Advance iterator and retrieve the next point/value pair. Retrieves the next entry from the iterator created by islet_iter_N(). Skips empty cells in the bounding box. When all entries have been returned (or the box was empty), returns 0 and automatically frees the iterator's internal memory.
Parameters
p Output point array. Must have space for the dimension count of the matching islet_iter_N() call. Filled with the coordinates of the next point.
ref Output pointer for the stored value (uint32_t). Filled with the value stored at this point.
cur Iterator handle from islet_iter_N().
Returns
1 if a point/value pair was retrieved (output written to p and ref). 0 when iteration is complete (no more entries). The iterator is automatically freed on return 0.
Note
The iterator is stateful and maintains position. Each call advances to the next entry.
Empty cells in the bounding box are automatically skipped. Only coordinates with stored values are returned.
Warning
After this function returns 0, the iterator handle becomes invalid. Do not call islet_next() again with the same handle.
The iterator's internal memory is freed when this returns 0. There is no separate "close" or "free" function.
Typical usage pattern:
int16_t start[3] = {0, 0, 0};
uint16_t lengths[3] = {10, 10, 10};
uint32_t iter = islet_iter(db, start, lengths, 3);
int16_t point[3];
uint32_t value;
while (islet_next(point, &value, iter)) {
printf("Point (%d,%d,%d) = %u\n",
point[0], point[1], point[2], value);
}
// Iterator is automatically freed after loop
See also
islet_iter
int islet_next32 (int32_t * p, uint32_t * ref, uint32_t cur)
Advance a 2D x 32-bit iterator (islet_iter_2_32 handle). Same contract as islet_next(), on int32_t lanes. Iterators from islet_iter_1..4 use islet_next(); 2D x 32-bit iterators use this.
Parameters
p Output point array (int32_t[2]).
ref Output pointer for the stored value (uint32_t).
cur Iterator handle from islet_iter_2_32().
Returns
1 on entry, 0 when complete (handle freed).
uint32_t islet_open (char * filename, char * database, uint32_t mask)
Open or create a spatial database. Creates a spatial map backed by libcorm with CM_SORTED for efficient range queries. Internally uses Morton codes (uint64_t) as keys and uint32_t for values. If a filename is provided, data is automatically loaded from disk if the file exists.
Parameters
filename File path for persistence, or NULL for in-memory only. Example: "world.db"
database Logical database name within the file, or NULL to skip file association. Multiple databases can share one file. Example: "main", "players", "chunks"
mask Hash table mask (initial capacity = mask + 1). Must be 2^n - 1 for optimal performance. Examples: 0xFF (256 entries), 0xFFF (4096 entries), 0xFFFF (65536 entries). The map auto-grows past this; pick a mask near your expected entry count.
Returns
Database handle for use with other islet functions.
Note
File Persistence: File-backed databases automatically load existing data when opened. Data is automatically saved at process exit via libcorm's destructor. Call corm_save() explicitly only if you need mid-execution checkpointing.
Capacity: The mask sizes the initial table; the map auto-grows by doubling when it fills. Nothing terminates on growth.
The database is created with CM_SORTED | CM_MULTIVALUE: ordered iteration by Morton code for efficient spatial range queries, with multi-value cells (see the Value Semantics note above).
Warning
The filename and database parameters are not copied. If providing string literals, they must remain valid for the database lifetime.
Example (in-memory):
islet_init();
uint32_t db = islet_open(NULL, NULL, 0xFF); // 256-entry initial table
Example (persistent):
islet_init();
uint32_t db = islet_open("world.db", "main", 0xFFF); // 4096-entry initial table
See also
islet_init
corm_open
corm_save
corm_close
void islet_put_1 (uint32_t pdb_hd, int16_t * p, uint32_t thing) [inline], [static]
Store a value at a spatial coordinate (append). Per-dimension variants (islet_put_1..4). Appends the value at the given point in the database. Internally converts the coordinate to a Morton code and calls corm_put(). If entries already exist at this coordinate, the new value is ADDED alongside them (multi-value cell) - nothing is replaced. Use islet_set_N() for replace semantics, islet_get_multi_N() to read all values back.
Parameters
pdb_hd Database handle from islet_open().
p Point coordinate. Array of int16_t with at least the dimension count of the function used. Coordinates are signed 16-bit integers ranging from -32768 to 32767.
thing Value to store (uint32_t). Can be any 32-bit value including 0. Avoid using CM_MISS (0xFFFFFFFF) as it may cause confusion, though it's technically valid.
Note
If the database is file-backed (filename provided to islet_open()), changes are automatically saved at process exit. Call corm_save() explicitly for mid-execution persistence.
Example (store single value):
int16_t pos[3] = {10, 20, 30};
islet_put_3(db, pos, 42); // Store value 42 at (10,20,30)
Example (update existing value):
int16_t pos[3] = {10, 20, 30};
uint32_t old = islet_get_3(db, pos);
if (old != ISLET_MISS) {
islet_set_3(db, pos, old + 1); // Increment (replace)
}
Example (populate a 2D grid):
for (int16_t x = 0; x < 10; x++) {
for (int16_t y = 0; y < 10; y++) {
int16_t pos[2] = {x, y};
islet_put_2(db, pos, x * 10 + y);
}
}
See also
islet_get_3
islet_del_3
corm_put
corm_save
void islet_set_1 (uint32_t pdb_hd, int16_t * p, uint32_t thing) [inline], [static]
Store a value at a spatial coordinate (replace). Per-dimension variants (islet_set_1..4). Replaces every value at the given point with a single new value: islet_del_all_N() followed by islet_put_N(). This preserves the historical single-value overwrite convenience on top of multi-value cells.
Parameters
pdb_hd Database handle from islet_open().
p Point coordinate. Array of int16_t with at least the dimension count of the function used.
thing Value to store (uint32_t).
Example:
int16_t pos[3] = {10, 20, 30};
islet_put_3(db, pos, 42);
islet_set_3(db, pos, 99); // Cell now holds exactly {99}
See also
islet_put_3
islet_del_all_3
islet_get_3
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. Inverse of morton_set_bulk(): decodes 4 codes at a time under AVX2 (dense compact, scalar tail + fallback otherwise). Output points match morton_get_3() exactly.
Parameters
points Output points. Array of int16_t[3] with 'n' entries.
codes Input Morton codes. Array of uint64_t with 'n' elements.
n Number of codes to decode (0..UINT32_MAX).
Returns
Number of points decoded (always == n).
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. 4D analogue of morton_get_bulk(): decodes 4 codes at a time under AVX2 (dense stride-4 compact), scalar tail + fallback otherwise. Output points match morton_get_4() exactly.
Parameters
points Output points. Array of int16_t[4] with 'n' entries.
codes Input Morton codes. Array of uint64_t with 'n' elements.
n Number of codes to decode (0..UINT32_MAX).
Returns
Number of points decoded (always == n).
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. Encodes up to 4 points (AVX2) or 2 points (NEON) in parallel, falling back to scalar for remaining points. The output array must have space for at least n elements.
Parameters
out Output Morton codes. Array of uint64_t with 'n' elements.
points Input points. Array of int16_t[3] with 'n' entries.
n Number of points to encode (0..UINT32_MAX).
Returns
Number of points encoded (always == n).
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. 4D analogue of morton_set_bulk(): encodes 4 points at a time under AVX2 (dense stride-4 packing), scalar tail + fallback otherwise. Output codes match morton_set_4() exactly.
Parameters
out Output Morton codes. Array of uint64_t with 'n' elements.
points Input points. Array of int16_t[4] with 'n' entries.
n Number of points to encode (0..UINT32_MAX).
Returns
Number of points encoded (always == n).
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. Per-dimension variants (rec_axis_fill_bbox_1..4). Kernel-form space-axis adapter: streams every value stored in the axis-aligned box [s, s+l] into a recall candidate set, then seals it (sort + dedup). Multiple values sharing one cell each enter the set; sealing collapses exact duplicates. The walk never materializes the box volume โ sparse queries over large boxes stay cheap.
Parameters
pdb_hd Database handle from islet_open().
s Start point (minimum corner). Array of int16_t.
l Lengths per dimension. Array of uint16_t.
out Caller-owned candidate set; appended to, then sealed. May already hold refs (result is the union, sealed).
Returns
0 on success (out sealed). -1 when out is NULL, or the box volume exceeds ISLET_FILL_MAX_VOL (note: 4D volumes are 4-way products, so keep each side small).
Example:
rec_set_t *cands = rec_set_new();
int16_t s[3] = {0, 0, 0};
uint16_t l[3] = {16, 16, 16};
if (rec_axis_fill_bbox_3(db, s, l, cands) == 0) {
// rec_set_count(cands) distinct refs, sorted
}
rec_set_free(cands);
See also
ISLET_FILL_MAX_VOL
islet_iter_1 islet_iter_2 islet_iter_3 islet_iter_4
Variable Documentation
const islet_ops_t islet_ops[5] [extern]
The per-dimension operation table (islet_ops[0] = all NULL). NOTE: literal 5 (MAX_DIM + 1) here โ MAX_DIM lives in libislet.c and this header stays standalone. Keep the two in sync.
Author
Generated automatically by Doxygen for islet from the source code.