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. |
|int ||CopyAndPermute (const Epetra_SrcDistObject &Source, int NumSameIDs, int NumPermuteIDs, int *PermuteToLIDs, int *PermuteFromLIDs, const Epetra_OffsetIndex *Indexor)|
| ||Perform ID copies and permutations that are on processor. |
|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(). |
|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(). |
|long long * ||Values_|
| ||Epetra_LongLongVector (const Epetra_BlockMap &Map, bool zeroOut=true)|
| ||Basic Epetra_LongLongVector constuctor. |
| ||Epetra_LongLongVector (const Epetra_LongLongVector &Source)|
| ||Epetra_LongLongVector copy constructor. |
| ||Epetra_LongLongVector (Epetra_DataAccess CV, const Epetra_BlockMap &Map, long long *V)|
| ||Set vector values from user array. |
|virtual ||~Epetra_LongLongVector ()|
| ||Epetra_LongLongVector destructor. |
Post-construction modification methods
|int ||PutValue (long long Value)|
| ||Set all elements of the vector to Value. |
|int ||ExtractCopy (long long *V) const |
| ||Put vector values into user-provided array. |
|int ||ExtractView (long long **V) const |
| ||Set user-provided address of V. |
|long long ||MaxValue ()|
| ||Find maximum value. |
|long long ||MinValue ()|
| ||Find minimum value. |
|Epetra_LongLongVector & ||operator= (const Epetra_LongLongVector &Source)|
| ||= Operator. |
|long long & ||operator (int index)|
| ||Element access function. |
|const long long & ||operator (int index) const |
| ||Element access function. |
Attribute access functions
|long long * ||Values () const |
| ||Returns a pointer to an array containing the values of this vector. |
|int ||MyLength () const |
| ||Returns the local vector length on the calling processor of vectors in the multi-vector. |
|long long ||GlobalLength64 () const |
| ||Returns the global vector length of vectors in the multi-vector. |
|virtual void ||Print (std::ostream &os) const |
| ||Print method. |
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
Distributed Global Vectors - In most instances, a multi-vector will be partitioned across multiple memory images associated with multiple processors. In this case, there is a unique copy of each element and elements are spread across all processors specified by the Epetra_Comm communicator.
Replicated Local Vectors - Some algorithms use vectors that are too small to be distributed across all processors. Replicated local vectors handle these types of situation.
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:
Copy mode - Allocates memory and makes a copy of the user-provided data. In this case, the user data is not needed after construction.
View mode - Creates a "view" of the user data. In this case, the user data is required to remain intact for the life of the vector.
- View mode is extremely dangerous from a data hiding perspective. Therefore, we strongly encourage users to develop code using Copy mode first and only use the View mode in a secondary optimization phase.
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:
Basic - All values are zero.
Copy - Copy an existing vector.
Copy from or make view of user int array.
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.
- ExtractView functions are extremely dangerous from a data hiding perspective. For both ExtractView fuctions, there is a corresponding ExtractCopy function. We strongly encourage users to develop code using ExtractCopy functions first and only use the ExtractView functions in a secondary optimization phase.
There are two Extract functions:
ExtractCopy - Copy values into a user-provided array.
ExtractView - Set user-provided array to point to Epetra_LongLongVector data.
- A Epetra_Map, Epetra_LocalMap or Epetra_BlockMap object is required for all Epetra_LongLongVector constructors.
Definition at line 126 of file Epetra_LongLongVector.h.