Skip to content

Commit

Permalink
add missing c_ptr and use .EQV. instead .EQ.
Browse files Browse the repository at this point in the history
  • Loading branch information
ofmla authored Apr 22, 2024
1 parent dbb1074 commit 7d77bb1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zfp_fct_wrapper.F90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module zfp_fct_wrapper
use, intrinsic :: iso_c_binding, only : c_long, c_double, c_loc, c_sizeof
use, intrinsic :: iso_c_binding, only : c_ptr, c_long, c_double, c_loc, c_sizeof
use, intrinsic :: iso_fortran_env
use zfp

Expand Down Expand Up @@ -43,7 +43,7 @@ subroutine compress(indata, buffer, tolerance, precision, rate, parallel)
if(present(tolerance) .and. present(precision)) stop 'only 1 parameter is allowed'
if(present(tolerance) .and. present(rate)) stop 'only 1 parameter is allowed'
if(present(rate) .and. present(precision)) stop 'only 1 parameter is allowed'
if(present(parallel) .and. (parallel .eq. .false.)) parl =.false.
if(present(parallel) .and. (parallel .eqv. .false.)) parl =.false.

in_ptr = c_loc(indata); shap = shape(indata)
if (c_sizeof(1._wp) .eq. 8) then
Expand Down Expand Up @@ -114,7 +114,7 @@ subroutine decompress(buffer, outdata, tolerance, precision, rate, parallel)
if(present(tolerance) .and. present(precision)) stop 'only 1 parameter is allowed'
if(present(tolerance) .and. present(rate)) stop 'only 1 parameter is allowed'
if(present(rate) .and. present(precision)) stop 'only 1 parameter is allowed'
if(present(parallel) .and. (parallel .eq. .false.)) parl =.false.
if(present(parallel) .and. (parallel .eqv. .false.)) parl =.false.

out_ptr = c_loc(outdata); shap = shape(outdata)
if (c_sizeof(1._wp) .eq. 8) then
Expand Down

0 comments on commit 7d77bb1

Please sign in to comment.