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
ca69e522
Commit
ca69e522
authored
Nov 05, 2018
by
Shucai Xiao
Browse files
clang format for all changed files.
parent
d79346d1
Changes
95
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
59 additions
and
39 deletions
+59
-39
src/include/migraph/functional.hpp
src/include/migraph/functional.hpp
+3
-2
src/include/migraph/fwd_conv_batchnorm_rewrite.hpp
src/include/migraph/fwd_conv_batchnorm_rewrite.hpp
+3
-2
src/include/migraph/generate.hpp
src/include/migraph/generate.hpp
+3
-2
src/include/migraph/half.hpp
src/include/migraph/half.hpp
+3
-2
src/include/migraph/instruction.hpp
src/include/migraph/instruction.hpp
+3
-2
src/include/migraph/instruction_ref.hpp
src/include/migraph/instruction_ref.hpp
+3
-2
src/include/migraph/iterator_for.hpp
src/include/migraph/iterator_for.hpp
+3
-2
src/include/migraph/literal.hpp
src/include/migraph/literal.hpp
+3
-2
src/include/migraph/make_shared_array.hpp
src/include/migraph/make_shared_array.hpp
+3
-2
src/include/migraph/manage_ptr.hpp
src/include/migraph/manage_ptr.hpp
+3
-2
src/include/migraph/matcher.hpp
src/include/migraph/matcher.hpp
+3
-2
src/include/migraph/memory_coloring.hpp
src/include/migraph/memory_coloring.hpp
+3
-2
src/include/migraph/onnx.hpp
src/include/migraph/onnx.hpp
+3
-2
src/include/migraph/operation.hpp
src/include/migraph/operation.hpp
+2
-1
src/include/migraph/operators.hpp
src/include/migraph/operators.hpp
+3
-2
src/include/migraph/pass.hpp
src/include/migraph/pass.hpp
+3
-2
src/include/migraph/pass_config.hpp
src/include/migraph/pass_config.hpp
+3
-2
src/include/migraph/program.hpp
src/include/migraph/program.hpp
+3
-2
src/include/migraph/ranges.hpp
src/include/migraph/ranges.hpp
+3
-2
src/include/migraph/rank.hpp
src/include/migraph/rank.hpp
+3
-2
No files found.
src/include/migraph/functional.hpp
View file @
ca69e522
...
...
@@ -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
src/include/migraph/fwd_conv_batchnorm_rewrite.hpp
View file @
ca69e522
...
...
@@ -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
src/include/migraph/generate.hpp
View file @
ca69e522
...
...
@@ -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
src/include/migraph/half.hpp
View file @
ca69e522
...
...
@@ -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
src/include/migraph/instruction.hpp
View file @
ca69e522
...
...
@@ -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
{
...
...
src/include/migraph/instruction_ref.hpp
View file @
ca69e522
...
...
@@ -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
src/include/migraph/iterator_for.hpp
View file @
ca69e522
...
...
@@ -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
src/include/migraph/literal.hpp
View file @
ca69e522
...
...
@@ -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
src/include/migraph/make_shared_array.hpp
View file @
ca69e522
...
...
@@ -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
src/include/migraph/manage_ptr.hpp
View file @
ca69e522
...
...
@@ -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) \
...
...
src/include/migraph/matcher.hpp
View file @
ca69e522
...
...
@@ -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
src/include/migraph/memory_coloring.hpp
View file @
ca69e522
...
...
@@ -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
src/include/migraph/onnx.hpp
View file @
ca69e522
...
...
@@ -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
src/include/migraph/operation.hpp
View file @
ca69e522
...
...
@@ -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
...
...
src/include/migraph/operators.hpp
View file @
ca69e522
...
...
@@ -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
...
...
@@ -858,7 +859,7 @@ struct outline
};
}
// namespace op
}
//
inline
namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/pass.hpp
View file @
ca69e522
...
...
@@ -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
src/include/migraph/pass_config.hpp
View file @
ca69e522
...
...
@@ -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
src/include/migraph/program.hpp
View file @
ca69e522
...
...
@@ -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
src/include/migraph/ranges.hpp
View file @
ca69e522
...
...
@@ -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
src/include/migraph/rank.hpp
View file @
ca69e522
...
...
@@ -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
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