compressor_zfp Derived Type

type, public, extends(abstract_compressor) :: compressor_zfp

ZFP-based compressor implementation


Inherits

type~~compressor_zfp~~InheritsGraph type~compressor_zfp compressor_zfp type~abstract_compressor abstract_compressor type~compressor_zfp->type~abstract_compressor type~cudaevent cudaEvent type~compressor_zfp->type~cudaevent event type~dtfft_compression_config_t dtfft_compression_config_t type~compressor_zfp->type~dtfft_compression_config_t config type~zfp_exec_policy zfp_exec_policy type~compressor_zfp->type~zfp_exec_policy policy type~zfp_type zfp_type type~compressor_zfp->type~zfp_type scalar_type c_ptr c_ptr type~cudaevent->c_ptr event type~dtfft_compression_lib_t dtfft_compression_lib_t type~dtfft_compression_config_t->type~dtfft_compression_lib_t compression_lib type~dtfft_compression_mode_t dtfft_compression_mode_t type~dtfft_compression_config_t->type~dtfft_compression_mode_t compression_mode

Components

Type Visibility Attributes Name Initial
integer(kind=int8), public :: ndims

Number of dimensions

integer(kind=int64), public :: storage_size

Size of storage per element

real(kind=real64), public :: compressed_rate

Accumulated compression rate

integer(kind=int64), public :: execution_count

Number of compression executions

integer(kind=int32), public :: dims_permutation

Dimension permutation flag

logical, private :: is_complex

Indicates if the data type is complex

logical, private :: is_fixed_rate
integer(kind=int64), private :: imag_offset

Byte offset for imaginary part in complex data

type(dtfft_compression_config_t), private :: config

Compression configuration parameters

type(zfp_exec_policy), private :: policy

ZFP execution policy (serial or CUDA)

type(zfp_type), private :: scalar_type

ZFP scalar type (float or double)

type(cudaEvent), private :: event

Type-Bound Procedures

procedure, public, non_overridable, pass(self) :: create

Initializes the compressor with given parameters

  • private function create(self, ndims, config, platform, base_type, storage_size, dims_permutation)

    Initializes the compressor with given parameters

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_compressor), intent(inout) :: self

    Compressor instance

    integer(kind=int8), intent(in) :: ndims

    Number of dimensions

    type(dtfft_compression_config_t), intent(in) :: config

    Compression configuration

    type(dtfft_platform_t), intent(in) :: platform

    Target platform

    type(MPI_Datatype), intent(in) :: base_type

    MPI data type

    integer(kind=int64), intent(in) :: storage_size

    Storage size per element

    integer(kind=int32), intent(in) :: dims_permutation

    Dimension permutation flag

    Return Value integer(kind=int32)

procedure, public, non_overridable, pass(self) :: compress

Compresses the input data and returns the compressed size

  • private function compress(self, dims, displ, in, out, stream)

    Compresses the input data and returns the compressed size

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_compressor), intent(inout) :: self

    Compressor instance

    integer(kind=int32), intent(in) :: dims(:)

    Array dimensions

    integer(kind=int32), intent(in) :: displ

    Displacement in arrays

    type(c_ptr), intent(in) :: in

    Pointer to uncompressed data

    type(c_ptr), intent(in) :: out

    Pointer to compressed buffer

    type(dtfft_stream_t), intent(in) :: stream

    Stream handle

    Return Value integer(kind=int64)

procedure, public, non_overridable, pass(self) :: decompress

Decompresses the input data into the output buffer

  • private subroutine decompress(self, dims, displ, in, out, stream)

    Decompresses the input data into the output buffer

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_compressor), intent(inout) :: self

    Compressor instance

    integer(kind=int32), intent(in) :: dims(:)

    Array dimensions

    integer(kind=int32), intent(in) :: displ

    Displacement in arrays

    type(c_ptr), intent(in) :: in

    Pointer to compressed data

    type(c_ptr), intent(in) :: out

    Pointer to uncompressed buffer

    type(dtfft_stream_t), intent(in) :: stream

    Stream handle

