Epetra Package Browser (Single Doxygen Collection)
Development
|
Epetra_LongLongVector: A class for constructing and using dense integer vectors on a parallel computer. More...
#include <Epetra_LongLongVector.h>
Private Member Functions | |
int | AllocateForCopy () |
int | DoCopy (long long *V) |
int | AllocateForView () |
int | DoView (long long *V) |
int | CheckSizes (const Epetra_SrcDistObject &A) |
Allows the source and target (this) objects to be compared for compatibility, return nonzero if not. More... | |
int | CopyAndPermute (const Epetra_SrcDistObject &Source, int NumSameIDs, int NumPermuteIDs, int *PermuteToLIDs, int *PermuteFromLIDs, const Epetra_OffsetIndex *Indexor, Epetra_CombineMode CombineMode=Zero) |
Perform ID copies and permutations that are on processor. More... | |
int | PackAndPrepare (const Epetra_SrcDistObject &Source, int NumExportIDs, int *ExportLIDs, int &LenExports, char *&Exports, int &SizeOfPacket, int *Sizes, bool &VarSizes, Epetra_Distributor &Distor) |
Perform any packing or preparation required for call to DoTransfer(). More... | |
int | UnpackAndCombine (const Epetra_SrcDistObject &Source, int NumImportIDs, int *ImportLIDs, int LenImports, char *Imports, int &SizeOfPacket, Epetra_Distributor &Distor, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor) |
Perform any unpacking and combining after call to DoTransfer(). More... | |
Private Attributes | |
long long * | Values_ |
bool | UserAllocated_ |
bool | Allocated_ |
Constructors/destructors | |
Epetra_LongLongVector (const Epetra_BlockMap &Map, bool zeroOut=true) | |
Basic Epetra_LongLongVector constuctor. More... | |
Epetra_LongLongVector (const Epetra_LongLongVector &Source) | |
Epetra_LongLongVector copy constructor. More... | |
Epetra_LongLongVector (Epetra_DataAccess CV, const Epetra_BlockMap &Map, long long *V) | |
Set vector values from user array. More... | |
virtual | ~Epetra_LongLongVector () |
Epetra_LongLongVector destructor. More... | |
Post-construction modification methods | |
int | PutValue (long long Value) |
Set all elements of the vector to Value. More... | |
Extraction methods | |
int | ExtractCopy (long long *V) const |
Put vector values into user-provided array. More... | |
int | ExtractView (long long **V) const |
Set user-provided address of V. More... | |
Mathematical methods | |
long long | MaxValue () |
Find maximum value. More... | |
long long | MinValue () |
Find minimum value. More... | |
Overloaded operators | |
Epetra_LongLongVector & | operator= (const Epetra_LongLongVector &Source) |
= Operator. More... | |
long long & | operator[] (int index) |
Element access function. More... | |
const long long & | operator[] (int index) const |
Element access function. More... | |
Attribute access functions | |
long long * | Values () const |
Returns a pointer to an array containing the values of this vector. More... | |
int | MyLength () const |
Returns the local vector length on the calling processor of vectors in the multi-vector. More... | |
long long | GlobalLength64 () const |
Returns the global vector length of vectors in the multi-vector. More... | |
I/O methods | |
virtual void | Print (std::ostream &os) const |
Print method. More... | |
Additional Inherited Members | |
Public Member Functions inherited from Epetra_DistObject | |
Epetra_DistObject (const Epetra_BlockMap &Map) | |
Basic Epetra_DistObject constuctor. More... | |
Epetra_DistObject (const Epetra_BlockMap &Map, const char *const Label) | |
Epetra_DistObject (const Epetra_DistObject &Source) | |
Epetra_DistObject copy constructor. More... | |
virtual | ~Epetra_DistObject () |
Epetra_DistObject destructor. More... | |
int | Import (const Epetra_SrcDistObject &A, const Epetra_Import &Importer, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor=0) |
Imports an Epetra_DistObject using the Epetra_Import object. More... | |
int | Import (const Epetra_SrcDistObject &A, const Epetra_Export &Exporter, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor=0) |
Imports an Epetra_DistObject using the Epetra_Export object. More... | |
int | Export (const Epetra_SrcDistObject &A, const Epetra_Import &Importer, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor=0) |
Exports an Epetra_DistObject using the Epetra_Import object. More... | |
int | Export (const Epetra_SrcDistObject &A, const Epetra_Export &Exporter, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor=0) |
Exports an Epetra_DistObject using the Epetra_Export object. More... | |
const Epetra_BlockMap & | Map () const |
Returns the address of the Epetra_BlockMap for this multi-vector. More... | |
const Epetra_Comm & | Comm () const |
Returns the address of the Epetra_Comm for this multi-vector. More... | |
bool | DistributedGlobal () const |
Returns true if this multi-vector is distributed global, i.e., not local replicated. More... | |
Public Member Functions inherited from Epetra_Object | |
Epetra_Object (int TracebackModeIn=-1, bool set_label=true) | |
Epetra_Object Constructor. More... | |
Epetra_Object (const char *const Label, int TracebackModeIn=-1) | |
Epetra_Object Constructor. More... | |
Epetra_Object (const Epetra_Object &Object) | |
Epetra_Object Copy Constructor. More... | |
virtual | ~Epetra_Object () |
Epetra_Object Destructor. More... | |
virtual void | SetLabel (const char *const Label) |
Epetra_Object Label definition using char *. More... | |
virtual const char * | Label () const |
Epetra_Object Label access funtion. More... | |
virtual int | ReportError (const std::string Message, int ErrorCode) const |
Error reporting method. More... | |
Public Member Functions inherited from Epetra_SrcDistObject | |
virtual | ~Epetra_SrcDistObject () |
Epetra_SrcDistObject destructor. More... | |
Static Public Member Functions inherited from Epetra_Object | |
static void | SetTracebackMode (int TracebackModeValue) |
Set the value of the Epetra_Object error traceback report mode. More... | |
static int | GetTracebackMode () |
Get the value of the Epetra_Object error report mode. More... | |
static std::ostream & | GetTracebackStream () |
Get the output stream for error reporting. More... | |
Static Public Attributes inherited from Epetra_Object | |
static int | TracebackMode |
Protected Member Functions inherited from Epetra_DistObject | |
virtual int | DoTransfer (const Epetra_SrcDistObject &A, Epetra_CombineMode CombineMode, int NumSameIDs, int NumPermuteIDs, int NumRemoteIDs, int NumExportIDs, int *PermuteToLIDs, int *PermuteFromLIDs, int *RemoteLIDs, int *ExportLIDs, int &LenExports, char *&Exports, int &LenImports, char *&Imports, Epetra_Distributor &Distor, bool DoReverse, const Epetra_OffsetIndex *Indexor) |
Perform actual transfer (redistribution) of data across memory images, using Epetra_Distributor object. More... | |
Protected Member Functions inherited from Epetra_Object | |
std::string | toString (const int &x) const |
std::string | toString (const long long &x) const |
std::string | toString (const double &x) const |
Protected Attributes inherited from Epetra_DistObject | |
Epetra_BlockMap | Map_ |
const Epetra_Comm * | Comm_ |
char * | Exports_ |
char * | Imports_ |
int | LenExports_ |
int | LenImports_ |
int * | Sizes_ |
Epetra_LongLongVector: A class for constructing and using dense integer vectors on a parallel computer.
The Epetra_LongLongVector class enables the construction and use of integer dense vectors in a distributed memory environment. The distribution of the dense vector is determined in part by a Epetra_Comm object and a Epetra_Map (or Epetra_LocalMap or Epetra_BlockMap).
Distributed Global vs. Replicated Local
Constructing Epetra_LongLongVectors
There are four Epetra_LongLongVector constructors. The first is a basic constructor that allocates space and sets all values to zero, the second is a copy constructor. The third and fourth constructors work with user data. These constructors have two data access modes:
All Epetra_LongLongVector constructors require a map argument that describes the layout of elements on the parallel machine. Specifically, map
is a Epetra_Map, Epetra_LocalMap or Epetra_BlockMap object describing the desired memory layout for the vector.
There are four different Epetra_LongLongVector constructors:
Extracting Data from Epetra_LongLongVectors
Once a Epetra_LongLongVector is constructed, it is possible to extract a copy of the values or create a view of them.
There are two Extract functions:
Definition at line 126 of file Epetra_LongLongVector.h.
Epetra_LongLongVector::Epetra_LongLongVector | ( | const Epetra_BlockMap & | Map, |
bool | zeroOut = true |
||
) |
Basic Epetra_LongLongVector constuctor.
Creates a Epetra_LongLongVector object and, by default, fills with zero values.
In | Map - A Epetra_LocalMap, Epetra_Map or Epetra_BlockMap. |
In | zeroOut - If true then the allocated memory will be zeroed out initialy. If false then this memory will not be touched which can be significantly faster. |
Definition at line 52 of file Epetra_LongLongVector.cpp.
Epetra_LongLongVector::Epetra_LongLongVector | ( | const Epetra_LongLongVector & | Source | ) |
Epetra_LongLongVector copy constructor.
Definition at line 65 of file Epetra_LongLongVector.cpp.
Epetra_LongLongVector::Epetra_LongLongVector | ( | Epetra_DataAccess | CV, |
const Epetra_BlockMap & | Map, | ||
long long * | V | ||
) |
Set vector values from user array.
In | Epetra_DataAccess - Enumerated type set to Copy or View. |
In | Map - A Epetra_LocalMap, Epetra_Map or Epetra_BlockMap. |
In | V - Pointer to an array of long long numbers.. |
See Detailed Description section for further discussion.
Definition at line 78 of file Epetra_LongLongVector.cpp.
|
virtual |
Epetra_LongLongVector destructor.
Definition at line 97 of file Epetra_LongLongVector.cpp.
int Epetra_LongLongVector::PutValue | ( | long long | Value | ) |
Set all elements of the vector to Value.
Definition at line 162 of file Epetra_LongLongVector.cpp.
int Epetra_LongLongVector::ExtractCopy | ( | long long * | V | ) | const |
Put vector values into user-provided array.
Out | V - Pointer to memory space that will contain the vector values. |
Definition at line 147 of file Epetra_LongLongVector.cpp.
int Epetra_LongLongVector::ExtractView | ( | long long ** | V | ) | const |
Set user-provided address of V.
Out | V - Address of a pointer to that will be set to point to the values of the vector. |
Definition at line 155 of file Epetra_LongLongVector.cpp.
long long Epetra_LongLongVector::MaxValue | ( | ) |
Find maximum value.
Definition at line 168 of file Epetra_LongLongVector.cpp.
long long Epetra_LongLongVector::MinValue | ( | ) |
Find minimum value.
Definition at line 178 of file Epetra_LongLongVector.cpp.
Epetra_LongLongVector & Epetra_LongLongVector::operator= | ( | const Epetra_LongLongVector & | Source | ) |
= Operator.
In | A - Epetra_LongLongVector to copy. |
Definition at line 188 of file Epetra_LongLongVector.cpp.
|
inline |
|
inline |
|
inline |
Returns a pointer to an array containing the values of this vector.
Definition at line 249 of file Epetra_LongLongVector.h.
|
inline |
Returns the local vector length on the calling processor of vectors in the multi-vector.
Definition at line 252 of file Epetra_LongLongVector.h.
|
inline |
Returns the global vector length of vectors in the multi-vector.
Definition at line 255 of file Epetra_LongLongVector.h.
|
virtual |
Print method.
Reimplemented from Epetra_DistObject.
Definition at line 200 of file Epetra_LongLongVector.cpp.
|
private |
Definition at line 104 of file Epetra_LongLongVector.cpp.
|
private |
Definition at line 121 of file Epetra_LongLongVector.cpp.
|
private |
Definition at line 129 of file Epetra_LongLongVector.cpp.
|
private |
Definition at line 139 of file Epetra_LongLongVector.cpp.
|
privatevirtual |
Allows the source and target (this) objects to be compared for compatibility, return nonzero if not.
Implements Epetra_DistObject.
Definition at line 254 of file Epetra_LongLongVector.cpp.
|
privatevirtual |
Perform ID copies and permutations that are on processor.
Implements Epetra_DistObject.
Definition at line 261 of file Epetra_LongLongVector.cpp.
|
privatevirtual |
Perform any packing or preparation required for call to DoTransfer().
Implements Epetra_DistObject.
Definition at line 373 of file Epetra_LongLongVector.cpp.
|
privatevirtual |
Perform any unpacking and combining after call to DoTransfer().
Implements Epetra_DistObject.
Definition at line 447 of file Epetra_LongLongVector.cpp.
|
private |
Definition at line 302 of file Epetra_LongLongVector.h.
|
private |
Definition at line 303 of file Epetra_LongLongVector.h.
|
private |
Definition at line 304 of file Epetra_LongLongVector.h.