Skip to content

Commit 8b3cd40

Browse files
committed
better host array detection
1 parent 528d02b commit 8b3cd40

1 file changed

Lines changed: 2 additions & 13 deletions

File tree

src/linalg.jl

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ function LinearAlgebra.mul!(
7272
return C
7373
end
7474

75-
isblasmatrix(A::StridedView{T, 2}) where {T} = false
76-
function isblasmatrix(A::StridedView{T, 2, <:Array}) where {T <: LinearAlgebra.BlasFloat}
75+
function isblasmatrix(A::StridedView{T, 2}) where {T <: LinearAlgebra.BlasFloat}
76+
pointer(x) isa Ptr || return false
7777
if A.op == identity
7878
return stride(A, 1) == 1 || stride(A, 2) == 1
7979
elseif A.op == conj
@@ -82,17 +82,6 @@ function isblasmatrix(A::StridedView{T, 2, <:Array}) where {T <: LinearAlgebra.B
8282
return false
8383
end
8484
end
85-
@static if isdefined(Core, :Memory)
86-
function isblasmatrix(A::StridedView{T, 2, <:Memory}) where {T <: LinearAlgebra.BlasFloat}
87-
if A.op == identity
88-
return stride(A, 1) == 1 || stride(A, 2) == 1
89-
elseif A.op == conj
90-
return stride(A, 2) == 1
91-
else # should never happen
92-
return false
93-
end
94-
end
95-
end
9685
function getblasmatrix(A::StridedView{T, 2}) where {T <: LinearAlgebra.BlasFloat}
9786
if A.op == identity
9887
if stride(A, 1) == 1

0 commit comments

Comments
 (0)