KernelAbstractions.jl can be used to accelerate the function
|
function streamfunctionfrompv!(ψh, qh, params, grid) |
|
for j=1:grid.nl, i=1:grid.nkr |
|
CUDA.@allowscalar @views ψh[i, j, :] .= params.invS[i, j] * qh[i, j, :] |
|
end |
A simple example showing how to use KernelAbstractions is the "Naive Transpose":
https://juliagpu.gitlab.io/KernelAbstractions.jl/examples/naive_transpose/
KernelAbstractions.jlcan be used to accelerate the functionGeophysicalFlows.jl/src/multilayerqg.jl
Lines 299 to 302 in 47a2b51
A simple example showing how to use
KernelAbstractionsis the "Naive Transpose":https://juliagpu.gitlab.io/KernelAbstractions.jl/examples/naive_transpose/