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: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
name = "ArrayLayouts"
uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
authors = ["Sheehan Olver <[email protected]>"]
version = "0.4.7"
version = "0.4.8"

[deps]
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[compat]
Compat = "3.16"
FillArrays = "0.9.1"
julia = "1"

Expand Down
6 changes: 1 addition & 5 deletions src/ArrayLayouts.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module ArrayLayouts
using Base, Base.Broadcast, LinearAlgebra, FillArrays, SparseArrays
using Base, Base.Broadcast, LinearAlgebra, FillArrays, SparseArrays, Compat
import LinearAlgebra.BLAS

import Base: AbstractArray, AbstractMatrix, AbstractVector,
Expand Down Expand Up @@ -83,10 +83,6 @@ struct ConjPtr{T}
ptr::Ptr{T}
end

if VERSION < v"1.5-"
unsafe_convert(::Type{Ptr{T}}, A::Adjoint{<:Real}) where T<:Real = unsafe_convert(Ptr{T}, parent(A))
unsafe_convert(::Type{Ptr{T}}, A::Transpose) where T = unsafe_convert(Ptr{T}, parent(A))
end

# work-around issue with complex conjugation of pointer
unsafe_convert(::Type{Ptr{T}}, Ac::Adjoint{<:Complex}) where T<:Complex = unsafe_convert(ConjPtr{T}, parent(Ac))
Expand Down
9 changes: 8 additions & 1 deletion test/test_muladd.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
using ArrayLayouts, FillArrays, Random, Test
import ArrayLayouts: DenseColumnMajor, AbstractStridedLayout, AbstractColumnMajor, DiagonalLayout, mul, Mul
import ArrayLayouts: DenseColumnMajor, AbstractStridedLayout, AbstractColumnMajor, DiagonalLayout, mul, Mul, zero!

Random.seed!(0)
@testset "Multiplication" begin
@testset "zero!" begin
for A in (randn(5,5), [randn(5,5),randn(4,4)])
zero!(A)
@test iszero(A)
end
end

@testset "Matrix * Vector" begin
@testset "eltype" begin
v = MulAdd(1,zeros(Int,2,2), zeros(Float64,2),0,zeros(2))
Expand Down