copy Interface

public interface copy

Copies an array to new memory (no pointers), The output array size will be changed to match the copy.

Example usage

use variableKind, only: r64
use m_allocate, only: allocate
use m_copy, only: copy

real(r64),allocatable :: a1D(:), a2D(:,:), a3D(:,:,:)
real(r64),allocatable :: b1D(:), b2D(:,:), b3D(:,:,:)
call allocate(a1D, 20)
call allocate(a2D, [20,20])
call allocate(a3D, [20,20,20])
a1D = 1.d0
a2D = 2.d0
a3D = 3.d0
call copy(a1D, b1D)
call copy(a2D, b2D)
call copy(a3D, b3D)
write(*,'(a)') 'a1D equals b1D: '//str(all(a1D == b1D))
write(*,'(a)') 'a2D equals b2D: '//str(all(a2D == b2D))
write(*,'(a)') 'a3D equals b3D: '//str(all(a3D == b3D))
call deallocate(a1D)
call deallocate(a2D)
call deallocate(a3D)
call deallocate(b1D)
call deallocate(b2D)
call deallocate(b3D)

Called By

interface~~copy~~CalledByGraph interface~copy copy proc~copy_test copy_test proc~copy_test->interface~copy program~test_coretran test_coretran program~test_coretran->proc~copy_test
Help


Subroutines

public subroutine copy_r1D(this, that)

Interfaced with copy

Arguments

Type IntentOptional AttributesName
real(kind=r32), intent(in), allocatable:: this(:)

Copy this array

real(kind=r32), intent(inout), allocatable:: that(:)

Copy of this

public subroutine copy_r2D(this, that)

Interfaced with copy

Arguments

Type IntentOptional AttributesName
real(kind=r32), intent(in), allocatable:: this(:,:)

Copy this array

real(kind=r32), intent(inout), allocatable:: that(:,:)

Copy of this

public subroutine copy_r3D(this, that)

Interfaced with copy

Arguments

Type IntentOptional AttributesName
real(kind=r32), intent(in), allocatable:: this(:,:,:)

Copy this array

real(kind=r32), intent(inout), allocatable:: that(:,:,:)

Copy of this

public subroutine copy_d1D(this, that)

Interfaced with copy

Arguments

Type IntentOptional AttributesName
real(kind=r64), intent(in), allocatable:: this(:)

Copy this array

real(kind=r64), intent(inout), allocatable:: that(:)

Copy of this

public subroutine copy_d2D(this, that)

Interfaced with copy

Arguments

Type IntentOptional AttributesName
real(kind=r64), intent(in), allocatable:: this(:,:)

Copy this array

real(kind=r64), intent(inout), allocatable:: that(:,:)

Copy of this

public subroutine copy_d3D(this, that)

Interfaced with copy

Arguments

Type IntentOptional AttributesName
real(kind=r64), intent(in), allocatable:: this(:,:,:)

Copy this array

real(kind=r64), intent(inout), allocatable:: that(:,:,:)

Copy of this

public subroutine copy_i1D(this, that)

Interfaced with copy

Arguments

Type IntentOptional AttributesName
integer(kind=i32), intent(in), allocatable:: this(:)

Copy this array

integer(kind=i32), intent(inout), allocatable:: that(:)

Copy of this

public subroutine copy_i2D(this, that)

Interfaced with copy

Arguments

Type IntentOptional AttributesName
integer(kind=i32), intent(in), allocatable:: this(:,:)

Copy this array

integer(kind=i32), intent(inout), allocatable:: that(:,:)

Copy of this

public subroutine copy_i3D(this, that)

Interfaced with copy

Arguments

Type IntentOptional AttributesName
integer(kind=i32), intent(in), allocatable:: this(:,:,:)

Copy this array

integer(kind=i32), intent(inout), allocatable:: that(:,:,:)

Copy of this

public subroutine copy_id1D(this, that)

Interfaced with copy

Arguments

Type IntentOptional AttributesName
integer(kind=i64), intent(in), allocatable:: this(:)

Copy this array

integer(kind=i64), intent(inout), allocatable:: that(:)

Copy of this

public subroutine copy_id2D(this, that)

Interfaced with copy

Arguments

Type IntentOptional AttributesName
integer(kind=i64), intent(in), allocatable:: this(:,:)

Copy this array

integer(kind=i64), intent(inout), allocatable:: that(:,:)

Copy of this

public subroutine copy_id3D(this, that)

Interfaced with copy

Arguments

Type IntentOptional AttributesName
integer(kind=i64), intent(in), allocatable:: this(:,:,:)

Copy this array

integer(kind=i64), intent(inout), allocatable:: that(:,:,:)