procedure, public, non_overridable, pass(self) :: get_average_rate

Returns the average compression rate over all executions

  • private pure function get_average_rate(self)

    Returns the average compression rate over all executions

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_compressor), intent(in) :: self

    Compressor instance

    Return Value real(kind=real64)

procedure, public :: create_private => create

Initializes the ZFP compressor with given configuration

  • private function create(self, config, platform, base_type)

    Initializes the ZFP compressor with given configuration

    Arguments

    Type IntentOptional Attributes Name
    class(compressor_zfp), intent(inout) :: self

    Compressor instance

    type(dtfft_compression_config_t), intent(in) :: config

    Compression settings

    type(dtfft_platform_t), intent(in) :: platform

    Target platform (CPU or CUDA)

    type(MPI_Datatype), intent(in) :: base_type

    MPI data type

    Return Value integer(kind=int32)

procedure, public :: compress_private => compress

Compresses the input data using ZFP

  • private function compress(self, dims, in, out, stream)

    Compresses the input data using ZFP

    Arguments

    Type IntentOptional Attributes Name
    class(compressor_zfp), intent(inout) :: self

    Compressor instance

    integer(kind=int32), intent(in) :: dims(:)

    Array dimensions

    type(c_ptr), intent(in) :: in

    Pointer to input data

    type(c_ptr), intent(in) :: out

    Pointer to output buffer

    type(dtfft_stream_t), intent(in) :: stream

    Stream handle

    Return Value integer(kind=int64)

procedure, public :: decompress_private => decompress

Decompresses the input data using ZFP

  • private subroutine decompress(self, dims, in, out, stream)

    Decompresses the input data using ZFP

    Arguments

    Type IntentOptional Attributes Name
    class(compressor_zfp), intent(inout) :: self

    Compressor instance

    integer(kind=int32), intent(in) :: dims(:)

    Array dimensions

    type(c_ptr), intent(in) :: in

    Pointer to compressed data

    type(c_ptr), intent(in) :: out

    Pointer to output buffer

    type(dtfft_stream_t), intent(in) :: stream

    Stream handle

procedure, public :: destroy

Cleans up the compressor resources

  • private subroutine destroy(self)

    Cleans up the compressor resources

    Arguments

    Type IntentOptional Attributes Name
    class(compressor_zfp), intent(inout) :: self

    Compressor instance

procedure, public :: sync

  • private subroutine sync(self, stream)

    Arguments

    Type IntentOptional Attributes Name
    class(compressor_zfp), intent(inout) :: self

    Abstract kernel

    type(dtfft_stream_t), intent(in) :: stream

procedure, public :: pre_sync

  • private subroutine pre_sync(self, stream)

    Arguments

    Type IntentOptional Attributes Name
    class(compressor_zfp), intent(inout) :: self

    Abstract kernel

    type(dtfft_stream_t), intent(in) :: stream

procedure, public :: post_sync

  • private subroutine post_sync(self, stream)

    Arguments

    Type IntentOptional Attributes Name
    class(compressor_zfp), intent(inout) :: self

    Abstract kernel

    type(dtfft_stream_t), intent(in) :: stream

procedure, public :: init

Initializes ZFP stream and field for compression/decompression

  • private subroutine init(self, uncompressed_ptr, dims, is_decompression, zfp, field)

    Initializes ZFP stream and field for compression/decompression

    Arguments

    Type IntentOptional Attributes Name
    class(compressor_zfp), intent(inout) :: self

    Compressor instance

    type(c_ptr), intent(in) :: uncompressed_ptr

    Pointer to uncompressed data

    integer(kind=int32), intent(in) :: dims(:)

    Array dimensions

    logical, intent(in) :: is_decompression

    Decompression flag. Used only in omp build

    type(zfp_stream), intent(out) :: zfp

    ZFP stream

    type(zfp_field), intent(out) :: field

    ZFP field