Main Page | Namespace List | Class Hierarchy | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages

BspLib.hpp File Reference

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

Included by dependency graph

Go to the source code of this file.

Functions

void bsp_begin (int maxProcs)
int bsp_pid ()
int bsp_nprocs ()
void bsp_sync ()
void bsp_pushregister (const void *ident, int size)
void bsp_popregister (const void *ident)
void bsp_put (int pid, const void *src, void *dst, int offset, int nbytes)
void bsp_get (int pid, void *src, int offset, void *dst, int nBytes)
void bsp_push_reg (const void *ident, int size)
void bsp_pop_reg (const void *ident)


Function Documentation

void bsp_begin int  maxProcs  ) 
 

Starts the parallel portion of a BSP program

Parameters:
maxProcs - the number of tasks to be spawned. This is currently unused. Instead, use the configuration file to specify the number of tasks.

void bsp_get int  pid,
void *  src,
int  offset,
void *  dst,
int  nBytes
 

Allows the local task to read from memory from a remote process.

Parameters:
pid - The BSP process ID from where memory contents will be read
src - Memory address from where data will be copied
offset - Offset that will be added to the source address to determine the starting position from where data will be copied
dst - The destination address to were data will be written
nBytes - Number of bytes to be read

int bsp_nprocs  ) 
 

Returns the number of total tasks of the BSP application.

int bsp_pid  ) 
 

Returns the BSP PID of the current task

void bsp_pop_reg const void *  ident  ) 
 

Alias to bsp_popregister. Removes the registration that allows a memory area to be remotely accessed. If there are more than one registration of the same address, the last one is removed.

Parameters:
ident - the memory address to be deregistered

void bsp_popregister const void *  ident  ) 
 

Removes the registration that allows a memory area to be remotely accessed. If there are more than one registration of the same address, the last one is removed.

Parameters:
ident - the memory address to be deregistered

void bsp_push_reg const void *  ident,
int  size
 

Alias to bsp_pushregister. Register a memory address as accessible for remote writes/reads.

Parameters:
ident - pointer to the memory area
size - size (in bytes) if the memory area being registered.

void bsp_pushregister const void *  ident,
int  size
 

Register a memory address as accessible for remote writes/reads.

Parameters:
ident - pointer to the memory area
size - size (in bytes) if the memory area being registered.

void bsp_put int  pid,
const void *  src,
void *  dst,
int  offset,
int  nbytes
 

Performs a write at a remote memory address.

Parameters:
pid - the BSP PID of the remote task on which the write will be performed
src - the memory address from which contents will be copied
dst - the LOCAL destination memory address. Will be mapped to a global memory address.
offset - will start copying from address dst + offset
nbytes - the number of bytes that will be copied

void bsp_sync  ) 
 

Barrier synchronization. Waits until all other tasks reach the barrier.


Generated on Mon Sep 6 16:12:52 2004 by doxygen 1.3.3