You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/parallel.jl
+11-13Lines changed: 11 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ Declare the `kernelcall` parallel. The kernel will automatically be called as re
38
38
Automatic computation of `ranges` for `@parallel <kernelcall>` is only possible if the number of parallel indices used by the kernel is equal to the number of dimensions of the highest-dimensional input arrays. Otherwise, specify the `ranges` manually with `@parallel ranges=... <kernelcall>`.
39
39
40
40
!!! note "Runtime hardware selection"
41
-
When KernelAbstractions is initialized, this wrapper consults [`current_hardware`](@ref) to determine the runtime hardware target. The symbol defaults to `:cpu` and can be switched to select other targets via [`select_hardware`](@ref).
41
+
When KernelAbstractions is chosen as the package for parallelization, this wrapper consults [`current_hardware`](@ref) to determine the runtime hardware target. The symbol defaults to `:cpu` and can be switched to select other targets via [`select_hardware`](@ref).
42
42
43
43
# Arguments
44
44
- `kernelcall`: a call to a kernel that is declared parallel.
ifhaskey(backend_kwargs_expr, :shmem) @KeywordArgumentError("@parallel <kernelcall>: keyword `shmem` is not allowed when memopt=true is set.") end
375
366
package =get_package(caller)
@@ -450,7 +441,7 @@ function compute_loopsize(package::Symbol)
450
441
end
451
442
452
443
453
-
## FUNCTIONS TO COMPUTE NTHREADS, NBLOCKS
444
+
## FUNCTIONS TO COMPUTE NTHREADS, NBLOCKS, SHARED MEMORY SIZE AND RANGES
454
445
455
446
functioncompute_nthreads_memopt(nthreads_x_max, nthreads_max_memopt, maxsize, loopdim, stencilranges) # This is a heuristic, which results typcially in (32,4,1) threads for a 3-D case.
456
447
maxsize =promote_maxsize(maxsize)
@@ -478,8 +469,6 @@ function get_ranges_memopt(nthreads_x_max, nthreads_max_memopt, loopdim, args...
478
469
end
479
470
480
471
481
-
## FUNCTIONS TO COMPUTE SHARED MEMORY SIZE AND RANGES FOR MEMOPT
0 commit comments