Provides a state/error handling derived type for advanced error handling of BLAS/LAPACK based linear algebra procedures. All procedures are pure. (Specification) Version: experimental
A fixed-storage state variable for error handling of linear algebra routines
Version: experimental
Error state handling: if the user requested the error state variable on output, just return it to the user. Otherwise, halt the program on error.
Version: experimental
Interfaces for comparison operators of error states with integer flags
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=ilp), | public, | parameter | :: | LINALG_ERROR | = | -2_ilp | |
integer(kind=ilp), | public, | parameter | :: | LINALG_INTERNAL_ERROR | = | -3_ilp | |
integer(kind=ilp), | public, | parameter | :: | LINALG_SUCCESS | = | 0_ilp |
State return types |
integer(kind=ilp), | public, | parameter | :: | LINALG_VALUE_ERROR | = | -1_ilp |
Error creation message, with location location
Create state with no message
Add location
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | where_at |
Location |
||
integer, | intent(in) | :: | flag |
Input error flag |
||
class(*), | intent(in), | optional, | dimension(..) | :: | a1 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a2 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a3 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a4 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a5 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a6 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a7 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a8 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a9 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a10 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a11 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a12 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a13 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a14 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a15 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a16 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a17 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a18 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a19 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a20 |
Optional rank-agnostic arguments |
Error creation message, from N input variables (numeric or strings)
Set error flag
Set chain
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | flag |
Input error flag |
||
class(*), | intent(in), | optional, | dimension(..) | :: | a1 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a2 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a3 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a4 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a5 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a6 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a7 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a8 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a9 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a10 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a11 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a12 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a13 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a14 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a15 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a16 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a17 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a18 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a19 |
Optional rank-agnostic arguments |
class(*), | intent(in), | optional, | dimension(..) | :: | a20 |
Optional rank-agnostic arguments |
Compare the error state with an integer flag
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(linalg_state_type), | intent(in) | :: | err | |||
integer, | intent(in) | :: | flag |
Compare an integer flag with the error state
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | flag | |||
type(linalg_state_type), | intent(in) | :: | err |
Compare the error state with an integer flag
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(linalg_state_type), | intent(in) | :: | err | |||
integer, | intent(in) | :: | flag |
Compare an integer flag with the error state
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | flag | |||
type(linalg_state_type), | intent(in) | :: | err |
Compare the error state with an integer flag
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(linalg_state_type), | intent(in) | :: | err | |||
integer, | intent(in) | :: | flag |
Compare an integer flag with the error state
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | flag | |||
type(linalg_state_type), | intent(in) | :: | err |
Comparison operators
Compare an error state with an integer flag
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(linalg_state_type), | intent(in) | :: | err | |||
integer, | intent(in) | :: | flag |
Compare an integer flag with the error state
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | flag | |||
type(linalg_state_type), | intent(in) | :: | err |
Compare the error state with an integer flag
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(linalg_state_type), | intent(in) | :: | err | |||
integer, | intent(in) | :: | flag |
Compare an integer flag with the error state
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | flag | |||
type(linalg_state_type), | intent(in) | :: | err |
Compare the error state with an integer flag
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(linalg_state_type), | intent(in) | :: | err | |||
integer, | intent(in) | :: | flag |
Compare an integer flag with the error state
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | flag | |||
type(linalg_state_type), | intent(in) | :: | err |
linalg_state_type
defines a state return type for a
linear algebra routine. State contains a status flag, a comment, and a
procedure specifier that can be used to mark where the error happened
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=MSG_LENGTH), | public | :: | message | = | repeat(' ', MSG_LENGTH) |
Message associated to the current state |
|
integer(kind=ilp), | public | :: | state | = | LINALG_SUCCESS |
The current exit state |
|
character(len=NAME_LENGTH), | public | :: | where_at | = | repeat(' ', NAME_LENGTH) |
Location of the state change |
private pure function new_state (where_at, flag, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) | Error creation message, with location location Create state with no message Add location |
private pure function new_state_nowhere (flag, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) | Error creation message, from N input variables (numeric or strings) Set error flag Set chain |
procedure, public :: destroy => state_destroy | ../../ Cleanup |
procedure, public :: error => state_is_error | |
procedure, public :: ok => state_is_ok | ../../ State properties |
procedure, public :: print => state_print | ../../ Print error message |
procedure, public :: print_msg => state_message |
Flow control: on output flag present, return it; otherwise, halt on error
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(linalg_state_type), | intent(in) | :: | ierr | |||
type(linalg_state_type), | intent(out), | optional | :: | ierr_out |