@@ -155,7 +155,7 @@ function Base.reshape(a::AbstractGPUArray{T,M}, dims::NTuple{N,Int}) where {T,N,
155
155
return a
156
156
end
157
157
158
- derive (T, N, a, dims, 0 )
158
+ derive (T, a, dims, 0 )
159
159
end
160
160
161
161
@@ -173,7 +173,7 @@ function Base.reinterpret(::Type{T}, a::AbstractGPUArray{S,N}) where {T,S,N}
173
173
osize = tuple (size1, Base. tail (isize)... )
174
174
end
175
175
176
- return derive (T, N, a, osize, 0 )
176
+ return derive (T, a, osize, 0 )
177
177
end
178
178
179
179
function _reinterpret_exception (:: Type{T} , a:: AbstractArray{S,N} ) where {T,S,N}
229
229
# # reinterpret(reshape)
230
230
231
231
function Base. reinterpret (:: typeof (reshape), :: Type{T} , a:: AbstractGPUArray ) where {T}
232
- N, osize = _base_check_reshape_reinterpret (T, a)
233
- return derive (T, N, a, osize, 0 )
232
+ osize = _base_check_reshape_reinterpret (T, a)
233
+ return derive (T, a, osize, 0 )
234
234
end
235
235
236
236
# taken from reinterpretarray.jl
@@ -240,21 +240,20 @@ function _base_check_reshape_reinterpret(::Type{T}, a::AbstractGPUArray{S}) wher
240
240
isbitstype (S) || throwbits (S, T, S)
241
241
if sizeof (S) == sizeof (T)
242
242
N = ndims (a)
243
- osize = size (a)
243
+ size (a)
244
244
elseif sizeof (S) > sizeof (T)
245
245
d, r = divrem (sizeof (S), sizeof (T))
246
246
r == 0 || throwintmult (S, T)
247
247
N = ndims (a) + 1
248
- osize = (d, size (a)... )
248
+ (d, size (a)... )
249
249
else
250
250
d, r = divrem (sizeof (T), sizeof (S))
251
251
r == 0 || throwintmult (S, T)
252
252
N = ndims (a) - 1
253
253
N > - 1 || throwsize0 (S, T, " larger" )
254
254
axes (a, 1 ) == Base. OneTo (sizeof (T) ÷ sizeof (S)) || throwsize1 (a, T)
255
- osize = size (a)[2 : end ]
255
+ size (a)[2 : end ]
256
256
end
257
- return N, osize
258
257
end
259
258
260
259
@noinline function throwbits (S:: Type , T:: Type , U:: Type )
321
320
@inline function unsafe_contiguous_view (a:: AbstractGPUArray{T} , I:: NTuple{N,Base.ViewIndex} , dims:: NTuple{M,Integer} ) where {T,N,M}
322
321
offset = Base. compute_offset1 (a, 1 , I)
323
322
324
- derive (T, M, a, dims, offset)
323
+ derive (T, a, dims, offset)
325
324
end
326
325
327
326
@inline function unsafe_view (A, I, :: NonContiguous )
0 commit comments