The part lo .. hi of points i1 .. i2 that chunk j holds, and its buffer p(xyz and distance, high/low, lo:hi) (null if none).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(LineChain), | intent(in) | :: | self | |||
| integer, | intent(in) | :: | j |
the chunk, and points i1 .. i2 (chain indices) |
||
| integer, | intent(in) | :: | i1 |
the chunk, and points i1 .. i2 (chain indices) |
||
| integer, | intent(in) | :: | i2 |
the chunk, and points i1 .. i2 (chain indices) |
||
| integer, | intent(out) | :: | lo |
chain indices (lo > hi: none) |
||
| integer, | intent(out) | :: | hi |
chain indices (lo > hi: none) |
||
| real(kind=c_float), | intent(out), | dimension(:,:,:), pointer | :: | p |
(4, 2, hi-lo+1) |
subroutine slice(self, j, i1, i2, lo, hi, p) class(LineChain), intent(in) :: self integer, intent(in) :: j, i1, i2 !! the chunk, and points i1 .. i2 (chain indices) integer, intent(out) :: lo, hi !! chain indices (lo > hi: none) real(c_float), dimension(:,:,:), pointer, intent(out) :: p !! (4, 2, hi-lo+1) real(c_float), dimension(:,:,:), pointer :: all p => null() associate (c => self%chunks(j)) lo = max(i1, c%first) hi = min(i2, c%first + c%capacity - 1) if (lo > hi) return call line_buffer(c%line, all) if (associated(all)) p => all(:, :, lo-c%first+1:hi-c%first+1) end associate end subroutine slice