PULSAR  2.0.0
Parallel Ultra-Light Systolic Array Runtime
 All Data Structures Files Functions Typedefs Enumerations Macros Groups
prt_packet.h
Go to the documentation of this file.
1 
11 #ifndef PRT_PACKET_H
12 #define PRT_PACKET_H
13 
14 #include "prt.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 struct prt_vdp_s;
21 struct prt_channel_s;
22 struct gpu_malloc_s;
23 
31 typedef struct prt_packet_s {
32  void *data; // Pointer to the data.
33  size_t size; // Data size in bytes.
34  volatile int num_refs; // Number of active references.
35  prt_location_t location; // Packet location.
36  int device_rank; // Device number.
37  struct gpu_malloc_s *devmem; // Device memory allocator.
38 } prt_packet_t;
39 
40 prt_packet_t *prt_packet_new_host(size_t size, void *data);
42  size_t size, void *data, struct prt_vdp_s *vdp);
43 void prt_packet_resize_host(prt_packet_t *packet, size_t size);
46 
48  prt_packet_t *src_packet, struct prt_channel_s *channel);
50  prt_packet_t *src_packet, struct prt_channel_s *channel);
52  prt_packet_t *src_packet, struct prt_channel_s *channel);
54  prt_packet_t *src_packet, struct prt_channel_s *channel);
56  prt_packet_t *src_packet, struct prt_channel_s *channel, int agent);
57 
58 #ifdef __cplusplus
59 }
60 #endif
61 
62 #endif /* PRT_PACKET_H */