size_6d Function

private pure function size_6d(me) result(s)

Actual size of a bspline_6d structure in bits.

Type Bound

bspline_6d

Arguments

Type IntentOptional Attributes Name
class(bspline_6d), intent(in) :: me

Return Value integer(kind=ip)

size of the structure in bits


Source Code

    pure function size_6d(me) result(s)

    implicit none

    class(bspline_6d),intent(in) :: me
    integer(ip) :: s !! size of the structure in bits

    s = 2_ip*int_size + logical_size + 22_ip*int_size

    if (allocated(me%bcoef))      s = s + real_size*size(me%bcoef,1_ip,kind=ip)*&
                                                    size(me%bcoef,2_ip,kind=ip)*&
                                                    size(me%bcoef,3_ip,kind=ip)*&
                                                    size(me%bcoef,4_ip,kind=ip)*&
                                                    size(me%bcoef,5_ip,kind=ip)*&
                                                    size(me%bcoef,6,kind=ip)
    if (allocated(me%tx))         s = s + real_size*size(me%tx,kind=ip)
    if (allocated(me%ty))         s = s + real_size*size(me%ty,kind=ip)
    if (allocated(me%tz))         s = s + real_size*size(me%tz,kind=ip)
    if (allocated(me%tq))         s = s + real_size*size(me%tq,kind=ip)
    if (allocated(me%tr))         s = s + real_size*size(me%tr,kind=ip)
    if (allocated(me%ts))         s = s + real_size*size(me%ts,kind=ip)
    if (allocated(me%work_val_1)) s = s + real_size*size(me%work_val_1,1_ip,kind=ip)*&
                                                    size(me%work_val_1,2_ip,kind=ip)*&
                                                    size(me%work_val_1,3_ip,kind=ip)*&
                                                    size(me%work_val_1,4_ip,kind=ip)*&
                                                    size(me%work_val_1,5_ip,kind=ip)
    if (allocated(me%work_val_2)) s = s + real_size*size(me%work_val_2,1_ip,kind=ip)*&
                                                    size(me%work_val_2,2_ip,kind=ip)*&
                                                    size(me%work_val_2,3_ip,kind=ip)*&
                                                    size(me%work_val_2,4_ip,kind=ip)
    if (allocated(me%work_val_3)) s = s + real_size*size(me%work_val_3,1_ip,kind=ip)*&
                                                    size(me%work_val_3,2_ip,kind=ip)*&
                                                    size(me%work_val_3,3_ip,kind=ip)
    if (allocated(me%work_val_4)) s = s + real_size*size(me%work_val_4,1_ip,kind=ip)*&
                                                    size(me%work_val_4,2_ip,kind=ip)
    if (allocated(me%work_val_5)) s = s + real_size*size(me%work_val_5,kind=ip)
    if (allocated(me%work_val_6)) s = s + real_size*size(me%work_val_6,kind=ip)

    end function size_6d