AccessPattern.hpp

00001 #ifndef _AccessPattern_h_
00002 #define _AccessPattern_h_
00003 
00004 /*--------------------------------------------------------------------*/
00005 /*    Copyright 2005 Sandia Corporation.                              */
00006 /*    Under the terms of Contract DE-AC04-94AL85000, there is a       */
00007 /*    non-exclusive license for use of this work by or on behalf      */
00008 /*    of the U.S. Government.  Export of this program may require     */
00009 /*    a license from the United States Government.                    */
00010 /*--------------------------------------------------------------------*/
00011 
00012 #include <cstdlib>
00013 
00014 class AccessPattern {
00015  public:
00016   AccessPattern() : ID_(-1), numRowIDs_(0), numFieldsPerRow_(NULL),
00017     rowFieldIDs_(NULL), numColIDsPerRow_(0), numFieldsPerCol_(NULL),
00018     colFieldIDs_(NULL), interleaveStrategy_(0) {}
00019 
00020   ~AccessPattern()
00021     {
00022       int i;
00023       for(i=0; i<numRowIDs_; i++) delete [] rowFieldIDs_[i];
00024       for(i=0; i<numColIDsPerRow_; i++) delete [] colFieldIDs_[i];
00025 
00026       delete [] rowFieldIDs_;
00027       delete [] colFieldIDs_;
00028       delete [] numFieldsPerRow_;
00029       delete [] numFieldsPerCol_;
00030       numRowIDs_ = 0;
00031       numColIDsPerRow_ = 0;
00032     }
00033 
00034   int ID_;
00035   int numRowIDs_;
00036   int* numFieldsPerRow_;
00037   int** rowFieldIDs_;
00038   int numColIDsPerRow_;
00039   int* numFieldsPerCol_;
00040   int** colFieldIDs_;
00041   int interleaveStrategy_;
00042 };
00043 
00044 #endif // _AccessPattern_h_

Generated on Wed May 12 21:30:40 2010 for FEI by  doxygen 1.4.7