simple reusable helpers for random things
The is equal interface is used to circumvent the fact that Fortran, rightfully, complains about comparing two reals without involving a tolerance, i.e. if(a == b) since there is no guarantee that the two reals are exactly equal due to floating point precision issues. The functions are defined as elemental
Usage: if (is_equal(a, b)) then where a and b are real numbers, and the function will return true if they are equal within the tolerance defined in pic_global_definitions.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | a | |||
real(kind=sp), | intent(in) | :: | b |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | a | |||
real(kind=dp), | intent(in) | :: | b |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | a | |||
real(kind=dp), | intent(in) | :: | b |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | a | |||
real(kind=sp), | intent(in) | :: | b |
this subroutine runs a random dgemm to create work so that timers and other testing utils work nicely