#include "bsp_exptable.h"
#include "bsp_mesgqueue.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, MessageQueue *restrict, const int) |
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 * | deliveryTable_push (ExpandableTable *restrict table, const int proc, const DelivElement element, const ItemType type) |
Adds an element to the table and expands the table when necessary. |
DeliveryTable provides two functionalities:
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 consists of a tag and a payload. The tag is a DelivElement, the payload data can be anything as long it is not bigger as described in the tag. The tag stores information about the size
, action specific information and where to find the next
action of the same type. The tag does not store what type of action it represents, because DeliveryTable knows where to find the first action of a certain type (DelivInfo ) . Subsequent actions are referenced by the next
value in the tag. In other words: Each column stores 6 linked lists of actions (pushreg, popreg, put, get, send, settag). Information about these linked lists (the arrays referenced in DelivInfo) are stored at the top of the columns. This way, the information is automatically communicated to the receiving processors.
You may wonder why these linked lists are necessary. It also works without these lists if you store the type of action in the tag. However, when executing a column, it has to be determined what type each actions. This results in a switch-case statement in a tight loop. Branches are expensive and using these linked lists they have become unnecessary.
Definition in file bsp_delivtable.h.
|
Frees memory allocated by a DeliveryTable.
Definition at line 135 of file bsp_delivtable.h. References bsp_free(), and expandableTable_destruct(). Referenced by bsp_end(). Here is the call graph for this function: |
|
|
|
Expands a DeliveryTable.
Definition at line 149 of file bsp_delivtable.h. References ALIGNED_TYPE, and expandableTable_expand(). Referenced by deliveryTable_push(). Here is the call graph for this function: |
|
initializes a DeliveryTable object
Definition at line 83 of file bsp_delivtable.h. References ALIGNED_TYPE, bsp_malloc, DelivInfo::count, SpecInfo::deliv, DelivInfo::end, expandableTable_initialize(), no_slots(), and DelivInfo::start. Referenced by bsp_begin(). Here is the call graph for this function: |
|
Adds an element to the table and expands the table when necessary. The payload may be copied to the address referenced by the returned pointer.
Definition at line 176 of file bsp_delivtable.h. References ALIGNED_TYPE, deliveryTable_expand(), MAX, no_slots(), restrict, and DelivElement::size. Referenced by bsp_pop_reg(), bsp_push_reg(), bsp_put(), bsp_send(), bsp_set_tagsize(), and requestTable_execute(). Here is the call graph for this function: |
|
clears a DeliveryTable object
Definition at line 116 of file bsp_delivtable.h. References ALIGNED_TYPE, expandableTable_reset(), and no_slots(). Referenced by bsp_sync(). Here is the call graph for this function: |