PULSAR  1.0.0
Parallel Ultra Light Systolic Array Runtime
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
prt_channel.h
Go to the documentation of this file.
1 
11 #ifndef PRT_CHANNEL_H
12 #define PRT_CHANNEL_H
13 
14 #include "prt.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 struct prt_vdp_s;
21 struct prt_packet_s;
22 
29 typedef struct prt_channel_s {
30  struct prt_vdp_s *vdp; // back pointer to the parent VDP
31  int count; // number of elements in a packet
32  MPI_Datatype datatype; // datatype of elements in a packet
33  int *src_tuple; // tuple of the source VDP
34  int src_slot; // slot in the source VDP
35  int *dst_tuple; // tuple of the destination VDP
36  int dst_slot; // slot in the destination VDP
37  int src_node; // source node
38  int dst_node; // destination node
39  int tag; // tag for process-to-process communication
40  icl_deque_t *packets; // list of data packets
42 
50 
52  int count, MPI_Datatype datatype,
53  int *src_tuple, int src_slot,
54  int *dst_tuple, int dst_slot);
55 void prt_channel_delete(prt_channel_t *channel);
56 void prt_channel_push(prt_channel_t *channel, struct prt_packet_s *packet);
58 int prt_channel_empty(prt_channel_t *channel);
59 int prt_channel_compare(void *channel1, void *channel2);
60 
61 #ifdef __cplusplus
62 }
63 #endif
64 
65 #endif /* PRT_CHANNEL_H */
struct prt_channel_s prt_channel_t
VDP's data channel Implements a data link between a pair of VDPs. Identifies the source and destinati...
icl_deque_t * packets
Definition: prt_channel.h:40
MPI_Datatype datatype
Definition: prt_channel.h:32
VDP's data packet A packet of data transferred through VDP's channels.
Definition: prt_packet.h:24
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.
Definition: prt_channel.c:98
int * dst_tuple
Definition: prt_channel.h:35
int * src_tuple
Definition: prt_channel.h:33
int prt_channel_empty(prt_channel_t *channel)
Checks if a channel is empty.
Definition: prt_channel.c:153
void prt_channel_delete(prt_channel_t *channel)
channel destructor
Definition: prt_channel.c:64
prt_channel_direction_e
VDP's data channel direction Identifies the direction of a VDP channel during insertion.
Definition: prt_channel.h:47
VDP's data channel Implements a data link between a pair of VDPs. Identifies the source and destinati...
Definition: prt_channel.h:29
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.
Definition: prt_channel.c:128
int prt_channel_compare(void *channel1, void *channel2)
Compare two channels.
Definition: prt_channel.c:174
Virtual Data Processor (VDP) Is uniquely identified by a tuple. Fires for a predefined number of cycl...
Definition: prt_vdp.h:37
enum prt_channel_direction_e prt_channel_direction_t
VDP's data channel direction Identifies the direction of a VDP channel during insertion.
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
Definition: prt_channel.c:27
struct prt_vdp_s * vdp
Definition: prt_channel.h:30