Skip to content

Commit

Permalink
feat: support Static 1+
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Aug 2, 2024
1 parent d9ef1e0 commit f899df0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Octavian"
uuid = "6fd5a793-0b7e-452c-907f-f8bfe9c57db4"
authors = ["Chris Elrod", "Dilum Aluthge", "Mason Protter", "contributors"]
version = "0.3.27"
version = "0.3.28"

[deps]
CPUSummary = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9"
Expand Down Expand Up @@ -34,7 +34,7 @@ LoopVectorization = "0.12.86"
ManualMemory = "0.1.1"
PolyesterWeave = "0.1.1, 0.2"
PrecompileTools = "1"
Static = "0.8.4"
Static = "0.8.4, 1"
StaticArrayInterface = "1"
ThreadingUtilities = "0.5"
VectorizationBase = "0.21.15"
Expand Down
4 changes: 2 additions & 2 deletions src/matmul.jl
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ function sync_mul!(
while _atomic_load(atomp) sync_iters
pause()
end
atomp += cache_linesize()
atomp = __add(atomp, cache_linesize())
end
end
# multiply
Expand Down Expand Up @@ -994,7 +994,7 @@ function sync_mul!(
while _atomic_load(atomp + 4) sync_iters
pause()
end
atomp += cache_linesize()
atomp = __add(atomp, cache_linesize())
end
end
end
Expand Down
4 changes: 4 additions & 0 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,7 @@ end
stridedpointer($gf(sp, :p), si, StaticInt{$Bn}())
end
end

__add(x, y) = x + y
__add(x::Ptr, ::StaticInt{N}) where {N} = x + N
__add(::StaticInt{N}, y::Ptr) where {N} = y + N

0 comments on commit f899df0

Please sign in to comment.