pack_data_I8_R4 Subroutine

private pure subroutine pack_data_I8_R4(a1, a2, packed)

Pack different kinds of data into single I1P array.

 use befor64
 use penf
 integer(I8P)              :: a1(1)
 real(R4P)                 :: a2(1)
 integer(I1P), allocatable :: pack(:)
 a1(1) = 0
 a2(1) = 1
 call pack_data(a1=a1, a2=a2, packed=pack)
 print *, pack(size(pack, dim=1))

Arguments

Type IntentOptional AttributesName
integer(kind=I8P), intent(in) :: a1(1:)

First data stream.

real(kind=R4P), intent(in) :: a2(1:)

Second data stream.

integer(kind=I1P), intent(inout), allocatable:: packed(:)

Packed data into I1P array.

Called By

proc~~pack_data_i8_r4~~CalledByGraph proc~pack_data_i8_r4 pack_data_I8_R4 interface~pack_data pack_data interface~pack_data->proc~pack_data_i8_r4 program~volatile_doctest~50 volatile_doctest program~volatile_doctest~50->interface~pack_data program~volatile_doctest~66 volatile_doctest program~volatile_doctest~66->interface~pack_data program~volatile_doctest~51 volatile_doctest program~volatile_doctest~51->interface~pack_data program~volatile_doctest~55 volatile_doctest program~volatile_doctest~55->interface~pack_data program~volatile_doctest~67 volatile_doctest program~volatile_doctest~67->interface~pack_data program~volatile_doctest~52 volatile_doctest program~volatile_doctest~52->interface~pack_data program~volatile_doctest~53 volatile_doctest program~volatile_doctest~53->interface~pack_data program~volatile_doctest~58 volatile_doctest program~volatile_doctest~58->interface~pack_data program~volatile_doctest~54 volatile_doctest program~volatile_doctest~54->interface~pack_data program~volatile_doctest~39 volatile_doctest program~volatile_doctest~39->interface~pack_data program~volatile_doctest~61 volatile_doctest program~volatile_doctest~61->interface~pack_data program~volatile_doctest~40 volatile_doctest program~volatile_doctest~40->interface~pack_data program~volatile_doctest~65 volatile_doctest program~volatile_doctest~65->interface~pack_data program~volatile_doctest~57 volatile_doctest program~volatile_doctest~57->interface~pack_data program~volatile_doctest~56 volatile_doctest program~volatile_doctest~56->interface~pack_data program~volatile_doctest~42 volatile_doctest program~volatile_doctest~42->interface~pack_data program~volatile_doctest~64 volatile_doctest program~volatile_doctest~64->interface~pack_data program~volatile_doctest~59 volatile_doctest program~volatile_doctest~59->interface~pack_data program~volatile_doctest~43 volatile_doctest program~volatile_doctest~43->interface~pack_data program~volatile_doctest~44 volatile_doctest program~volatile_doctest~44->interface~pack_data program~volatile_doctest~63 volatile_doctest program~volatile_doctest~63->interface~pack_data program~volatile_doctest~45 volatile_doctest program~volatile_doctest~45->interface~pack_data program~volatile_doctest~38 volatile_doctest program~volatile_doctest~38->interface~pack_data program~volatile_doctest~46 volatile_doctest program~volatile_doctest~46->interface~pack_data program~volatile_doctest~62 volatile_doctest program~volatile_doctest~62->interface~pack_data program~volatile_doctest~47 volatile_doctest program~volatile_doctest~47->interface~pack_data program~volatile_doctest~41 volatile_doctest program~volatile_doctest~41->interface~pack_data program~volatile_doctest~48 volatile_doctest program~volatile_doctest~48->interface~pack_data program~volatile_doctest~49 volatile_doctest program~volatile_doctest~49->interface~pack_data program~volatile_doctest~60 volatile_doctest program~volatile_doctest~60->interface~pack_data
Help

Source Code


Source Code

   pure subroutine pack_data_I8_R4(a1, a2, packed)
   !< Pack different kinds of data into single I1P array.
   !<
   !<```fortran
   !< use befor64
   !< use penf
   !< integer(I8P)              :: a1(1)
   !< real(R4P)                 :: a2(1)
   !< integer(I1P), allocatable :: pack(:)
   !< a1(1) = 0
   !< a2(1) = 1
   !< call pack_data(a1=a1, a2=a2, packed=pack)
   !< print *, pack(size(pack, dim=1))
   !<```
   !=> 63 <<<
   integer(I8P),              intent(in)    :: a1(1:)    !< First data stream.
   real(R4P),                 intent(in)    :: a2(1:)    !< Second data stream.
   integer(I1P), allocatable, intent(inout) :: packed(:) !< Packed data into I1P array.
   integer(I1P), allocatable                :: p1(:)     !< Temporary packed data of first stream.
   integer(I1P), allocatable                :: p2(:)     !< Temporary packed data of second stream.

   p1 = transfer(a1,p1)
   p2 = transfer(a2,p2)
   packed = [p1,p2]
   endsubroutine pack_data_I8_R4