X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Fsn_network.h;h=716c2a3222d8a54bb5859202d550c6c333d8f3e9;hb=0c45212d2c6f5533aa4a3006cbb8347f2b238296;hp=8e6d4929d767afc149a0bce24bbbfd288a81b0d1;hpb=28b20bd635f739e7b42f5f5ad5d6bc88df500653;p=sort-networks.git diff --git a/src/sn_network.h b/src/sn_network.h index 8e6d492..716c2a3 100644 --- a/src/sn_network.h +++ b/src/sn_network.h @@ -95,6 +95,18 @@ sn_network_t *sn_network_create_odd_even_mergesort (int inputs_num); sn_network_t *sn_network_create_pairwise (int inputs_num); /** + * Append another network to a given network. + * + * \param n The comparator network to which the other network is added. This + * network is modified. + * \param other The network to be added to the first network. This network is + * consumed by this function and the memory pointed to is freed. You cannot + * use that network after this call, so use sn_network_clone() if required. + * \return Zero on success, non-zero on failure. + */ +int sn_network_network_add (sn_network_t *n, sn_network_t *other); + +/** * Append a new stage to a comparator network. * * \param n The comparator network to which to add the stage.