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:
- key: readability-identifier-naming.NamespaceCase
value: lower_case
- key: readability-identifier-naming.InlineNamespaceCase
value: lower_case
value: UPPER_CASE
- key: readability-identifier-naming.EnumConstantCase
value: lower_case
- key: readability-identifier-naming.ConstexprVariableCase
......
......@@ -5,7 +5,7 @@
#include <migraph/iterator_for.hpp>
namespace migraph {
inline namespace version_1 {
inline namespace MIGRAPH_INLINE_NS {
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
......@@ -8,7 +8,7 @@
#include <unordered_set>
namespace migraph {
inline namespace version_1 {
inline namespace MIGRAPH_INLINE_NS {
template <class Range>
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)); }
} // namespace version_1
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
......@@ -4,7 +4,7 @@
#include <migraph/literal.hpp>
namespace migraph {
inline namespace version_1 {
inline namespace MIGRAPH_INLINE_NS {
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{}); }
} // namespace version_1
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
......@@ -6,7 +6,7 @@
#include <migraph/ranges.hpp>
namespace migraph {
inline namespace version_1 {
inline namespace MIGRAPH_INLINE_NS {
template <class Range, class Iterator>
std::ptrdiff_t bidistance(const Range& r, Iterator start, Iterator last)
......@@ -62,5 +62,5 @@ void dead_code_elimination::apply(program& p) const
p.remove_instructions(std::next(last), p.end());
}
} // namespace version_1
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
......@@ -8,7 +8,7 @@
#include <migraph/pass_config.hpp>
namespace migraph {
inline namespace version_1 {
inline namespace MIGRAPH_INLINE_NS {
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
......@@ -7,6 +7,7 @@
#include <migraph/dfor.hpp>
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
void eliminate_concat::apply(program& p) const
{
for(auto ins : iterator_for(p))
......@@ -66,4 +67,5 @@ void eliminate_concat::apply(program& p) const
}
}
}
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
......@@ -8,7 +8,7 @@
#include <utility>
namespace migraph {
inline namespace version_1 {
inline namespace MIGRAPH_INLINE_NS {
bool try_compute_shape(const operation& op, const std::vector<instruction_ref>& args)
{
......@@ -47,5 +47,5 @@ void eliminate_contiguous::apply(program& p) const
}
}
} // namespace version_1
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
......@@ -3,7 +3,7 @@
#include <cstdlib>
namespace migraph {
inline namespace version_1 {
inline namespace MIGRAPH_INLINE_NS {
bool enabled(const char* name)
{
......@@ -30,5 +30,5 @@ std::vector<std::string> env(const char* name)
return {{p}};
}
} // namespace version_1
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
......@@ -6,7 +6,7 @@
#include <migraph/dfor.hpp>
namespace migraph {
inline namespace version_1 {
inline namespace MIGRAPH_INLINE_NS {
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
#include <migraph/generate.hpp>
namespace migraph {
inline namespace version_1 {
inline namespace MIGRAPH_INLINE_NS {
argument generate_argument(shape s, unsigned long seed)
{
......@@ -31,5 +31,5 @@ literal abs(literal l)
return transform(std::move(l), [](auto x) { return std::fabs(x); });
}
} // namespace version_1
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
......@@ -47,7 +47,7 @@ struct argument : raw_data<argument>
shape m_shape;
};
} // namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -10,8 +10,10 @@
#include <migraph/operation.hpp>
#include <migraph/operators.hpp>
#include <migraph/config.hpp>
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
struct program;
......@@ -233,7 +235,7 @@ inline const ValueType& any_cast(const concat_optimization& x)
}
#endif
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -4,7 +4,7 @@
namespace migraph {
#ifndef MIGRAPH_USE_CLANG_TIDY
#define MIGRAPH_INLINE_NS version_1 // NOLINT
#define MIGRAPH_INLINE_NS version_1
#endif
} // namespace migraph
......
......@@ -205,7 +205,7 @@ inline const ValueType& any_cast(const context& x)
#endif
} // inline namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -4,8 +4,10 @@
#include <string>
#include <migraph/instruction_ref.hpp>
#include <migraph/concat_opt.hpp>
#include <migraph/config.hpp>
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
struct program;
......@@ -16,6 +18,7 @@ struct eliminate_concat
void apply(program& p) const;
};
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -33,7 +33,7 @@ bool disabled(T)
return result;
}
} // inline namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -12,7 +12,7 @@ inline namespace MIGRAPH_INLINE_NS {
#define MIGRAPH_FALLTHROUGH
#endif
} // inline namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -387,7 +387,7 @@ inline bool operator!=(const operation& x, const operation& y) { return !(x == y
#endif
} // inline namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -244,7 +244,7 @@ inline const ValueType& any_cast(const target& x)
#endif
} // inline namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#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