@@ -101,23 +101,7 @@ function __init__()
101
101
102
102
@require CuArrays = " 3a865a2d-5b23-5a0f-bc46-62713ec82fae" begin
103
103
@require Adapt = " 79e6a3ab-5dfb-504d-930d-738a2a938a0e" begin
104
- fast_scalar_indexing (:: Type{<:CuArrays.CuArray} ) = false
105
- @inline allowed_getindex (x:: CuArrays.CuArray , i... ) = CuArrays. @allowscalar (x[i... ])
106
- @inline function allowed_setindex! (x:: CuArrays.CuArray , v, i... )
107
- (CuArrays. @allowscalar (x[i... ] = v))
108
- end
109
-
110
- function Base. setindex (x:: CuArrays.CuArray , v, i:: Int )
111
- _x = copy (x)
112
- allowed_setindex! (_x, v, i)
113
- return _x
114
- end
115
-
116
- function restructure (x:: CuArrays.CuArray , y)
117
- return reshape (Adapt. adapt (parameterless_type (x), y), Base. size (x)... )
118
- end
119
-
120
- device (:: Type{<:CuArrays.CuArray} ) = GPU ()
104
+ include (" cuarrays.jl" )
121
105
end
122
106
@require DiffEqBase = " 2b5f629d-d688-5b77-993f-72d75c75574e" begin
123
107
# actually do QR
@@ -129,30 +113,15 @@ function __init__()
129
113
130
114
@require CUDA = " 052768ef-5323-5732-b1bb-66c8b64840ba" begin
131
115
@require Adapt = " 79e6a3ab-5dfb-504d-930d-738a2a938a0e" begin
132
- fast_scalar_indexing (:: Type{<:CUDA.CuArray} ) = false
133
- @inline allowed_getindex (x:: CUDA.CuArray , i... ) = CUDA. @allowscalar (x[i... ])
134
- @inline allowed_setindex! (x:: CUDA.CuArray , v, i... ) = (CUDA. @allowscalar (x[i... ] = v))
135
-
136
- function Base. setindex (x:: CUDA.CuArray , v, i:: Int )
137
- _x = copy (x)
138
- allowed_setindex! (_x, v, i)
139
- return _x
140
- end
141
-
142
- function restructure (x:: CUDA.CuArray , y)
143
- return reshape (Adapt. adapt (parameterless_type (x), y), Base. size (x)... )
144
- end
145
-
146
- device (:: Type{<:CUDA.CuArray} ) = GPU ()
116
+ include (" cuarrays2.jl" )
147
117
end
148
118
@require DiffEqBase = " 2b5f629d-d688-5b77-993f-72d75c75574e" begin
149
119
# actually do QR
150
- function uu_instance (A:: CUDA.CuMatrix{T} ) where {T}
120
+ function lu_instance (A:: CUDA.CuMatrix{T} ) where {T}
151
121
return CUDA. CUSOLVER. CuQR (similar (A, 0 , 0 ), similar (A, 0 ))
152
122
end
153
123
end
154
124
end
155
-
156
125
@require BandedMatrices = " aae01518-5342-5314-be14-df237901396f" begin
157
126
struct BandedMatrixIndex <: MatrixIndex
158
127
count:: Int
0 commit comments