Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
a4026def
Commit
a4026def
authored
Nov 05, 2018
by
Shucai Xiao
Browse files
clang format for all changed files.
parent
e1ef1e17
Changes
95
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
52 additions
and
33 deletions
+52
-33
src/env.cpp
src/env.cpp
+1
-1
src/generate.cpp
src/generate.cpp
+2
-1
src/include/migraph/argument.hpp
src/include/migraph/argument.hpp
+3
-2
src/include/migraph/auto_any_cast.hpp
src/include/migraph/auto_any_cast.hpp
+2
-1
src/include/migraph/auto_contiguous.hpp
src/include/migraph/auto_contiguous.hpp
+3
-2
src/include/migraph/builtin.hpp
src/include/migraph/builtin.hpp
+3
-2
src/include/migraph/check_context.hpp
src/include/migraph/check_context.hpp
+2
-1
src/include/migraph/check_shapes.hpp
src/include/migraph/check_shapes.hpp
+3
-2
src/include/migraph/common_subexpression_elimination.hpp
src/include/migraph/common_subexpression_elimination.hpp
+3
-2
src/include/migraph/constant_propagate.hpp
src/include/migraph/constant_propagate.hpp
+3
-2
src/include/migraph/context.hpp
src/include/migraph/context.hpp
+2
-1
src/include/migraph/dead_code_elimination.hpp
src/include/migraph/dead_code_elimination.hpp
+3
-2
src/include/migraph/dfor.hpp
src/include/migraph/dfor.hpp
+3
-2
src/include/migraph/eliminate_allocation.hpp
src/include/migraph/eliminate_allocation.hpp
+3
-2
src/include/migraph/eliminate_contiguous.hpp
src/include/migraph/eliminate_contiguous.hpp
+3
-2
src/include/migraph/env.hpp
src/include/migraph/env.hpp
+2
-1
src/include/migraph/erase.hpp
src/include/migraph/erase.hpp
+3
-2
src/include/migraph/errors.hpp
src/include/migraph/errors.hpp
+3
-2
src/include/migraph/fallthrough.hpp
src/include/migraph/fallthrough.hpp
+2
-1
src/include/migraph/float_equal.hpp
src/include/migraph/float_equal.hpp
+3
-2
No files found.
src/env.cpp
View file @
a4026def
...
...
@@ -30,5 +30,5 @@ std::vector<std::string> env(const char* name)
return
{{
p
}};
}
}
// namespace MIGRAPH_INLINE_N
}
// namespace MIGRAPH_INLINE_N
S
}
// namespace migraph
src/generate.cpp
View file @
a4026def
#include <migraph/generate.hpp>
namespace
migraph
{
namespace
MIGRAPH_INLINE_NS
{
namespace
migraph
{
namespace
MIGRAPH_INLINE_NS
{
argument
generate_argument
(
shape
s
,
unsigned
long
seed
)
{
...
...
src/include/migraph/argument.hpp
View file @
a4026def
...
...
@@ -7,7 +7,8 @@
#include <functional>
#include <utility>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
/**
* @brief Arguments passed to instructions
...
...
@@ -46,7 +47,7 @@ struct argument : raw_data<argument>
shape
m_shape
;
};
}
//
inline
namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/auto_any_cast.hpp
View file @
a4026def
...
...
@@ -2,7 +2,8 @@
#define MIGRAPH_GUARD_RTGLIB_AUTO_ANY_CAST_HPP
#include <migraph/config.hpp>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
detail
{
...
...
src/include/migraph/auto_contiguous.hpp
View file @
a4026def
...
...
@@ -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 auto_contiguous
void
apply
(
program
&
p
)
const
;
};
}
//
inline
namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/builtin.hpp
View file @
a4026def
...
...
@@ -7,7 +7,8 @@
#include <migraph/reflect.hpp>
#include <migraph/config.hpp>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
builtin
{
...
...
@@ -63,7 +64,7 @@ struct param
};
}
// namespace builtin
}
//
inline
namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/check_context.hpp
View file @
a4026def
...
...
@@ -4,7 +4,8 @@
#include <migraph/program.hpp>
#include <migraph/config.hpp>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
template
<
class
T
>
struct
check_context
...
...
src/include/migraph/check_shapes.hpp
View file @
a4026def
...
...
@@ -5,7 +5,8 @@
#include <migraph/config.hpp>
#include <algorithm>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
struct
check_shapes
{
...
...
@@ -155,7 +156,7 @@ struct check_shapes
check_shapes
slice
(
long
start
,
long
last
)
{
return
{
get
(
start
),
get
(
last
),
name
};
}
};
}
//
inline
namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/common_subexpression_elimination.hpp
View file @
a4026def
...
...
@@ -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 common_subexpression_elimination
void
apply
(
program
&
p
)
const
;
};
}
//
inline
namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/constant_propagate.hpp
View file @
a4026def
...
...
@@ -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 constant_propagate
void
apply
(
program
&
p
)
const
;
};
}
//
inline
namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/context.hpp
View file @
a4026def
...
...
@@ -9,7 +9,8 @@
#include <utility>
#include <migraph/config.hpp>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
#ifdef DOXYGEN
...
...
src/include/migraph/dead_code_elimination.hpp
View file @
a4026def
...
...
@@ -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 dead_code_elimination
void
apply
(
program
&
p
)
const
;
};
}
//
inline
namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/dfor.hpp
View file @
a4026def
...
...
@@ -3,7 +3,8 @@
#include <migraph/config.hpp>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
// Multidimensional for loop
inline
auto
dfor
()
...
...
@@ -22,7 +23,7 @@ auto dfor(T x, Ts... xs)
};
}
}
//
inline
namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/eliminate_allocation.hpp
View file @
a4026def
...
...
@@ -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
;
...
...
@@ -17,7 +18,7 @@ struct eliminate_allocation
void
apply
(
program
&
p
)
const
;
};
}
//
inline
namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/eliminate_contiguous.hpp
View file @
a4026def
...
...
@@ -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 eliminate_contiguous
void
apply
(
program
&
p
)
const
;
};
}
//
inline
namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/env.hpp
View file @
a4026def
...
...
@@ -5,7 +5,8 @@
#include <string>
#include <migraph/config.hpp>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
// Declare a cached environment variable
#define MIGRAPH_DECLARE_ENV_VAR(x) \
...
...
src/include/migraph/erase.hpp
View file @
a4026def
...
...
@@ -4,7 +4,8 @@
#include <algorithm>
#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
...
...
@@ -32,7 +33,7 @@ auto erase_if(R&& r, P&& pred)
return
r
.
erase
(
std
::
remove_if
(
r
.
begin
(),
r
.
end
(),
pred
),
r
.
end
());
}
}
//
inline
namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/errors.hpp
View file @
a4026def
...
...
@@ -6,7 +6,8 @@
#include <string>
#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
struct
exception
:
std
::
runtime_error
...
...
@@ -45,7 +46,7 @@ inline std::string make_source_context(const std::string& file, int line)
#define MIGRAPH_THROW(...) \
throw migraph::make_exception(migraph::make_source_context(__FILE__, __LINE__), __VA_ARGS__)
}
//
inline
namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/fallthrough.hpp
View file @
a4026def
...
...
@@ -3,7 +3,8 @@
#include <migraph/config.hpp>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
#ifdef __clang__
#define MIGRAPH_FALLTHROUGH [[clang::fallthrough]]
...
...
src/include/migraph/float_equal.hpp
View file @
a4026def
...
...
@@ -11,7 +11,8 @@
#include <migraph/requires.hpp>
#include <migraph/config.hpp>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
template
<
class
...
Ts
>
using
common_type
=
typename
std
::
common_type
<
Ts
...
>::
type
;
...
...
@@ -41,7 +42,7 @@ struct float_equal_fn
static
constexpr
float_equal_fn
float_equal
{};
}
//
inline
namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
Prev
1
2
3
4
5
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment