Skip to content

Commit

Permalink
removed unsed functions from utils
Browse files Browse the repository at this point in the history
  • Loading branch information
teseoch committed Oct 18, 2023
1 parent 7d7bc8a commit 2586b62
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 42 deletions.
37 changes: 0 additions & 37 deletions src/polysolve/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,18 @@
namespace polysolve
{

StopWatch::StopWatch(spdlog::logger &logger)
: m_logger(logger)
{
start();
}

StopWatch::StopWatch(const std::string &name, spdlog::logger &logger)
: m_name(name), m_logger(logger)
{
start();
}

StopWatch::StopWatch(double &total_time, spdlog::logger &logger)
: m_total_time(&total_time), m_logger(logger)
{
start();
}

StopWatch::StopWatch(Timing &timing, spdlog::logger &logger)
: m_total_time(&timing.time), m_count(&timing.count), m_logger(logger)
{
start();
}

StopWatch::StopWatch(const std::string &name, double &total_time, spdlog::logger &logger)
: m_name(name), m_total_time(&total_time), m_logger(logger)
{
start();
}

StopWatch::StopWatch(const std::string &name, Timing &timing, spdlog::logger &logger)
: m_name(name), m_total_time(&timing.time), m_count(&timing.count), m_logger(logger)
{
start();
}

StopWatch::~StopWatch()
{
stop();
Expand Down Expand Up @@ -95,17 +71,4 @@ namespace polysolve
return I;
}

bool has_hessian_nans(const polysolve::StiffnessMatrix &hessian)
{
for (int k = 0; k < hessian.outerSize(); ++k)
{
for (polysolve::StiffnessMatrix::InnerIterator it(hessian, k); it; ++it)
{
if (std::isnan(it.value()))
return true;
}
}

return false;
}
} // namespace polysolve
5 changes: 0 additions & 5 deletions src/polysolve/Utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,8 @@ namespace polysolve
using clock = std::chrono::steady_clock;

public:
StopWatch(spdlog::logger &logger);
StopWatch(const std::string &name, spdlog::logger &logger);
StopWatch(double &total_time, spdlog::logger &logger);
StopWatch(Timing &timing, spdlog::logger &logger);
StopWatch(const std::string &name, double &total_time, spdlog::logger &logger);
StopWatch(const std::string &name, Timing &timing, spdlog::logger &logger);

virtual ~StopWatch();

Expand Down Expand Up @@ -63,6 +59,5 @@ namespace polysolve
}

Eigen::SparseMatrix<double> sparse_identity(int rows, int cols);
bool has_hessian_nans(const polysolve::StiffnessMatrix &hessian);

} // namespace polysolve

0 comments on commit 2586b62

Please sign in to comment.