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
d2549384
Commit
d2549384
authored
Feb 01, 2019
by
Khalique
Browse files
manual merge
parents
67048d04
ab6cd9d3
Changes
303
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
14 deletions
+27
-14
tools/include/pass.hpp
tools/include/pass.hpp
+7
-4
tools/include/target.hpp
tools/include/target.hpp
+9
-6
tools/te.py
tools/te.py
+11
-4
No files found.
tools/include/pass.hpp
View file @
d2549384
#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
migraph
{
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
struct
program
;
...
...
@@ -35,6 +37,7 @@ interface('pass',
#endif
}
// namespace migraph
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
#endif
tools/include/target.hpp
View file @
d2549384
#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>
...
...
@@ -8,10 +8,12 @@
#include <type_traits>
#include <utility>
#include <vector>
#include <migraph/context.hpp>
#include <migraph/pass.hpp>
#include <migraphx/context.hpp>
#include <migraphx/pass.hpp>
#include <migraphx/config.hpp>
namespace
migraph
{
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
#ifdef DOXYGEN
...
...
@@ -48,6 +50,7 @@ interface('target',
#endif
}
// namespace migraph
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
#endif
tools/te.py
View file @
d2549384
...
...
@@ -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