pack_data Interface

public interface pack_data

Pack different kinds of data into single I1P array.

This is useful for encoding different (heterogeneous) kinds variables into a single (homogeneous) stream of bits.

Presently, the following combinations are available:

  • Arrays-Arrays:
    • real(any)-real(any);
    • real(any)-integer(any);
    • integer(any)-integer(any);
    • integer(any)-real(any);
    • real(any)-character;
    • character-real(any);
    • integer(any)-character;
    • character-integer(any);
  • Scalars-Scalars:
    • real(any)-real(any);
    • real(any)-integer(any);
    • integer(any)-integer(any);
    • integer(any)-real(any);
    • real(any)-character;
    • character-real(any);
    • integer(any)-character;
    • character-integer(any);

Examples of usage

Packing two real arrays, one with kind R8P and one with R4P

real(R8P)::                 array_r8(1:12)
real(R4P)::                 array_r4(-1:5)
integer(I1P), allocatable:: rpack
...
call pack_data(a1=array_r8,a2=array_r4,packed=rpack)

Packing two arrays, one real with kind R4P and one integer with I4P

real(R4P)::                 array_r4(2)
integer(I4P)::              array_i4(0:2)
integer(I1P), allocatable:: rpack
...
call pack_data(a1=array_r4,a2=array_i4,packed=rpack)

Calls

interface~~pack_data~~CallsGraph interface~pack_data pack_data proc~pack_data_r4_i2 pack_data_R4_I2 interface~pack_data->proc~pack_data_r4_i2 proc~pack_data_r4_i4 pack_data_R4_I4 interface~pack_data->proc~pack_data_r4_i4 proc~pack_data_i4_i1 pack_data_I4_I1 interface~pack_data->proc~pack_data_i4_i1 proc~pack_data_i2_i1 pack_data_I2_I1 interface~pack_data->proc~pack_data_i2_i1 proc~pack_data_r4_i8 pack_data_R4_I8 interface~pack_data->proc~pack_data_r4_i8 proc~pack_data_i2_r4 pack_data_I2_R4 interface~pack_data->proc~pack_data_i2_r4 proc~pack_data_i4_r4 pack_data_I4_R4 interface~pack_data->proc~pack_data_i4_r4 proc~pack_data_i2_r8 pack_data_I2_R8 interface~pack_data->proc~pack_data_i2_r8 proc~pack_data_r8_i2 pack_data_R8_I2 interface~pack_data->proc~pack_data_r8_i2 proc~pack_data_r4_r8 pack_data_R4_R8 interface~pack_data->proc~pack_data_r4_r8 proc~pack_data_i4_i2 pack_data_I4_I2 interface~pack_data->proc~pack_data_i4_i2 proc~pack_data_i1_r4 pack_data_I1_R4 interface~pack_data->proc~pack_data_i1_r4 proc~pack_data_r8_i8 pack_data_R8_I8 interface~pack_data->proc~pack_data_r8_i8 proc~pack_data_r8_i4 pack_data_R8_I4 interface~pack_data->proc~pack_data_r8_i4 proc~pack_data_i1_r8 pack_data_I1_R8 interface~pack_data->proc~pack_data_i1_r8 proc~pack_data_r8_r4 pack_data_R8_R4 interface~pack_data->proc~pack_data_r8_r4 proc~pack_data_i4_r8 pack_data_I4_R8 interface~pack_data->proc~pack_data_i4_r8 proc~pack_data_i2_i4 pack_data_I2_I4 interface~pack_data->proc~pack_data_i2_i4 proc~pack_data_i1_i2 pack_data_I1_I2 interface~pack_data->proc~pack_data_i1_i2 proc~pack_data_i1_i8 pack_data_I1_I8 interface~pack_data->proc~pack_data_i1_i8 proc~pack_data_i8_i1 pack_data_I8_I1 interface~pack_data->proc~pack_data_i8_i1 proc~pack_data_i8_i2 pack_data_I8_I2 interface~pack_data->proc~pack_data_i8_i2 proc~pack_data_r8_i1 pack_data_R8_I1 interface~pack_data->proc~pack_data_r8_i1 proc~pack_data_i8_i4 pack_data_I8_I4 interface~pack_data->proc~pack_data_i8_i4 proc~pack_data_i8_r4 pack_data_I8_R4 interface~pack_data->proc~pack_data_i8_r4 proc~pack_data_i4_i8 pack_data_I4_I8 interface~pack_data->proc~pack_data_i4_i8 proc~pack_data_i1_i4 pack_data_I1_I4 interface~pack_data->proc~pack_data_i1_i4 proc~pack_data_i8_r8 pack_data_I8_R8 interface~pack_data->proc~pack_data_i8_r8 proc~pack_data_r4_i1 pack_data_R4_I1 interface~pack_data->proc~pack_data_r4_i1 proc~pack_data_i2_i8 pack_data_I2_I8 interface~pack_data->proc~pack_data_i2_i8
Help

Called By

interface~~pack_data~~CalledByGraph interface~pack_data pack_data 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


Module Procedures

