Commit 8d73a5c1 by Tianqi Chen Committed by GitHub

[CODEGEN] Fix Metal codegen when storage scope is needed (#469)

parent a85ec885
......@@ -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 << "*)";
}
......
......@@ -192,6 +192,8 @@ void CodeGenMetal::PrintStorageScope(
os << "device";
} else if (scope == "shared") {
os << "threadgroup";
} else {
os << "thread";
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment