PULSAR  1.0.0
Parallel Ultra Light Systolic Array Runtime
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator 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_channel_s;
22 struct prt_request_s;
23 
29 #define PRT_PROXY_MAX_TAGS_PER_NODE 10003
30 #define PRT_PROXY_MAX_SENDS_PER_THREAD 1
31 #define PRT_PROXY_MAX_RECVS_PER_THREAD 1
32 
39 typedef struct prt_proxy_s {
40  struct prt_vsa_s *vsa; // back pointer to the parent VSA.
41  int num_threads; // number of threads
42  icl_hash_t *tags_hash; // channel lookup by rank-tag
43  icl_deque_t **sends_requested; // sends requested by channels (per thread)
44  icl_list_t **sends_posted; // sends posted, not completed (per thread)
45  icl_list_t *recvs_posted; // recvs posted, not completed (all threads)
46  size_t max_packet_size; // maximum size of a packet in bytes
47 } prt_proxy_t;
48 
52 void prt_proxy_send(prt_proxy_t *proxy, int thread_rank, struct prt_channel_s *channel);
53 void prt_proxy_recv(prt_proxy_t *proxy, struct prt_request_s *request);
55 
56 #ifdef __cplusplus
57 }
58 #endif
59 
60 #endif /* PRT_PROXY_H */
icl_list_t * recvs_posted
Definition: prt_proxy.h:45
icl_list_t ** sends_posted
Definition: prt_proxy.h:44
struct prt_proxy_s prt_proxy_t
VSA's communication proxy Serves communication requests from the worker threads. Contains a list of r...
void prt_proxy_delete(prt_proxy_t *proxy)
communication proxy destructor Checking if all the lists are empty at the time of destruction...
Definition: prt_proxy.c:66
Virtual Systolic Array (VSA) VSA contains global informationa about the system, a local communication...
Definition: prt_vsa.h:45
VSA's communication proxy Serves communication requests from the worker threads. Contains a list of r...
Definition: prt_proxy.h:39
prt_proxy_t * prt_proxy_new(int num_threads)
communication proxy constructor
Definition: prt_proxy.c:21
void prt_proxy_max_packet_size(prt_proxy_t *proxy, prt_channel_t *channel)
Look for maximum channel/packet size.
Definition: prt_proxy.c:105
VDP's data channel Implements a data link between a pair of VDPs. Identifies the source and destinati...
Definition: prt_channel.h:29
icl_deque_t ** sends_requested
Definition: prt_proxy.h:43
struct prt_vsa_s * vsa
Definition: prt_proxy.h:40
void prt_proxy_run(prt_proxy_t *proxy)
communication proxy production cycle Serves communication requests of local worker threads until shut...
Definition: prt_proxy.c:171
struct prt_proxy_s * proxy
Definition: prt_vsa.h:56
void prt_proxy_recv(prt_proxy_t *proxy, prt_request_t *request)
recv to a channel
Definition: prt_proxy.c:143
VSA proxy's communication request Contains basic information about the communication request...
Definition: prt_request.h:27
size_t max_packet_size
Definition: prt_proxy.h:46
int num_threads
Definition: prt_proxy.h:41
int num_threads
Definition: prt_vsa.h:48
icl_hash_t * tags_hash
Definition: prt_proxy.h:42
void prt_proxy_send(prt_proxy_t *proxy, int thread_rank, prt_channel_t *channel)
send from a channel
Definition: prt_proxy.c:122