fixed_array_dp_get_unchecked Function

private pure function fixed_array_dp_get_unchecked(self, index) result(value)

UNCHECKED element access for inner loops: no bounds check at all. The caller is responsible for guaranteeing 1 <= index <= size(), typically by looping over 1, array%size(). Reading an index outside that range returns undefined data. Use at unless the bounds check is measurably in the way.

Type Bound

fixed_array_dp_t

Arguments

Type IntentOptional Attributes Name
class(fixed_array_dp_t), intent(in) :: self
integer(kind=default_int), intent(in) :: index

Return Value real(kind=dp)


Source Code

   pure function fixed_array_dp_get_unchecked(self, index) result(value)
      !! UNCHECKED element access for inner loops: no bounds check at all.
      !! The caller is responsible for guaranteeing `1 <= index <= size()`,
      !! typically by looping over `1, array%size()`. Reading an index
      !! outside that range returns undefined data. Use `at` unless the
      !! bounds check is measurably in the way.
      class(fixed_array_dp_t), intent(in) :: self
      integer(default_int), intent(in) :: index
      real(dp) :: value

      value = self%items(index)
   end function fixed_array_dp_get_unchecked