PULSAR  0.1
Parallel Unified Linear Algebra with Systolic Arrays
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
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 
24 typedef struct prt_packet_s {
25  void *data; // pointer to the data
26  int num_refs; // number of active references
27 } prt_packet_t;
28 
29 prt_packet_t *prt_packet_new(size_t data_size);
30 void prt_packet_release(prt_packet_t *packet);
31 
32 #ifdef __cplusplus
33 }
34 #endif
35 
36 #endif /* PRT_PACKET_H */
VDP's data packet A packet of data transferred through VDP's channels.
Definition: prt_packet.h:24
void * data
Definition: prt_packet.h:25
void prt_packet_release(prt_packet_t *packet)
Release a packet. Decrements the number of active references. Destroys the packet when the last refer...
Definition: prt_packet.c:42
struct prt_packet_s prt_packet_t
VDP's data packet A packet of data transferred through VDP's channels.
prt_packet_t * prt_packet_new(size_t data_size)
packet constructor Sets the number of references to one.
Definition: prt_packet.c:22