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

clang format for all changed files.

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