SST  13.0.0
StructuralSimulationToolkit
timeVortex.h
1 // Copyright 2009-2023 NTESS. Under the terms
2 // of Contract DE-NA0003525 with NTESS, the U.S.
3 // Government retains certain rights in this software.
4 //
5 // Copyright (c) 2009-2023, NTESS
6 // All rights reserved.
7 //
8 // This file is part of the SST software package. For license
9 // information, see the LICENSE file in the top level directory of the
10 // distribution.
11 
12 #ifndef SST_CORE_TIMEVORTEX_H
13 #define SST_CORE_TIMEVORTEX_H
14 
15 #include "sst/core/activityQueue.h"
16 #include "sst/core/module.h"
17 
18 namespace SST {
19 
20 class Output;
21 
22 /**
23  * Primary Event Queue
24  */
25 class TimeVortex : public ActivityQueue
26 {
27 public:
28  SST_ELI_DECLARE_BASE(TimeVortex)
29  SST_ELI_DECLARE_INFO_EXTERN(ELI::ProvidesParams)
30  SST_ELI_DECLARE_CTOR_EXTERN(SST::Params&)
31 
32  TimeVortex() { max_depth = MAX_SIMTIME_T; }
33  ~TimeVortex() {}
34 
35  // Inherited from ActivityQueue
36  virtual bool empty() override = 0;
37  virtual int size() override = 0;
38  virtual void insert(Activity* activity) override = 0;
39  virtual Activity* pop() override = 0;
40  virtual Activity* front() override = 0;
41 
42  /** Print the state of the TimeVortex */
43  virtual void print(Output& out) const = 0;
44  virtual uint64_t getMaxDepth() const { return max_depth; }
45  virtual uint64_t getCurrentDepth() const = 0;
46 
47 protected:
48  uint64_t max_depth;
49 };
50 
51 } // namespace SST
52 
53 #endif // SST_CORE_TIMEVORTEX_H
Output object provides consistent method for outputting data to stdout, stderr and/or sst debug file...
Definition: output.h:51
virtual Activity * pop() override=0
Remove and return the next activity.
Base class for all Activities in the SST Event Queue.
Definition: activity.h:45
virtual Activity * front() override=0
Returns the next activity.
Primary Event Queue.
Definition: timeVortex.h:25
Definition: action.cc:18
Definition: paramsInfo.h:40
Parameter store.
Definition: params.h:55
Base Class for a queue of Activities.
Definition: activityQueue.h:21
virtual void insert(Activity *activity) override=0
Insert a new activity into the queue.
virtual int size() override=0
Returns the number of activities in the queue.
virtual bool empty() override=0
Returns true if the queue is empty.
virtual void print(Output &out) const =0
Print the state of the TimeVortex.