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
8d73a5c1
Commit
8d73a5c1
authored
Sep 21, 2017
by
Tianqi Chen
Committed by
GitHub
Sep 21, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CODEGEN] Fix Metal codegen when storage scope is needed (#469)
parent
a85ec885
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
src/codegen/codegen_c.cc
+4
-0
src/codegen/codegen_metal.cc
+2
-0
No files found.
src/codegen/codegen_c.cc
View file @
8d73a5c1
...
...
@@ -142,6 +142,10 @@ std::string CodeGenC::GetBufferRef(
os
<<
"*)("
;
if
(
!
HandleTypeMatch
(
buffer
,
t
.
element_of
()))
{
os
<<
'('
;
if
(
scope
.
length
()
!=
0
)
{
PrintStorageScope
(
scope
,
os
);
}
os
<<
' '
;
PrintType
(
t
.
element_of
(),
os
);
os
<<
"*)"
;
}
...
...
src/codegen/codegen_metal.cc
View file @
8d73a5c1
...
...
@@ -192,6 +192,8 @@ void CodeGenMetal::PrintStorageScope(
os
<<
"device"
;
}
else
if
(
scope
==
"shared"
)
{
os
<<
"threadgroup"
;
}
else
{
os
<<
"thread"
;
}
}
...
...
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