27 int count, MPI_Datatype datatype,
28 int *src_tuple,
int src_slot,
29 int *dst_tuple,
int dst_slot)
36 prt_assert(count > 0,
"count less or equal zero");
37 prt_assert(src_tuple != NULL,
"NULL source tuple");
38 prt_assert(src_tuple != NULL,
"NULL destination tuple");
42 channel->
count = count;
103 __sync_fetch_and_add(&packet->
num_refs, 1);
128 prt_assert(channel != NULL,
"popping from a NULL channel");
132 prt_assert(node != NULL,
"empty packet list");
icl_node_t * icl_deque_append(icl_deque_t *deque, void *data)
Insert the node at the end of the deque.
int prt_tuple_compare(void *tuple_a, void *tuple_b)
tuple comparison
prt_packet_t * prt_channel_pop(prt_channel_t *channel)
Fetches a packef from a channel. Does not decrement the number of active references. The packet leaves the channel, but enters the VDP.
icl_deque_t * icl_deque_new()
deque constructor
int icl_deque_size(icl_deque_t *deque)
Return the deque size.
icl_node_t * icl_deque_first(icl_deque_t *deque)
Get the first node in the deque.
VDP's data packet A packet of data transferred through VDP's channels.
void prt_channel_push(prt_channel_t *channel, prt_packet_t *packet)
Sends a packed down a channel. Increments the packet's number of active references.
int prt_channel_empty(prt_channel_t *channel)
Checks if a channel is empty.
void prt_channel_delete(prt_channel_t *channel)
channel destructor
int icl_deque_destroy(icl_deque_t *deque, void(*free_func)(void *))
deque destructor
VDP's data channel Implements a data link between a pair of VDPs. Identifies the source and destinati...
int prt_channel_compare(void *channel1, void *channel2)
Compare two channels. Channels are equal if they have the same source and destination tuples and slot...
int icl_deque_delete(icl_deque_t *deque, icl_node_t *node, void(*free_func)(void *))
Delete the node from the deque.
#define prt_assert(cond, msg)
prt_channel_t * prt_channel_new(int count, MPI_Datatype datatype, int *src_tuple, int src_slot, int *dst_tuple, int dst_slot)
channel constructor
struct prt_thread_s * thread
struct prt_proxy_s * proxy
void prt_proxy_send(prt_proxy_t *proxy, int thread_rank, prt_channel_t *channel)
send from a channel