@@ -2,27 +2,27 @@ module ArrayInterfaceGPUArrays
2
2
3
3
using Adapt
4
4
using ArrayInterfaceCore
5
- using GPUArrays
5
+ using GPUArraysCore
6
6
7
- ArrayInterfaceCore. fast_scalar_indexing (:: Type{<:GPUArrays .AbstractGPUArray} ) = false
8
- @inline ArrayInterfaceCore. allowed_getindex (x:: GPUArrays .AbstractGPUArray , i... ) = GPUArrays . @allowscalar (x[i... ])
9
- @inline ArrayInterfaceCore. allowed_setindex! (x:: GPUArrays .AbstractGPUArray , v, i... ) = (GPUArrays . @allowscalar (x[i... ] = v))
7
+ ArrayInterfaceCore. fast_scalar_indexing (:: Type{<:GPUArraysCore .AbstractGPUArray} ) = false
8
+ @inline ArrayInterfaceCore. allowed_getindex (x:: GPUArraysCore .AbstractGPUArray , i... ) = GPUArraysCore . @allowscalar (x[i... ])
9
+ @inline ArrayInterfaceCore. allowed_setindex! (x:: GPUArraysCore .AbstractGPUArray , v, i... ) = (GPUArraysCore . @allowscalar (x[i... ] = v))
10
10
11
- function Base. setindex (x:: GPUArrays .AbstractGPUArray , v, i:: Int )
11
+ function Base. setindex (x:: GPUArraysCore .AbstractGPUArray , v, i:: Int )
12
12
_x = copy (x)
13
13
ArrayInterfaceCore. allowed_setindex! (_x, v, i)
14
14
return _x
15
15
end
16
16
17
- function ArrayInterfaceCore. restructure (x:: GPUArrays .AbstractGPUArray , y)
17
+ function ArrayInterfaceCore. restructure (x:: GPUArraysCore .AbstractGPUArray , y)
18
18
reshape (Adapt. adapt (ArrayInterfaceCore. parameterless_type (x), y), Base. size (x)... )
19
19
end
20
20
21
- function ArrayInterfaceCore. lu_instance (A:: GPUArrays .AbstractGPUMatrix{T} ) where {T}
21
+ function ArrayInterfaceCore. lu_instance (A:: GPUArraysCore .AbstractGPUMatrix{T} ) where {T}
22
22
qr (similar (A, 1 , 1 ))
23
23
end
24
24
25
25
# Doesn't do much, but makes a gigantic change to the dependency chain.
26
- # ArrayInterface.device(::Type{<:GPUArrays .AbstractGPUArray}) = ArrayInterface.GPU()
26
+ # ArrayInterface.device(::Type{<:GPUArraysCore .AbstractGPUArray}) = ArrayInterface.GPU()
27
27
28
28
end
0 commit comments