PULSAR  2.0.0
Parallel Ultra-Light Systolic Array Runtime
 All Data Structures Files Functions Typedefs Enumerations Macros Groups
prt_transfer.c
Go to the documentation of this file.
1 
11 #include "prt_transfer.h"
12 
14 
25  struct prt_packet_s *packet,
26  struct prt_channel_s *channel,
27  enum prt_direction_e direction,
28  int agent)
29 {
30  prt_transfer_t *transfer =
31  (prt_transfer_t*)malloc(sizeof(prt_transfer_t));
32  prt_assert(transfer != NULL, "malloc failed");
33  transfer->packet = packet;
34  transfer->channel = channel;
35  transfer->direction = direction;
36  transfer->agent = agent;
37  return transfer;
38 }
39 
41 
47 {
48  free(transfer);
49 }