src/IplPaws/DLDescriptor.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 /***************************************************************************
00003  *
00004  * The IPPL Framework
00005  * 
00006  *
00007  * Visit http://www.acl.lanl.gov/POOMS for more details
00008  *
00009  ***************************************************************************/
00010 
00011 #ifndef DOMAIN_LAYOUT_POINTER_DESCRIPTOR_H
00012 #define DOMAIN_LAYOUT_POINTER_DESCRIPTOR_H
00013 
00015 #include "Paws/PawsArrayDescriptor.h"
00016 #include "IpplPaws/DLRepresentation.h"
00017 
00018 class PawsMessage;
00019 
00020 
00021 //
00022 // A simple local descriptor.
00023 // It holds blocks of data of type T in a collection C with domain D.
00024 //
00025 
00026 template<class D, unsigned Dim, class C, class T>
00027 class DLDescriptor : public PawsArrayDescriptor<T>
00028 {
00029 public:
00030     DLDescriptor(DLRepresentation<D,Dim>& rep) : PawsArrayDescriptor<T>(rep) {}
00031     DLDescriptor(DLRepresentation<D,Dim>& rep, C* coll);
00032     ~DLDescriptor() {}
00033 
00034     PawsMessage* packStdData(const char* loc_id, const char* rem_id,
00035                         PawsAbstractMessage* am,
00036                         PawsRepresentation& remote_rep, int snum);
00037     PawsMessage* packData(const char* loc_id, const char* rem_id,
00038                         PawsAbstractMessage* am,
00039                         PawsRepresentation& rem_rep, int snum);
00040 
00041     void unpackStdData(PawsMessage& message, const char* header);
00042     void unpackData(PawsMessage& message, const char* header);
00043 
00044     // Update the actual data collection with a new pointer
00045     void update(const DLRepresentation<D,Dim>& rep, C* coll);
00046 
00047 private:
00048     D    makeDomain(const int* first, const int* last, const int* stride);
00049     C*   collection;
00050 
00051     // make unnecessary constructors private to avoid their use
00052     DLDescriptor(const DLDescriptor<D,Dim,C,T> &);
00053     DLDescriptor<D,Dim,C,T> &operator=(const DLDescriptor<D,Dim,C,T> &);
00054 };
00055 
00056 template <class D, unsigned Dim, class C, class T>
00057 ostream& operator<<(ostream& out, DLDescriptor<D,Dim,C,T>& dlDesc);
00058 
00059 #include "IpplPaws/DLDescriptor.cpp"
00060 
00061 #endif  // DOMAIN_LAYOUT_POINTER_DESCRIPTOR_H
00062 
00063 /***************************************************************************
00064  * $RCSfile: DLDescriptor.h,v $   $Author: adelmann $
00065  * $Revision: 1.1.1.1 $   $Date: 2003/01/23 07:40:32 $
00066  * IPPL_VERSION_ID: $Id: DLDescriptor.h,v 1.1.1.1 2003/01/23 07:40:32 adelmann Exp $ 
00067  ***************************************************************************/
00068 

Generated on Mon Jan 16 13:23:49 2006 for IPPL by  doxygen 1.4.6