word_size Function

public function word_size(type_kind, rc)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: type_kind
integer, intent(out), optional :: rc

Return Value integer


Calls

proc~~word_size~~CallsGraph proc~word_size word_size interface~mapl_assert MAPL_Assert proc~word_size->interface~mapl_assert proc~mapl_return MAPL_Return proc~word_size->proc~mapl_return at at proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception

Source Code

   integer function word_size(type_kind,rc)
      integer, intent(in) :: type_kind
      integer, optional, intent(out) :: rc
      integer(kind=INT32) :: i32
      integer(kind=INT64) :: i64
      real (kind=REAL32) :: r32
      real (kind=REAL64) :: r64

      select case(type_kind)
      case (pFIO_INT32)
         word_size = 1
      case (pFIO_REAL32)
         word_size = c_sizeof(r32)/c_sizeof(i32)
      case (pFIO_LOGICAL)
         word_size = 1
      case (pFIO_REAL64)
         word_size = c_sizeof(r64)/c_sizeof(i32)
      case (pFIO_INT64)
         word_size = c_sizeof(i64)/c_sizeof(i32)
      case default
         _FAIL( "unsupported type kind")
      end select
         
      _RETURN(_SUCCESS)
   end function word_size