@@ -13,7 +13,8 @@ Base.setindex!(A::MyMatrix, v, k::Int, j::Int) = setindex!(A.A, v, k, j)
13
13
Base. size (A:: MyMatrix ) = size (A. A)
14
14
Base. strides (A:: MyMatrix ) = strides (A. A)
15
15
Base. 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)
17
18
MemoryLayout (:: Type{MyMatrix} ) = DenseColumnMajor ()
18
19
Base. copy (A:: MyMatrix ) = MyMatrix (copy (A. A))
19
20
@@ -26,7 +27,8 @@ Base.setindex!(A::MyVector, v, k::Int) = setindex!(A.A, v, k)
26
27
Base. size (A:: MyVector ) = size (A. A)
27
28
Base. strides (A:: MyVector ) = strides (A. A)
28
29
Base. 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)
30
32
MemoryLayout (:: Type{MyVector} ) = DenseColumnMajor ()
31
33
32
34
# These need to test dispatch reduces to ArrayLayouts.mul, etc.
0 commit comments