Skip to content

Commit 8ef29ea

Browse files
committed
localmemory
1 parent 61f6756 commit 8ef29ea

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/KernelAbstractions.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,9 @@ include("macros.jl")
814814
###
815815

816816
function Scratchpad end
817-
function SharedMemory end
817+
function SharedMemory(t::Type{T}, dims::Val{Dims}, id::Val{Id}) where {T, Dims, Id}
818+
KernelIntrinsics.localmemory(t, dims, id)
819+
end
818820

819821
function __synchronize()
820822
error("@synchronize used outside kernel or not captured")

src/pocl/backend.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ end
166166

167167
## Shared and Scratch Memory
168168

169-
@device_override @inline function KA.SharedMemory(::Type{T}, ::Val{Dims}, ::Val{Id}) where {T, Dims, Id}
169+
@device_override @inline function KI.localmemory(::Type{T}, ::Val{Dims}, ::Val{Id}) where {T, Dims, Id}
170170
ptr = SPIRVIntrinsics.emit_localmemory(T, Val(prod(Dims)))
171171
CLDeviceArray(Dims, ptr)
172172
end

0 commit comments

Comments
 (0)