PULSAR  2.0.0
Parallel Ultra-Light Systolic Array Runtime
 All Data Structures Files Functions Typedefs Enumerations Macros Groups
prt_proxy.h
Go to the documentation of this file.
1 
11 #ifndef PRT_PROXY_H
12 #define PRT_PROXY_H
13 
14 #include "prt.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 struct prt_vsa_s;
21 struct prt_packet_s;
22 struct prt_channel_s;
23 struct prt_request_s;
24 
30 #define PRT_PROXY_MAX_TAGS_PER_NODE 10003
31 
35 #define PRT_PROXY_MAX_SENDS_PER_AGENT 1
36 
40  #define PRT_PROXY_MAX_RECVS_PER_AGENT 1
41 
49 typedef struct prt_proxy_s {
50  struct prt_vsa_s *vsa; // Back pointer to the parent VSA.
51  int num_agents; // Number of agents (threads + devices).
52  icl_hash_t *tags_hash; // Channel lookup by rank-tag.
53  icl_deque_t **sends_requested; // Sends requested by channels (per agent).
54  icl_list_t **sends_posted; // Sends posted, not completed (per agent).
55  icl_list_t *recvs_posted; // Recvs posted, not completed (all agents).
56  icl_deque_t *transfers; // Requested accelerator transfers.
57  size_t max_channel_size; // Maximum size of a channel in bytes.
58  volatile int num_callbacks; // Number of pending callbacks.
59 } prt_proxy_t;
60 
61 prt_proxy_t* prt_proxy_new(int num_agents);
62 void prt_proxy_delete(prt_proxy_t *proxy);
63 void prt_proxy_max_channel_size(prt_proxy_t *proxy, struct prt_channel_s *channel);
64 void prt_proxy_recv(prt_proxy_t *proxy, struct prt_request_s *request);
65 void prt_proxy_mpi(prt_proxy_t *proxy);
66 void prt_proxy_cuda(prt_proxy_t *proxy);
67 double prt_proxy_run(prt_proxy_t *proxy);
68 
69 #ifdef __cplusplus
70 }
71 #endif
72 
73 #endif /* PRT_PROXY_H */