Jpetra Development
Public Member Functions
Jpetra::SerialComm Class Reference
Inheritance diagram for Jpetra::SerialComm:
Inheritance graph
[legend]
Collaboration diagram for Jpetra::SerialComm:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SerialComm ()
void barrier ()
int broadcast (int value, int root)
double broadcast (double value, int root)
Serializable broadcast (java.io.Serializable value, int root)
double[] gatherAll (double myDouble)
double[] gatherAll (double[] myElements)
java.io.Serializable[] gatherAll (java.io.Serializable[] myElements)
int[] gatherAll (int[] myElements)
int[] gatherAll (int myInt)
boolean isSerial ()
int getNumVnodes ()
int getVnodeId ()
double[] maxAll (double[] partialMaxs)
int[] maxAll (int[] partialMaxs)
int[] minAll (int[] partialMins)
Serializable minAll (Serializable partialMins)
double[] scanSums (double[] myElements)
int[] scanSums (int[] myElements)
void setMyVnodeID (int newVnodeID)
int[] sumAll (int[] partialSums)
double[] sumAll (double[] partialSums)
int[][] gatherAll2dArray (int[] myElements)
void send (Serializable[] exportObject, int destinationVnode)
void send (int[] exportObject, int destinationVnode)
Serializable receive (int senderId)
int[] scatterIntArray (int[] in)
int[] scatter2dArray (int[][] in)
int[][] gather (int[] in)
void send (Serializable exportObject, int destinationVnode)
void send (double[] exportObject, int destinationVnode)
Distributor createDistributor ()
Directory createDirectory (VectorSpace vectorSpace)
Serializable maxAll (Serializable partialMaxs)
double[] minAll (double[] partialMins)

Detailed Description

SerialComm is a simple class that implements the Comm interface for serial communication. Most methods either simply return the parameters passed to them or return a hard coded value.

Author:
Jason Cross

Constructor & Destructor Documentation

Jpetra::SerialComm::SerialComm ( ) [inline]

Creates a new instance of SerialComm.


Member Function Documentation

void Jpetra::SerialComm::barrier ( ) [inline]

No-op for a serial communicator.

Implements Jpetra::Comm.

int Jpetra::SerialComm::broadcast ( int  value,
int  root 
) [inline]

Does a broadcast of value to the node itself.

Parameters:
valueThe int to broadcast to all nodes.
rootThe root vnode to gather the ints onto. This is not used for serial communication and is ignored.
Returns:
value that was passed in

Implements Jpetra::Comm.

Serializable Jpetra::SerialComm::broadcast ( java.io.Serializable  value,
int  root 
) [inline]

Does a broadcast of value to the node itself.

Parameters:
valueThe Serializable object to broadcast to all nodes.
rootThe root vnode to gather the Serializable objects onto. This is not used for serial communication and is ignored.
Returns:
value that was passed in
double Jpetra::SerialComm::broadcast ( double  value,
int  root 
) [inline]

Does a broadcast of value to the node itself.

Parameters:
valueThe double to broadcast to all nodes.
rootThe root vnode to gather the doubles onto. This is not used for serial communication and is ignored.
Returns:
value that was passed in

Implements Jpetra::Comm.

int [] Jpetra::SerialComm::gatherAll ( int[]  myElements) [inline]

Simply returns myElements.

Parameters:
myElementsthe int array to gather
Returns:
myElements

Implements Jpetra::Comm.

int [] Jpetra::SerialComm::gatherAll ( int  myInt) [inline]

Simply returns an array of size one of myInt.

Parameters:
myIntthe int to gather
Returns:
myInt

Implements Jpetra::Comm.

double [] Jpetra::SerialComm::gatherAll ( double  myDouble) [inline]

Simply returns an array of size one of myDouble.

Parameters:
myDoublethe double to gather
Returns:
myDouble

Implements Jpetra::Comm.

double [] Jpetra::SerialComm::gatherAll ( double[]  myElements) [inline]

Simply returns myElements.

