Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 12, 2024
1 parent d1ba4d8 commit 1bcc3eb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 26 deletions.
20 changes: 5 additions & 15 deletions include/tvm/scheme/internal/CompiledAssignment.h
Original file line number Diff line number Diff line change
Expand Up @@ -738,12 +738,8 @@ class CompiledAssignment<MatrixType, A, W, M, ZERO>
CompiledAssignment(const Eigen::Ref<MatrixType> & to) : to_(to) {}

public:
void run()
{ /* Do nothing */
}
void from(const Eigen::Ref<const MatrixType> &)
{ /* Do nothing */
}
void run() { /* Do nothing */ }
void from(const Eigen::Ref<const MatrixType> &) { /* Do nothing */ }
void to(const Eigen::Ref<MatrixType> & to)
{
// We want to do to_ = to but there is no operator= for Eigen::Ref,
Expand All @@ -770,9 +766,7 @@ class CompiledAssignment<MatrixType, COPY, W, M, ZERO>

public:
void run() { to_.setZero(); }
void from(const Eigen::Ref<const MatrixType> &)
{ /* Do nothing */
}
void from(const Eigen::Ref<const MatrixType> &) { /* Do nothing */ }
void to(const Eigen::Ref<MatrixType> & to)
{
// We want to do to_ = to but there is no operator= for Eigen::Ref,
Expand All @@ -799,9 +793,7 @@ class CompiledAssignment<MatrixType, MIN, W, M, ZERO>

public:
void run() { to_.array() = to_.array().min(0); }
void from(const Eigen::Ref<const MatrixType> &)
{ /* Do nothing */
}
void from(const Eigen::Ref<const MatrixType> &) { /* Do nothing */ }
void to(const Eigen::Ref<MatrixType> & to) { new(&to_) Eigen::Ref<MatrixType>(to); }

private:
Expand All @@ -823,9 +815,7 @@ class CompiledAssignment<MatrixType, MAX, W, M, ZERO>

public:
void run() { to_.array() = to_.array().max(0); }
void from(const Eigen::Ref<const MatrixType> &)
{ /* Do nothing */
}
void from(const Eigen::Ref<const MatrixType> &) { /* Do nothing */ }
void to(const Eigen::Ref<MatrixType> & to) { new(&to_) Eigen::Ref<MatrixType>(to); }

private:
Expand Down
16 changes: 5 additions & 11 deletions src/graph/Log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,7 @@ std::string Log::generateDot(const std::vector<Log::Output> & outHighlight,

// generate the dot code
std::stringstream dot;
dot << "digraph \""
<< "Update graph"
<< "\"\n{\n";
dot << "digraph \"" << "Update graph" << "\"\n{\n";
dot << " rankdir=\"LR\";\n";

// Process each node
Expand Down Expand Up @@ -549,8 +547,7 @@ std::string Log::generateDot(const std::vector<Log::Output> & outHighlight,
dot << nodeName(o) << "->" << nodeName(u);
if(oh[o] && uh[u])
{
dot << " "
<< "[color=orange]";
dot << " " << "[color=orange]";
}
dot << ";\n";
}
Expand All @@ -563,8 +560,7 @@ std::string Log::generateDot(const std::vector<Log::Output> & outHighlight,
dot << nodeName(u) << "->" << nodeName(o);
if(oh[o] && uh[u])
{
dot << " "
<< "[color=orange]";
dot << " " << "[color=orange]";
}
dot << ";\n";
}
Expand All @@ -577,8 +573,7 @@ std::string Log::generateDot(const std::vector<Log::Output> & outHighlight,
dot << nodeName(from) << "->" << nodeName(to);
if(uh[from] && uh[to])
{
dot << " "
<< "[color=orange]";
dot << " " << "[color=orange]";
}
dot << ";\n";
}
Expand All @@ -592,8 +587,7 @@ std::string Log::generateDot(const std::vector<Log::Output> & outHighlight,
dot << nodeName(from) << "->" << nodeName(to);
if(oh[from] && oh[to])
{
dot << " "
<< "[color=orange]";
dot << " " << "[color=orange]";
}
dot << ";\n";
}
Expand Down

0 comments on commit 1bcc3eb

Please sign in to comment.