soa_resize_field Interface

public interface soa_resize_field

Give one field array a new allocated length, preserving a prefix.

Usage: call soa_resize_field(values, new_capacity, keep, fill_to, err)

values(1:keep) survives the call. Indices keep+1 .. fill_to are set to the zero value of the type; indices above fill_to are left unspecified. When values already has exactly new_capacity elements no reallocation happens and only the fill is performed, which is what makes a shrink followed by a grow free.

Fails with ERROR_VALIDATION on inconsistent arguments and with ERROR_ALLOC if the new array cannot be allocated.

Calls

interface~~soa_resize_field~~CallsGraph interface~soa_resize_field soa_resize_field proc~soa_resize_int32_field soa_resize_int32_field interface~soa_resize_field->proc~soa_resize_int32_field proc~soa_resize_int64_field soa_resize_int64_field interface~soa_resize_field->proc~soa_resize_int64_field proc~soa_resize_logical_field soa_resize_logical_field interface~soa_resize_field->proc~soa_resize_logical_field proc~soa_resize_real_dp_field soa_resize_real_dp_field interface~soa_resize_field->proc~soa_resize_real_dp_field proc~soa_resize_real_sp_field soa_resize_real_sp_field interface~soa_resize_field->proc~soa_resize_real_sp_field proc~error_has_error error_t%error_has_error proc~soa_resize_int32_field->proc~error_has_error proc~soa_check_alloc soa_check_alloc proc~soa_resize_int32_field->proc~soa_check_alloc proc~soa_check_resize_args soa_check_resize_args proc~soa_resize_int32_field->proc~soa_check_resize_args proc~soa_resize_int64_field->proc~error_has_error proc~soa_resize_int64_field->proc~soa_check_alloc proc~soa_resize_int64_field->proc~soa_check_resize_args proc~soa_resize_logical_field->proc~error_has_error proc~soa_resize_logical_field->proc~soa_check_alloc proc~soa_resize_logical_field->proc~soa_check_resize_args proc~soa_resize_real_dp_field->proc~error_has_error proc~soa_resize_real_dp_field->proc~soa_check_alloc proc~soa_resize_real_dp_field->proc~soa_check_resize_args proc~soa_resize_real_sp_field->proc~error_has_error proc~soa_resize_real_sp_field->proc~soa_check_alloc proc~soa_resize_real_sp_field->proc~soa_check_resize_args interface~to_char to_char proc~soa_check_alloc->interface~to_char proc~error_set error_t%error_set proc~soa_check_alloc->proc~error_set proc~soa_check_resize_args->interface~to_char proc~soa_check_resize_args->proc~error_set proc~to_char_char to_char_char interface~to_char->proc~to_char_char proc~to_char_dp to_char_dp interface~to_char->proc~to_char_dp proc~to_char_int32 to_char_int32 interface~to_char->proc~to_char_int32 proc~to_char_int64 to_char_int64 interface~to_char->proc~to_char_int64 proc~to_char_logical to_char_logical interface~to_char->proc~to_char_logical proc~to_char_matrix_dp to_char_matrix_dp interface~to_char->proc~to_char_matrix_dp proc~to_char_matrix_int32 to_char_matrix_int32 interface~to_char->proc~to_char_matrix_int32 proc~to_char_matrix_int64 to_char_matrix_int64 interface~to_char->proc~to_char_matrix_int64 proc~to_char_matrix_sp to_char_matrix_sp interface~to_char->proc~to_char_matrix_sp proc~to_char_sp to_char_sp interface~to_char->proc~to_char_sp proc~to_char_vector_dp to_char_vector_dp interface~to_char->proc~to_char_vector_dp proc~to_char_vector_int32 to_char_vector_int32 interface~to_char->proc~to_char_vector_int32 proc~to_char_vector_int64 to_char_vector_int64 interface~to_char->proc~to_char_vector_int64 proc~to_char_vector_sp to_char_vector_sp interface~to_char->proc~to_char_vector_sp

Called by

interface~~soa_resize_field~~CalledByGraph interface~soa_resize_field soa_resize_field proc~particle_soa_resize particle_soa_t%particle_soa_resize proc~particle_soa_resize->interface~soa_resize_field proc~particle_soa_allocate particle_soa_t%particle_soa_allocate proc~particle_soa_allocate->proc~particle_soa_resize

Module Procedures

private subroutine soa_resize_int32_field(values, new_capacity, keep, fill_to, err)

Resize an integer(int32) field.

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(inout), allocatable :: values(:)
integer(kind=default_int), intent(in) :: new_capacity
integer(kind=default_int), intent(in) :: keep
integer(kind=default_int), intent(in) :: fill_to
type(error_t), intent(inout) :: err

private subroutine soa_resize_int64_field(values, new_capacity, keep, fill_to, err)

Resize an integer(int64) field.

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(inout), allocatable :: values(:)
integer(kind=default_int), intent(in) :: new_capacity
integer(kind=default_int), intent(in) :: keep
integer(kind=default_int), intent(in) :: fill_to
type(error_t), intent(inout) :: err

private subroutine soa_resize_real_sp_field(values, new_capacity, keep, fill_to, err)

Resize a real(sp) field.

Arguments

Type IntentOptional Attributes Name
real(kind=sp), intent(inout), allocatable :: values(:)
integer(kind=default_int), intent(in) :: new_capacity
integer(kind=default_int), intent(in) :: keep
integer(kind=default_int), intent(in) :: fill_to
type(error_t), intent(inout) :: err

private subroutine soa_resize_real_dp_field(values, new_capacity, keep, fill_to, err)

Resize a real(dp) field.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(inout), allocatable :: values(:)
integer(kind=default_int), intent(in) :: new_capacity
integer(kind=default_int), intent(in) :: keep
integer(kind=default_int), intent(in) :: fill_to
type(error_t), intent(inout) :: err

private subroutine soa_resize_logical_field(values, new_capacity, keep, fill_to, err)

Resize a default logical field.

Arguments

Type IntentOptional Attributes Name
logical, intent(inout), allocatable :: values(:)
integer(kind=default_int), intent(in) :: new_capacity
integer(kind=default_int), intent(in) :: keep
integer(kind=default_int), intent(in) :: fill_to
type(error_t), intent(inout) :: err