Parameters:
myElementsthe double array to gather
Returns:
myElements

Implements Jpetra::Comm.

java.io.Serializable [] Jpetra::SerialComm::gatherAll ( java.io.Serializable[]  myElements) [inline]

Simply returns myElements.

Parameters:
myElementsthe serialized object array to gather
Returns:
myElements
int Jpetra::SerialComm::getNumVnodes ( ) [inline]

Since this is a serial implementation of comm the value returned will always be 1.

Returns:
1

Implements Jpetra::Comm.

int Jpetra::SerialComm::getVnodeId ( ) [inline]

Since this is a serial implementation of Comm it always returns 0.

Returns:
0

Implements Jpetra::Comm.

boolean Jpetra::SerialComm::isSerial ( ) [inline]

Accessor to determine if this is in serial mode. Always returns true.

Returns:
true

Implements Jpetra::Comm.

double [] Jpetra::SerialComm::maxAll ( double[]  partialMaxs) [inline]

Simply returns partialMaxs.

Parameters:
partialMaxsthe partial maximums
Returns:
partialMaxs

Implements Jpetra::Comm.

int [] Jpetra::SerialComm::maxAll ( int[]  partialMaxs) [inline]

Simply returns partialMaxs.

Parameters:
partialMaxsthe partial maximums
Returns:
partialMaxs

Implements Jpetra::Comm.

Serializable Jpetra::SerialComm::minAll ( Serializable  partialMins) [inline]

Simply returns partialMins.

Parameters:
partialMinsthe partial minimums
Returns:
partialMins

Implements Jpetra::Comm.

double [] Jpetra::SerialComm::minAll ( double[]  partialMins) [inline]

Takes a list of values form all vnodes in the communicator, computes the min, and returns the min to all vnodes.

Parameters:
partialMinsin on entry; the list of values, usually computed locally, to be summed across all vnodes
Returns:
out on exit; the list of values summed across all vnodes

Implements Jpetra::Comm.

int [] Jpetra::SerialComm::minAll ( int[]  partialMins) [inline]

Simply returns partialMins.

Parameters:
partialMinsthe partial minimums
Returns:
partialMins

Implements Jpetra::Comm.

Serializable Jpetra::SerialComm::receive ( int  senderId) [inline]

No-op for a serial communicator.

Implements Jpetra::Comm.

double [] Jpetra::SerialComm::scanSums ( double[]  myElements) [inline]

Simply returns myElements.

Parameters:
myElementsthe values to be summmed
Returns:
myElements

Implements Jpetra::Comm.

int [] Jpetra::SerialComm::scanSums ( int[]  myElements) [inline]

Simply returns myElements.

Parameters:
myElementsthe values to be summmed
Returns:
myElements

Implements Jpetra::Comm.

void Jpetra::SerialComm::send ( double[]  exportObject,
int  destinationVnode 
) [inline]

No-op for a serial communicator.

Implements Jpetra::Comm.

void Jpetra::SerialComm::send ( int[]  exportObject,
int  destinationVnode 
) [inline]

No-op for a serial communicator.

Implements Jpetra::Comm.

void Jpetra::SerialComm::send ( Serializable  exportObject,
int  destinationVnode 
) [inline]

No-op for a serial communicator.

Implements Jpetra::Comm.

void Jpetra::SerialComm::setMyVnodeID ( int  newVnodeID) [inline]

No-op for a serial communicator.

Parameters:
newVnodeIDnew vnode ID for this</code vnode

Implements Jpetra::Comm.

int [] Jpetra::SerialComm::sumAll ( int[]  partialSums) [inline]

Simply returns partialSums.

Parameters:
partialSumsthe partial sums
Returns:
partialSums

Implements Jpetra::Comm.

double [] Jpetra::SerialComm::sumAll ( double[]  partialSums) [inline]

Simply returns partialSums.

Parameters:
partialSumsthe partial sums
Returns:
partialSums

Implements Jpetra::Comm.


The documentation for this class was generated from the following file:
 All Classes Functions Variables