Fortran interface to ZFP compression library
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(zfp_type), | public, | parameter | :: | zfp_type_float | = | zfp_type(3) |
Single precision floating point type |
| type(zfp_type), | public, | parameter | :: | zfp_type_double | = | zfp_type(4) |
Double precision floating point type |
| type(zfp_exec_policy), | public, | parameter | :: | zfp_exec_serial | = | zfp_exec_policy(0) |
Serial execution policy |
| type(zfp_exec_policy), | public, | parameter | :: | zfp_exec_omp | = | zfp_exec_policy(1) |
OpenMP parallel execution policy |
| type(zfp_exec_policy), | public, | parameter | :: | zfp_exec_cuda | = | zfp_exec_policy(2) |
CUDA parallel execution policy |
Allocate metadata for 2D field f[ny][nx]
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | uncompressed_ptr |
pointer to uncompressed scalars (may be NULL) |
||
| type(zfp_type), | value | :: | scalar_type |
scalar type |
||
| integer(kind=c_size_t), | value | :: | nx |
number of scalars in x dimension |
||
| integer(kind=c_size_t), | value | :: | ny |
number of scalars in y dimension |
allocated field metadata
Allocate metadata for 3D field f[nz][ny][nx]
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | uncompressed_ptr |
pointer to uncompressed scalars (may be NULL) |
||
| type(zfp_type), | value | :: | scalar_type |
scalar type |
||
| integer(kind=c_size_t), | value | :: | nx |
number of scalars in x dimension |
||
| integer(kind=c_size_t), | value | :: | ny |
number of scalars in y dimension |
||
| integer(kind=c_size_t), | value | :: | nz |
number of scalars in z dimension |
allocated field metadata
Set 2D field strides in number of scalars
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(zfp_field), | value | :: | field |
field metadata |
||
| integer(kind=c_ptrdiff_t), | value | :: | sx |
stride in x dimension: &f[0][1] - &f[0][0] |
||
| integer(kind=c_ptrdiff_t), | value | :: | sy |
stride in y dimension: &f[1][0] - &f[0][0] |
Set 3D field strides in number of scalars
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(zfp_field), | value | :: | field |
field metadata |
||
| integer(kind=c_ptrdiff_t), | value | :: | sx |
stride in x dimension: &f[0][0][1] - &f[0][0][0] |
||
| integer(kind=c_ptrdiff_t), | value | :: | sy |
stride in y dimension: &f[0][1][0] - &f[0][0][0] |
||
| integer(kind=c_ptrdiff_t), | value | :: | sz |
stride in z dimension: &f[1][0][0] - &f[0][0][0] |
Open compressed stream and associate with bit stream
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(bitstream), | value | :: | bs |
bit stream to read from and write to (may be NULL) |
allocated compressed stream
Close and deallocate compressed stream (does not affect bit stream)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(zfp_stream), | value | :: | stream |
compressed stream |
Conservative estimate of compressed size in bytes
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(zfp_stream), | value | :: | stream |
compressed stream |
||
| type(zfp_field), | value | :: | field |
array to compress |
maximum number of bytes of compressed storage
Set pointer to first scalar in field
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(zfp_field), | value | :: | field |
field metadata |
||
| type(c_ptr), | value | :: | arr_ptr |
pointer to first scalar |
Field dimensionality (1, 2, 3, or 4)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(zfp_field), | value | :: | field |
field metadata |
number of dimensions
Deallocate field metadata
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(zfp_field), | value | :: | field |
field metadata |
Rewind bit stream to beginning for compression or decompression
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(zfp_stream), | value | :: | stream |
compressed bit stream |
Open bit stream for reading and writing
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | buffer |
pointer to buffer |
||
| integer(kind=c_size_t), | value | :: | bytes |
buffer size in bytes |
bit stream
Close bit stream
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(bitstream), | value | :: | bs |
bit stream |
Associate bit stream with compressed stream
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(zfp_stream), | value | :: | stream |
compressed stream |
||
| type(bitstream), | value | :: | bs |
bit stream to read from and write to |
Enable reversible (lossless) compression
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(zfp_stream), | value | :: | stream |
compressed stream |
Set size in compressed bits/scalar (fixed-rate mode)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(zfp_stream), | value | :: | stream |
compressed stream |
||
| real(kind=c_double), | value | :: | rate |
desired rate in compressed bits/scalar |
||
| type(zfp_type), | value | :: | scalar_type |
scalar type to compress |
||
| integer(kind=c_int), | value | :: | dims |
array dimensionality (1, 2, 3, or 4) |
||
| integer(kind=c_int), | value | :: | align |
word-aligned blocks, e.g., for write random access |
actual rate in compressed bits/scalar
Set precision in uncompressed bits/scalar (fixed-precision mode)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(zfp_stream), | value | :: | stream |
compressed stream |
||
| integer(kind=c_int), | value | :: | prec |
desired precision in uncompressed bits/scalar |
actual precision
Set accuracy as absolute error tolerance (fixed-accuracy mode)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(zfp_stream), | value | :: | stream |
compressed stream |
||
| real(kind=c_double), | value | :: | acc |
desired error tolerance |
actual error tolerance
Set execution policy
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(zfp_stream), | value | :: | stream |
compressed stream |
||
| type(zfp_exec_policy), | value | :: | execution_policy |
execution policy |
true upon success
Decompress entire field (nonzero return value upon success)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(zfp_stream), | value | :: | stream |
compressed stream |
||
| type(zfp_field), | value | :: | field |
field metadata |
cumulative number of bytes of compressed storage
Compress entire field (nonzero return value upon success)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(zfp_stream), | value | :: | stream |
compressed stream |
||
| type(zfp_field), | value | :: | field |
field metadata |
cumulative number of bytes of compressed storage
ZFP field type, representing an uncompressed array
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(c_ptr), | public | :: | val |
ZFP stream type, representing a compressed stream
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(c_ptr), | public | :: | val |
Bitstream type for compressed data
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(c_ptr), | public | :: | val |
Scalar type enumeration
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=c_int), | public | :: | val |
Execution policy enumeration
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=c_int), | public | :: | val |
Create field for 2D or 3D arrays
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | intent(in) | :: | uncompressed_ptr |
pointer to uncompressed scalars |
||
| type(zfp_type), | intent(in) | :: | scalar_type |
scalar type |
||
| integer(kind=int32), | intent(in) | :: | dims(:) |
array dimensions |
field metadata
Set field strides for 2D or 3D arrays
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(zfp_field), | intent(in) | :: | field |
field metadata |
||
| integer(kind=int32), | intent(in) | :: | strides(:) |
strides per dimension |
Set compression rate with alignment for complex data
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(zfp_stream), | intent(in) | :: | stream |
compressed stream |
||
| type(zfp_field), | intent(in) | :: | field |
field metadata |
||
| real(kind=c_double), | intent(in) | :: | rate |
desired rate in compressed bits/scalar |
Set precision in uncompressed bits/scalar
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(zfp_stream), | intent(in) | :: | stream |
compressed stream |
||
| integer(kind=c_int), | intent(in) | :: | prec |
desired precision |
Set accuracy as absolute error tolerance
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(zfp_stream), | intent(in) | :: | stream |
compressed stream |
||
| real(kind=c_double), | intent(in) | :: | acc |
desired error tolerance |