Hypex.Register.Array (Hypex v2.1.0)
View SourceA Hypex.Register implementation using an Erlang :array.
Arrays offer the best average throughput and scale well to various widths and cardinalities. For this reason this register is the default chosen when non is explicitly requested.
This register will scale to many use cases, and should be a solid choice for many users as a balance of memory, throughput and flexibility.
Recommended for general usage or when traffic patterns are less defined.
Summary
Functions
Retrieve a specific bit from a register.
Initialize an empty array register of a given width.
Merge together two registers of the same width and type.
Set a specific bit in a register.
Run a reduction over the inner bits of a register.
Types
@type t() :: :array.array(number())
Functions
Retrieve a specific bit from a register.
Initialize an empty array register of a given width.
Merge together two registers of the same width and type.
Set a specific bit in a register.
@spec reduce(t(), width :: number(), accumulator :: any(), (number(), any() -> any())) :: accumulator :: any()
Run a reduction over the inner bits of a register.