Skip to content

Commit 4921fc9

Browse files
committed
clang-format
1 parent 521707c commit 4921fc9

File tree

4 files changed

+49
-50
lines changed

4 files changed

+49
-50
lines changed

src/sst/core/checkpointAction.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ CheckpointAction::createCheckpoint(Simulation_impl* sim)
217217
if ( r == rank_.rank ) {
218218
// If this is my rank go ahead
219219
for ( uint32_t t = 0; t < num_ranks.thread; ++t ) {
220-
220+
221221
// If this is my thread go ahead
222222
if ( t == rank_.thread ) {
223223
sim->checkpoint_append_registry(directory + "/" + registry_name, filename);
@@ -256,7 +256,7 @@ CheckpointAction::createCheckpoint(Simulation_impl* sim)
256256
// SyncManager check whether a checkpoint needs to be generated
257257
SimTime_t
258258
CheckpointAction::check(SimTime_t current_time)
259-
{
259+
{
260260
#if 0
261261
Simulation_impl* sim = Simulation_impl::getSimulation();
262262
sim->getSimulationOutput().output(
@@ -267,7 +267,7 @@ CheckpointAction::check(SimTime_t current_time)
267267
// initiated. This will also handle the case where both a sim and
268268
// real-time trigger happened at the same time
269269
if ( (current_time == next_sim_time_) || generate_ ) {
270-
Simulation_impl* sim = Simulation_impl::getSimulation();
270+
Simulation_impl* sim = Simulation_impl::getSimulation();
271271
createCheckpoint(sim);
272272
generate_ = false;
273273
// Only add to the simulation-interval checkpoint time if it

src/sst/core/impl/interactive/simpleDebug.cc

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ namespace SST::IMPL::Interactive {
3232

3333
// Static Initialization
3434
bool SimpleDebugger::autoCompleteEnable = true;
35-
std::ofstream SimpleDebugger::loggingFile;
35+
std::ofstream SimpleDebugger::loggingFile;
3636
std::ifstream SimpleDebugger::replayFile;
3737
std::string SimpleDebugger::loggingFilePath = "sst-console.out";
38-
std::string SimpleDebugger::replayFilePath = "sst-console.in";
39-
bool SimpleDebugger::enLogging = false;
40-
bool SimpleDebugger::confirm = true;
38+
std::string SimpleDebugger::replayFilePath = "sst-console.in";
39+
bool SimpleDebugger::enLogging = false;
40+
bool SimpleDebugger::confirm = true;
4141
SimpleDebugger::SimpleDebugger(Params& params) :
4242
InteractiveConsole()
4343
{
@@ -267,7 +267,7 @@ SimpleDebugger::execute(const std::string& msg)
267267
// Descend into the name_stack
268268
cd_name_stack();
269269

270-
done = false;
270+
done = false;
271271
retState = DONE;
272272

273273
// Select the input source and next command line
@@ -788,29 +788,30 @@ SimpleDebugger::cmd_print(std::vector<std::string>& tokens)
788788
int recurse = 4; // default -r depth
789789
std::string tok = tokens[1];
790790
if ( (tok.size() >= 2) && (tok[0] == '-') && (tok[1] == 'r') ) {
791-
// Got a -r
792-
std::string num = tok.substr(2);
793-
if ( num.size() != 0 ) {
794-
try {
795-
recurse = SST::Core::from_string<int>(num);
796-
}
797-
catch ( const std::invalid_argument& e ) {
798-
printf("Invalid number format specified with -r: %s\n", tok.c_str());
799-
return false;
800-
}
801-
} else {
802-
std::string num = tok.substr(2);
803-
if ( num.size() != 0 ) {
804-
try {
805-
recurse = SST::Core::from_string<int>(num);
806-
}
807-
catch ( std::invalid_argument& e ) {
808-
printf("Invalid number format specified with -r: %s\n", tok.c_str());
809-
return false;
810-
}
811-
}
812-
}
813-
var_index = 2;
791+
// Got a -r
792+
std::string num = tok.substr(2);
793+
if ( num.size() != 0 ) {
794+
try {
795+
recurse = SST::Core::from_string<int>(num);
796+
}
797+
catch ( const std::invalid_argument& e ) {
798+
printf("Invalid number format specified with -r: %s\n", tok.c_str());
799+
return false;
800+
}
801+
}
802+
else {
803+
std::string num = tok.substr(2);
804+
if ( num.size() != 0 ) {
805+
try {
806+
recurse = SST::Core::from_string<int>(num);
807+
}
808+
catch ( std::invalid_argument& e ) {
809+
printf("Invalid number format specified with -r: %s\n", tok.c_str());
810+
return false;
811+
}
812+
}
813+
}
814+
var_index = 2;
814815
}
815816

816817
if ( tokens.size() == var_index ) {
@@ -1306,8 +1307,7 @@ SimpleDebugger::cmd_define(std::vector<std::string>& UNUSED(tokens))
13061307
}
13071308

13081309
// Create a user command entry (or clear existing one)
1309-
if ( cmdRegistry.beginUserCommand(tokens[1]) )
1310-
line_entry_mode = LINE_ENTRY_MODE::DEFINE;
1310+
if ( cmdRegistry.beginUserCommand(tokens[1]) ) line_entry_mode = LINE_ENTRY_MODE::DEFINE;
13111311

13121312
return true;
13131313
}
@@ -1319,8 +1319,7 @@ SimpleDebugger::cmd_document(std::vector<std::string>& tokens)
13191319
std::cout << "Invalid\nsyntax: document <cmd_name>" << std::endl;
13201320
return false;
13211321
}
1322-
if ( cmdRegistry.beginDocCommand(tokens[1]) )
1323-
line_entry_mode = LINE_ENTRY_MODE::DOCUMENT;
1322+
if ( cmdRegistry.beginDocCommand(tokens[1]) ) line_entry_mode = LINE_ENTRY_MODE::DOCUMENT;
13241323

13251324
return true;
13261325
}

src/sst/core/impl/interactive/simpleDebug.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ class ConsoleCommand
8484
group_(ConsoleCommandGroup::USER)
8585
{}
8686
ConsoleCommand() {}; // default constructor
87-
const std::string& str_long() const { return str_long_; }
88-
const std::string& str_short() const { return str_short_; }
89-
const std::string& str_help() const { return str_help_; }
90-
void setUserHelp(std::string& help) { str_help_ = help; }
87+
const std::string& str_long() const { return str_long_; }
88+
const std::string& str_short() const { return str_short_; }
89+
const std::string& str_help() const { return str_help_; }
90+
void setUserHelp(std::string& help) { str_help_ = help; }
9191
const ConsoleCommandGroup& group() const { return group_; }
9292
// Command Execution
9393
bool exec(std::vector<std::string>& tokens) { return func_(tokens); }
@@ -275,17 +275,17 @@ class SimpleDebugger : public SST::InteractiveConsole
275275
void save_name_stack();
276276
void cd_name_stack();
277277
278-
static bool autoCompleteEnable; //skk = true;
278+
static bool autoCompleteEnable; // skk = true;
279279
280280
// gdb/lldb thread spin support
281281
uint64_t spinner = 1;
282282
283283
// logging support
284284
static std::ofstream loggingFile;
285285
static std::ifstream replayFile;
286-
static std::string loggingFilePath; //skk = "sst-console.out";
287-
static std::string replayFilePath; //skk = "sst-console.in";
288-
static bool enLogging; //skk = false;
286+
static std::string loggingFilePath; // skk = "sst-console.out";
287+
static std::string replayFilePath; // skk = "sst-console.in";
288+
static bool enLogging; // skk = false;
289289
290290
// command injection (for sst --replay option)
291291
std::stringstream injectedCommand;
@@ -300,7 +300,7 @@ class SimpleDebugger : public SST::InteractiveConsole
300300
// Keep track of all the WatchPoints
301301
std::vector<std::pair<WatchPoint*, BaseComponent*>> watch_points_;
302302
bool clear_watchlist();
303-
static bool confirm;//skk = true; // Ask for confirmation to clear watchlist
303+
static bool confirm; // skk = true; // Ask for confirmation to clear watchlist
304304
305305
std::vector<std::string> tokenize(std::vector<std::string>& tokens, const std::string& input);
306306

src/sst/core/sync/syncManager.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -621,20 +621,20 @@ SyncManager::execute()
621621
#if 0
622622
if ( sig_alrm ) real_time_->performSignal(sig_alrm);
623623
#else
624-
if (sig_alrm) {
625-
//out.output("skk:syncmgr:execute: T%d: in sigalrm\n", rank_.thread);
624+
if ( sig_alrm ) {
625+
// out.output("skk:syncmgr:execute: T%d: in sigalrm\n", rank_.thread);
626626
real_time_->performSignal(sig_alrm);
627627
}
628628
#endif
629629
}
630630

631-
// Check local checkpoint generate flag and set shared generate if needed.
632-
if (checkpoint_->getCheckpoint() == true) {
631+
// Check local checkpoint generate flag and set shared generate if needed.
632+
if ( checkpoint_->getCheckpoint() == true ) {
633633
ckpt_generate_.store(1);
634634
}
635635
// Ensure everyone has written the mask before updating local generate_
636-
ic_barrier_.wait();
637-
if (ckpt_generate_.load()) {
636+
ic_barrier_.wait();
637+
if ( ckpt_generate_.load() ) {
638638
checkpoint_->setCheckpoint();
639639
}
640640
next_checkpoint_time = checkpoint_->check(getDeliveryTime());

0 commit comments

Comments
 (0)