PULSAR  2.0.0
Parallel Ultra-Light Systolic Array Runtime
 All Data Structures Files Functions Typedefs Enumerations 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 
34 typedef struct prt_channel_s {
35  struct prt_vdp_s *dst_vdp; // Back pointer to the destination VDP.
36  struct prt_vdp_s *src_vdp; // Back pointer to the source VDP.
37  struct prt_proxy_s *proxy; // Pointer to the comm proxy.
38  size_t size; // Max packet size in bytes.
39  int *src_tuple; // Tuple of the source VDP.
40  int src_slot; // Slot in the source VDP.
41  int *dst_tuple; // Tuple of the destination VDP.
42  int dst_slot; // Slot in the destination VDP.
43  int src_node; // Source node.
44  int dst_node; // Destination node.
45  int tag; // Tag for MPI communication.
46  icl_deque_t *packets; // List of data packets.
47  int active; // Activity flag.
48  cudaStream_t in_stream; // Inbound stream.
49  cudaStream_t out_stream; // Outbound stream.
51 
57  PRT_INPUT_CHANNEL, PRT_OUTPUT_CHANNEL
59 
61  size_t size,
62  int *src_tuple, int src_slot,
63  int *dst_tuple, int dst_slot);
64 void prt_channel_delete(prt_channel_t *channel);
66  struct prt_vdp_s *vdp, prt_channel_t *channel, struct prt_packet_s *packet);
68  struct prt_vdp_s *vdp, prt_channel_t *channel, struct prt_packet_s *packet);
70 int prt_channel_empty(prt_channel_t *channel);
71 int prt_channel_compare(void *channel1, void *channel2);
72 void prt_channel_off(prt_channel_t *channel);
73 void prt_channel_on(prt_channel_t *channel);
74 
75 #ifdef __cplusplus
76 }
77 #endif
78 
79 #endif /* PRT_CHANNEL_H */