PULSAR  2.0.0
Parallel Ultra-Light Systolic Array Runtime
 All Data Structures Files Functions Typedefs Enumerations Macros Groups
prt_channel.c File Reference

PRT data channel. More...

#include "prt_channel.h"

Go to the source code of this file.

Functions

prt_channel_tprt_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 (prt_vdp_t *vdp, prt_channel_t *channel, prt_packet_t *packet)
 Sends a packet from a host VDP. More...
 
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. More...
 
prt_packet_tprt_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...
 

Detailed Description

PRT data channel.

Author
Jakub Kurzak

PULSAR Runtime http://icl.utk.edu/pulsar/ Copyright (C) 2012-2015 University of Tennessee.

Definition in file prt_channel.c.

Function Documentation

int prt_channel_compare ( void *  channel1,
void *  channel2 
)

Compares two channels.

Parameters
channel1– The first channel.
channel2– The second channel.
Return values
-1channel1 is less than channel2.
0channel1 is equal to channel2.
1channel1 is greater than channel2.

Definition at line 264 of file prt_channel.c.

void prt_channel_delete ( prt_channel_t channel)

Destroys a channel.

Parameters
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.

Parameters
channel– The channel to check.
Return values
1if the channel is empty.
0if 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.

Parameters
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.

Parameters
channel- The channel to activate.

Definition at line 306 of file prt_channel.c.

prt_packet_t* 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.

Parameters
channel– The channel to fetch the packet from.
Returns
A data packet.

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.

Parameters
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.

Parameters
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.