Utils module for FTorch containing value comparisons for testing
Determines whether two real32-valued 1D arrays coincide to a given relative tolerance
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real32), | intent(in), | dimension(:) | :: | got |
The array of values to be tested |
|
| real(kind=real32), | intent(in), | dimension(:) | :: | expect |
The array of expected values |
|
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real32), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the comparison pass?
Determines whether two real32-valued 2D arrays coincide to a given relative tolerance
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real32), | intent(in), | dimension(:,:) | :: | got |
The array of values to be tested |
|
| real(kind=real32), | intent(in), | dimension(:,:) | :: | expect |
The array of expected values |
|
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real32), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the comparison pass?
Determines whether two real32-valued 3D arrays coincide to a given relative tolerance
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real32), | intent(in), | dimension(:,:,:) | :: | got |
The array of values to be tested |
|
| real(kind=real32), | intent(in), | dimension(:,:,:) | :: | expect |
The array of expected values |
|
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real32), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the comparison pass?
Determines whether two real64-valued 1D arrays coincide to a given relative tolerance
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in), | dimension(:) | :: | got |
The array of values to be tested |
|
| real(kind=real64), | intent(in), | dimension(:) | :: | expect |
The array of expected values |
|
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real64), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the comparison pass?
Determines whether two real64-valued 2D arrays coincide to a given relative tolerance
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in), | dimension(:,:) | :: | got |
The array of values to be tested |
|
| real(kind=real64), | intent(in), | dimension(:,:) | :: | expect |
The array of expected values |
|
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real64), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the comparison pass?
Determines whether two real64-valued 3D arrays coincide to a given relative tolerance
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in), | dimension(:,:,:) | :: | got |
The array of values to be tested |
|
| real(kind=real64), | intent(in), | dimension(:,:,:) | :: | expect |
The array of expected values |
|
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real64), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the comparison pass?
Alias for allclose_real32_1d
This version is deprecated and is only included for backwards compatibility. It will be removed in FTorch version 2.0.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real32), | intent(in), | dimension(:) | :: | got |
The array of values to be tested |
|
| real(kind=real32), | intent(in), | dimension(:) | :: | expect |
The array of expected values |
|
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real32), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the assertion pass?
Alias for allclose_real32_2d
This version is deprecated and is only included for backwards compatibility. It will be removed in FTorch version 2.0.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real32), | intent(in), | dimension(:,:) | :: | got |
The array of values to be tested |
|
| real(kind=real32), | intent(in), | dimension(:,:) | :: | expect |
The array of expected values |
|
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real32), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the assertion pass?
Alias for allclose_real32_3d
This version is deprecated and is only included for backwards compatibility. It will be removed in FTorch version 2.0.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real32), | intent(in), | dimension(:,:,:) | :: | got |
The array of values to be tested |
|
| real(kind=real32), | intent(in), | dimension(:,:,:) | :: | expect |
The array of expected values |
|
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real32), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the assertion pass?
Alias for allclose_real64_1d
This version is deprecated and is only included for backwards compatibility. It will be removed in FTorch version 2.0.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in), | dimension(:) | :: | got |
The array of values to be tested |
|
| real(kind=real64), | intent(in), | dimension(:) | :: | expect |
The array of expected values |
|
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real64), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the assertion pass?
Alias for allclose_real64_2d
This version is deprecated and is only included for backwards compatibility. It will be removed in FTorch version 2.0.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in), | dimension(:,:) | :: | got |
The array of values to be tested |
|
| real(kind=real64), | intent(in), | dimension(:,:) | :: | expect |
The array of expected values |
|
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real64), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the assertion pass?
Alias for allclose_real64_3d
This version is deprecated and is only included for backwards compatibility. It will be removed in FTorch version 2.0.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in), | dimension(:,:,:) | :: | got |
The array of values to be tested |
|
| real(kind=real64), | intent(in), | dimension(:,:,:) | :: | expect |
The array of expected values |
|
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real64), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the assertion pass?
Alias for isclose_real32
This version is deprecated and is only included for backwards compatibility. It will be removed in FTorch version 2.0.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real32), | intent(in) | :: | got |
The value to be tested |
||
| real(kind=real32), | intent(in) | :: | expect |
The expected value |
||
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real32), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the assertion pass?
Alias for isclose_real64
This version is deprecated and is only included for backwards compatibility. It will be removed in FTorch version 2.0.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | got |
The value to be tested |
||
| real(kind=real64), | intent(in) | :: | expect |
The expected value |
||
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real64), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the assertion pass?
Determines whether two real32 values coincide to a given relative tolerance
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real32), | intent(in) | :: | got |
The value to be tested |
||
| real(kind=real32), | intent(in) | :: | expect |
The expected value |
||
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real32), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the comparison pass?
Determines whether two real64 values coincide to a given relative tolerance
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | got |
The value to be tested |
||
| real(kind=real64), | intent(in) | :: | expect |
The expected value |
||
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real64), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the comparison pass?
Determines whether two real32-valued 1D arrays coincide to a given relative tolerance
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real32), | intent(in), | dimension(:) | :: | got |
The array of values to be tested |
|
| real(kind=real32), | intent(in), | dimension(:) | :: | expect |
The array of expected values |
|
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real32), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the comparison pass?
Determines whether two real32-valued 2D arrays coincide to a given relative tolerance
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real32), | intent(in), | dimension(:,:) | :: | got |
The array of values to be tested |
|
| real(kind=real32), | intent(in), | dimension(:,:) | :: | expect |
The array of expected values |
|
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real32), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the comparison pass?
Determines whether two real32-valued 3D arrays coincide to a given relative tolerance
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real32), | intent(in), | dimension(:,:,:) | :: | got |
The array of values to be tested |
|
| real(kind=real32), | intent(in), | dimension(:,:,:) | :: | expect |
The array of expected values |
|
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real32), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the comparison pass?
Determines whether two real64-valued 1D arrays coincide to a given relative tolerance
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in), | dimension(:) | :: | got |
The array of values to be tested |
|
| real(kind=real64), | intent(in), | dimension(:) | :: | expect |
The array of expected values |
|
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real64), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the comparison pass?
Determines whether two real64-valued 2D arrays coincide to a given relative tolerance
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in), | dimension(:,:) | :: | got |
The array of values to be tested |
|
| real(kind=real64), | intent(in), | dimension(:,:) | :: | expect |
The array of expected values |
|
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real64), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the comparison pass?
Determines whether two real64-valued 3D arrays coincide to a given relative tolerance
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in), | dimension(:,:,:) | :: | got |
The array of values to be tested |
|
| real(kind=real64), | intent(in), | dimension(:,:,:) | :: | expect |
The array of expected values |
|
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real64), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the comparison pass?
Alias for allclose_real32_1d
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real32), | intent(in), | dimension(:) | :: | got |
The array of values to be tested |
|
| real(kind=real32), | intent(in), | dimension(:) | :: | expect |
The array of expected values |
|
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real32), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the assertion pass?
Alias for allclose_real32_2d
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real32), | intent(in), | dimension(:,:) | :: | got |
The array of values to be tested |
|
| real(kind=real32), | intent(in), | dimension(:,:) | :: | expect |
The array of expected values |
|
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real32), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the assertion pass?
Alias for allclose_real32_3d
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real32), | intent(in), | dimension(:,:,:) | :: | got |
The array of values to be tested |
|
| real(kind=real32), | intent(in), | dimension(:,:,:) | :: | expect |
The array of expected values |
|
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real32), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the assertion pass?
Alias for allclose_real64_1d
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in), | dimension(:) | :: | got |
The array of values to be tested |
|
| real(kind=real64), | intent(in), | dimension(:) | :: | expect |
The array of expected values |
|
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real64), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the assertion pass?
Alias for allclose_real64_2d
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in), | dimension(:,:) | :: | got |
The array of values to be tested |
|
| real(kind=real64), | intent(in), | dimension(:,:) | :: | expect |
The array of expected values |
|
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real64), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the assertion pass?
Alias for allclose_real64_3d
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in), | dimension(:,:,:) | :: | got |
The array of values to be tested |
|
| real(kind=real64), | intent(in), | dimension(:,:,:) | :: | expect |
The array of expected values |
|
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real64), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the assertion pass?
Alias for isclose_real32
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real32), | intent(in) | :: | got |
The value to be tested |
||
| real(kind=real32), | intent(in) | :: | expect |
The expected value |
||
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real32), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the assertion pass?
Alias for isclose_real64
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | got |
The value to be tested |
||
| real(kind=real64), | intent(in) | :: | expect |
The expected value |
||
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real64), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the assertion pass?
Determines whether two real32 values coincide to a given relative tolerance
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real32), | intent(in) | :: | got |
The value to be tested |
||
| real(kind=real32), | intent(in) | :: | expect |
The expected value |
||
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real32), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the comparison pass?
Determines whether two real64 values coincide to a given relative tolerance
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | got |
The value to be tested |
||
| real(kind=real64), | intent(in) | :: | expect |
The expected value |
||
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real64), | intent(in), | optional | :: | rtol |
Optional relative tolerance (defaults to 1e-5) |
|
| logical, | intent(in), | optional | :: | print_result |
Optionally print test result to screen (defaults to .true.) |
Did the comparison pass?
Print the result of a test to the terminal
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| character(len=*), | intent(in) | :: | message |
Message to print |
||
| logical, | intent(in) | :: | test_pass |
Result of the value comparison |