Skip to content

Commit

Permalink
Docstring for MPISharedArray
Browse files Browse the repository at this point in the history
  • Loading branch information
johnomotani committed Sep 16, 2024
1 parent 29e3a94 commit f5949f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/src/developing.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ It might be convenient to add `using Revise` to your `startup.jl` file (`~/julia
## Array types

Most arrays in `moment_kinetics` are declared using a custom array type
`MPISharedArray`. Most of the time this type is just an alias for `Array`, and
so it needs the same template parameters (see [Julia's Array
[`moment_kinetics.communication.MPISharedArray`](@ref). Most of the time this
type is just an alias for `Array`, and so it needs the same template parameters
(see [Julia's Array
documentation](https://docs.julialang.org/en/v1/manual/arrays/)) - the data
type and the number of dimensions, e.g. `MPISharedArray{mk_float,3}`. Although
these arrays use shared memory, Julia does not know about this. We use
Expand Down
3 changes: 3 additions & 0 deletions moment_kinetics/src/communication.jl
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,9 @@ end
end

"""
Type used to declare a shared-memory array. When debugging is not active `MPISharedArray`
is just an alias for `Array`, but when `@debug_shared_array` is activated, it is instead
defined as an alias for `DebugMPISharedArray`.
"""
const MPISharedArray = @debug_shared_array_ifelse(DebugMPISharedArray, Array)

Expand Down

0 comments on commit f5949f8

Please sign in to comment.