private pure subroutine pack_data_R8_R4(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

Type IntentOptional AttributesName
real(kind=R8P), intent(in) :: a1(1:)

Firs data stream.

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

Second data stream.

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

Packed data into I1P array.

private pure subroutine pack_data_R8_I8(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

Type IntentOptional AttributesName
real(kind=R8P), intent(in) :: a1(1:)

First data stream.

integer(kind=I8P), intent(in) :: a2(1:)

Second data stream.

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

Packed data into I1P array.

private pure subroutine pack_data_R8_I4(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

Type IntentOptional AttributesName
real(kind=R8P), intent(in) :: a1(1:)

First data stream.

integer(kind=I4P), intent(in) :: a2(1:)

Second data stream.

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

Packed data into I1P array.

private pure subroutine pack_data_R8_I2(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

Type IntentOptional AttributesName
real(kind=R8P), intent(in) :: a1(1:)

First data stream.

integer(kind=I2P), intent(in) :: a2(1:)

Second data stream.

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

Packed data into I1P array.

private pure subroutine pack_data_R8_I1(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

Type IntentOptional AttributesName
real(kind=R8P), intent(in) :: a1(1:)

First data stream.

integer(kind=I1P), intent(in) :: a2(1:)

Second data stream.

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

Packed data into I1P array.

private pure subroutine pack_data_R4_R8(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

Type IntentOptional AttributesName
real(kind=R4P), intent(in) :: a1(1:)

Firs data stream.

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

Second data stream.

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

Packed data into I1P array.

private pure subroutine pack_data_R4_I8(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

Type IntentOptional AttributesName
real(kind=R4P), intent(in) :: a1(1:)

First data stream.

integer(kind=I8P), intent(in) :: a2(1:)

Second data stream.

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

Packed data into I1P array.

private pure subroutine pack_data_R4_I4(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

Type IntentOptional AttributesName
real(kind=R4P), intent(in) :: a1(1:)

First data stream.

integer(kind=I4P), intent(in) :: a2(1:)

Second data stream.

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

Packed data into I1P array.

private pure subroutine pack_data_R4_I2(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

Type IntentOptional AttributesName
real(kind=R4P), intent(in) :: a1(1:)

First data stream.

integer(kind=I2P), intent(in) :: a2(1:)

Second data stream.

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

Packed data into I1P array.

private pure subroutine pack_data_R4_I1(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

Type IntentOptional AttributesName
real(kind=R4P), intent(in) :: a1(1:)

First data stream.

integer(kind=I1P), intent(in) :: a2(1:)

Second data stream.

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

Packed data into I1P array.

private pure subroutine pack_data_I8_R8(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

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

First data stream.

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

Second data stream.

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

Packed data into I1P array.

private pure subroutine pack_data_I8_R4(a1, a2, packed)

Pack different kinds of data into single I1P array.

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.

private pure subroutine pack_data_I8_I4(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

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

First data stream.

integer(kind=I4P), intent(in) :: a2(1:)

Second data stream.

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

Packed data into I1P array.

private pure subroutine pack_data_I8_I2(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

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

First data stream.

integer(kind=I2P), intent(in) :: a2(1:)

Second data stream.

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

Packed data into I1P array.

private pure subroutine pack_data_I8_I1(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

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

First data stream.

integer(kind=I1P), intent(in) :: a2(1:)

Second data stream.

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

Packed data into I1P array.

private pure subroutine pack_data_I4_R8(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

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

First data stream.

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

Second data stream.

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

Packed data into I1P array.

private pure subroutine pack_data_I4_R4(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

Type IntentOptional AttributesName
integer(kind=I4P), 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.

private pure subroutine pack_data_I4_I8(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

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

First data stream.

integer(kind=I8P), intent(in) :: a2(1:)

Second data stream.

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

Packed data into I1P array.

private pure subroutine pack_data_I4_I2(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

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

First data stream.

integer(kind=I2P), intent(in) :: a2(1:)

Second data stream.

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

Packed data into I1P array.

private pure subroutine pack_data_I4_I1(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

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

First data stream.

integer(kind=I1P), intent(in) :: a2(1:)

Second data stream.

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

Packed data into I1P array.

private pure subroutine pack_data_I2_R8(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

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

First data stream.

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

Second data stream.

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

Packed data into I1P array.

private pure subroutine pack_data_I2_R4(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

Type IntentOptional AttributesName
integer(kind=I2P), 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.

private pure subroutine pack_data_I2_I8(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

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

First data stream.

integer(kind=I8P), intent(in) :: a2(1:)

Second data stream.

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

Packed data into I1P array.

private pure subroutine pack_data_I2_I4(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

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

First data stream.

integer(kind=I4P), intent(in) :: a2(1:)

Second data stream.

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

Packed data into I1P array.

private pure subroutine pack_data_I2_I1(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

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

First data stream.

integer(kind=I1P), intent(in) :: a2(1:)

Second data stream.

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

Packed data into I1P array.

private pure subroutine pack_data_I1_R8(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

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

First data stream.

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

Second data stream.

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

Packed data into I1P array.

private pure subroutine pack_data_I1_R4(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

Type IntentOptional AttributesName
integer(kind=I1P), 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.

private pure subroutine pack_data_I1_I8(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

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

First data stream.

integer(kind=I8P), intent(in) :: a2(1:)

Second data stream.

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

Packed data into I1P array.

private pure subroutine pack_data_I1_I4(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

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

First data stream.

integer(kind=I4P), intent(in) :: a2(1:)

Second data stream.

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

Packed data into I1P array.

private pure subroutine pack_data_I1_I2(a1, a2, packed)

Pack different kinds of data into single I1P array.

Arguments

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

First data stream.

integer(kind=I2P), intent(in) :: a2(1:)

Second data stream.

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

Packed data into I1P array.