mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2025-01-03 01:56:18 +01:00
Simplified VFC probes in Fortran
This commit is contained in:
parent
f2875ed133
commit
3f8ee854c4
@ -101,41 +101,3 @@ void __attribute__((destructor)) qmckl_dump_probes(){
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// Fortran wrappers
|
||||
|
||||
bool qmckl_probe_f(
|
||||
char * testName,
|
||||
char * varName,
|
||||
double * value
|
||||
) {
|
||||
return qmckl_probe(testName, varName, *value);
|
||||
}
|
||||
|
||||
|
||||
bool qmckl_probe_check_f(
|
||||
char * testName,
|
||||
char * varName,
|
||||
double * value,
|
||||
double * expectedValue,
|
||||
double * accuracyTarget
|
||||
) {
|
||||
return qmckl_probe_check(
|
||||
testName, varName,
|
||||
*value, *expectedValue, *accuracyTarget
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
bool qmckl_probe_check_relative_f(
|
||||
char * testName,
|
||||
char * varName,
|
||||
double * value,
|
||||
double * expectedValue,
|
||||
double * accuracyTarget
|
||||
) {
|
||||
return qmckl_probe_check_relative(
|
||||
testName, varName,
|
||||
*value, *expectedValue, *accuracyTarget
|
||||
);
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
module qmckl_probes_f
|
||||
interface
|
||||
logical(c_bool) function qmckl_probe &
|
||||
logical(c_bool) function qmckl_probe_c &
|
||||
(testName, varName, val) &
|
||||
bind(C, name="qmckl_probe_f")
|
||||
bind(C, name="qmckl_probe")
|
||||
|
||||
use, intrinsic :: iso_c_binding
|
||||
import
|
||||
@ -11,39 +11,71 @@ module qmckl_probes_f
|
||||
character(C_CHAR), dimension(*) :: testName
|
||||
character(C_CHAR), dimension(*) :: varName
|
||||
|
||||
real(C_DOUBLE) :: val
|
||||
real(C_DOUBLE), value :: val
|
||||
end function qmckl_probe_c
|
||||
|
||||
logical(c_bool) function qmckl_probe_check_c &
|
||||
(testName, varName, val, expectedValue, accuracyTarget) &
|
||||
bind(C, name="qmckl_probe_check")
|
||||
|
||||
use, intrinsic :: iso_c_binding
|
||||
import
|
||||
implicit none
|
||||
|
||||
character(C_CHAR), dimension(*) :: testName
|
||||
character(C_CHAR), dimension(*) :: varName
|
||||
|
||||
real(C_DOUBLE), value :: val
|
||||
real(C_DOUBLE), value :: expectedValue
|
||||
real(C_DOUBLE), value :: accuracyTarget
|
||||
end function qmckl_probe_check_c
|
||||
|
||||
logical(c_bool) function qmckl_probe_check_relative_c &
|
||||
(testName, varName, val, expectedValue, accuracyTarget) &
|
||||
bind(C, name="qmckl_probe_check_relative")
|
||||
|
||||
use, intrinsic :: iso_c_binding
|
||||
import
|
||||
implicit none
|
||||
|
||||
character(C_CHAR), dimension(*) :: testName
|
||||
character(C_CHAR), dimension(*) :: varName
|
||||
|
||||
real(C_DOUBLE), value :: val
|
||||
real(C_DOUBLE), value :: expectedValue
|
||||
real(C_DOUBLE), value :: accuracyTarget
|
||||
end function qmckl_probe_check_relative_c
|
||||
end interface
|
||||
|
||||
logical function qmckl_probe (testName, varName, val)
|
||||
implicit none
|
||||
character, dimension(*) :: testName
|
||||
character, dimension(*) :: varName
|
||||
double precision :: val
|
||||
return qmckl_probe_c(testName//C_NULL_CHAR, varName//C_NULL_CHAR, val)
|
||||
end function qmckl_probe
|
||||
|
||||
logical(c_bool) function qmckl_probe_check &
|
||||
(testName, varName, val, expectedValue, accuracyTarget) &
|
||||
bind(C, name="qmckl_probe_check_f")
|
||||
|
||||
use, intrinsic :: iso_c_binding
|
||||
import
|
||||
logical function qmckl_probe_check
|
||||
(testName, varName, val, expectedValue, accuracyTarget)
|
||||
implicit none
|
||||
|
||||
character(C_CHAR), dimension(*) :: testName
|
||||
character(C_CHAR), dimension(*) :: varName
|
||||
|
||||
real(C_DOUBLE) :: val
|
||||
real(C_DOUBLE) :: expectedValue
|
||||
real(C_DOUBLE) :: accuracyTarget
|
||||
character, dimension(*) :: testName
|
||||
character, dimension(*) :: varName
|
||||
double precision :: val
|
||||
double precision :: expectedValue
|
||||
double precision :: accuracyTarget
|
||||
return qmckl_probe_check_c(testName//C_NULL_CHAR, varName//C_NULL_CHAR, &
|
||||
val, expectedValue, accuracyTarget)
|
||||
end function qmckl_probe_check
|
||||
|
||||
logical(c_bool) function qmckl_probe_check_relative &
|
||||
(testName, varName, val, expectedValue, accuracyTarget) &
|
||||
bind(C, name="qmckl_probe_check_relative_f")
|
||||
|
||||
use, intrinsic :: iso_c_binding
|
||||
import
|
||||
logical function qmckl_probe_check_relative &
|
||||
(testName, varName, val, expectedValue, accuracyTarget)
|
||||
implicit none
|
||||
|
||||
character(C_CHAR), dimension(*) :: testName
|
||||
character(C_CHAR), dimension(*) :: varName
|
||||
|
||||
real(C_DOUBLE) :: val
|
||||
real(C_DOUBLE) :: expectedValue
|
||||
real(C_DOUBLE) :: accuracyTarget
|
||||
character, dimension(*) :: testName
|
||||
character, dimension(*) :: varName
|
||||
double precision :: val
|
||||
double precision :: expectedValue
|
||||
double precision :: accuracyTarget
|
||||
return qmckl_probe_check_relative_c(testName//C_NULL_CHAR, varName//C_NULL_CHAR, &
|
||||
val, expectedValue, accuracyTarget)
|
||||
end function qmckl_probe_check_relative
|
||||
end interface
|
||||
end module qmckl_probes_f
|
||||
|
Loading…
Reference in New Issue
Block a user