54#define LF_SPARSE_WIDTH_THRESHOLD 10
61#define LF_SPARSE_CAPACITY_DIVIDER 10
131#define lf_multiport_iterator(in) \
132 (_lf_multiport_iterator_impl((lf_port_base_t**)self->_lf_##in, self->_lf_##in##_width))
int lf_multiport_next(lf_multiport_iterator_t *iterator)
Return the channel number of the next present input on the multiport or -1 if there are no more prese...
lf_multiport_iterator_t _lf_multiport_iterator_impl(lf_port_base_t **port, int width)
Given an array of pointers to port structs, return an iterator that can be used to iterate over the p...
Definitions for token objects, reference-counted wrappers around dynamically-allocated messages.
An iterator over a record of the subset of channels of a multiport that have present inputs.
Definition port.h:73
lf_port_base_t ** port
Array of port pointers to iterate over.
Definition port.h:99
int idx
Current position in the sparse record.
Definition port.h:90
int width
Total width of the multiport.
Definition port.h:107
int next
Index of the next present channel.
Definition port.h:81
Base type for ports.
Definition lf_token.h:202