@@ -13,7 +13,8 @@ Base.setindex!(A::MyMatrix, v, k::Int, j::Int) = setindex!(A.A, v, k, j)
1313Base. size (A:: MyMatrix ) = size (A. A)
1414Base. strides (A:: MyMatrix ) = strides (A. A)
1515Base. elsize (:: Type{MyMatrix} ) = sizeof (Float64)
16- Base. unsafe_convert (:: Type{Ptr{T}} , A:: MyMatrix ) where T = Base. unsafe_convert (Ptr{T}, A. A)
16+ Base. cconvert (:: Type{Ptr{Float64}} , A:: MyMatrix ) = A. A
17+ Base. unsafe_convert (:: Type{Ptr{Float64}} , A:: MyMatrix ) = Base. unsafe_convert (Ptr{Float64}, A. A)
1718MemoryLayout (:: Type{MyMatrix} ) = DenseColumnMajor ()
1819Base. copy (A:: MyMatrix ) = MyMatrix (copy (A. A))
1920
@@ -26,7 +27,8 @@ Base.setindex!(A::MyVector, v, k::Int) = setindex!(A.A, v, k)
2627Base. size (A:: MyVector ) = size (A. A)
2728Base. strides (A:: MyVector ) = strides (A. A)
2829Base. elsize (:: Type{MyVector} ) = sizeof (Float64)
29- Base. unsafe_convert (:: Type{Ptr{T}} , A:: MyVector ) where T = Base. unsafe_convert (Ptr{T}, A. A)
30+ Base. cconvert (:: Type{Ptr{T}} , A:: MyVector{T} ) where {T} = A. A
31+ Base. unsafe_convert (:: Type{Ptr{T}} , A:: MyVector{T} ) where T = Base. unsafe_convert (Ptr{T}, A. A)
3032MemoryLayout (:: Type{MyVector} ) = DenseColumnMajor ()
3133
3234# These need to test dispatch reduces to ArrayLayouts.mul, etc.
0 commit comments