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

Virtual Data Processor. More...

#include "prt.h"

Go to the source code of this file.

Data Structures

struct  prt_vdp_s
 Virtual Data Processor (VDP). Is uniquely identified by a tuple. Fires for a predefined number of cycles. Has a fixed number of input and output channels. Has a persistent local store. Has access to read-only global store. More...
 

Typedefs

typedef void(* prt_vdp_function_t )(struct prt_vdp_s *)
 VDP's function pointer. Defines the type of the pointer to the VDP's function.
 
typedef struct prt_vdp_s prt_vdp_t
 Virtual Data Processor (VDP). Is uniquely identified by a tuple. Fires for a predefined number of cycles. Has a fixed number of input and output channels. Has a persistent local store. Has access to read-only global store.
 

Functions

prt_vdp_tprt_vdp_new (int *tuple, int counter, prt_vdp_function_t function, size_t local_store_size, int num_inputs, int num_outputs, int color)
 Creates a new VDP. More...
 
void prt_vdp_delete (prt_vdp_t *vdp)
 Destroys a VDP. Used for destruction of local VDPs. Destroys all input channels. Destroys all dangling output channels. Local output channels are destroyed as input channels of other local VDPs. More...
 
void prt_vdp_annihilate (prt_vdp_t *vdp)
 Annihilates a VDP. Used for complete annihilation of VDPs that don't belong in the node. Destroys all input channels. Destroys all output channels. More...
 
void prt_vdp_channel_insert (prt_vdp_t *vdp, struct prt_channel_s *channel, enum prt_channel_direction_e direction, int slot)
 
struct prt_packet_sprt_vdp_packet_new (prt_vdp_t *vdp, size_t size, void *data)
 Creates a new packet. Allocates the size amount of data if a NULL pointer is passed. The size cannot be larger than INT_MAX, because all data typea are packed inside messages of type MPI_BYTE. Calls host constructor or device constructor depending on the VDP's location. More...
 
struct prt_packet_sprt_vdp_packet_new_host_to_device (prt_vdp_t *vdp, size_t size, void *data)
 Creates a new packet and queues a host-to-device transfer. The size cannot be larger than INT_MAX, because all data typea are packed inside messages of type MPI_BYTE. Expects a non-NULL pointer to the data in host memory. Right now, device memory is allocated immediately. Potentially, it could also be done in the VDP's stream. More...
 
void prt_vdp_packet_release (prt_vdp_t *vdp, struct prt_packet_s *packet)
 Releases a packet. Decrements the number of active references. Destroys the packet when the number of references goes down to zero. For device packets, puts a callback in the VDP's stream. More...
 
void prt_vdp_channel_push (prt_vdp_t *vdp, int channel_num, struct prt_packet_s *packet)
 Pushes a packet in a channel. More...
 
struct prt_packet_sprt_vdp_channel_pop (prt_vdp_t *vdp, int channel_num)
 Fetches a packet from a channel. More...
 
void prt_vdp_channel_off (prt_vdp_t *vdp, int channel_num)
 Deactivates a channel. More...
 
void prt_vdp_channel_on (prt_vdp_t *vdp, int channel_num)
 Activates a channel. More...
 
int prt_vdp_ready (prt_vdp_t *vdp)
 Checks if a VDP is ready to fire. Only checks established channels. (NULL channels don't prevent firing.) Inactive channels don't precent firing. More...
 

Detailed Description

Virtual Data Processor.

Author
Jakub Kurzak

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

Definition in file prt_vdp.h.

Function Documentation

void prt_vdp_annihilate ( prt_vdp_t vdp)

Annihilates a VDP. Used for complete annihilation of VDPs that don't belong in the node. Destroys all input channels. Destroys all output channels.

Parameters
vdp– The VDP to annihilate.

Definition at line 152 of file prt_vdp.c.

void prt_vdp_delete ( prt_vdp_t vdp)

Destroys a VDP. Used for destruction of local VDPs. Destroys all input channels. Destroys all dangling output channels. Local output channels are destroyed as input channels of other local VDPs.

Parameters
vdp– The VDP to destroy.

Definition at line 87 of file prt_vdp.c.

int prt_vdp_ready ( prt_vdp_t vdp)

Checks if a VDP is ready to fire. Only checks established channels. (NULL channels don't prevent firing.) Inactive channels don't precent firing.

Parameters
vdp– The VDP to check.
Return values
1if ready.
0if not ready.

Definition at line 456 of file prt_vdp.c.