JuliaGPU / JuliaGPU/KernelAbstractions.jl
Stencil example
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 523
- Forks
- 88
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 25
Description
@dpsanders
using KernelAbstractions
using OffsetArrays
@kernel function update!(A, @Const(B))
i, j = @index(Global, NTuple)
acc = zero(eltype(A))
for m in -1:1
for n in -1:1
acc += B[i+m, j+n]
end
end
A[i, j] = acc
end
N = 64
B = OffsetArray(ones(N+2, N+2), 0:N+1, 0:N+1)
A = OffsetArray(ones(N+2, N+2), 0:N+1, 0:N+1)
kernel = update!(CPU(), (4,4), (N,N))
wait(kernel(A, B))
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue provides only a Julia stencil example using KernelAbstractions and OffsetArrays; begin by reproducing the snippet and inspecting the update! kernel entry point. No file, test, or requested outcome is identified, so confirm the intended change and define what a completed example should demonstrate before editing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- hpc
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100