diff --git a/Project.toml b/Project.toml index f5a2c90..80ad99d 100644 --- a/Project.toml +++ b/Project.toml @@ -1,20 +1,18 @@ name = "BlockHaloArrays" uuid = "8029ca6b-11ad-4a59-88a2-2e6eee4ef8a2" authors = ["Sam Miller 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] diff --git a/README.md b/README.md index 8ea3df3..d799b23 100644 --- a/README.md +++ b/README.md @@ -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 ``` @@ -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 @@ -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. diff --git a/src/BlockHaloArrays.jl b/src/BlockHaloArrays.jl index e2d4176..69654f3 100644 --- a/src/BlockHaloArrays.jl +++ b/src/BlockHaloArrays.jl @@ -15,6 +15,7 @@ export domainview export onboundary export donorview, haloview export blockindex, localindex +export @tspawnat abstract type AbstractBlockHaloArray end diff --git a/test/unit/common.jl b/test/unit/common.jl index d5ed54e..0a8ac3c 100644 --- a/test/unit/common.jl +++ b/test/unit/common.jl @@ -1,7 +1,7 @@ using .Threads using BlockHaloArrays using EllipsisNotation -using ThreadPools: @tspawnat +using BlockHaloArrays: @tspawnat using Test # using TestItems, TestItemRunner