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
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.