@@ -356,21 +356,23 @@ end
356
356
end
357
357
358
358
@inline function slab (data:: IJFH{S, Nij} , h:: Integer ) where {S, Nij}
359
- @boundscheck (1 <= h <= length (data)) || throw (BoundsError (data, (h,)))
359
+ @boundscheck (1 <= h <= size (parent (data), 4 )) ||
360
+ throw (BoundsError (data, (h,)))
360
361
dataview = @inbounds view (parent (data), :, :, :, h)
361
362
IJF {S, Nij} (dataview)
362
363
end
363
364
364
365
@inline function slab (data:: IJFH{S, Nij} , v:: Integer , h:: Integer ) where {S, Nij}
365
- @boundscheck (v >= 1 && 1 <= h <= length ( data)) ||
366
+ @boundscheck (v >= 1 && 1 <= h <= size ( parent ( data), 4 )) ||
366
367
throw (BoundsError (data, (v, h)))
367
368
dataview = @inbounds view (parent (data), :, :, :, h)
368
369
IJF {S, Nij} (dataview)
369
370
end
370
371
371
372
@inline function column (data:: IJFH{S, Nij} , i, j, h) where {S, Nij}
372
- @boundscheck (1 <= j <= Nij && 1 <= i <= Nij && 1 <= h <= length (data)) ||
373
- throw (BoundsError (data, (i, j, h)))
373
+ @boundscheck (
374
+ 1 <= j <= Nij && 1 <= i <= Nij && 1 <= h <= size (parent (data), 4 )
375
+ ) || throw (BoundsError (data, (i, j, h)))
374
376
dataview = @inbounds view (parent (data), i, j, :, h)
375
377
DataF {S} (dataview)
376
378
end
@@ -449,14 +451,15 @@ function Base.fill!(data::IFH, val)
449
451
end
450
452
451
453
@inline function slab (data:: IFH{S, Ni} , h:: Integer ) where {S, Ni}
452
- @boundscheck (1 <= h <= length (data)) || throw (BoundsError (data, (h,)))
454
+ @boundscheck (1 <= h <= size (parent (data), 3 )) ||
455
+ throw (BoundsError (data, (h,)))
453
456
dataview = @inbounds view (parent (data), :, :, h)
454
457
IF {S, Ni} (dataview)
455
458
end
456
459
Base. @propagate_inbounds slab (data:: IFH , v:: Integer , h:: Integer ) = slab (data, h)
457
460
458
461
@inline function column (data:: IFH{S, Ni} , i, h) where {S, Ni}
459
- @boundscheck (1 <= h <= length ( data) && 1 <= i <= Ni) ||
462
+ @boundscheck (1 <= h <= size ( parent ( data), 3 ) && 1 <= i <= Ni) ||
460
463
throw (BoundsError (data, (i, h)))
461
464
dataview = @inbounds view (parent (data), i, :, h)
462
465
DataF {S} (dataview)
969
972
end
970
973
971
974
@inline function Base. setindex! (data:: VF{S} , val, v:: Integer ) where {S}
972
- @boundscheck (1 <= v <= length (parent (data))) ||
975
+ @boundscheck (1 <= v <= size (parent (data), 1 )) ||
973
976
throw (BoundsError (data, (v,)))
974
977
@inbounds set_struct! (
975
978
parent (data),
0 commit comments