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 |
logical, | private | :: | use_threaded_default | = | .false. |
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 copy(destination, source, [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
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(inout) | :: | dest(:) | |||
integer(kind=int32), | intent(in) | :: | source(:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(inout) | :: | dest(:) | |||
integer(kind=int64), | intent(in) | :: | source(:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(inout) | :: | dest(:) | |||
real(kind=sp), | intent(in) | :: | source(:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(inout) | :: | dest(:) | |||
real(kind=dp), | intent(in) | :: | source(:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(inout) | :: | dest(:,:) | |||
integer(kind=int32), | intent(in) | :: | source(:,:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(inout) | :: | dest(:,:) | |||
integer(kind=int64), | intent(in) | :: | source(:,:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(inout) | :: | dest(:,:) | |||
real(kind=sp), | intent(in) | :: | source(:,:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(inout) | :: | dest(:,:) | |||
real(kind=dp), | intent(in) | :: | source(:,:) | |||
logical, | intent(in), | optional | :: | threaded |
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 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
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(inout) | :: | vector(:) | |||
integer(kind=int32), | intent(in) | :: | alpha | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(inout) | :: | vector(:) | |||
integer(kind=int64), | intent(in) | :: | alpha | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(inout) | :: | vector(:) | |||
real(kind=sp), | intent(in) | :: | alpha | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(inout) | :: | vector(:) | |||
real(kind=dp), | intent(in) | :: | alpha | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(inout) | :: | matrix(:,:) | |||
integer(kind=int32), | intent(in) | :: | alpha | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(inout) | :: | matrix(:,:) | |||
integer(kind=int64), | intent(in) | :: | alpha | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(inout) | :: | matrix(:,:) | |||
real(kind=sp), | intent(in) | :: | alpha | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(inout) | :: | matrix(:,:) | |||
real(kind=dp), | intent(in) | :: | alpha | |||
logical, | intent(in), | optional | :: | threaded |
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)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | array(:) | |||
integer(kind=default_int), | intent(in), | optional | :: | order |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | array(:) | |||
integer(kind=default_int), | intent(in), | optional | :: | order |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | array(:) | |||
integer(kind=default_int), | intent(in), | optional | :: | order |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | array(:) | |||
integer(kind=default_int), | intent(in), | optional | :: | order |
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
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | vector(:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | vector(:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | vector(:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | vector(:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | matrix(:,:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | matrix(:,:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | matrix(:,:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | matrix(:,:) | |||
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)
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
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | A(:,:) | |||
integer(kind=int32), | intent(out) | :: | B(:,:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | A(:,:) | |||
integer(kind=int64), | intent(out) | :: | B(:,:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | A(:,:) | |||
real(kind=sp), | intent(out) | :: | B(:,:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | A(:,:) | |||
real(kind=dp), | intent(out) | :: | B(:,:) | |||
logical, | intent(in), | optional | :: | threaded |
get_threading_mode returns the current threading mode for the array routines Usage: mode = get_threading_mode()
get_threading_mode returns the current threading mode for the array routines Usage: mode = get_threading_mode()
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_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.)
get the current threading mode for the array routines Usage: mode = get_threading_mode()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | array(:) | |||
integer(kind=default_int), | intent(in), | optional | :: | order |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | array(:) | |||
integer(kind=default_int), | intent(in), | optional | :: | order |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | array(:) | |||
integer(kind=default_int), | intent(in), | optional | :: | order |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | array(:) | |||
integer(kind=default_int), | intent(in), | optional | :: | order |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | matrix(:,:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | matrix(:,:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | matrix(:,:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | matrix(:,:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | vector(:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | vector(:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | vector(:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | vector(:) | |||
logical, | intent(in), | optional | :: | threaded |
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 |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(inout) | :: | dest(:,:) | |||
real(kind=dp), | intent(in) | :: | source(:,:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(inout) | :: | dest(:,:) | |||
integer(kind=int32), | intent(in) | :: | source(:,:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(inout) | :: | dest(:,:) | |||
integer(kind=int64), | intent(in) | :: | source(:,:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(inout) | :: | dest(:,:) | |||
real(kind=sp), | intent(in) | :: | source(:,:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(inout) | :: | dest(:) | |||
real(kind=dp), | intent(in) | :: | source(:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(inout) | :: | dest(:) | |||
integer(kind=int32), | intent(in) | :: | source(:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(inout) | :: | dest(:) | |||
integer(kind=int64), | intent(in) | :: | source(:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(inout) | :: | dest(:) | |||
real(kind=sp), | intent(in) | :: | source(:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(inout) | :: | matrix(:,:) | |||
real(kind=dp), | intent(in) | :: | alpha | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(inout) | :: | matrix(:,:) | |||
integer(kind=int32), | intent(in) | :: | alpha | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(inout) | :: | matrix(:,:) | |||
integer(kind=int64), | intent(in) | :: | alpha | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(inout) | :: | matrix(:,:) | |||
real(kind=sp), | intent(in) | :: | alpha | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(inout) | :: | vector(:) | |||
real(kind=dp), | intent(in) | :: | alpha | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(inout) | :: | vector(:) | |||
integer(kind=int32), | intent(in) | :: | alpha | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(inout) | :: | vector(:) | |||
integer(kind=int64), | intent(in) | :: | alpha | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(inout) | :: | vector(:) | |||
real(kind=sp), | intent(in) | :: | alpha | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | A(:,:) | |||
real(kind=dp), | intent(out) | :: | B(:,:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | A(:,:) | |||
integer(kind=int32), | intent(out) | :: | B(:,:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | A(:,:) | |||
integer(kind=int64), | intent(out) | :: | B(:,:) | |||
logical, | intent(in), | optional | :: | threaded |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | A(:,:) | |||
real(kind=sp), | intent(out) | :: | B(:,:) | |||
logical, | intent(in), | optional | :: | threaded |