Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 1 addition & 25 deletions lib/intrinsics/src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,31 +34,7 @@ macro builtin_ccall(name, ret, argtypes, args...)
"d"
elseif T <: LLVMPtr
elt, as = T.parameters

# mangle address space
ASstr = if as == AS.CrossWorkgroup
"CLglobal"
#elseif as == AS.Global_device
# "CLdevice"
#elseif as == AS.Global_host
# "CLhost"
elseif as == AS.Workgroup
"CLlocal"
elseif as == AS.UniformConstant
"CLconstant"
elseif as == AS.Function
"CLprivate"
elseif as == AS.Generic
"CLgeneric"
else
error("Unknown address space $as")
end

# encode as vendor qualifier
ASstr = "U" * string(length(ASstr)) * ASstr

# XXX: where does the V come from?
"P" * ASstr * "V" * mangle(elt)
(as == AS.Private ? "P" : "PU3AS$as") * "V" * mangle(elt)
else
error("Unknown type $T")
end
Expand Down
Loading