Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
HeteroFlow
THAPI
Commits
b1f78dc2
Commit
b1f78dc2
authored
Mar 11, 2021
by
Brice Videau
Browse files
Add cast_type field to babeltrace model.
parent
3e5990b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
opencl/gen_babeltrace_model.rb
View file @
b1f78dc2
...
...
@@ -68,9 +68,15 @@ schema_event = OPENCL_MODEL['events'].map { |name, fields|
payload_fields
=
fields
.
map
{
|
sub_name
,
field
|
field
[
'name'
]
=
sub_name
parsed_field
=
parse_field
(
field
)
cast_type
=
"
#{
field
[
'type'
].
gsub
(
'cl_errcode'
,
'cl_int'
)
}
"
cast_type
<<
' *'
if
field
[
'pointer'
]
cast_type
<<
' *'
if
field
[
'array'
]
cast_type
<<
' *'
if
field
[
'string'
]
parsed_field
[
:cast_type
]
=
cast_type
if
field
[
'array'
]
&&
field
[
'lttng'
].
match
(
'ctf_sequence'
)
additional_parsed_field
=
parse_field
({
'name'
=>
"_
#{
sub_name
}
_length"
,
'lttng'
=>
'ctf_integer'
,
'type'
=>
'size_t'
})
additional_parsed_field
[
:cast_type
]
=
'size_t'
[
additional_parsed_field
,
parsed_field
]
else
parsed_field
...
...
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