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

clang format for all changed files.

parent e1ef1e17
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
#include <migraph/requires.hpp> #include <migraph/requires.hpp>
#include <migraph/config.hpp> #include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS { namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
struct raw_data_base struct raw_data_base
{ {
...@@ -204,7 +205,7 @@ auto visit_all(T&& x, Ts&&... xs) ...@@ -204,7 +205,7 @@ auto visit_all(T&& x, Ts&&... xs)
}; };
} }
} // inline namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#endif #endif
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
#include <migraph/config.hpp> #include <migraph/config.hpp>
#include <functional> #include <functional>
namespace migraph { inline namespace MIGRAPH_INLINE_NS { namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
namespace detail { namespace detail {
...@@ -46,7 +47,7 @@ void reflect_each(T& x, F f) ...@@ -46,7 +47,7 @@ void reflect_each(T& x, F f)
}); });
} }
} // inline namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#endif #endif
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
#include <type_traits> #include <type_traits>
#include <migraph/config.hpp> #include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS { namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
template <bool... Bs> template <bool... Bs>
struct and_ : std::is_same<and_<Bs...>, and_<(Bs || true)...>> // NOLINT struct and_ : std::is_same<and_<Bs...>, and_<(Bs || true)...>> // NOLINT
...@@ -45,7 +46,7 @@ struct requires_enum ...@@ -45,7 +46,7 @@ struct requires_enum
#endif #endif
#endif #endif
} // inline namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#endif #endif
...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,8 @@
#include <migraph/half.hpp> #include <migraph/half.hpp>
#include <migraph/config.hpp> #include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS { namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
struct shape_impl; struct shape_impl;
...@@ -162,7 +163,7 @@ struct shape ...@@ -162,7 +163,7 @@ struct shape
std::string type_string() const; std::string type_string() const;
}; };
} // inline namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#endif #endif
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
#include <migraph/config.hpp> #include <migraph/config.hpp>
#include <algorithm> #include <algorithm>
namespace migraph { inline namespace MIGRAPH_INLINE_NS { namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
template <class F> template <class F>
void shape_for_each(const migraph::shape& s, F f) void shape_for_each(const migraph::shape& s, F f)
...@@ -27,7 +28,7 @@ void shape_for_each(const migraph::shape& s, F f) ...@@ -27,7 +28,7 @@ void shape_for_each(const migraph::shape& s, F f)
} }
} }
} // inline namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#endif #endif
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
#include <string> #include <string>
#include <migraph/config.hpp> #include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS { namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
struct program; struct program;
...@@ -14,7 +15,7 @@ struct simplify_algebra ...@@ -14,7 +15,7 @@ struct simplify_algebra
void apply(program& p) const; void apply(program& p) const;
}; };
} // inline namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#endif #endif
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
#include <migraph/instruction_ref.hpp> #include <migraph/instruction_ref.hpp>
#include <migraph/config.hpp> #include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS { namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
struct program; struct program;
...@@ -15,7 +16,7 @@ struct simplify_reshapes ...@@ -15,7 +16,7 @@ struct simplify_reshapes
void apply(program& p) const; void apply(program& p) const;
}; };
} // inline namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#endif #endif
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
#include <migraph/rank.hpp> #include <migraph/rank.hpp>
#include <migraph/config.hpp> #include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS { namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
template <class T> template <class T>
struct stream_range_container struct stream_range_container
...@@ -55,7 +56,7 @@ void stream_write_value(std::ostream& os, const T& x) ...@@ -55,7 +56,7 @@ void stream_write_value(std::ostream& os, const T& x)
detail::stream_write_value_impl(rank<1>{}, os, x); detail::stream_write_value_impl(rank<1>{}, os, x);
} }
} // inline namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#endif #endif
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
#include <sstream> #include <sstream>
#include <migraph/config.hpp> #include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS { namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
inline std::string inline std::string
replace_string(std::string subject, const std::string& search, const std::string& replace) replace_string(std::string subject, const std::string& search, const std::string& replace)
...@@ -86,7 +87,7 @@ inline std::string to_string(const T& x) ...@@ -86,7 +87,7 @@ inline std::string to_string(const T& x)
return ss.str(); return ss.str();
} }
} // inline namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#endif #endif
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
#include <migraph/pass.hpp> #include <migraph/pass.hpp>
#include <migraph/config.hpp> #include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS { namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
#ifdef DOXYGEN #ifdef DOXYGEN
......
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
#include <iostream> #include <iostream>
#include <utility> #include <utility>
namespace migraph { inline namespace MIGRAPH_INLINE_NS { namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
template <class T> template <class T>
struct tensor_view struct tensor_view
...@@ -168,7 +169,7 @@ tensor_view<T> make_view(shape s, T* data) ...@@ -168,7 +169,7 @@ tensor_view<T> make_view(shape s, T* data)
return {s, data}; return {s, data};
} }
} // inline namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#endif #endif
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
#include <chrono> #include <chrono>
#include <migraph/config.hpp> #include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS { namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
template <class Duration, class F> template <class Duration, class F>
auto time(F f) auto time(F f)
...@@ -15,7 +16,7 @@ auto time(F f) ...@@ -15,7 +16,7 @@ auto time(F f)
return std::chrono::duration_cast<Duration>(finish - start).count(); return std::chrono::duration_cast<Duration>(finish - start).count();
} }
} // inline namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#endif #endif
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
#include <migraph/functional.hpp> #include <migraph/functional.hpp>
#include <migraph/config.hpp> #include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS { namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
struct tracer struct tracer
{ {
...@@ -29,7 +30,7 @@ struct tracer ...@@ -29,7 +30,7 @@ struct tracer
std::ostream* os = nullptr; std::ostream* os = nullptr;
}; };
} // inline namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#endif #endif
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
#include <string> #include <string>
#include <migraph/config.hpp> #include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS { namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
template <class PrivateMigraphTypeNameProbe> template <class PrivateMigraphTypeNameProbe>
const std::string& get_type_name() const std::string& get_type_name()
...@@ -40,7 +41,7 @@ const std::string& get_type_name(const T&) ...@@ -40,7 +41,7 @@ const std::string& get_type_name(const T&)
return migraph::get_type_name<T>(); return migraph::get_type_name<T>();
} }
} // inline namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#endif #endif
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
#include <migraph/half.hpp> #include <migraph/half.hpp>
#include <migraph/config.hpp> #include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS { namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
#define MIGRAPH_DETAIL_EXTEND_TRAIT_FOR(trait, T) \ #define MIGRAPH_DETAIL_EXTEND_TRAIT_FOR(trait, T) \
template <class X> \ template <class X> \
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
#include <migraph/float_equal.hpp> #include <migraph/float_equal.hpp>
#include <migraph/config.hpp> #include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS { namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
// Compute the value of a range // Compute the value of a range
template <class R> template <class R>
...@@ -172,6 +173,6 @@ bool verify_range(R1&& r1, R2&& r2, double tolerance = 80, double* out_error = n ...@@ -172,6 +173,6 @@ bool verify_range(R1&& r1, R2&& r2, double tolerance = 80, double* out_error = n
return error <= threshold; return error <= threshold;
} }
} // inline namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#endif #endif
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
#include <migraph/argument.hpp> #include <migraph/argument.hpp>
#include <migraph/config.hpp> #include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS { namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
inline bool verify_args(const std::string& name, inline bool verify_args(const std::string& name,
const argument& cpu_arg, const argument& cpu_arg,
...@@ -83,7 +84,7 @@ inline bool verify_args(const std::string& name, ...@@ -83,7 +84,7 @@ inline bool verify_args(const std::string& name,
return passed; return passed;
} }
} // inline namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#endif #endif
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
#include <migraph/builtin.hpp> #include <migraph/builtin.hpp>
#include <migraph/erase.hpp> #include <migraph/erase.hpp>
namespace migraph { namespace MIGRAPH_INLINE_NS { namespace migraph {
namespace MIGRAPH_INLINE_NS {
instruction::instruction(operation o, shape r, std::vector<instruction_ref> args) instruction::instruction(operation o, shape r, std::vector<instruction_ref> args)
: op(std::move(o)), result(std::move(r)), arguments(std::move(args)) : op(std::move(o)), result(std::move(r)), arguments(std::move(args))
......
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
#include <vector> #include <vector>
#include <queue> #include <queue>
namespace migraph { inline namespace MIGRAPH_INLINE_NS { namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
//#define MIGRAPH_DEBUG_OPT //#define MIGRAPH_DEBUG_OPT
......
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