Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
3c9e262f
Commit
3c9e262f
authored
Sep 03, 2017
by
ziheng
Committed by
Tianqi Chen
Sep 03, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] Fix build error: call to 'make_const' is ambiguous (#415)
parent
e05f54be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/pass/inject_double_buffer.cc
+3
-3
No files found.
src/pass/inject_double_buffer.cc
View file @
3c9e262f
...
...
@@ -123,7 +123,7 @@ class DoubleBufferInjector : public IRMutator {
Var
outer_var
(
old_loop
->
loop_var
->
name_hint
+
".outer"
,
old_loop
->
loop_var
.
type
());
std
::
unordered_map
<
const
Variable
*
,
Expr
>
vmap
;
std
::
vector
<
Stmt
>
loop_seq
;
for
(
size
_t
i
=
0
;
i
<
split_loop_
;
++
i
)
{
for
(
int32
_t
i
=
0
;
i
<
split_loop_
;
++
i
)
{
vmap
[
old_loop
->
loop_var
.
get
()]
=
outer_var
*
factor
+
make_const
(
factor
.
type
(),
i
);
loop_seq
.
emplace_back
(
Substitute
(
old_loop
->
body
,
vmap
));
}
...
...
@@ -133,7 +133,7 @@ class DoubleBufferInjector : public IRMutator {
// tail
std
::
vector
<
Stmt
>
tail_seq
;
Stmt
tail_body
=
StripDoubleBufferWrite
().
Mutate
(
old_loop
->
body
);
for
(
size
_t
i
=
0
;
i
<
split_loop_
;
++
i
)
{
for
(
int32
_t
i
=
0
;
i
<
split_loop_
;
++
i
)
{
Expr
idx
=
tail_base
+
make_const
(
tail_base
.
type
(),
i
);
vmap
[
old_loop
->
loop_var
.
get
()]
=
idx
;
tail_seq
.
emplace_back
(
...
...
@@ -238,7 +238,7 @@ class DoubleBufferInjector : public IRMutator {
std
::
string
scope
;
};
// Whether split loop
int
split_loop_
;
int
32_t
split_loop_
;
// Whether we are inside double buffer scope.
bool
in_double_buffer_scope_
{
false
};
// The current loop 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