Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
matrix:
version:
- '1'
- '1.5'
- 'nightly'
- 'lts'
- 'pre'
os:
- ubuntu-latest
arch:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Downstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- 1
- 4
- 10
julia-version: [1,1.6]
julia-version: [1,'lts','pre']
os: [ubuntu-latest]
package:
- {user: JuliaSIMD, repo: LoopVectorization.jl, group: Interface}
Expand Down
10 changes: 5 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ version = "0.2.2"
[deps]
BitTwiddlingConvenienceFunctions = "62783981-4cbd-42fc-bca8-16325de8dc4b"
CPUSummary = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9"
IfElse = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173"
Static = "aedffcd0-7271-4cad-89d0-dc628f76c6d3"
ThreadingUtilities = "8290d209-cae3-49c0-8002-c8c24d57dab5"

[compat]
Aqua = "0.8"
BitTwiddlingConvenienceFunctions = "0.1"
CPUSummary = "0.1.2, 0.2"
IfElse = "0.1"
Static = "0.3.1, 0.4, 0.5, 0.6, 0.7, 0.8, 1"
ThreadingUtilities = "0.4.5, 0.5"
julia = "1.5"
Static = "1"
Test = "<0.1, 1.10"
ThreadingUtilities = "0.5"
julia = "1.10"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Expand Down
51 changes: 19 additions & 32 deletions src/PolyesterWeave.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,28 @@ end
using BitTwiddlingConvenienceFunctions: nextpow2
using ThreadingUtilities: _atomic_store!, _atomic_or!, _atomic_xchg!
using Static
using IfElse: ifelse

export request_threads, free_threads!

@static if VERSION ≥ v"1.6.0-DEV.674"
@inline function assume(b::Bool)
Base.llvmcall(
(
"""
declare void @llvm.assume(i1)

define void @entry(i8 %byte) alwaysinline {
top:
%bit = trunc i8 %byte to i1
call void @llvm.assume(i1 %bit)
ret void
}
""",
"entry"
),
Cvoid,
Tuple{Bool},
b
)
end
else
@inline assume(b::Bool) = Base.llvmcall(
(
"declare void @llvm.assume(i1)",
"%b = trunc i8 %0 to i1\ncall void @llvm.assume(i1 %b)\nret void"
),
Cvoid,
Tuple{Bool},
b
)
@inline function assume(b::Bool)
Base.llvmcall(
(
"""
declare void @llvm.assume(i1)

define void @entry(i8 %byte) alwaysinline {
top:
%bit = trunc i8 %byte to i1
call void @llvm.assume(i1 %bit)
ret void
}
""",
"entry"
),
Cvoid,
Tuple{Bool},
b
)
end

const WORKERS = Ref{NTuple{8,UInt64}}(ntuple(((zero ∘ UInt64)), Val(8)))
Expand Down
Loading