Skip to content

Commit

Permalink
Updated exports and deps based on the new spawn macro
Browse files Browse the repository at this point in the history
  • Loading branch information
smillerc committed Oct 20, 2022
1 parent 176ab07 commit 275719d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
4 changes: 1 addition & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
name = "BlockHaloArrays"
uuid = "8029ca6b-11ad-4a59-88a2-2e6eee4ef8a2"
authors = ["Sam Miller <[email protected]> and contributors"]
version = "0.4.8"
version = "0.4.9"

[deps]
EllipsisNotation = "da5c29d0-fa7d-589e-88eb-ea29b0a81949"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
NumaAllocators = "21436f30-1b4a-4f08-87af-e26101bb5379"
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
ThreadPools = "b189fb0b-2eb5-4ed4-bc0c-d34c51242431"

[compat]
EllipsisNotation = "1"
NumaAllocators = "0.2"
OffsetArrays = "1"
ThreadPools = "2"
julia = "1.6"

[extras]
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ end
Then the `stencil!()` function is split among threads via:
```julia
@sync for block_id in 1:nthreads()
ThreadPools.@tspawnat block_id stencil!(A, block_id)
@tspawnat block_id stencil!(A, block_id)
end
```

Expand Down Expand Up @@ -76,7 +76,7 @@ end

# Let each thread initialize it's own block
@sync for tid in 1:nblocks(A)
ThreadPools.@tspawnat tid init(A1)
@tspawnat tid init(A1)
end

# Let each block sync its halo region with its neighbors
Expand All @@ -91,7 +91,7 @@ Anew = flatten(A) # Anew is a 2D Array -- no longer a BlockHaloArray

- `flatten(A)`: Return a flattened `Array` of `A`. This is a copy.
- `repartition(A, nblocks)`: Repartition the BlockHaloArray into a different block layout
- `updatehalo!(A, include_periodic_bc=false)`: Sync all block halo regions. This uses a `@sync` loop with Threadpools.@tspawnat to sync each block.
- `updatehalo!(A, include_periodic_bc=false)`: Sync all block halo regions. This uses a `@sync` loop with @tspawnat to sync each block.
- `updateblockhalo!(A, block_id, include_periodic_bc=false)`: Sync the halo regions of a single block. No `@sync` or `@spawn` calls are used.
- `domainview(A, blockid)`: Return a view of a the domain (no halo regions) of block `blockid`
- `onboundary(A, blockid)`: Is the current block `blockid` on a boundary? This is used help apply boundary conditions in a user code.
Expand Down
1 change: 1 addition & 0 deletions src/BlockHaloArrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export domainview
export onboundary
export donorview, haloview
export blockindex, localindex
export @tspawnat

abstract type AbstractBlockHaloArray end

Expand Down
2 changes: 1 addition & 1 deletion test/unit/common.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using .Threads
using BlockHaloArrays
using EllipsisNotation
using ThreadPools: @tspawnat
using BlockHaloArrays: @tspawnat
using Test
# using TestItems, TestItemRunner

Expand Down

2 comments on commit 275719d

@smillerc
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/70702

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.4.9 -m "<description of version>" 275719dbf1abf8cb63d9d7db5556a85422c64778
git push origin v0.4.9

Please sign in to comment.