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 |