Commit d918b57f authored by Shucai Xiao's avatar Shucai Xiao
Browse files

fixed the format error related to clang-tidy.

parent 8259bf56
...@@ -18,7 +18,7 @@ CheckOptions: ...@@ -18,7 +18,7 @@ CheckOptions:
- key: readability-identifier-naming.NamespaceCase - key: readability-identifier-naming.NamespaceCase
value: lower_case value: lower_case
- key: readability-identifier-naming.InlineNamespaceCase - key: readability-identifier-naming.InlineNamespaceCase
value: lower_case value: UPPER_CASE
- key: readability-identifier-naming.EnumConstantCase - key: readability-identifier-naming.EnumConstantCase
value: lower_case value: lower_case
- key: readability-identifier-naming.ConstexprVariableCase - key: readability-identifier-naming.ConstexprVariableCase
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include <migraph/iterator_for.hpp> #include <migraph/iterator_for.hpp>
namespace migraph { namespace migraph {
inline namespace version_1 { inline namespace MIGRAPH_INLINE_NS {
void auto_contiguous::apply(program& p) const void auto_contiguous::apply(program& p) const
{ {
...@@ -20,5 +20,5 @@ void auto_contiguous::apply(program& p) const ...@@ -20,5 +20,5 @@ void auto_contiguous::apply(program& p) const
} }
} }
} // namespace version_1 } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include <unordered_set> #include <unordered_set>
namespace migraph { namespace migraph {
inline namespace version_1 { inline namespace MIGRAPH_INLINE_NS {
template <class Range> template <class Range>
void cse_range(program& p, Range&& r) void cse_range(program& p, Range&& r)
...@@ -35,5 +35,5 @@ void cse_range(program& p, Range&& r) ...@@ -35,5 +35,5 @@ void cse_range(program& p, Range&& r)
void common_subexpression_elimination::apply(program& p) const { cse_range(p, iterator_for(p)); } void common_subexpression_elimination::apply(program& p) const { cse_range(p, iterator_for(p)); }
} // namespace version_1 } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include <migraph/literal.hpp> #include <migraph/literal.hpp>
namespace migraph { namespace migraph {
inline namespace version_1 { inline namespace MIGRAPH_INLINE_NS {
struct match_const_add struct match_const_add
{ {
...@@ -26,5 +26,5 @@ struct match_const_add ...@@ -26,5 +26,5 @@ struct match_const_add
void constant_propagate::apply(program& p) const { match::find_matches(p, match_const_add{}); } void constant_propagate::apply(program& p) const { match::find_matches(p, match_const_add{}); }
} // namespace version_1 } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include <migraph/ranges.hpp> #include <migraph/ranges.hpp>
namespace migraph { namespace migraph {
inline namespace version_1 { inline namespace MIGRAPH_INLINE_NS {
template <class Range, class Iterator> template <class Range, class Iterator>
std::ptrdiff_t bidistance(const Range& r, Iterator start, Iterator last) std::ptrdiff_t bidistance(const Range& r, Iterator start, Iterator last)
...@@ -62,5 +62,5 @@ void dead_code_elimination::apply(program& p) const ...@@ -62,5 +62,5 @@ void dead_code_elimination::apply(program& p) const
p.remove_instructions(std::next(last), p.end()); p.remove_instructions(std::next(last), p.end());
} }
} // namespace version_1 } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include <migraph/pass_config.hpp> #include <migraph/pass_config.hpp>
namespace migraph { namespace migraph {
inline namespace version_1 { inline namespace MIGRAPH_INLINE_NS {
void eliminate_allocation::apply(program& p) const void eliminate_allocation::apply(program& p) const
{ {
...@@ -37,5 +37,5 @@ void eliminate_allocation::apply(program& p) const ...@@ -37,5 +37,5 @@ void eliminate_allocation::apply(program& p) const
} }
} }
} // namespace version_1 } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <migraph/dfor.hpp> #include <migraph/dfor.hpp>
namespace migraph { namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
void eliminate_concat::apply(program& p) const void eliminate_concat::apply(program& p) const
{ {
for(auto ins : iterator_for(p)) for(auto ins : iterator_for(p))
...@@ -66,4 +67,5 @@ void eliminate_concat::apply(program& p) const ...@@ -66,4 +67,5 @@ void eliminate_concat::apply(program& p) const
} }
} }
} }
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include <utility> #include <utility>
namespace migraph { namespace migraph {
inline namespace version_1 { inline namespace MIGRAPH_INLINE_NS {
bool try_compute_shape(const operation& op, const std::vector<instruction_ref>& args) bool try_compute_shape(const operation& op, const std::vector<instruction_ref>& args)
{ {
...@@ -47,5 +47,5 @@ void eliminate_contiguous::apply(program& p) const ...@@ -47,5 +47,5 @@ void eliminate_contiguous::apply(program& p) const
} }
} }
} // namespace version_1 } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#include <cstdlib> #include <cstdlib>
namespace migraph { namespace migraph {
inline namespace version_1 { inline namespace MIGRAPH_INLINE_NS {
bool enabled(const char* name) bool enabled(const char* name)
{ {
...@@ -30,5 +30,5 @@ std::vector<std::string> env(const char* name) ...@@ -30,5 +30,5 @@ std::vector<std::string> env(const char* name)
return {{p}}; return {{p}};
} }
} // namespace version_1 } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include <migraph/dfor.hpp> #include <migraph/dfor.hpp>
namespace migraph { namespace migraph {
inline namespace version_1 { inline namespace MIGRAPH_INLINE_NS {
void fwd_conv_batchnorm_rewrite::apply(program& p) const void fwd_conv_batchnorm_rewrite::apply(program& p) const
{ {
...@@ -67,5 +67,5 @@ void fwd_conv_batchnorm_rewrite::apply(program& p) const ...@@ -67,5 +67,5 @@ void fwd_conv_batchnorm_rewrite::apply(program& p) const
} }
} }
} // namespace version_1 } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#include <migraph/generate.hpp> #include <migraph/generate.hpp>
namespace migraph { namespace migraph {
inline namespace version_1 { inline namespace MIGRAPH_INLINE_NS {
argument generate_argument(shape s, unsigned long seed) argument generate_argument(shape s, unsigned long seed)
{ {
...@@ -31,5 +31,5 @@ literal abs(literal l) ...@@ -31,5 +31,5 @@ literal abs(literal l)
return transform(std::move(l), [](auto x) { return std::fabs(x); }); return transform(std::move(l), [](auto x) { return std::fabs(x); });
} }
} // namespace version_1 } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
...@@ -47,7 +47,7 @@ struct argument : raw_data<argument> ...@@ -47,7 +47,7 @@ struct argument : raw_data<argument>
shape m_shape; shape m_shape;
}; };
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#endif #endif
...@@ -10,8 +10,10 @@ ...@@ -10,8 +10,10 @@
#include <migraph/operation.hpp> #include <migraph/operation.hpp>
#include <migraph/operators.hpp> #include <migraph/operators.hpp>
#include <migraph/config.hpp>
namespace migraph { namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
struct program; struct program;
...@@ -233,7 +235,7 @@ inline const ValueType& any_cast(const concat_optimization& x) ...@@ -233,7 +235,7 @@ inline const ValueType& any_cast(const concat_optimization& x)
} }
#endif #endif
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#endif #endif
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
namespace migraph { namespace migraph {
#ifndef MIGRAPH_USE_CLANG_TIDY #ifndef MIGRAPH_USE_CLANG_TIDY
#define MIGRAPH_INLINE_NS version_1 // NOLINT #define MIGRAPH_INLINE_NS version_1
#endif #endif
} // namespace migraph } // namespace migraph
......
...@@ -205,7 +205,7 @@ inline const ValueType& any_cast(const context& x) ...@@ -205,7 +205,7 @@ inline const ValueType& any_cast(const context& x)
#endif #endif
} // inline namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#endif #endif
...@@ -4,8 +4,10 @@ ...@@ -4,8 +4,10 @@
#include <string> #include <string>
#include <migraph/instruction_ref.hpp> #include <migraph/instruction_ref.hpp>
#include <migraph/concat_opt.hpp> #include <migraph/concat_opt.hpp>
#include <migraph/config.hpp>
namespace migraph { namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
struct program; struct program;
...@@ -16,6 +18,7 @@ struct eliminate_concat ...@@ -16,6 +18,7 @@ struct eliminate_concat
void apply(program& p) const; void apply(program& p) const;
}; };
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#endif #endif
...@@ -33,7 +33,7 @@ bool disabled(T) ...@@ -33,7 +33,7 @@ bool disabled(T)
return result; return result;
} }
} // inline namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#endif #endif
...@@ -12,7 +12,7 @@ inline namespace MIGRAPH_INLINE_NS { ...@@ -12,7 +12,7 @@ inline namespace MIGRAPH_INLINE_NS {
#define MIGRAPH_FALLTHROUGH #define MIGRAPH_FALLTHROUGH
#endif #endif
} // inline namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#endif #endif
...@@ -387,7 +387,7 @@ inline bool operator!=(const operation& x, const operation& y) { return !(x == y ...@@ -387,7 +387,7 @@ inline bool operator!=(const operation& x, const operation& y) { return !(x == y
#endif #endif
} // inline namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#endif #endif
...@@ -244,7 +244,7 @@ inline const ValueType& any_cast(const target& x) ...@@ -244,7 +244,7 @@ inline const ValueType& any_cast(const target& x)
#endif #endif
} // inline namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#endif #endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment