reactor-c
C Runtime for Lingua Franca
|
Functions | |
int | compare_sizes (const void *a, const void *b) |
lf_multiport_iterator_t | _lf_multiport_iterator_impl (lf_port_base_t **port, int width) |
int | lf_multiport_next (lf_multiport_iterator_t *iterator) |
Copyright (c) 2022, The University of California at Berkeley.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Header file for macros, functions, and structs for optimized sparse I/O through multiports.
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 present channels.
port | An array of pointers to port structs. |
width | The width of the multiport (or a negative number if not a multiport). |
int compare_sizes | ( | const void * | a, |
const void * | b ) |
Compare two non-negative integers pointed to. Return -1 if a < b, 0 if a == b, and 1 if a > b.
a | Pointer to the first integer. |
b | Pointer to the second integer. |
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 present channels.
iterator | The iterator. |