← All compilation units

Flyology_SIMD.Algorithms.Generic_Indexed_Bytes

Description

Small-set byte classification for caller-selected array and index types. The actual array must have contiguous eight-bit modular components.

Backend_Equal

function Backend_Equal (Left, Right : U8x16) return Mask_8x16

Result of an indexed-byte search. Index is meaningful only when Found is True.

Parameters
Left
Right
Return value

True when the algorithm found a requested byte.

The actual match index when Found is True.

Backend_Splat

function Backend_Splat (Value : U8) return U8x16

Result of an indexed-byte search. Index is meaningful only when Found is True.

Parameters
Value
Return value

True when the algorithm found a requested byte.

The actual match index when Found is True.

Backend_To_Bit_Mask

function Backend_To_Bit_Mask (Mask : Mask_8x16) return Interfaces.Unsigned_16

Result of an indexed-byte search. Index is meaningful only when Found is True.

Parameters
Mask
Return value

True when the algorithm found a requested byte.

The actual match index when Found is True.

Byte_Array_Type

type Byte_Array_Type is array (Index_Type range <>) of aliased Byte_Type;

Byte_Type

type Byte_Type is mod <>;

Find_First_Of

function Find_First_Of (Data : Byte_Array_Type; Needles : Byte_Array_Type) return Search_Result

Return the first index whose byte equals any member of Needles. Empty inputs have no match. Duplicate needles have no effect. Sets of up to four bytes use the selected vector backend; larger sets use the scalar fallback with identical results.

Parameters
Data

The complete byte array to search without copying.

Needles

The byte values that constitute the small set.

Return value

A found flag and, when found, the first matching actual index.

Index_Type

type Index_Type is range <>;

Search_Result

type Search_Result is record
   Found : Boolean;
   Index : Index_Type;
end record;

Result of an indexed-byte search. Index is meaningful only when Found is True.

Record fields
Found

True when the algorithm found a requested byte.

Index

The actual match index when Found is True.