sizes_of_arrays Function

public function sizes_of_arrays(list)

sizes of arrays stored in list

Arguments

Type IntentOptional Attributes Name
type(array_list), intent(in) :: list

Return Value integer, ALLOCATABLE, DIMENSION(:)


Source Code

   FUNCTION sizes_of_arrays(list)
      !! sizes of arrays stored in list
      TYPE(array_list), INTENT(IN)       :: list
      INTEGER, ALLOCATABLE, DIMENSION(:) :: sizes_of_arrays

      INTEGER                            :: i_data, num_data

      num_data = number_of_arrays(list)
      ALLOCATE (sizes_of_arrays(num_data))
      DO i_data = 1, num_data
         sizes_of_arrays(i_data) = list%ptr(i_data + 1) - list%ptr(i_data)
      END DO
   END FUNCTION sizes_of_arrays