PULSAR  0.1
Parallel Unified Linear Algebra with Systolic Arrays
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
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 dst_node; // destination node
38  icl_deque_t *packets; // list of data packets
39  int tag; // tag for process-to-process communication
41 
49 
51  int count, MPI_Datatype datatype,
52  int *src_tuple, int src_slot,
53  int *dst_tuple, int dst_slot);
54 void prt_channel_delete(prt_channel_t *channel);
55 void prt_channel_push(prt_channel_t *channel, struct prt_packet_s *packet);
57 int prt_channel_empty(prt_channel_t *channel);
58 int prt_channel_compare(void *channel1, void *channel2);
59 
60 #ifdef __cplusplus
61 }
62 #endif
63 
64 #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:38
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:125
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
int * dst_tuple
Definition: prt_channel.h:35
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:96
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:150
void prt_channel_delete(prt_channel_t *channel)
channel destructor
Definition: prt_channel.c:63
prt_channel_direction_e
VDP's data channel direction Identifies the direction of a VDP channel during insertion.
Definition: prt_channel.h:46
VDP's data channel Implements a data link between a pair of VDPs. Identifies the source and destinati...
Definition: prt_channel.h:29
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...
Definition: prt_channel.c:171
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:26
struct prt_vdp_s * vdp
Definition: prt_channel.h:30