12#ifndef SST_CORE_IMPL_TIMEVORTEX_TIMEVORTEXPQ_H
13#define SST_CORE_IMPL_TIMEVORTEX_TIMEVORTEXPQ_H
15#include "sst/core/eli/elementinfo.h"
16#include "sst/core/threadsafe.h"
17#include "sst/core/timeVortex.h"
36class TimeVortexPQBase :
public TimeVortex
41 explicit TimeVortexPQBase(
Params& params);
45 bool empty()
override;
54 uint64_t getCurrentDepth()
const override {
return current_depth; }
55 uint64_t getMaxDepth()
const override {
return max_depth; }
57 void dbg_print(
Output& out)
override;
61 virtual void fixup_handlers()
override;
66 template <
class T,
class S,
class C>
67 S& getContainer(std::priority_queue<T, S, C>& q)
69 struct UnderlyingContainer : std::priority_queue<T, S, C>
71 static S& getUnderlyingContainer(std::priority_queue<T, S, C>& q) {
return q.*&UnderlyingContainer::c; }
73 return UnderlyingContainer::getUnderlyingContainer(q);
84 std::conditional_t<TS, std::atomic<uint64_t>, uint64_t> current_depth;
Class to use as the greater than operator for STL functions or sorting algorithms (used if you want t...
Definition activity.h:107
Base class for all Activities in the SST Event Queue.
Definition activity.h:46
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition serializer.h:45
Definition threadsafe.h:132
void print(Output &out) const override
Print the state of the TimeVortex.
Definition timeVortexPQ.cc:107
bool empty() override
Returns true if the queue is empty.
Definition timeVortexPQ.cc:50
int size() override
Returns the number of activities in the queue.
Definition timeVortexPQ.cc:60
Activity * front() override
Returns the next activity.
Definition timeVortexPQ.cc:97
Activity * pop() override
Remove and return the next activity.
Definition timeVortexPQ.cc:84
void insert(Activity *activity) override
Insert a new activity into the queue.
Definition timeVortexPQ.cc:70
Output object provides consistent method for outputting data to stdout, stderr and/or sst debug file.
Definition output.h:54
Parameter store.
Definition params.h:58