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
a5c1c7f6
Unverified
Commit
a5c1c7f6
authored
Feb 10, 2019
by
Paul Fultz II
Committed by
GitHub
Feb 10, 2019
Browse files
Merge branch 'develop' into mem_color_ordering_fix
parents
462a4920
d516b099
Changes
303
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
8 deletions
+21
-8
tools/include/pass.hpp
tools/include/pass.hpp
+5
-2
tools/include/target.hpp
tools/include/target.hpp
+5
-2
tools/te.py
tools/te.py
+11
-4
No files found.
tools/include/pass.hpp
View file @
a5c1c7f6
#ifndef MIGRAPH_GUARD_PASS_HPP
#define MIGRAPH_GUARD_PASS_HPP
#ifndef MIGRAPH
X
_GUARD_PASS_HPP
#define MIGRAPH
X
_GUARD_PASS_HPP
#include <cassert>
#include <string>
...
...
@@ -7,8 +7,10 @@
#include <memory>
#include <type_traits>
#include <utility>
#include <migraphx/config.hpp>
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
struct
program
;
...
...
@@ -35,6 +37,7 @@ interface('pass',
#endif
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
#endif
tools/include/target.hpp
View file @
a5c1c7f6
#ifndef MIGRAPH_GUARD_MIGRAPHLIB_TARGET_HPP
#define MIGRAPH_GUARD_MIGRAPHLIB_TARGET_HPP
#ifndef MIGRAPH
X
_GUARD_MIGRAPHLIB_TARGET_HPP
#define MIGRAPH
X
_GUARD_MIGRAPHLIB_TARGET_HPP
#include <cassert>
#include <string>
...
...
@@ -10,8 +10,10 @@
#include <vector>
#include <migraphx/context.hpp>
#include <migraphx/pass.hpp>
#include <migraphx/config.hpp>
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
#ifdef DOXYGEN
...
...
@@ -48,6 +50,7 @@ interface('target',
#endif
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
#endif
tools/te.py
View file @
a5c1c7f6
...
...
@@ -71,6 +71,11 @@ struct ${struct_name}
${nonvirtual_members}
friend bool is_shared(const ${struct_name} & private_detail_x, const ${struct_name} & private_detail_y)
{
return private_detail_x.private_detail_te_handle_mem_var == private_detail_y.private_detail_te_handle_mem_var;
}
private:
struct private_detail_te_handle_base_type
{
...
...
@@ -179,7 +184,7 @@ nonvirtual_member = string.Template('''
${friend} ${return_type} ${name}(${params}) ${const}
{
assert(${this}.private_detail_te_handle_mem_var);
return ${this}.private_detail_te_get_handle().${internal_name}(${member_args});
${
return
_}
${this}.private_detail_te_get_handle().${internal_name}(${member_args});
}
'''
)
...
...
@@ -189,7 +194,7 @@ virtual_member = string.Template('''
${return_type} ${internal_name}(${member_params}) ${member_const} override
{
${using}
return ${call};
${
return
_}
${call};
}
'''
)
...
...
@@ -240,7 +245,8 @@ def convert_member(d, struct_name):
'friend'
:
''
,
'this'
:
'(*this)'
,
'using'
:
''
,
'brief'
:
''
'brief'
:
''
,
'return_'
:
''
}
args
=
[]
params
=
[]
...
...
@@ -257,7 +263,8 @@ def convert_member(d, struct_name):
for
x
in
d
[
name
]:
t
=
d
[
name
][
x
]
if
x
==
'return'
:
member
[
'return_type'
]
=
t
member
[
'return_type'
]
=
t
if
t
else
'void'
if
member
[
'return_type'
]
!=
'void'
:
member
[
'return_'
]
=
'return'
elif
x
==
'const'
:
member
[
'const'
]
=
'const'
member
[
'member_const'
]
=
'const'
...
...
Prev
1
…
12
13
14
15
16
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