Please do not modify this file to implement new methods, please go look at tools/autogen/pic_array_cpu.fypp and edit the generator.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=default_int), | public, | parameter | :: | ASCENDING | = | 1 | |
| integer(kind=default_int), | public, | parameter | :: | DESCENDING | = | 2 | |
| integer(kind=default_int), | private, | parameter | :: | block_size | = | 32 |
This is the size to block over for matrices for performance purposes |
| character(len=5), | private, | parameter | :: | default_format | = | "NUMPY" |
supported formats: NUMPY, MATHEMATICA, and PLAIN which resembles numpy |
| character(len=*), | private, | parameter | :: | fmt_edge | = | "(A)" | |
| character(len=*), | private, | parameter | :: | fmt_in | = | '(A, ", ")' | |
| logical, | private | :: | use_threaded_default | = | .false. |
get_threading_mode returns the current threading mode for the array routines Usage: mode = get_threading_mode()
get the current threading mode for the array routines Usage: mode = get_threading_mode()
is_sorted provides a simple way to checking if a 1d array is sorted it is implemented for int32, int64, sp, and dp datatypes. The default is to check if an array is sorted in ascending fashion.
Usage: result = is_sorted(array, [optional] ASCENDING/DESCENDING)
check if a 1d array of type int32 is sorted
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | array(:) | |||
| integer(kind=default_int), | intent(in), | optional | :: | order |
check if a 1d array of type int64 is sorted
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(in) | :: | array(:) | |||
| integer(kind=default_int), | intent(in), | optional | :: | order |
check if a 1d array of type sp is sorted
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(in) | :: | array(:) | |||
| integer(kind=default_int), | intent(in), | optional | :: | order |
check if a 1d array of type dp is sorted
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | array(:) | |||
| integer(kind=default_int), | intent(in), | optional | :: | order |
check if a 1d array of type char is sorted
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | array(:) | |||
| integer(kind=default_int), | intent(in), | optional | :: | order |
copy provides a blas-less implementation of xcopy where x is (i,s,d) icopy, scopy, dcopy if you built pic with BLAS use the copy interface provided there, I will not beat BLAS copy is implemented for (int32, int64, sp, dp) for 1 and 2d arrays of the same types
Usage: call pic_copy(destination, source, [optional] threaded, [optional] err)
This subroutine is threaded for performance purposes if threaded is set to .true.
A destination whose shape differs from the source is a caller error. If the optional err argument is present it is set to ERROR_VALIDATION and the destination is left unchanged; if err is absent the mismatch aborts the program with error stop, which is the historical behaviour.
Note
If this subroutine is called inside a omp threaded region it will run serially because of nested parallelism
copy a vector of datatype int32
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(inout) | :: | dest(:) | |||
| integer(kind=int32), | intent(in) | :: | source(:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION on a size mismatch, leaving dest unchanged; when absent a mismatch aborts with error stop |
copy a vector of datatype int64
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(inout) | :: | dest(:) | |||
| integer(kind=int64), | intent(in) | :: | source(:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION on a size mismatch, leaving dest unchanged; when absent a mismatch aborts with error stop |
copy a vector of datatype sp
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(inout) | :: | dest(:) | |||
| real(kind=sp), | intent(in) | :: | source(:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION on a size mismatch, leaving dest unchanged; when absent a mismatch aborts with error stop |
copy a vector of datatype dp
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout) | :: | dest(:) | |||
| real(kind=dp), | intent(in) | :: | source(:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION on a size mismatch, leaving dest unchanged; when absent a mismatch aborts with error stop |
copy a matrix of datatype int32
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(inout) | :: | dest(:,:) | |||
| integer(kind=int32), | intent(in) | :: | source(:,:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION on a size mismatch, leaving dest unchanged; when absent a mismatch aborts with error stop |
copy a matrix of datatype int64
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(inout) | :: | dest(:,:) | |||
| integer(kind=int64), | intent(in) | :: | source(:,:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION on a size mismatch, leaving dest unchanged; when absent a mismatch aborts with error stop |
copy a matrix of datatype sp
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(inout) | :: | dest(:,:) | |||
| real(kind=sp), | intent(in) | :: | source(:,:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION on a size mismatch, leaving dest unchanged; when absent a mismatch aborts with error stop |
copy a matrix of datatype dp
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout) | :: | dest(:,:) | |||
| real(kind=dp), | intent(in) | :: | source(:,:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION on a size mismatch, leaving dest unchanged; when absent a mismatch aborts with error stop |
copy a tensor of datatype int32
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(inout) | :: | dest(:,:,:) | |||
| integer(kind=int32), | intent(in) | :: | source(:,:,:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION on a size mismatch, leaving dest unchanged; when absent a mismatch aborts with error stop |
copy a tensor of datatype int64
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(inout) | :: | dest(:,:,:) | |||
| integer(kind=int64), | intent(in) | :: | source(:,:,:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION on a size mismatch, leaving dest unchanged; when absent a mismatch aborts with error stop |
copy a tensor of datatype sp
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(inout) | :: | dest(:,:,:) | |||
| real(kind=sp), | intent(in) | :: | source(:,:,:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION on a size mismatch, leaving dest unchanged; when absent a mismatch aborts with error stop |
copy a tensor of datatype dp
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout) | :: | dest(:,:,:) | |||
| real(kind=dp), | intent(in) | :: | source(:,:,:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION on a size mismatch, leaving dest unchanged; when absent a mismatch aborts with error stop |
fill provides a generic interface to assing a value alpha of types (int32, int64, sp, dp) as defined in pic_types.F90 The inteface supports filling 1d and 2d arrays of the specified variables
Usage: call pic_fill(array, value, [optional] threaded)
This subroutine is threaded for performance purposes if threaded is set to .true.
Note
If this subroutine is called inside a omp threaded region it will run serially because of nested parallelism
fill a vector of datatype int32 with a value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(inout) | :: | vector(:) | |||
| integer(kind=int32), | intent(in) | :: | alpha | |||
| logical, | intent(in), | optional | :: | threaded |
fill a vector of datatype int64 with a value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(inout) | :: | vector(:) | |||
| integer(kind=int64), | intent(in) | :: | alpha | |||
| logical, | intent(in), | optional | :: | threaded |
fill a vector of datatype sp with a value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(inout) | :: | vector(:) | |||
| real(kind=sp), | intent(in) | :: | alpha | |||
| logical, | intent(in), | optional | :: | threaded |
fill a vector of datatype dp with a value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout) | :: | vector(:) | |||
| real(kind=dp), | intent(in) | :: | alpha | |||
| logical, | intent(in), | optional | :: | threaded |
fill a matrix of datatype int32 with a value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(inout) | :: | matrix(:,:) | |||
| integer(kind=int32), | intent(in) | :: | alpha | |||
| logical, | intent(in), | optional | :: | threaded |
fill a matrix of datatype int64 with a value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(inout) | :: | matrix(:,:) | |||
| integer(kind=int64), | intent(in) | :: | alpha | |||
| logical, | intent(in), | optional | :: | threaded |
fill a matrix of datatype sp with a value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(inout) | :: | matrix(:,:) | |||
| real(kind=sp), | intent(in) | :: | alpha | |||
| logical, | intent(in), | optional | :: | threaded |
fill a matrix of datatype dp with a value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout) | :: | matrix(:,:) | |||
| real(kind=dp), | intent(in) | :: | alpha | |||
| logical, | intent(in), | optional | :: | threaded |
fill a tensor of datatype int32 with a value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(inout) | :: | tensor(:,:,:) | |||
| integer(kind=int32), | intent(in) | :: | alpha | |||
| logical, | intent(in), | optional | :: | threaded |
fill a tensor of datatype int64 with a value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(inout) | :: | tensor(:,:,:) | |||
| integer(kind=int64), | intent(in) | :: | alpha | |||
| logical, | intent(in), | optional | :: | threaded |
fill a tensor of datatype sp with a value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(inout) | :: | tensor(:,:,:) | |||
| real(kind=sp), | intent(in) | :: | alpha | |||
| logical, | intent(in), | optional | :: | threaded |
fill a tensor of datatype dp with a value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout) | :: | tensor(:,:,:) | |||
| real(kind=dp), | intent(in) | :: | alpha | |||
| logical, | intent(in), | optional | :: | threaded |
Generic interface for printing arrays of different types
Usage: call pic_print_array(array, [optional] format, [optional] err) Where format can be: NUMPY, PLAIN, MATHEMATICA (can use lower caps)
Implemented types are:
array(:) -> int32, int64, sp, dp
array(:,:) -> int32, int64, sp, dp
array(:) (packed matrix) -> sp, dp
array(:,:,:) -> sp, dp
Two things can go wrong while printing, and both are reported through the optional err argument without changing what the routines do:
an unrecognised format string. err is set to ERROR_VALIDATION and the array is still printed using NumPy brackets. When err is absent a warning is printed to stdout instead, exactly as before.
an n_elements that is not a packed triangle size (the packed-matrix specifics only). err is set to ERROR_VALIDATION and nothing is printed. When err is absent the complaint is printed to stdout instead, again as before.
Neither case aborts, with or without err: these routines never terminated the program and still do not, so adding err cannot turn a working caller into a crashing one. A caller that wants to be told about bad input must pass err and inspect it; a caller that does not pass err gets the historical stdout message and no other signal.
print a vector of values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | vector(:) | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION for an unsupported format_type; the vector is printed with NumPy brackets regardless |
print a vector of values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(in) | :: | vector(:) | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION for an unsupported format_type; the vector is printed with NumPy brackets regardless |
print a vector of values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(in) | :: | vector(:) | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION for an unsupported format_type; the vector is printed with NumPy brackets regardless |
print a vector of values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | vector(:) | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION for an unsupported format_type; the vector is printed with NumPy brackets regardless |
print a matrix of values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | matrix(:,:) | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION for an unsupported format_type; the matrix is printed with NumPy brackets regardless |
print a matrix of values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(in) | :: | matrix(:,:) | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION for an unsupported format_type; the matrix is printed with NumPy brackets regardless |
print a matrix of values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(in) | :: | matrix(:,:) | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION for an unsupported format_type; the matrix is printed with NumPy brackets regardless |
print a matrix of values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | matrix(:,:) | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION for an unsupported format_type; the matrix is printed with NumPy brackets regardless |
Print a packed lower triangular matrix of values
n_elements must be n*(n + 1)/2 for some n. If it is not, nothing is printed: err is set to ERROR_VALIDATION when it is present, and the complaint goes to stdout when it is not. Neither path aborts, which is how this routine has always behaved.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | packed(:) | |||
| integer(kind=default_int), | intent(in) | :: | n_elements | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION when n_elements is not a packed triangle size, or when format_type is not supported |
Print a packed lower triangular matrix of values
n_elements must be n*(n + 1)/2 for some n. If it is not, nothing is printed: err is set to ERROR_VALIDATION when it is present, and the complaint goes to stdout when it is not. Neither path aborts, which is how this routine has always behaved.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(in) | :: | packed(:) | |||
| integer(kind=default_int), | intent(in) | :: | n_elements | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION when n_elements is not a packed triangle size, or when format_type is not supported |
Print a packed lower triangular matrix of values
n_elements must be n*(n + 1)/2 for some n. If it is not, nothing is printed: err is set to ERROR_VALIDATION when it is present, and the complaint goes to stdout when it is not. Neither path aborts, which is how this routine has always behaved.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(in) | :: | packed(:) | |||
| integer(kind=default_int), | intent(in) | :: | n_elements | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION when n_elements is not a packed triangle size, or when format_type is not supported |
Print a packed lower triangular matrix of values
n_elements must be n*(n + 1)/2 for some n. If it is not, nothing is printed: err is set to ERROR_VALIDATION when it is present, and the complaint goes to stdout when it is not. Neither path aborts, which is how this routine has always behaved.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | packed(:) | |||
| integer(kind=default_int), | intent(in) | :: | n_elements | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION when n_elements is not a packed triangle size, or when format_type is not supported |
Print a 3D tensor of values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | matrix(:,:,:) | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION for an unsupported format_type; the tensor is printed with NumPy brackets regardless |
Print a 3D tensor of values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(in) | :: | matrix(:,:,:) | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION for an unsupported format_type; the tensor is printed with NumPy brackets regardless |
Print a 3D tensor of values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(in) | :: | matrix(:,:,:) | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION for an unsupported format_type; the tensor is printed with NumPy brackets regardless |
Print a 3D tensor of values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | matrix(:,:,:) | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION for an unsupported format_type; the tensor is printed with NumPy brackets regardless |
should not be used, intended for testing purposes. randomizes an array of type int32
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(inout) | :: | array(:) |
should not be used, intended for testing purposes. randomizes an array of type int64
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(inout) | :: | array(:) |
should not be used, intended for testing purposes. randomizes an array of type sp
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(inout) | :: | array(:) |
should not be used, intended for testing purposes. randomizes an array of type dp
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout) | :: | array(:) |
should not be used, intended for testing purposes. randomizes an array of type char
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(inout) | :: | array(:) |
pic_sum provides a threaded alternative to the sum(array) Fortran intrinsic which will be too slow for large sizes of vectors and matrices. Note that this provides the total sum. As opposed to the blas alternative XASUM which does the absolute sum
pic_sum is implemented for (int32, int64, sp, dp) 1 and 2d arrays
Usage: result = pic_sum(array, [optional] threaded)
This subroutine is threaded for performance purposes if threaded is set to true
Note
If this subroutine is called inside a omp threaded region it will run serially because of nested parallelism
perform the total sum of all components of type int32 in a vector
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | vector(:) | |||
| logical, | intent(in), | optional | :: | threaded |
perform the total sum of all components of type int64 in a vector
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(in) | :: | vector(:) | |||
| logical, | intent(in), | optional | :: | threaded |
perform the total sum of all components of type sp in a vector
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(in) | :: | vector(:) | |||
| logical, | intent(in), | optional | :: | threaded |
perform the total sum of all components of type dp in a vector
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | vector(:) | |||
| logical, | intent(in), | optional | :: | threaded |
perform the total sum of all components of type int32 in a matrix
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | matrix(:,:) | |||
| logical, | intent(in), | optional | :: | threaded |
perform the total sum of all components of type int64 in a matrix
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(in) | :: | matrix(:,:) | |||
| logical, | intent(in), | optional | :: | threaded |
perform the total sum of all components of type sp in a matrix
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(in) | :: | matrix(:,:) | |||
| logical, | intent(in), | optional | :: | threaded |
perform the total sum of all components of type dp in a matrix
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | matrix(:,:) | |||
| logical, | intent(in), | optional | :: | threaded |
perform the total sum of all components of type int32 in a 3d tensor
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | tensor(:,:,:) | |||
| logical, | intent(in), | optional | :: | threaded |
perform the total sum of all components of type int64 in a 3d tensor
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(in) | :: | tensor(:,:,:) | |||
| logical, | intent(in), | optional | :: | threaded |
perform the total sum of all components of type sp in a 3d tensor
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(in) | :: | tensor(:,:,:) | |||
| logical, | intent(in), | optional | :: | threaded |
perform the total sum of all components of type dp in a 3d tensor
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | tensor(:,:,:) | |||
| logical, | intent(in), | optional | :: | threaded |
pic_transpose provides a blas-less, threaded alternative to the Fortran transpose intrinsic which will be slow for large matrix sizes. pic_transpose does not assume symmetric matrices
pic_transpose is implemented for (int32, int64, sp, dp) 2d arrays
Usage: call pic_transpose(matrix_to_transpose, result, [optional] threaded, [optional] err)
This subroutine is threaded for performance purposes if threaded is set to true
The result must be shaped (cols, rows) for an input shaped (rows, cols). If it is not, the optional err argument is set to ERROR_VALIDATION; if err is absent the mismatch aborts the program with error stop, which is the historical behaviour. The result is intent(out), so on the error path it is undefined and the caller must not read it.
Note
If this subroutine is called inside a omp threaded region it will run serially because of nested parallelism
transpose a matrix of datatype int32
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | A(:,:) | |||
| integer(kind=int32), | intent(out) | :: | B(:,:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION when B is not shaped (cols, rows); B is intent(out) and therefore undefined on that path. When err is absent a mismatch aborts with error stop |
transpose a matrix of datatype int64
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(in) | :: | A(:,:) | |||
| integer(kind=int64), | intent(out) | :: | B(:,:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION when B is not shaped (cols, rows); B is intent(out) and therefore undefined on that path. When err is absent a mismatch aborts with error stop |
transpose a matrix of datatype sp
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(in) | :: | A(:,:) | |||
| real(kind=sp), | intent(out) | :: | B(:,:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION when B is not shaped (cols, rows); B is intent(out) and therefore undefined on that path. When err is absent a mismatch aborts with error stop |
transpose a matrix of datatype dp
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | A(:,:) | |||
| real(kind=dp), | intent(out) | :: | B(:,:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION when B is not shaped (cols, rows); B is intent(out) and therefore undefined on that path. When err is absent a mismatch aborts with error stop |
set_threading sets the threading mode for the array routines this will set the use_threaded variable to true or false depending on the input Usage: call set_threading_mode(.true.) or call set_threading_mode(.false.)
set the threading mode for the array routines, this will set the use_threaded variable to true or false depending on the input
Usage: call set_threading(.true.) or call set_threading(.false.)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(in) | :: | threaded |
get the current threading mode for the array routines Usage: mode = get_threading_mode()
check if a 1d array of type char is sorted
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | array(:) | |||
| integer(kind=default_int), | intent(in), | optional | :: | order |
check if a 1d array of type dp is sorted
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | array(:) | |||
| integer(kind=default_int), | intent(in), | optional | :: | order |
check if a 1d array of type int32 is sorted
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | array(:) | |||
| integer(kind=default_int), | intent(in), | optional | :: | order |
check if a 1d array of type int64 is sorted
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(in) | :: | array(:) | |||
| integer(kind=default_int), | intent(in), | optional | :: | order |
check if a 1d array of type sp is sorted
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(in) | :: | array(:) | |||
| integer(kind=default_int), | intent(in), | optional | :: | order |
perform the total sum of all components of type dp in a 3d tensor
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | tensor(:,:,:) | |||
| logical, | intent(in), | optional | :: | threaded |
perform the total sum of all components of type int32 in a 3d tensor
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | tensor(:,:,:) | |||
| logical, | intent(in), | optional | :: | threaded |
perform the total sum of all components of type int64 in a 3d tensor
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(in) | :: | tensor(:,:,:) | |||
| logical, | intent(in), | optional | :: | threaded |
perform the total sum of all components of type sp in a 3d tensor
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(in) | :: | tensor(:,:,:) | |||
| logical, | intent(in), | optional | :: | threaded |
perform the total sum of all components of type dp in a matrix
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | matrix(:,:) | |||
| logical, | intent(in), | optional | :: | threaded |
perform the total sum of all components of type int32 in a matrix
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | matrix(:,:) | |||
| logical, | intent(in), | optional | :: | threaded |
perform the total sum of all components of type int64 in a matrix
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(in) | :: | matrix(:,:) | |||
| logical, | intent(in), | optional | :: | threaded |
perform the total sum of all components of type sp in a matrix
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(in) | :: | matrix(:,:) | |||
| logical, | intent(in), | optional | :: | threaded |
perform the total sum of all components of type dp in a vector
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | vector(:) | |||
| logical, | intent(in), | optional | :: | threaded |
perform the total sum of all components of type int32 in a vector
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | vector(:) | |||
| logical, | intent(in), | optional | :: | threaded |
perform the total sum of all components of type int64 in a vector
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(in) | :: | vector(:) | |||
| logical, | intent(in), | optional | :: | threaded |
perform the total sum of all components of type sp in a vector
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(in) | :: | vector(:) | |||
| logical, | intent(in), | optional | :: | threaded |
copy a tensor of datatype dp
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout) | :: | dest(:,:,:) | |||
| real(kind=dp), | intent(in) | :: | source(:,:,:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION on a size mismatch, leaving dest unchanged; when absent a mismatch aborts with error stop |
copy a tensor of datatype int32
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(inout) | :: | dest(:,:,:) | |||
| integer(kind=int32), | intent(in) | :: | source(:,:,:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION on a size mismatch, leaving dest unchanged; when absent a mismatch aborts with error stop |
copy a tensor of datatype int64
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(inout) | :: | dest(:,:,:) | |||
| integer(kind=int64), | intent(in) | :: | source(:,:,:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION on a size mismatch, leaving dest unchanged; when absent a mismatch aborts with error stop |
copy a tensor of datatype sp
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(inout) | :: | dest(:,:,:) | |||
| real(kind=sp), | intent(in) | :: | source(:,:,:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION on a size mismatch, leaving dest unchanged; when absent a mismatch aborts with error stop |
copy a matrix of datatype dp
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout) | :: | dest(:,:) | |||
| real(kind=dp), | intent(in) | :: | source(:,:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION on a size mismatch, leaving dest unchanged; when absent a mismatch aborts with error stop |
copy a matrix of datatype int32
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(inout) | :: | dest(:,:) | |||
| integer(kind=int32), | intent(in) | :: | source(:,:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION on a size mismatch, leaving dest unchanged; when absent a mismatch aborts with error stop |
copy a matrix of datatype int64
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(inout) | :: | dest(:,:) | |||
| integer(kind=int64), | intent(in) | :: | source(:,:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION on a size mismatch, leaving dest unchanged; when absent a mismatch aborts with error stop |
copy a matrix of datatype sp
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(inout) | :: | dest(:,:) | |||
| real(kind=sp), | intent(in) | :: | source(:,:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION on a size mismatch, leaving dest unchanged; when absent a mismatch aborts with error stop |
copy a vector of datatype dp
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout) | :: | dest(:) | |||
| real(kind=dp), | intent(in) | :: | source(:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION on a size mismatch, leaving dest unchanged; when absent a mismatch aborts with error stop |
copy a vector of datatype int32
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(inout) | :: | dest(:) | |||
| integer(kind=int32), | intent(in) | :: | source(:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION on a size mismatch, leaving dest unchanged; when absent a mismatch aborts with error stop |
copy a vector of datatype int64
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(inout) | :: | dest(:) | |||
| integer(kind=int64), | intent(in) | :: | source(:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION on a size mismatch, leaving dest unchanged; when absent a mismatch aborts with error stop |
copy a vector of datatype sp
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(inout) | :: | dest(:) | |||
| real(kind=sp), | intent(in) | :: | source(:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION on a size mismatch, leaving dest unchanged; when absent a mismatch aborts with error stop |
fill a tensor of datatype dp with a value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout) | :: | tensor(:,:,:) | |||
| real(kind=dp), | intent(in) | :: | alpha | |||
| logical, | intent(in), | optional | :: | threaded |
fill a tensor of datatype int32 with a value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(inout) | :: | tensor(:,:,:) | |||
| integer(kind=int32), | intent(in) | :: | alpha | |||
| logical, | intent(in), | optional | :: | threaded |
fill a tensor of datatype int64 with a value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(inout) | :: | tensor(:,:,:) | |||
| integer(kind=int64), | intent(in) | :: | alpha | |||
| logical, | intent(in), | optional | :: | threaded |
fill a tensor of datatype sp with a value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(inout) | :: | tensor(:,:,:) | |||
| real(kind=sp), | intent(in) | :: | alpha | |||
| logical, | intent(in), | optional | :: | threaded |
fill a matrix of datatype dp with a value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout) | :: | matrix(:,:) | |||
| real(kind=dp), | intent(in) | :: | alpha | |||
| logical, | intent(in), | optional | :: | threaded |
fill a matrix of datatype int32 with a value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(inout) | :: | matrix(:,:) | |||
| integer(kind=int32), | intent(in) | :: | alpha | |||
| logical, | intent(in), | optional | :: | threaded |
fill a matrix of datatype int64 with a value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(inout) | :: | matrix(:,:) | |||
| integer(kind=int64), | intent(in) | :: | alpha | |||
| logical, | intent(in), | optional | :: | threaded |
fill a matrix of datatype sp with a value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(inout) | :: | matrix(:,:) | |||
| real(kind=sp), | intent(in) | :: | alpha | |||
| logical, | intent(in), | optional | :: | threaded |
fill a vector of datatype dp with a value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout) | :: | vector(:) | |||
| real(kind=dp), | intent(in) | :: | alpha | |||
| logical, | intent(in), | optional | :: | threaded |
fill a vector of datatype int32 with a value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(inout) | :: | vector(:) | |||
| integer(kind=int32), | intent(in) | :: | alpha | |||
| logical, | intent(in), | optional | :: | threaded |
fill a vector of datatype int64 with a value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(inout) | :: | vector(:) | |||
| integer(kind=int64), | intent(in) | :: | alpha | |||
| logical, | intent(in), | optional | :: | threaded |
fill a vector of datatype sp with a value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(inout) | :: | vector(:) | |||
| real(kind=sp), | intent(in) | :: | alpha | |||
| logical, | intent(in), | optional | :: | threaded |
Print a 3D tensor of values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | matrix(:,:,:) | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION for an unsupported format_type; the tensor is printed with NumPy brackets regardless |
Print a 3D tensor of values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | matrix(:,:,:) | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION for an unsupported format_type; the tensor is printed with NumPy brackets regardless |
Print a 3D tensor of values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(in) | :: | matrix(:,:,:) | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION for an unsupported format_type; the tensor is printed with NumPy brackets regardless |
Print a 3D tensor of values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(in) | :: | matrix(:,:,:) | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION for an unsupported format_type; the tensor is printed with NumPy brackets regardless |
print a matrix of values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | matrix(:,:) | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION for an unsupported format_type; the matrix is printed with NumPy brackets regardless |
print a matrix of values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | matrix(:,:) | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION for an unsupported format_type; the matrix is printed with NumPy brackets regardless |
print a matrix of values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(in) | :: | matrix(:,:) | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION for an unsupported format_type; the matrix is printed with NumPy brackets regardless |
print a matrix of values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(in) | :: | matrix(:,:) | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION for an unsupported format_type; the matrix is printed with NumPy brackets regardless |
Print a packed lower triangular matrix of values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | packed(:) | |||
| integer(kind=default_int), | intent(in) | :: | n_elements | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION when n_elements is not a packed triangle size, or when format_type is not supported |
Print a packed lower triangular matrix of values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | packed(:) | |||
| integer(kind=default_int), | intent(in) | :: | n_elements | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION when n_elements is not a packed triangle size, or when format_type is not supported |
Print a packed lower triangular matrix of values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(in) | :: | packed(:) | |||
| integer(kind=default_int), | intent(in) | :: | n_elements | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION when n_elements is not a packed triangle size, or when format_type is not supported |
Print a packed lower triangular matrix of values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(in) | :: | packed(:) | |||
| integer(kind=default_int), | intent(in) | :: | n_elements | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION when n_elements is not a packed triangle size, or when format_type is not supported |
print a vector of values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | vector(:) | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION for an unsupported format_type; the vector is printed with NumPy brackets regardless |
print a vector of values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | vector(:) | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION for an unsupported format_type; the vector is printed with NumPy brackets regardless |
print a vector of values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(in) | :: | vector(:) | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION for an unsupported format_type; the vector is printed with NumPy brackets regardless |
print a vector of values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(in) | :: | vector(:) | |||
| character(len=*), | intent(in), | optional | :: | format_type | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION for an unsupported format_type; the vector is printed with NumPy brackets regardless |
should not be used, intended for testing purposes. randomizes an array of type char
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(inout) | :: | array(:) |
should not be used, intended for testing purposes. randomizes an array of type dp
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout) | :: | array(:) |
should not be used, intended for testing purposes. randomizes an array of type int32
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(inout) | :: | array(:) |
should not be used, intended for testing purposes. randomizes an array of type int64
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(inout) | :: | array(:) |
should not be used, intended for testing purposes. randomizes an array of type sp
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(inout) | :: | array(:) |
Set brackets based on output format type
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | format_type | |||
| character(len=1), | intent(out) | :: | open_bracket | |||
| character(len=1), | intent(out) | :: | close_bracket | |||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION for an unsupported format_type; the brackets still come back as the NumPy defaults |
set the threading mode for the array routines, this will set the use_threaded variable to true or false depending on the input
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(in) | :: | threaded |
transpose a matrix of datatype dp
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | A(:,:) | |||
| real(kind=dp), | intent(out) | :: | B(:,:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION when B is not shaped (cols, rows); B is intent(out) and therefore undefined on that path. When err is absent a mismatch aborts with error stop |
transpose a matrix of datatype int32
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | A(:,:) | |||
| integer(kind=int32), | intent(out) | :: | B(:,:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION when B is not shaped (cols, rows); B is intent(out) and therefore undefined on that path. When err is absent a mismatch aborts with error stop |
transpose a matrix of datatype int64
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(in) | :: | A(:,:) | |||
| integer(kind=int64), | intent(out) | :: | B(:,:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION when B is not shaped (cols, rows); B is intent(out) and therefore undefined on that path. When err is absent a mismatch aborts with error stop |
transpose a matrix of datatype sp
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(in) | :: | A(:,:) | |||
| real(kind=sp), | intent(out) | :: | B(:,:) | |||
| logical, | intent(in), | optional | :: | threaded | ||
| type(error_t), | intent(inout), | optional | :: | err |
set to ERROR_VALIDATION when B is not shaped (cols, rows); B is intent(out) and therefore undefined on that path. When err is absent a mismatch aborts with error stop |