00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef _MAPFILE_H_
00010 #define _MAPFILE_H_
00011
00012 #include "../../include/debug_flags.h"
00013 #include "charm++.h"
00014 #include "cpaimd.h"
00015 #include "MapTable.h"
00016
00017 class MapFile
00018 {
00019 private:
00020 char* mapName;
00021 int numDim;
00022 int* sizeDim;
00023
00024 int numProcs;
00025 char* mapOrder;
00026 int Xmax;
00027 int Ymax;
00028 int Zmax;
00029 int Tmax;
00030 int stride;
00031
00032
00033
00034
00035 public:
00036 MapFile(char* name, int numpes);
00037 MapFile(char* name, int num, int* size, int numpes, char *order, int x, int y, int z, int t, int stride=1);
00038 MapFile();
00039 ~MapFile();
00040
00041 void setSize(int num, int* size);
00042 void setAttributes(int num, int* size, char *order, int x, int y, int z, int t, int stride);
00043 void dumpMap(MapType2 *map);
00044 void dumpMap(MapType3 *map);
00045 void dumpMap(MapType4 *map);
00046 int loadMap(char *filename, MapType2 *map);
00047 int loadMap(char *filename, MapType3 *map);
00048 int loadMap(char *filename, MapType4 *map);
00049
00050 };
00051
00052 #endif
00053
00054