|
PULSAR
2.0.0
Parallel Ultra-Light Systolic Array Runtime
|
PRT data channel. More...
#include "prt.h"Go to the source code of this file.
Data Structures | |
| struct | prt_channel_s |
| VDP's data channel. Implements a data link between a pair of VDPs. Identifies the source and destination VDPs by tuples. Contains a thread-safe list of data packets. More... | |
Typedefs | |
| typedef struct prt_channel_s | prt_channel_t |
| VDP's data channel. Implements a data link between a pair of VDPs. Identifies the source and destination VDPs by tuples. Contains a thread-safe list of data packets. More... | |
|
typedef enum prt_channel_direction_e | prt_channel_direction_t |
| VDP's data channel direction. Identifies the direction of a VDP channel during insertion. | |
Enumerations | |
| enum | prt_channel_direction_e { PRT_INPUT_CHANNEL, PRT_OUTPUT_CHANNEL } |
| VDP's data channel direction. Identifies the direction of a VDP channel during insertion. | |
Functions | |
| prt_channel_t * | prt_channel_new (size_t size, int *src_tuple, int src_slot, int *dst_tuple, int dst_slot) |
| Creates a new channel. Channel size cannot be larger than INT_MAX, because all data typea are packed inside messages of type MPI_BYTE. More... | |
| void | prt_channel_delete (prt_channel_t *channel) |
| Destroys a channel. More... | |
| void | prt_channel_push_host (struct prt_vdp_s *vdp, prt_channel_t *channel, struct prt_packet_s *packet) |
| Sends a packet from a host VDP. More... | |
| void | prt_channel_push_device (struct prt_vdp_s *vdp, prt_channel_t *channel, struct prt_packet_s *packet) |
| Sends a packet from a device VDP. Puts a callback in the VDP's stream. When reached, the callback puts the transfer in the channel's stream. More... | |
| struct prt_packet_s * | prt_channel_pop (prt_channel_t *channel) |
| Fetches a packef from a channel. Does not decrement the number of active references. The packet leaves the channel, but enters the VDP. More... | |
| int | prt_channel_empty (prt_channel_t *channel) |
| Checks if a channel is empty. More... | |
| int | prt_channel_compare (void *channel1, void *channel2) |
| Compares two channels. More... | |
| void | prt_channel_off (prt_channel_t *channel) |
| Deactivates a channel. Newly created channels are active. Inactive channels are excluded from readiness checks. More... | |
| void | prt_channel_on (prt_channel_t *channel) |
| Activates a channel. Newly created channels are active. Inactive channels are excluded from readiness checks. More... | |
PRT data channel.
PULSAR Runtime http://icl.utk.edu/pulsar/ Copyright (C) 2012-2015 University of Tennessee.
Definition in file prt_channel.h.
| typedef struct prt_channel_s prt_channel_t |
VDP's data channel. Implements a data link between a pair of VDPs. Identifies the source and destination VDPs by tuples. Contains a thread-safe list of data packets.
The in_stream is used when the recipient device pulls: host->device, device->device (second stage). The out_stream is used when the sender device pushes: device->host, device->device (first stage).
| int prt_channel_compare | ( | void * | channel1, |
| void * | channel2 | ||
| ) |
Compares two channels.
| channel1 | – The first channel. |
| channel2 | – The second channel. |
| -1 | channel1 is less than channel2. |
| 0 | channel1 is equal to channel2. |
| 1 | channel1 is greater than channel2. |
Definition at line 264 of file prt_channel.c.
| void prt_channel_delete | ( | prt_channel_t * | channel) |
Destroys a channel.
| channel | – The channel to destroy. |
Definition at line 70 of file prt_channel.c.
| int prt_channel_empty | ( | prt_channel_t * | channel) |
Checks if a channel is empty.
| channel | – The channel to check. |
| 1 | if the channel is empty. |
| 0 | if the channel is not empty. |
Definition at line 243 of file prt_channel.c.
| void prt_channel_off | ( | prt_channel_t * | channel) |
Deactivates a channel. Newly created channels are active. Inactive channels are excluded from readiness checks.
| channel | – The channel to deactivate. |
Definition at line 292 of file prt_channel.c.
| void prt_channel_on | ( | prt_channel_t * | channel) |
Activates a channel. Newly created channels are active. Inactive channels are excluded from readiness checks.
| channel | - The channel to activate. |
Definition at line 306 of file prt_channel.c.
| struct prt_packet_s* prt_channel_pop | ( | prt_channel_t * | channel) |
Fetches a packef from a channel. Does not decrement the number of active references. The packet leaves the channel, but enters the VDP.
| channel | – The channel to fetch the packet from. |
Definition at line 219 of file prt_channel.c.
| void prt_channel_push_device | ( | prt_vdp_t * | vdp, |
| prt_channel_t * | channel, | ||
| prt_packet_t * | packet | ||
| ) |
Sends a packet from a device VDP. Puts a callback in the VDP's stream. When reached, the callback puts the transfer in the channel's stream.
There is no need to set the device here. This function is called by prt_vdp_channel_push, which is called from VDP code, where the device is already set.
| vdp | – The device VDP sending the packet. |
| channel | – The channel to send the packet to. |
| packet | – The packet to send. |
Definition at line 151 of file prt_channel.c.
| void prt_channel_push_host | ( | prt_vdp_t * | vdp, |
| prt_channel_t * | channel, | ||
| prt_packet_t * | packet | ||
| ) |
Sends a packet from a host VDP.
| vdp | – The host VDP sending the packet. |
| channel | – The channel to send the packet to. |
| packet | – The packet to send. |
Definition at line 104 of file prt_channel.c.