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
836efeb3
Commit
836efeb3
authored
May 02, 2022
by
umangyadav
Browse files
formatting
parent
2ecf0dd2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
10 deletions
+6
-10
src/api/include/migraphx/migraphx.hpp
src/api/include/migraphx/migraphx.hpp
+2
-8
src/api/migraphx.py
src/api/migraphx.py
+4
-2
No files found.
src/api/include/migraphx/migraphx.hpp
View file @
836efeb3
...
@@ -879,10 +879,7 @@ struct value : MIGRAPHX_HANDLE_BASE(value)
...
@@ -879,10 +879,7 @@ struct value : MIGRAPHX_HANDLE_BASE(value)
return
{
str_array
.
data
()};
return
{
str_array
.
data
()};
}
}
std
::
string
if_string
()
const
std
::
string
if_string
()
const
{
return
this
->
is_string
()
?
this
->
get_string
()
:
""
;
}
{
return
this
->
is_string
()
?
this
->
get_string
()
:
""
;
}
#define MIGRAPHX_VISIT_VALUE_TYPES(m) \
#define MIGRAPHX_VISIT_VALUE_TYPES(m) \
m(int64, std::int64_t) m(uint64, std::uint64_t) m(float, double) m(bool, bool)
m(int64, std::int64_t) m(uint64, std::uint64_t) m(float, double) m(bool, bool)
...
@@ -905,10 +902,7 @@ struct value : MIGRAPHX_HANDLE_BASE(value)
...
@@ -905,10 +902,7 @@ struct value : MIGRAPHX_HANDLE_BASE(value)
call(&migraphx_value_get_##vt, &get_value, this->get_handle_ptr()); \
call(&migraphx_value_get_##vt, &get_value, this->get_handle_ptr()); \
return get_value; \
return get_value; \
} \
} \
const cpp_type* if_##vt() const \
const cpp_type* if_##vt() const { return this->is_##vt() ? &(this->get_##vt()) : nullptr; }
{ \
return this->is_##vt() ? &(this->get_##vt()) : nullptr; \
}
MIGRAPHX_VISIT_VALUE_TYPES
(
MIGRAPHX_VALUE_GENERATE_DEFINE_METHODS
)
MIGRAPHX_VISIT_VALUE_TYPES
(
MIGRAPHX_VALUE_GENERATE_DEFINE_METHODS
)
};
};
...
...
src/api/migraphx.py
View file @
836efeb3
...
@@ -233,8 +233,10 @@ def value(h):
...
@@ -233,8 +233,10 @@ def value(h):
for
vt
,
cpp_type
in
zip
(
vt
,
cpp_types
):
for
vt
,
cpp_type
in
zip
(
vt
,
cpp_types
):
h
.
constructor
(
'create_{}'
.
format
(
vt
),
api
.
params
(
i
=
cpp_type
))
h
.
constructor
(
'create_{}'
.
format
(
vt
),
api
.
params
(
i
=
cpp_type
))
h
.
constructor
(
'create_{}_with_key'
.
format
(
vt
),
h
.
constructor
(
'create_{}_with_key'
.
format
(
vt
),
api
.
params
(
pkey
=
'const char*'
,
i
=
cpp_type
))
api
.
params
(
pkey
=
'const char*'
,
i
=
cpp_type
))
h
.
method
(
'if_{}'
.
format
(
vt
),
returns
=
'const '
+
cpp_type
+
'*'
,
const
=
True
)
h
.
method
(
'if_{}'
.
format
(
vt
),
returns
=
'const '
+
cpp_type
+
'*'
,
const
=
True
)
h
.
method
(
'is_{}'
.
format
(
vt
),
returns
=
'bool'
,
const
=
True
)
h
.
method
(
'is_{}'
.
format
(
vt
),
returns
=
'bool'
,
const
=
True
)
h
.
method
(
'get_{}'
.
format
(
vt
),
returns
=
cpp_type
,
const
=
True
)
h
.
method
(
'get_{}'
.
format
(
vt
),
returns
=
cpp_type
,
const
=
True
)
...
...
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