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
8 changes: 5 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
name = "Octavian"
uuid = "6fd5a793-0b7e-452c-907f-f8bfe9c57db4"
authors = ["Mason Protter", "Chris Elrod", "Dilum Aluthge", "contributors"]
version = "0.2.12"
version = "0.2.13"

[deps]
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
LoopVectorization = "bdcacae8-1622-11e9-2a5c-532679323890"
Static = "aedffcd0-7271-4cad-89d0-dc628f76c6d3"
StrideArraysCore = "7792a7ef-975c-4747-a70f-980b88e8d1da"
ThreadingUtilities = "8290d209-cae3-49c0-8002-c8c24d57dab5"
VectorizationBase = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f"

[compat]
ArrayInterface = "3"
LoopVectorization = "0.11,0.12"
LoopVectorization = "0.12"
Static = "0.2"
StrideArraysCore = "0.1.5"
ThreadingUtilities = "0.4"
VectorizationBase = "0.18,0.19"
VectorizationBase = "0.19"
julia = "1.5"

[extras]
Expand Down
1 change: 1 addition & 0 deletions src/Octavian.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ using ArrayInterface: OptionallyStaticUnitRange, size, strides, offsets, indices

using Static: StaticInt, Zero, One, StaticBool, True, False, gt, eq, StaticFloat64,
roundtostaticint, floortostaticint
using StrideArraysCore: MemoryBuffer

using ThreadingUtilities:
_atomic_add!, _atomic_load, _atomic_store!,
Expand Down
14 changes: 0 additions & 14 deletions src/memory_buffer.jl
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
@inline Base.unsafe_convert(::Type{Ptr{T}}, d::MemoryBuffer) where {T} = Base.unsafe_convert(Ptr{T}, Base.pointer_from_objref(d))
@inline MemoryBuffer{T}(::UndefInitializer, ::StaticInt{L}) where {L,T} = MemoryBuffer{L,T}(undef)
Base.size(::MemoryBuffer{L}) where L = (L,)
@inline Base.similar(::MemoryBuffer{L,T}) where {L,T} = MemoryBuffer{L,T}(undef)
# Base.IndexStyle(::Type{<:MemoryBuffer}) = Base.IndexLinear()
@inline function Base.getindex(m::MemoryBuffer{L,T}, i::Int) where {L,T}
@boundscheck checkbounds(m, i)
GC.@preserve m x = vload(pointer(m), VectorizationBase.lazymul(VectorizationBase.static_sizeof(T), i - one(i)))
x
end
@inline function Base.setindex!(m::MemoryBuffer{L,T}, x, i::Int) where {L,T}
@boundscheck checkbounds(m, i)
GC.@preserve m vstore!(pointer(m), convert(T, x), lazymul(static_sizeof(T), i - one(i)))
end

if Sys.WORD_SIZE == 32
@inline function first_cache_buffer(::Type{T}) where {T}
Expand Down
8 changes: 0 additions & 8 deletions src/types.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
mutable struct MemoryBuffer{L,T} <: DenseVector{T}
data::NTuple{L,T}
@inline function MemoryBuffer{L,T}(::UndefInitializer) where {L,T}
@assert isbitstype(T) "Memory buffers must point to bits types, but `isbitstype($T) == false`."
new{L,T}()
end
end

struct BCache{T<:Union{UInt,Nothing}}
p::Ptr{Cvoid}
i::T
Expand Down