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
19ebf40d
"vscode:/vscode.git/clone" did not exist on "1e03871748dc1321766eabc1146f12e925a77954"
Commit
19ebf40d
authored
May 26, 2023
by
Paul
Browse files
Format
parent
f20af942
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
src/targets/gpu/compile_ops.cpp
src/targets/gpu/compile_ops.cpp
+7
-9
No files found.
src/targets/gpu/compile_ops.cpp
View file @
19ebf40d
...
...
@@ -87,14 +87,11 @@ struct problem_cache
{
cache
[
create_key
(
name
,
problem
)]
=
solution
;
}
void
mark
(
const
std
::
string
&
name
,
const
value
&
problem
)
{
insert
(
name
,
problem
,
value
{});
}
void
mark
(
const
std
::
string
&
name
,
const
value
&
problem
)
{
insert
(
name
,
problem
,
value
{});
}
optional
<
value
>
get
(
const
std
::
string
&
name
,
const
value
&
problem
)
const
{
auto
it
=
cache
.
find
(
create_key
(
name
,
problem
));
if
(
it
==
cache
.
end
())
if
(
it
==
cache
.
end
())
return
nullopt
;
return
it
->
second
;
}
...
...
@@ -189,7 +186,7 @@ struct compile_manager
problem_cache
pc
;
std
::
vector
<
compile_plan
>
cps
;
template
<
class
...
Ts
>
template
<
class
...
Ts
>
void
add_plan
(
Ts
&&
...
xs
)
{
cps
.
push_back
({
std
::
forward
<
Ts
>
(
xs
)...});
...
...
@@ -218,9 +215,10 @@ struct compile_manager
}
// Remove compile_plan already executed
cps
.
erase
(
std
::
remove_if
(
cps
.
begin
(),
cps
.
end
(),
[](
const
auto
&
cp
)
{
return
not
cp
.
results
.
empty
();
}),
cps
.
end
());
cps
.
erase
(
std
::
remove_if
(
cps
.
begin
(),
cps
.
end
(),
[](
const
auto
&
cp
)
{
return
not
cp
.
results
.
empty
();
}),
cps
.
end
());
}
};
...
...
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