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
b7cba4b1
Commit
b7cba4b1
authored
May 06, 2018
by
Paul
Browse files
Add begin/end functions for instruction stream
parent
cf11f657
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
include/rtg/program.hpp
include/rtg/program.hpp
+3
-0
src/program.cpp
src/program.cpp
+9
-0
No files found.
include/rtg/program.hpp
View file @
b7cba4b1
...
@@ -52,6 +52,9 @@ struct program
...
@@ -52,6 +52,9 @@ struct program
bool
has_instruction
(
instruction_ref
ins
)
const
;
bool
has_instruction
(
instruction_ref
ins
)
const
;
instruction_ref
begin
();
instruction_ref
end
();
private:
private:
std
::
unique_ptr
<
program_impl
>
impl
;
std
::
unique_ptr
<
program_impl
>
impl
;
};
};
...
...
src/program.cpp
View file @
b7cba4b1
...
@@ -59,6 +59,15 @@ bool program::has_instruction(instruction_ref ins) const
...
@@ -59,6 +59,15 @@ bool program::has_instruction(instruction_ref ins) const
})
!=
impl
->
instructions
.
end
();
})
!=
impl
->
instructions
.
end
();
}
}
instruction_ref
program
::
begin
()
{
return
impl
->
instructions
.
begin
();
}
instruction_ref
program
::
end
()
{
return
impl
->
instructions
.
end
();
}
literal
program
::
eval
(
std
::
unordered_map
<
std
::
string
,
argument
>
params
)
const
literal
program
::
eval
(
std
::
unordered_map
<
std
::
string
,
argument
>
params
)
const
{
{
std
::
unordered_map
<
const
instruction
*
,
argument
>
results
;
std
::
unordered_map
<
const
instruction
*
,
argument
>
results
;
...
...
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