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
d918b57f
Commit
d918b57f
authored
Nov 06, 2018
by
Shucai Xiao
Browse files
fixed the format error related to clang-tidy.
parent
8259bf56
Changes
56
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
34 additions
and
27 deletions
+34
-27
.clang-tidy
.clang-tidy
+1
-1
src/auto_contiguous.cpp
src/auto_contiguous.cpp
+2
-2
src/common_subexpression_elimination.cpp
src/common_subexpression_elimination.cpp
+2
-2
src/constant_propagate.cpp
src/constant_propagate.cpp
+2
-2
src/dead_code_elimination.cpp
src/dead_code_elimination.cpp
+2
-2
src/eliminate_allocation.cpp
src/eliminate_allocation.cpp
+2
-2
src/eliminate_concat.cpp
src/eliminate_concat.cpp
+2
-0
src/eliminate_contiguous.cpp
src/eliminate_contiguous.cpp
+2
-2
src/env.cpp
src/env.cpp
+2
-2
src/fwd_conv_batchnorm_rewrite.cpp
src/fwd_conv_batchnorm_rewrite.cpp
+2
-2
src/generate.cpp
src/generate.cpp
+2
-2
src/include/migraph/argument.hpp
src/include/migraph/argument.hpp
+1
-1
src/include/migraph/concat_opt.hpp
src/include/migraph/concat_opt.hpp
+3
-1
src/include/migraph/config.hpp
src/include/migraph/config.hpp
+1
-1
src/include/migraph/context.hpp
src/include/migraph/context.hpp
+1
-1
src/include/migraph/eliminate_concat.hpp
src/include/migraph/eliminate_concat.hpp
+3
-0
src/include/migraph/env.hpp
src/include/migraph/env.hpp
+1
-1
src/include/migraph/fallthrough.hpp
src/include/migraph/fallthrough.hpp
+1
-1
src/include/migraph/operation.hpp
src/include/migraph/operation.hpp
+1
-1
src/include/migraph/target.hpp
src/include/migraph/target.hpp
+1
-1
No files found.
.clang-tidy
View file @
d918b57f
...
@@ -18,7 +18,7 @@ CheckOptions:
...
@@ -18,7 +18,7 @@ CheckOptions:
- key: readability-identifier-naming.NamespaceCase
- key: readability-identifier-naming.NamespaceCase
value: lower_case
value: lower_case
- key: readability-identifier-naming.InlineNamespaceCase
- key: readability-identifier-naming.InlineNamespaceCase
value:
lower_case
value:
UPPER_CASE
- key: readability-identifier-naming.EnumConstantCase
- key: readability-identifier-naming.EnumConstantCase
value: lower_case
value: lower_case
- key: readability-identifier-naming.ConstexprVariableCase
- key: readability-identifier-naming.ConstexprVariableCase
...
...
src/auto_contiguous.cpp
View file @
d918b57f
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
#include <migraph/iterator_for.hpp>
#include <migraph/iterator_for.hpp>
namespace
migraph
{
namespace
migraph
{
inline
namespace
version_1
{
inline
namespace
MIGRAPH_INLINE_NS
{
void
auto_contiguous
::
apply
(
program
&
p
)
const
void
auto_contiguous
::
apply
(
program
&
p
)
const
{
{
...
@@ -20,5 +20,5 @@ void auto_contiguous::apply(program& p) const
...
@@ -20,5 +20,5 @@ void auto_contiguous::apply(program& p) const
}
}
}
}
}
// namespace
version_1
}
// namespace
MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
src/common_subexpression_elimination.cpp
View file @
d918b57f
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
#include <unordered_set>
#include <unordered_set>
namespace
migraph
{
namespace
migraph
{
inline
namespace
version_1
{
inline
namespace
MIGRAPH_INLINE_NS
{
template
<
class
Range
>
template
<
class
Range
>
void
cse_range
(
program
&
p
,
Range
&&
r
)
void
cse_range
(
program
&
p
,
Range
&&
r
)
...
@@ -35,5 +35,5 @@ void cse_range(program& p, Range&& r)
...
@@ -35,5 +35,5 @@ void cse_range(program& p, Range&& r)
void
common_subexpression_elimination
::
apply
(
program
&
p
)
const
{
cse_range
(
p
,
iterator_for
(
p
));
}
void
common_subexpression_elimination
::
apply
(
program
&
p
)
const
{
cse_range
(
p
,
iterator_for
(
p
));
}
}
// namespace
version_1
}
// namespace
MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
src/constant_propagate.cpp
View file @
d918b57f
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
#include <migraph/literal.hpp>
#include <migraph/literal.hpp>
namespace
migraph
{
namespace
migraph
{
inline
namespace
version_1
{
inline
namespace
MIGRAPH_INLINE_NS
{
struct
match_const_add
struct
match_const_add
{
{
...
@@ -26,5 +26,5 @@ struct match_const_add
...
@@ -26,5 +26,5 @@ struct match_const_add
void
constant_propagate
::
apply
(
program
&
p
)
const
{
match
::
find_matches
(
p
,
match_const_add
{});
}
void
constant_propagate
::
apply
(
program
&
p
)
const
{
match
::
find_matches
(
p
,
match_const_add
{});
}
}
// namespace
version_1
}
// namespace
MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
src/dead_code_elimination.cpp
View file @
d918b57f
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
#include <migraph/ranges.hpp>
#include <migraph/ranges.hpp>
namespace
migraph
{
namespace
migraph
{
inline
namespace
version_1
{
inline
namespace
MIGRAPH_INLINE_NS
{
template
<
class
Range
,
class
Iterator
>
template
<
class
Range
,
class
Iterator
>
std
::
ptrdiff_t
bidistance
(
const
Range
&
r
,
Iterator
start
,
Iterator
last
)
std
::
ptrdiff_t
bidistance
(
const
Range
&
r
,
Iterator
start
,
Iterator
last
)
...
@@ -62,5 +62,5 @@ void dead_code_elimination::apply(program& p) const
...
@@ -62,5 +62,5 @@ void dead_code_elimination::apply(program& p) const
p
.
remove_instructions
(
std
::
next
(
last
),
p
.
end
());
p
.
remove_instructions
(
std
::
next
(
last
),
p
.
end
());
}
}
}
// namespace
version_1
}
// namespace
MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
src/eliminate_allocation.cpp
View file @
d918b57f
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
#include <migraph/pass_config.hpp>
#include <migraph/pass_config.hpp>
namespace
migraph
{
namespace
migraph
{
inline
namespace
version_1
{
inline
namespace
MIGRAPH_INLINE_NS
{
void
eliminate_allocation
::
apply
(
program
&
p
)
const
void
eliminate_allocation
::
apply
(
program
&
p
)
const
{
{
...
@@ -37,5 +37,5 @@ void eliminate_allocation::apply(program& p) const
...
@@ -37,5 +37,5 @@ void eliminate_allocation::apply(program& p) const
}
}
}
}
}
// namespace
version_1
}
// namespace
MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
src/eliminate_concat.cpp
View file @
d918b57f
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
#include <migraph/dfor.hpp>
#include <migraph/dfor.hpp>
namespace
migraph
{
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
void
eliminate_concat
::
apply
(
program
&
p
)
const
void
eliminate_concat
::
apply
(
program
&
p
)
const
{
{
for
(
auto
ins
:
iterator_for
(
p
))
for
(
auto
ins
:
iterator_for
(
p
))
...
@@ -66,4 +67,5 @@ void eliminate_concat::apply(program& p) const
...
@@ -66,4 +67,5 @@ void eliminate_concat::apply(program& p) const
}
}
}
}
}
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
src/eliminate_contiguous.cpp
View file @
d918b57f
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
#include <utility>
#include <utility>
namespace
migraph
{
namespace
migraph
{
inline
namespace
version_1
{
inline
namespace
MIGRAPH_INLINE_NS
{
bool
try_compute_shape
(
const
operation
&
op
,
const
std
::
vector
<
instruction_ref
>&
args
)
bool
try_compute_shape
(
const
operation
&
op
,
const
std
::
vector
<
instruction_ref
>&
args
)
{
{
...
@@ -47,5 +47,5 @@ void eliminate_contiguous::apply(program& p) const
...
@@ -47,5 +47,5 @@ void eliminate_contiguous::apply(program& p) const
}
}
}
}
}
// namespace
version_1
}
// namespace
MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
src/env.cpp
View file @
d918b57f
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
#include <cstdlib>
#include <cstdlib>
namespace
migraph
{
namespace
migraph
{
inline
namespace
version_1
{
inline
namespace
MIGRAPH_INLINE_NS
{
bool
enabled
(
const
char
*
name
)
bool
enabled
(
const
char
*
name
)
{
{
...
@@ -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
version_1
}
// namespace
MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
src/fwd_conv_batchnorm_rewrite.cpp
View file @
d918b57f
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
#include <migraph/dfor.hpp>
#include <migraph/dfor.hpp>
namespace
migraph
{
namespace
migraph
{
inline
namespace
version_1
{
inline
namespace
MIGRAPH_INLINE_NS
{
void
fwd_conv_batchnorm_rewrite
::
apply
(
program
&
p
)
const
void
fwd_conv_batchnorm_rewrite
::
apply
(
program
&
p
)
const
{
{
...
@@ -67,5 +67,5 @@ void fwd_conv_batchnorm_rewrite::apply(program& p) const
...
@@ -67,5 +67,5 @@ void fwd_conv_batchnorm_rewrite::apply(program& p) const
}
}
}
}
}
// namespace
version_1
}
// namespace
MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
src/generate.cpp
View file @
d918b57f
#include <migraph/generate.hpp>
#include <migraph/generate.hpp>
namespace
migraph
{
namespace
migraph
{
inline
namespace
version_1
{
inline
namespace
MIGRAPH_INLINE_NS
{
argument
generate_argument
(
shape
s
,
unsigned
long
seed
)
argument
generate_argument
(
shape
s
,
unsigned
long
seed
)
{
{
...
@@ -31,5 +31,5 @@ literal abs(literal l)
...
@@ -31,5 +31,5 @@ literal abs(literal l)
return
transform
(
std
::
move
(
l
),
[](
auto
x
)
{
return
std
::
fabs
(
x
);
});
return
transform
(
std
::
move
(
l
),
[](
auto
x
)
{
return
std
::
fabs
(
x
);
});
}
}
}
// namespace
version_1
}
// namespace
MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
src/include/migraph/argument.hpp
View file @
d918b57f
...
@@ -47,7 +47,7 @@ struct argument : raw_data<argument>
...
@@ -47,7 +47,7 @@ struct argument : raw_data<argument>
shape
m_shape
;
shape
m_shape
;
};
};
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
#endif
#endif
src/include/migraph/concat_opt.hpp
View file @
d918b57f
...
@@ -10,8 +10,10 @@
...
@@ -10,8 +10,10 @@
#include <migraph/operation.hpp>
#include <migraph/operation.hpp>
#include <migraph/operators.hpp>
#include <migraph/operators.hpp>
#include <migraph/config.hpp>
namespace
migraph
{
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
struct
program
;
struct
program
;
...
@@ -233,7 +235,7 @@ inline const ValueType& any_cast(const concat_optimization& x)
...
@@ -233,7 +235,7 @@ inline const ValueType& any_cast(const concat_optimization& x)
}
}
#endif
#endif
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
#endif
#endif
src/include/migraph/config.hpp
View file @
d918b57f
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
namespace
migraph
{
namespace
migraph
{
#ifndef MIGRAPH_USE_CLANG_TIDY
#ifndef MIGRAPH_USE_CLANG_TIDY
#define MIGRAPH_INLINE_NS version_1
// NOLINT
#define MIGRAPH_INLINE_NS version_1
#endif
#endif
}
// namespace migraph
}
// namespace migraph
...
...
src/include/migraph/context.hpp
View file @
d918b57f
...
@@ -205,7 +205,7 @@ inline const ValueType& any_cast(const context& x)
...
@@ -205,7 +205,7 @@ inline const ValueType& any_cast(const context& x)
#endif
#endif
}
//
inline
namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
#endif
#endif
src/include/migraph/eliminate_concat.hpp
View file @
d918b57f
...
@@ -4,8 +4,10 @@
...
@@ -4,8 +4,10 @@
#include <string>
#include <string>
#include <migraph/instruction_ref.hpp>
#include <migraph/instruction_ref.hpp>
#include <migraph/concat_opt.hpp>
#include <migraph/concat_opt.hpp>
#include <migraph/config.hpp>
namespace
migraph
{
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
struct
program
;
struct
program
;
...
@@ -16,6 +18,7 @@ struct eliminate_concat
...
@@ -16,6 +18,7 @@ struct eliminate_concat
void
apply
(
program
&
p
)
const
;
void
apply
(
program
&
p
)
const
;
};
};
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
#endif
#endif
src/include/migraph/env.hpp
View file @
d918b57f
...
@@ -33,7 +33,7 @@ bool disabled(T)
...
@@ -33,7 +33,7 @@ bool disabled(T)
return
result
;
return
result
;
}
}
}
//
inline
namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
#endif
#endif
src/include/migraph/fallthrough.hpp
View file @
d918b57f
...
@@ -12,7 +12,7 @@ inline namespace MIGRAPH_INLINE_NS {
...
@@ -12,7 +12,7 @@ inline namespace MIGRAPH_INLINE_NS {
#define MIGRAPH_FALLTHROUGH
#define MIGRAPH_FALLTHROUGH
#endif
#endif
}
//
inline
namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
#endif
#endif
src/include/migraph/operation.hpp
View file @
d918b57f
...
@@ -387,7 +387,7 @@ inline bool operator!=(const operation& x, const operation& y) { return !(x == y
...
@@ -387,7 +387,7 @@ inline bool operator!=(const operation& x, const operation& y) { return !(x == y
#endif
#endif
}
//
inline
namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
#endif
#endif
src/include/migraph/target.hpp
View file @
d918b57f
...
@@ -244,7 +244,7 @@ inline const ValueType& any_cast(const target& x)
...
@@ -244,7 +244,7 @@ inline const ValueType& any_cast(const target& x)
#endif
#endif
}
//
inline
namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
#endif
#endif
Prev
1
2
3
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