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

clang format for all changed files.

parent e1ef1e17
......@@ -4,7 +4,8 @@
#include <utility>
#include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS {
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
struct swallow
{
......@@ -130,7 +131,7 @@ auto fold(F f)
return [=](auto&&... xs) { return fold_impl(f, std::forward<decltype(xs)>(xs)...); };
}
} // 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 fwd_conv_batchnorm_rewrite
void apply(program& p) const;
};
} // inline namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -7,7 +7,8 @@
#include <migraph/config.hpp>
#include <random>
namespace migraph { inline namespace MIGRAPH_INLINE_NS {
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
template <class T, MIGRAPH_REQUIRES(is_floating_point<T>{})>
constexpr T normalize(unsigned long z)
......@@ -92,7 +93,7 @@ literal generate_literal(shape s, unsigned long seed = 0);
literal abs(literal l);
} // inline namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -11,7 +11,8 @@
#include <half.hpp>
#include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS {
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
using half = half_float::half;
......@@ -32,7 +33,7 @@ struct deduce<half_float::detail::expr>
template <class T>
using deduce = typename detail::deduce<T>::type;
} // inline namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -10,7 +10,8 @@
#include <string>
#include <utility>
namespace migraph { inline namespace MIGRAPH_INLINE_NS {
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
shape compute_shape(const operation& op, const std::vector<instruction_ref>& args);
......@@ -89,7 +90,7 @@ struct instruction
std::vector<instruction_ref> arguments;
literal lit;
};
} // inline namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
namespace std {
......
......@@ -5,12 +5,13 @@
#include <functional>
#include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS {
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
struct instruction;
using instruction_ref = std::list<instruction>::iterator;
} // inline namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -5,7 +5,8 @@
#include <type_traits>
#include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS {
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
template <class T>
struct iterator_for_range
......@@ -38,7 +39,7 @@ iterator_for_range<T> iterator_for(T& x)
return {&x};
}
} // inline namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -11,7 +11,8 @@
#include <memory>
namespace migraph { inline namespace MIGRAPH_INLINE_NS {
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
/**
* @brief Represents a raw literal
......@@ -123,7 +124,7 @@ literal transform(literal l1, literal l2, F f)
return result;
}
} // inline namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -4,7 +4,8 @@
#include <memory>
#include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS {
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
template <typename T>
std::shared_ptr<T> make_shared_array(size_t size)
......@@ -12,7 +13,7 @@ std::shared_ptr<T> make_shared_array(size_t size)
return std::shared_ptr<T>(new T[size], std::default_delete<T[]>());
}
} // inline namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -5,7 +5,8 @@
#include <type_traits>
#include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS {
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
template <class F, F f> // NOLINT
struct manage_deleter
......@@ -50,7 +51,7 @@ shared<T> share(T p)
return shared<T>{std::move(p)};
}
} // inline namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#define MIGRAPH_MANAGE_PTR(T, F) \
......
......@@ -9,7 +9,8 @@
#include <migraph/config.hpp>
#include <unordered_map>
namespace migraph { inline namespace MIGRAPH_INLINE_NS {
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
namespace match {
......@@ -339,7 +340,7 @@ inline auto either_arg(std::size_t i, std::size_t j)
}
} // namespace match
} // 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;
struct memory_coloring
......@@ -15,7 +16,7 @@ struct memory_coloring
void apply(program& p) const;
};
} // inline namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -4,12 +4,13 @@
#include <migraph/program.hpp>
#include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS {
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
/// Create a program from an onnx file
program parse_onnx(const std::string& name);
} // inline namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -15,7 +15,8 @@
#include <migraph/auto_any_cast.hpp>
#include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS {
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
#ifdef DOXYGEN
......
......@@ -10,7 +10,8 @@
#include <cmath>
#include <utility>
namespace migraph { inline namespace MIGRAPH_INLINE_NS {
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
namespace op {
struct not_computable
......@@ -853,7 +854,7 @@ struct outline
};
} // namespace op
} // inline namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -9,7 +9,8 @@
#include <utility>
#include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS {
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
struct program;
......@@ -217,7 +218,7 @@ inline const ValueType& any_cast(const pass& x)
#endif
} // inline namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -5,10 +5,11 @@
#include <migraph/env.hpp>
#include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS {
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
MIGRAPH_DECLARE_ENV_VAR(MIGRAPH_DISABLE_MEMORY_COLORING)
} // inline namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif // MIGRAPH_GUARD_PASS_CONFIG_HPP
......@@ -13,7 +13,8 @@
#include <algorithm>
#include <iostream>
namespace migraph { inline namespace MIGRAPH_INLINE_NS {
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
struct program_impl;
......@@ -108,7 +109,7 @@ struct program
std::unique_ptr<program_impl> impl;
};
} // 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 {
namespace detail {
......@@ -105,7 +106,7 @@ iterator_range<Iterator> range(std::pair<Iterator, Iterator> p)
return {p.first, p.second};
}
} // inline namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -3,7 +3,8 @@
#include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS {
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
template <int N>
struct rank : rank<N - 1>
......@@ -15,7 +16,7 @@ struct rank<0>
{
};
} // 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