bsp_memreg.c File Reference

Implements methods on MemoryRegister. More...

#include "bsp_abort.h"
#include "bsp_memreg.h"
#include "bsp_alloc.h"

Include dependency graph for bsp_memreg.c:

Go to the source code of this file.

Functions

void memoryRegister_initialize (ExpandableTable *restrict table, const unsigned int nprocs, const unsigned int rows, const unsigned int src_proc)
 Initializes a MemoryRegister object.
void memoryRegister_destruct (ExpandableTable *restrict table)
 destructor of MemoryRegister
void memoryRegister_expand (ExpandableTable *restrict table, const unsigned int rows)
 increases the size of a MemoryRegister
static void newMemRegInfoAtPush (union SpecInfo *restrict info, unsigned int rows, unsigned int newrows)
 Used as parameter of memoryRegister_push().
void memoryRegister_push (ExpandableTable *restrict table, const unsigned int proc, const char *const restrict pointer)
 Adds an address of memory location of in a certain processor.
void memoryRegister_pop (ExpandableTable *restrict table, const unsigned int proc, const char *const restrict pointer)
 Removed an adress from a MemoryRegister.
void memoryRegister_pack (ExpandableTable *restrict table)
 Really removes popped elements from the table.


Detailed Description

Implements methods on MemoryRegister.

Author:
Wijnand Suijlen

Definition in file bsp_memreg.c.


Function Documentation

void memoryRegister_destruct ExpandableTable *restrict  table  ) 
 

destructor of MemoryRegister

Parameters:
table Reference to a MemoryRegister object

Definition at line 60 of file bsp_memreg.c.

References bsp_free(), and expandableTable_destruct().

Referenced by bsp_end().

Here is the call graph for this function:

void memoryRegister_expand ExpandableTable *restrict  table,
const unsigned int  rows
 

increases the size of a MemoryRegister

Parameters:
table Reference to a MemoryRegister object
rows Number of rows to add

Definition at line 71 of file bsp_memreg.c.

References bsp_calloc, bsp_free(), expandableTable_expand(), MemRegInfo::memoized_data_iter, MemRegInfo::memoized_end, MemRegInfo::memoized_src_proc, MemRegInfo::memoized_srccol, MemRegInfo::numremov, SpecInfo::reg, and MemRegInfo::removed.

Here is the call graph for this function:

void memoryRegister_initialize ExpandableTable *restrict  table,
const unsigned int  nprocs,
const unsigned int  rows,
const unsigned int  src_proc
 

Initializes a MemoryRegister object.

Parameters:
table Reference to a MemoryRegister object
nprocs Number of processors
rows Initial number of rows
src_proc Rank of the local processor

Definition at line 43 of file bsp_memreg.c.

References bsp_calloc, fixedElSizeTable_initialize(), MemRegInfo::memoized_data_iter, MemRegInfo::memoized_end, MemRegInfo::memoized_src_proc, MemRegInfo::memoized_srccol, MemRegInfo::numremov, SpecInfo::reg, and MemRegInfo::removed.

Referenced by bsp_begin().

Here is the call graph for this function:

void memoryRegister_pack ExpandableTable *restrict  table  ) 
 

Really removes popped elements from the table.

Popped elements are marked for removal, but are not actually removed.

Parameters:
table Reference to a MemoryRegister

Definition at line 159 of file bsp_memreg.c.

References restrict.

void memoryRegister_pop ExpandableTable *restrict  table,
const unsigned int  proc,
const char *const restrict  pointer
 

Removed an adress from a MemoryRegister.

Parameters:
table Reference to a MemoryRegister
proc Rank of local processor
pointer Local registered address

Definition at line 131 of file bsp_memreg.c.

References bsp_intern_abort(), ERR_POP_REG_WITHOUT_PUSH, and restrict.

Here is the call graph for this function:

void memoryRegister_push ExpandableTable *restrict  table,
const unsigned int  proc,
const char *const restrict  pointer
 

Adds an address of memory location of in a certain processor.

Parameters:
table Reference to a MemoryRegister object
proc Processor rank of the memory location
pointer Address

Definition at line 117 of file bsp_memreg.c.

References fixedElSizeTable_push(), and newMemRegInfoAtPush().

Here is the call graph for this function:

static void newMemRegInfoAtPush union SpecInfo *restrict  info,
unsigned int  rows,
unsigned int  newrows
[static]
 

Used as parameter of memoryRegister_push().

Parameters:
info MemoryRegister info
rows Old number of rows
newrows New number of rows

Definition at line 96 of file bsp_memreg.c.

References bsp_calloc, and bsp_free().

Referenced by memoryRegister_push().

Here is the call graph for this function:


Generated on Sat Apr 8 20:13:31 2006 for BSPonMPI by  doxygen 1.4.6