Copy of this

public subroutine copy_c1D(this, that)

Interfaced with copy

Arguments

Type IntentOptional AttributesName
complex(kind=r32), intent(in), allocatable:: this(:)

Copy this array

complex(kind=r32), intent(inout), allocatable:: that(:)

Copy of this

public subroutine copy_c2D(this, that)

Interfaced with copy

Arguments

Type IntentOptional AttributesName
complex(kind=r32), intent(in), allocatable:: this(:,:)

Copy this array

complex(kind=r32), intent(inout), allocatable:: that(:,:)

Copy of this

public subroutine copy_c3D(this, that)

Interfaced with copy

Arguments

Type IntentOptional AttributesName
complex(kind=r32), intent(in), allocatable:: this(:,:,:)

Copy this array

complex(kind=r32), intent(inout), allocatable:: that(:,:,:)

Copy of this

public subroutine copy_z1D(this, that)

Interfaced with copy

Arguments

Type IntentOptional AttributesName
complex(kind=r64), intent(in), allocatable:: this(:)

Copy this array

complex(kind=r64), intent(inout), allocatable:: that(:)

Copy of this

public subroutine copy_z2D(this, that)

Interfaced with copy

Arguments

Type IntentOptional AttributesName
complex(kind=r64), intent(in), allocatable:: this(:,:)

Copy this array

complex(kind=r64), intent(inout), allocatable:: that(:,:)

Copy of this

public subroutine copy_z3D(this, that)

Interfaced with copy

Arguments

Type IntentOptional AttributesName
complex(kind=r64), intent(in), allocatable:: this(:,:,:)

Copy this array

complex(kind=r64), intent(inout), allocatable:: that(:,:,:)

Copy of this

public subroutine copy_l1D(this, that)

Interfaced with copy

Arguments

Type IntentOptional AttributesName
logical, intent(in), allocatable:: this(:)

Copy this array

logical, intent(inout), allocatable:: that(:)

Copy of this

public subroutine copy_l2D(this, that)

Interfaced with copy

Arguments

Type IntentOptional AttributesName
logical, intent(in), allocatable:: this(:,:)

Copy this array

logical, intent(inout), allocatable:: that(:,:)

Copy of this

public subroutine copy_l3D(this, that)

Interfaced with copy

Arguments

Type IntentOptional AttributesName
logical, intent(in), allocatable:: this(:,:,:)

Copy this array

logical, intent(inout), allocatable:: that(:,:,:)

Copy of this


allocate allocate_test appendString arange argInsertionsort argMedianOf3 argPartition argSelect argSort array1D_test binarySearch checkIsOpen closeFile compact compare compare_d1 copy copy_test countEntries crossproduct cumprod cumsum dArgDynamicArray dArgDynamicArray_test daysInMonth daysInYear dDynamicArray dDynamicArray_test deallocate debug debug_s deleteFile diff eMsg fastTwoDiff fastTwoSum fErr fileExists fileIO_test geometricMean getExtension getFileSize getNFileLines getRandomSeed hasExtension hasNentries iachar1D iArgDynamicArray iArgDynamicArray_test idArgDynamicArray idArgDynamicArray_test idDynamicArray idDynamicArray_test iDynamicArray iDynamicArray_test ind2sub indexing_test insertionsort integerBin intervalSearch isLeapYear isOpen isSorted isString KdTree KdTree_test lowerCase maths_test mean median medianOf3 mErr msg norm1 normI openBinaryFile openFile partition partition3way partition3way_d1D prependString Prng Prng_test ProgressBar project random_test rArgDynamicArray rArgDynamicArray_test rDynamicArray rDynamicArray_test read1Dble read1Integer readline readline reallocate reallocate_test removeComments repeat replacedelim rngExponential rngExponential_d1 rngExponential_d1D rngExponential_d2D rngExponential_d3D rngExponential_unscaled_d1 rngInteger rngInteger_i1 rngInteger_i1D rngInteger_i2D rngInteger_i3D rngNormal rngNormal_d1 rngNormal_d1D rngNormal_d2D rngNormal_d3D rngUniform rngUniform_d1 rngUniform_d1D rngUniform_d2D rngUniform_d3D rngUniform_xorshift rngWeibull rngWeibull_d1 rngWeibull_d1D rngWeibull_d2D rngWeibull_d3D secondsToHMS select select_test setPrng setPrng_withSeed setPrng_WOseed shuffle simpleSearch skipFileLines sort sorting_test std str strings_test sub2ind swap test tester time_test timeInSeconds timeToInteger trimExtension trimmedmean twoDiff twoSum upperCase variance wMsg writeline