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.
This procedure exploits the transfer
builtin function, that from the standard (2003+) is defined as
TRANSFER(SOURCE, MOLD [, SIZE])
. Data object having a physical representation identical to that of SOURCE
but with the type
and type parameters of MOLD
. The result is of the same type and type parameters as MOLD
.
If MOLD
is an array and SIZE
is absent, the result is an array and of rank one. Its size is as small as possible such
that its physical representation is not shorter than that of SOURCE
.
Presently, the following combinations are available:
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)
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)
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pack different kinds of data into single I1P array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |