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

clang format for all changed files.

parent e1ef1e17
...@@ -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 MIGRAPH_INLINE_N } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#include <migraph/generate.hpp> #include <migraph/generate.hpp>
namespace migraph { namespace MIGRAPH_INLINE_NS { namespace migraph {
namespace MIGRAPH_INLINE_NS {
argument generate_argument(shape s, unsigned long seed) argument generate_argument(shape s, unsigned long seed)
{ {
......
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
#include <functional> #include <functional>
#include <utility> #include <utility>
namespace migraph { inline namespace MIGRAPH_INLINE_NS { namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
/** /**
* @brief Arguments passed to instructions * @brief Arguments passed to instructions
...@@ -46,7 +47,7 @@ struct argument : raw_data<argument> ...@@ -46,7 +47,7 @@ struct argument : raw_data<argument>
shape m_shape; shape m_shape;
}; };
} // inline namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#endif #endif
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
#define MIGRAPH_GUARD_RTGLIB_AUTO_ANY_CAST_HPP #define MIGRAPH_GUARD_RTGLIB_AUTO_ANY_CAST_HPP
#include <migraph/config.hpp> #include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS { namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
namespace detail { namespace detail {
......
...@@ -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 auto_contiguous ...@@ -15,7 +16,7 @@ struct auto_contiguous
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
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
#include <migraph/reflect.hpp> #include <migraph/reflect.hpp>
#include <migraph/config.hpp> #include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS { namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
namespace builtin { namespace builtin {
...@@ -63,7 +64,7 @@ struct param ...@@ -63,7 +64,7 @@ struct param
}; };
} // namespace builtin } // namespace builtin
} // inline namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#endif #endif
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
#include <migraph/program.hpp> #include <migraph/program.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 check_context struct check_context
......
...@@ -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 {
struct check_shapes struct check_shapes
{ {
...@@ -155,7 +156,7 @@ struct check_shapes ...@@ -155,7 +156,7 @@ struct check_shapes
check_shapes slice(long start, long last) { return {get(start), get(last), name}; } check_shapes slice(long start, long last) { return {get(start), get(last), name}; }
}; };
} // 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 common_subexpression_elimination ...@@ -15,7 +16,7 @@ struct common_subexpression_elimination
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
...@@ -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 constant_propagate ...@@ -14,7 +15,7 @@ struct constant_propagate
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
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
#include <utility> #include <utility>
#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
......
...@@ -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 dead_code_elimination ...@@ -15,7 +16,7 @@ struct dead_code_elimination
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
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
#include <migraph/config.hpp> #include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS { namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
// Multidimensional for loop // Multidimensional for loop
inline auto dfor() inline auto dfor()
...@@ -22,7 +23,7 @@ auto dfor(T x, Ts... xs) ...@@ -22,7 +23,7 @@ auto dfor(T x, Ts... xs)
}; };
} }
} // 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;
...@@ -17,7 +18,7 @@ struct eliminate_allocation ...@@ -17,7 +18,7 @@ struct eliminate_allocation
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 eliminate_contiguous ...@@ -15,7 +16,7 @@ struct eliminate_contiguous
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 <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 {
// Declare a cached environment variable // Declare a cached environment variable
#define MIGRAPH_DECLARE_ENV_VAR(x) \ #define MIGRAPH_DECLARE_ENV_VAR(x) \
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
#include <algorithm> #include <algorithm>
#include <migraph/config.hpp> #include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS { namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
/** /**
* @brief Erase all elements from a container * @brief Erase all elements from a container
...@@ -32,7 +33,7 @@ auto erase_if(R&& r, P&& pred) ...@@ -32,7 +33,7 @@ auto erase_if(R&& r, P&& pred)
return r.erase(std::remove_if(r.begin(), r.end(), pred), r.end()); return r.erase(std::remove_if(r.begin(), r.end(), pred), r.end());
} }
} // inline namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#endif #endif
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,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 {
/// Represents exceptions that can be thrown by migraphlib /// Represents exceptions that can be thrown by migraphlib
struct exception : std::runtime_error struct exception : std::runtime_error
...@@ -45,7 +46,7 @@ inline std::string make_source_context(const std::string& file, int line) ...@@ -45,7 +46,7 @@ inline std::string make_source_context(const std::string& file, int line)
#define MIGRAPH_THROW(...) \ #define MIGRAPH_THROW(...) \
throw migraph::make_exception(migraph::make_source_context(__FILE__, __LINE__), __VA_ARGS__) throw migraph::make_exception(migraph::make_source_context(__FILE__, __LINE__), __VA_ARGS__)
} // inline namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraph
#endif #endif
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
#include <migraph/config.hpp> #include <migraph/config.hpp>
namespace migraph { inline namespace MIGRAPH_INLINE_NS { namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
#ifdef __clang__ #ifdef __clang__
#define MIGRAPH_FALLTHROUGH [[clang::fallthrough]] #define MIGRAPH_FALLTHROUGH [[clang::fallthrough]]
......
...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,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 {
template <class... Ts> template <class... Ts>
using common_type = typename std::common_type<Ts...>::type; using common_type = typename std::common_type<Ts...>::type;
...@@ -41,7 +42,7 @@ struct float_equal_fn ...@@ -41,7 +42,7 @@ struct float_equal_fn
static constexpr float_equal_fn float_equal{}; static constexpr float_equal_fn float_equal{};
} // 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