• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

sst/core/sync.h

00001 // Copyright 2009-2010 Sandia Corporation. Under the terms
00002 // of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S.
00003 // Government retains certain rights in this software.
00004 // 
00005 // Copyright (c) 2009-2010, Sandia Corporation
00006 // All rights reserved.
00007 // 
00008 // This file is part of the SST software package. For license
00009 // information, see the LICENSE file in the top level directory of the
00010 // distribution.
00011 
00012 
00013 #ifndef SST_CORE_SYNC_H
00014 #define SST_CORE_SYNC_H
00015 
00016 #include <map>
00017 
00018 #include "sst/core/sst_types.h"
00019 #include "sst/core/action.h"
00020 
00021 namespace SST {
00022 
00023 #define _SYNC_DBG( fmt, args...) __DBG( DBG_SYNC, Sync, fmt, ## args )
00024 
00025 class SyncQueue;
00026 class Link;
00027 class TimeConverter;
00028 
00029 class Sync : public Action {
00030 public:
00031     Sync(TimeConverter* period);
00032     ~Sync();
00033 
00034     SyncQueue* registerLink(int rank, LinkId_t link_id, Link* link);
00035     void execute(void);
00036     
00037 private:
00038     typedef std::map<int, std::pair<SyncQueue*, std::vector<Activity*>* > > comm_map_t;
00039     typedef std::map<LinkId_t, Link*> link_map_t;
00040 
00041     Sync() { }
00042 
00043     TimeConverter* period;
00044     comm_map_t comm_map;
00045     link_map_t link_map;
00046     boost::mpi::communicator comm;
00047 
00048     friend class boost::serialization::access;
00049     template<class Archive>
00050     void serialize(Archive & ar, const unsigned int version);
00051 };
00052 
00053 } // namespace SST
00054 
00055 BOOST_CLASS_EXPORT_KEY(SST::Sync)
00056 
00057 #endif // SST_SYNC_H

Generated on Fri Oct 22 2010 11:02:13 for SST by  doxygen 1.7.1