Skip to content
Snippets Groups Projects
Commit 8554c2a0 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Remove useless parameters

parent 03b129ca
No related branches found
No related tags found
1 merge request!199Integrate checkpointing
......@@ -314,9 +314,6 @@ MeshModule::registerCheckpointResume() const
HighFive::Group& symbol_table_group) {
writeMesh(symbol_name, embedded_data, file, checkpoint_group, symbol_table_group);
}),
std::function([](const HighFive::File& file, const HighFive::Group& checkpoint_group,
const std::string& symbol_name,
const HighFive::Group& symbol_table_group) -> EmbeddedData {
return readMesh(file, checkpoint_group, symbol_name, symbol_table_group);
}));
std::function([](const std::string& symbol_name, const HighFive::Group& symbol_table_group)
-> EmbeddedData { return readMesh(symbol_name, symbol_table_group); }));
}
......@@ -24,16 +24,14 @@ CheckpointResumeRepository::checkpoint(const ASTNodeDataType& data_type,
}
EmbeddedData
CheckpointResumeRepository::resume(const HighFive::File& file,
const HighFive::Group& checkpoint_group,
const ASTNodeDataType& data_type,
CheckpointResumeRepository::resume(const ASTNodeDataType& data_type,
const std::string& symbol_name,
const HighFive::Group& symbol_table_group) const
{
std::string data_type_name = dataTypeName(data_type);
if (auto i_dt_function = m_data_type_resuming.find(data_type_name); i_dt_function != m_data_type_resuming.end()) {
const ResumeFunction& function = i_dt_function->second;
return function(file, checkpoint_group, symbol_name, symbol_table_group);
return function(symbol_name, symbol_table_group);
} else {
std::ostringstream error_msg;
error_msg << "cannot find resuming function for type '" << rang::fgB::yellow << data_type_name << rang::fg::reset
......
......@@ -19,10 +19,8 @@ class CheckpointResumeRepository
HighFive::Group& checkpoint_group,
HighFive::Group& symbol_table_group)>;
using ResumeFunction = std::function<EmbeddedData(const HighFive::File& symbol,
const HighFive::Group& file,
const std::string& symbol_name,
const HighFive::Group& symbol_table_group)>;
using ResumeFunction =
std::function<EmbeddedData(const std::string& symbol_name, const HighFive::Group& symbol_table_group)>;
private:
std::unordered_map<std::string, CheckpointFunction> m_data_type_checkpointing;
......@@ -59,9 +57,7 @@ class CheckpointResumeRepository
HighFive::Group& checkpoint_group,
HighFive::Group& symbol_table_group) const;
EmbeddedData resume(const HighFive::File& file,
const HighFive::Group& checkpoint_group,
const ASTNodeDataType& data_type,
EmbeddedData resume(const ASTNodeDataType& data_type,
const std::string& symbol_name,
const HighFive::Group& symbol_table_group) const;
......
......@@ -234,16 +234,15 @@ resume()
for (size_t i_component = 0; i_component < number_of_components; ++i_component) {
embedded_tuple[i_component] =
CheckpointResumeRepository::instance().resume(file, checkpoint,
p_symbol->attributes().dataType().contentType(),
CheckpointResumeRepository::instance().resume(p_symbol->attributes().dataType().contentType(),
p_symbol->name() + "/" + std::to_string(i_component),
saved_symbol_table);
}
p_symbol->attributes().value() = embedded_tuple;
} else {
p_symbol->attributes().value() =
CheckpointResumeRepository::instance().resume(file, checkpoint, p_symbol->attributes().dataType(),
p_symbol->name(), saved_symbol_table);
CheckpointResumeRepository::instance().resume(p_symbol->attributes().dataType(), p_symbol->name(),
saved_symbol_table);
}
}
}
......
......@@ -5,10 +5,7 @@
#include <utils/checkpointing/ResumingData.hpp>
EmbeddedData
readMesh([[maybe_unused]] const HighFive::File& file,
[[maybe_unused]] const HighFive::Group& checkpoint_group,
const std::string& symbol_name,
const HighFive::Group& symbol_table_group)
readMesh(const std::string& symbol_name, const HighFive::Group& symbol_table_group)
{
const HighFive::Group mesh_group = symbol_table_group.getGroup("embedded/" + symbol_name);
......
......@@ -28,9 +28,6 @@ read(const HighFive::Group& group, const std::string& name)
return array;
}
EmbeddedData readMesh(const HighFive::File& file,
const HighFive::Group& checkpoint_group,
const std::string& symbol_name,
const HighFive::Group& symbol_table_group);
EmbeddedData readMesh(const std::string& symbol_name, const HighFive::Group& symbol_table_group);
#endif // RESUME_UTILS_HPP
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment