ComputeMoa.h

Go to the documentation of this file.
00001 /* *
00002  * ***  Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by
00003  * ***  The Board of Trustees of the University of Illinois.
00004  * ***  All rights reserved.
00005  * **
00006  * =====================================================================================
00007  *
00008  *       Filename:  ComputeMoa.h
00009  *
00010  *    Description:  
00011  *
00012  *        Version:  Stub File
00013  *        Created:  03/08/2012 03:55:27 PM
00014  *       Revision:  
00015  *       Compiler:  charm++ 
00016  *
00017  *         Author:  Christopher B Harrison, Ph.D.
00018  *         Email:   charris5@gmail.com, char1@illinois.edu, char@ks.uiuc.edu
00019  *        Company:  
00020  *
00021  * =====================================================================================
00022  */
00023 
00024 #ifndef COMPUTEOA_H
00025 #define COMPUTEOA_H
00026 
00027 #include <vector>
00028 #include "ComputeHomePatches.h"
00029 #include "NamdTypes.h"
00030 
00031 #ifdef CHARM_HAS_MSA
00032 
00033 #include "msa/msa.h"
00034 
00035 typedef MSA::MSA1D<double, DefaultEntry<double>,
00036         MSA_DEFAULT_ENTRIES_PER_PAGE> Moa1Grid;
00037 
00038 typedef MSA::MSA3D<double, DefaultEntry<double>,
00039         MSA_DEFAULT_ENTRIES_PER_PAGE> Moa3Grid;
00040 
00041 #else
00042 
00043 typedef int Moa1Grid;
00044 typedef int Moa3Grid;
00045 
00046 #endif // CHARM_HAS_MSA
00047 
00048 struct Int2 {
00049   int nx, ny;
00050   Int2() : nx(0), ny(0) { }
00051   Int2(int mx, int my) : nx(mx), ny(my) { }
00052   void pup(PUP::er &p) { p|nx, p|ny; }
00053 };
00054 
00055 // /* Experimental */
00056 // struct Vec3 {
00057 //   std::vector<int> b1;  // b1 array 
00058 //   std::vector<int> b2;  // b1 array 
00059 //   std::vector<int> b3;  // b1 array 
00060 //   void pup(PUP::er &p) { p|b1, p|b2, p|b3; }
00061 // }
00062 
00063 
00064 struct Int3 {
00065   int nx, ny, nz;
00066   Int3() : nx(0), ny(0), nz(0) { }
00067   Int3(int mx, int my, int mz) : nx(mx), ny(my), nz(mz) { }
00068   void pup(PUP::er &p) { p|nx, p|ny, p|nz; }
00069 };
00070 
00071 class SubmitReduction;
00072 
00073 class ComputeMoa : public ComputeHomePatches {
00074 public:
00075   ComputeMoa(ComputeID c);
00076   virtual ~ComputeMoa();
00077   void doWork();
00078 
00079 private:
00080   SubmitReduction *reduction;
00081 };
00082 
00083 struct MoaData {
00084 
00085   int K1, K2, K3;
00086   int order;
00087   float orig_x, orig_y, orig_z;
00088 
00089   int num_clients;
00090   std::vector<int> num_clients_qh;  // number client chares for each qh grid
00091   std::vector<int> num_clients_bh;  // number client chares for each bh grid
00092   std::vector<int> num_clients_sh;  // number client chares for each bh grid
00093 
00094 
00095   std::vector<Moa3Grid> qh;      // charge grid
00096   std::vector<Moa3Grid> sh;      // s-value grid
00097 //  std::vector<Moa1Grid> b1;      // b-value grid
00098 //  std::vector<Moa1Grid> b2;      // b-value grid
00099 //  std::vector<Moa1Grid> b3;      // b-value grid
00100   std::vector<Moa3Grid> bh;      // b-value grid
00101 
00102   std::vector<Int2> k1r, k2r, k3r;
00103   Int3 gbqs;
00104   std::vector<int> hasLQ;
00105   std::vector<int> hasLB;
00106   std::vector<int> hasLS;
00107 
00108 
00109 
00110   void pup(PUP::er &p);  // for parameter marshalling
00111   void print();          // for debugging
00112 };
00113 
00114 #endif
00115 

Generated on Thu Nov 23 01:17:10 2017 for NAMD by  doxygen 1.4.7