Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doxygen Documentation - Small Updates #1041

Merged
merged 2 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/sst/core/configGraphOutput.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ class ConfigGraph;

namespace Core {

/**
* Exception handler class for graph configuration.
* Provides the interface to handle errors through the throw exception.
*/
class ConfigGraphOutputException : public std::exception
{
public:
Expand All @@ -32,19 +36,33 @@ class ConfigGraphOutputException : public std::exception
std::strcpy(exMsg, msg);
}

/**
* @return Exception Message
*/
virtual const char* what() const noexcept override { return exMsg; }

/**
* Exception message generated on call.
*/
protected:
char* exMsg;
};

/**
* Outputs configuration data to a specified file path.
*/
class ConfigGraphOutput
{
public:
ConfigGraphOutput(const char* path) { outputFile = fopen(path, "wt"); }

virtual ~ConfigGraphOutput() { fclose(outputFile); }

/**
* @param cfg Constant pointer to SST configuration
* @param graph Constant pointer to SST configuration graph
* @return void
*/
virtual void generate(const Config* cfg, ConfigGraph* graph) = 0;

protected:
Expand Down
3 changes: 3 additions & 0 deletions src/sst/core/cputimer.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

#include <sys/time.h>

/**
* @return Current CPU time using the time of day. Timezone information is not filled.
*/
double sst_get_cpu_time();

#endif // SST_CORE_CPU_TIMER_H
1 change: 1 addition & 0 deletions src/sst/core/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ class Event : public Activity
For links that are going to a sync, the delivery_info is used
on the remote side to send the event on the proper link. For
local links, delivery_info contains the delivery functor.
@return void
*/
inline void setDeliveryInfo(LinkId_t tag, uintptr_t delivery_info)
{
Expand Down
26 changes: 22 additions & 4 deletions src/sst/core/exit.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class Exit : public Action
public:
/**
* Create a new ExitEvent
* @param sim - Simulation Object
* @param single_rank - True if there are no parallel ranks
* @param sim Simulation object
* @param single_rank True if there are no parallel ranks
*
* Exit needs to register a handler during constructor time, which
* requires a simulation object. But the simulation class creates
Expand All @@ -56,20 +56,38 @@ class Exit : public Action
bool refDec(ComponentId_t, uint32_t thread);

unsigned int getRefCount();
SimTime_t getEndTime() { return end_time; }
void setEndTime(SimTime_t time) { end_time = time; }

/** Gets the end time of the simulation
* @return Time when simulation ends
*/
SimTime_t getEndTime() { return end_time; }

/** Stores the time the simulation has ended
* @param time Current simulation time
* @return void
*/
void setEndTime(SimTime_t time) { end_time = time; }

/** Computes the end time of the simulation
* @return End time of the simulation
*/
SimTime_t computeEndTime();
void execute(void) override;
void check();

/**
* @param header String to preface the exit action log
* @param out SST Output logger object
* @return void
*/
void print(const std::string& header, Output& out) const override
{
out.output(
"%s Exit Action to be delivered at %" PRIu64 " with priority %d\n", header.c_str(), getDeliveryTime(),
getPriority());
}


unsigned int getGlobalCount() { return global_count; }

private:
Expand Down
17 changes: 13 additions & 4 deletions src/sst/core/linkPair.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ namespace SST {
class LinkPair
{
public:
/** Create a new LinkPair. This is used when the endpoints are in the same partition. */
/** Create a new LinkPair. This is used when the endpoints are in the same partition.
* @param order Value used to enforce the link order.
*/
LinkPair(LinkId_t order) : left(new Link(order)), right(new Link(order))
{
my_id = order;
Expand All @@ -32,7 +34,10 @@ class LinkPair
right->pair_link = left;
}

/** Create a new LinkPair. This is used when the endpoints are in different partitions. */
/** Create a new LinkPair. This is used when the endpoints are in different partitions.
* @param order Value used to enforce the link order.
* @param remote_tag Used to look up the correct link on the other side.
*/
LinkPair(LinkId_t order, LinkId_t remote_tag) : left(new Link(remote_tag)), right(new Link(order))
{
my_id = order;
Expand All @@ -43,10 +48,14 @@ class LinkPair

virtual ~LinkPair() {}

/** Return the Left Link */
/** Return the Left Link
* @return Left link
*/
inline Link* getLeft() { return left; }

/** Return the Right Link */
/** Return the Right Link
* @return Right link
*/
inline Link* getRight() { return right; }

private:
Expand Down
Loading