bsp_delivtable.h File Reference

Defines the prototypes of the methods on a DeliveryTable object. More...

#include "bsp_exptable.h"
#include <config.h>

Include dependency graph for bsp_delivtable.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void deliveryTable_execute (ExpandableTable *restrict, ExpandableTable *restrict, ExpandableTable *restrict)
static void deliveryTable_initialize (ExpandableTable *restrict table, const int nprocs, const int rows)
 initializes a DeliveryTable object
static void deliveryTable_reset (ExpandableTable *restrict table)
 clears a DeliveryTable object
static void deliveryTable_destruct (ExpandableTable *restrict table)
 Frees memory allocated by a DeliveryTable.
static void deliveryTable_expand (ExpandableTable *restrict table, const int rows)
 Expands a DeliveryTable.
static void delivInfoMake (union SpecInfo *restrict info, int b, int c)
static void deliveryTable_push (ExpandableTable *restrict table, const int proc, const VarSizeElement elem)
 Adds a VarSizeElement to a DeliveryTable.
static void deliveryTable_pushSend (ExpandableTable *restrict table, const int proc, const void *restrict tag, const int tag_size, const void *restrict payload, const int payload_size)
 Adds a 'bsp_send()' to a DeliveryTable.
static void deliveryTable_pushPut (ExpandableTable *restrict table, const int proc, const void *const dst, const void *const restrict data, const int size)
 Adds a bsp_put() to a DeliveryTable.


Detailed Description

Defines the prototypes of the methods on a DeliveryTable object.

DeliveryTable provides two functionalities:

  1. It is a queue for actions which have to be performed during the next bsp_sync(), e.g. a bsp_set_tagsize() or a bsp_pop_reg()
  2. It is a communication buffer for data which has to be sent during the next bsp_sync(), e.g. a bsp_put()

These are the same if you consider sends and puts to be actions as well: A put or send is a memory copy action on the remote processor. Actions like bsp_set_tagsize() which do not need communication are placed in the column of the local processor (the column number is equal to the rank of the local processor). Each action is added to a column as a VarSizeElement. Additionally puts and sends have a block of data appended after the VarSizeElement struct in which one or more bsp_put()'s or bsp_send()'s are combined. An example is shown below.

varszel-ex.png

Example of a combined put and combined send in a VarSizeElement

Note that the size of the entire element is not fixed (hence the name VarSizeElement).
Author:
Wijnand Suijlen

Definition in file bsp_delivtable.h.


Function Documentation

static void deliveryTable_destruct ExpandableTable *restrict  table  )  [inline, static]
 

Frees memory allocated by a DeliveryTable.

Parameters:
table Reference to a DeliveryTable

Definition at line 89 of file bsp_delivtable.h.

References expandableTable_destruct().

Referenced by bsp_end().

Here is the call graph for this function:

void deliveryTable_execute ExpandableTable restrict,
ExpandableTable restrict,
ExpandableTable restrict
 

static void deliveryTable_expand ExpandableTable *restrict  table,
const int  rows
[inline, static]
 

Expands a DeliveryTable.

Parameters:
table Reference to a DeliveryTable object
rows Number of rows which should be added to this table

Definition at line 101 of file bsp_delivtable.h.

References VarSizeElement::data, SpecInfo::deliv, and DelivInfo::latest_pushed_element.

Referenced by deliveryTable_pushPut(), and deliveryTable_pushSend().

static void deliveryTable_initialize ExpandableTable *restrict  table,
const int  nprocs,
const int  rows
[inline, static]
 

initializes a DeliveryTable object

Parameters:
table Reference to a DeliveryTable
nprocs Number of processors to allocate memory for
rows Number of rows to allocate

Definition at line 67 of file bsp_delivtable.h.

References bsp_calloc, SpecInfo::deliv, DelivInfo::latest_pushed_element, and varElSizeTable_initialize().

Referenced by bsp_begin().

Here is the call graph for this function:

static void deliveryTable_push ExpandableTable *restrict  table,
const int  proc,
const VarSizeElement  elem
[inline, static]
 

Adds a VarSizeElement to a DeliveryTable.

Parameters:
table Reference to a DeliveryTable
proc Destination processor
elem Element which should be added

Definition at line 132 of file bsp_delivtable.h.

Referenced by bsp_pop_reg(), bsp_push_reg(), and bsp_set_tagsize().

static void deliveryTable_pushPut ExpandableTable *restrict  table,
const int  proc,
const void *const   dst,
const void *const restrict  data,
const int  size
[inline, static]
 

Adds a bsp_put() to a DeliveryTable.

Parameters:
table Reference to a DeliveryTable
proc Destination processor
dst Destination pointer (remote)
data Source pointer (local)
size Size of the data
If the last element was also a bsp_put() then do message combining

Definition at line 261 of file bsp_delivtable.h.

References VarSizeElement::data, deliveryTable_expand(), VarSizeElement::info, PutObject::item_count, PutObject::item_size, MAX, no_slots(), _VarSzInfo::put, put, VarSizeElement::size, and VarSizeElement::type.

Referenced by bsp_put(), and requestTable_execute().

Here is the call graph for this function:

static void deliveryTable_pushSend ExpandableTable *restrict  table,
const int  proc,
const void *restrict  tag,
const int  tag_size,
const void *restrict  payload,
const int  payload_size
[inline, static]
 

Adds a 'bsp_send()' to a DeliveryTable.

Parameters:
table Reference to a DeliveryTable
proc Destination processor
tag Pointer to the tag
tag_size Size of the tag
payload Pointer to the payload
payload_size Size of the payload
If the last pushed element was also a bsp_send() then do message combining

Definition at line 165 of file bsp_delivtable.h.

References VarSizeElement::data, deliveryTable_expand(), VarSizeElement::info, SendObject::item_count, MAX, no_slots(), SendObject::payload_size, _VarSzInfo::send, send, VarSizeElement::size, SendObject::tag_size, and VarSizeElement::type.

Referenced by bsp_send().

Here is the call graph for this function:

static void deliveryTable_reset ExpandableTable *restrict  table  )  [inline, static]
 

clears a DeliveryTable object

Parameters:
table Reference to a DeliveryTable

Definition at line 79 of file bsp_delivtable.h.

References expandableTable_reset().

Referenced by bsp_sync().

Here is the call graph for this function:

static void delivInfoMake union SpecInfo *restrict  info,
int  b,
int  c
[static]
 

Definition at line 122 of file bsp_delivtable.h.


Generated on Sat Apr 8 12:58:04 2006 for BSPonMPI by  doxygen 1.4.6