← All compilation units

Flyology_SIMD.Algorithms.Generic_Bytes

Description

Complete-buffer byte algorithms composed from a statically known backend.

Add_Saturate

procedure Add_Saturate (Data : in out Byte_Array; Value : U8)

Add Value to every byte in place, clamping each result to 255. Empty buffers are unchanged.

Parameters
Data

The complete byte buffer to transform in place.

Value

The unsigned byte addend broadcast to every element.

Backend_Add_Saturate

function Backend_Add_Saturate (Left, Right : U8x16) return U8x16

Return the first Ada index at which the complete buffers differ.

Parameters
Left

The left complete byte array.

Right

The right complete byte array with matching bounds.

Return value

A found flag and the first differing Ada index.

Backend_Bitwise_And

function Backend_Bitwise_And (Left, Right : U8x16) return U8x16

Return the first Ada index at which the complete buffers differ.

Parameters
Left

The left complete byte array.

Right

The right complete byte array with matching bounds.

Return value

A found flag and the first differing Ada index.

Backend_Equal

function Backend_Equal (Left, Right : U8x16) return Mask_8x16

Return the first Ada index at which the complete buffers differ.

Parameters
Left

The left complete byte array.

Right

The right complete byte array with matching bounds.

Return value

A found flag and the first differing Ada index.

Backend_Greater_Equal

function Backend_Greater_Equal (Left, Right : U8x16) return Mask_8x16

Return the first Ada index at which the complete buffers differ.

Parameters
Left

The left complete byte array.

Right

The right complete byte array with matching bounds.

Return value

A found flag and the first differing Ada index.

Backend_Less_Equal

function Backend_Less_Equal (Left, Right : U8x16) return Mask_8x16

Return the first Ada index at which the complete buffers differ.

Parameters
Left

The left complete byte array.

Right

The right complete byte array with matching bounds.

Return value

A found flag and the first differing Ada index.

Backend_Load_Unaligned

function Backend_Load_Unaligned (Data : Byte_Array; Start : Natural) return U8x16

Return the first Ada index at which the complete buffers differ. @param Left The left complete byte array. @param Right The right complete byte array with matching bounds.

Parameters
Data
Start
Return value

A found flag and the first differing Ada index.

Backend_Mask_And

function Backend_Mask_And (Left, Right : Mask_8x16) return Mask_8x16

Return the first Ada index at which the complete buffers differ.

Parameters
Left

The left complete byte array.

Right

The right complete byte array with matching bounds.

Return value

A found flag and the first differing Ada index.

Backend_Splat

function Backend_Splat (Value : U8) return U8x16

Return the first Ada index at which the complete buffers differ. @param Left The left complete byte array. @param Right The right complete byte array with matching bounds.

Parameters
Value
Return value

A found flag and the first differing Ada index.

Backend_Store_Unaligned

procedure Backend_Store_Unaligned (Data : in out Byte_Array; Start : Natural; Value : U8x16)

Return the first Ada index at which the complete buffers differ. @param Left The left complete byte array. @param Right The right complete byte array with matching bounds. @return A found flag and the first differing Ada index.

Parameters
Data
Start
Value

Backend_To_Bit_Mask

function Backend_To_Bit_Mask (Mask : Mask_8x16) return Interfaces.Unsigned_16

Return the first Ada index at which the complete buffers differ. @param Left The left complete byte array. @param Right The right complete byte array with matching bounds.

Parameters
Mask
Return value

A found flag and the first differing Ada index.

Count

function Count (Data : Byte_Array; Needle : U8) return Natural

Count occurrences of one byte.

Parameters
Data

The complete byte array to scan.

Needle

The byte to count.

Return value

The number of matching elements.

Count_In_Range

function Count_In_Range (Data : Byte_Array; Low, High : U8) return Natural

Count bytes in the inclusive unsigned interval Low .. High. If Low is greater than High, the interval is empty and the result is zero.

Parameters
Data

The complete byte array to scan.

Low

The inclusive lower byte bound.

High

The inclusive upper byte bound.

Return value

The number of elements in the interval.

Equal

function Equal (Left, Right : Byte_Array) return Boolean

Report whether two complete byte arrays have identical elements.

Parameters
Left

The left complete byte array.

Right

The right complete byte array with matching bounds.

Return value

True when every corresponding byte is equal.

Find_First

function Find_First (Data : Byte_Array; Needle : U8) return Search_Result

Return the first Ada index at which Needle occurs.

Parameters
Data

The complete byte array to search.

Needle

The byte to find.

Return value

A found flag and the first matching Ada index.

Find_First_Difference

function Find_First_Difference (Left, Right : Byte_Array) return Search_Result

Return the first Ada index at which the complete buffers differ.

Parameters
Left

The left complete byte array.

Right

The right complete byte array with matching bounds.

Return value

A found flag and the first differing Ada index.

Find_First_Of

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

Return the first Ada index whose byte equals any member of Needles. An empty Data or Needles array has no match. Duplicate needles have no effect. The vector path is optimized for sets of up to four bytes; larger sets retain the same exact semantics through a scalar scan.

Parameters
Data

The complete byte array to search.

Needles

The byte values that constitute the small set.

Return value

A found flag and the first matching Ada index.

Is_ASCII

function Is_ASCII (Data : Byte_Array) return Boolean

Report whether every byte is in the 7-bit ASCII range.

Parameters
Data

The complete byte array to validate.

Return value

True when every byte is less than 128.