TABLE OF CONTENTS
- ABINIT/m_copy
- m_copy/addr_copy_dp1d
- m_copy/addr_copy_dp2d
- m_copy/addr_copy_dp3d
- m_copy/addr_copy_dp4d
- m_copy/addr_copy_dp5d
- m_copy/addr_copy_int1d
- m_copy/addr_copy_int2d
- m_copy/addr_copy_int3d
- m_copy/addr_copy_int4d
- m_copy/alloc_copy_cdp1d
- m_copy/alloc_copy_cdp2d
- m_copy/alloc_copy_cdp3d
- m_copy/alloc_copy_cdp4d
- m_copy/alloc_copy_ch1d
- m_copy/alloc_copy_csp1d
- m_copy/alloc_copy_csp2d
- m_copy/alloc_copy_csp3d
- m_copy/alloc_copy_csp4d
- m_copy/alloc_copy_int1d
- m_copy/alloc_copy_int2d
- m_copy/alloc_copy_int3d
- m_copy/alloc_copy_int4d
- m_copy/alloc_copy_int4d_1b
- m_copy/alloc_copy_log1d
- m_copy/alloc_copy_log2d
- m_copy/alloc_copy_log3d
- m_copy/alloc_copy_log4d
- m_copy/alloc_copy_rdp1d
- m_copy/alloc_copy_rdp2d
- m_copy/alloc_copy_rdp3d
- m_copy/alloc_copy_rdp4d
- m_copy/alloc_copy_rdp5d
- m_copy/alloc_copy_rdp6d
- m_copy/deep_copy_cdp0d
- m_copy/deep_copy_cdp1d
- m_copy/deep_copy_cdp2d
- m_copy/deep_copy_cdp3d
- m_copy/deep_copy_cdp4d
- m_copy/deep_copy_ch1d
- m_copy/deep_copy_csp0d
- m_copy/deep_copy_csp1d
- m_copy/deep_copy_csp2d
- m_copy/deep_copy_csp3d
- m_copy/deep_copy_csp4d
- m_copy/deep_copy_int0d
- m_copy/deep_copy_int1d
- m_copy/deep_copy_int2d
- m_copy/deep_copy_int3d
- m_copy/deep_copy_int4d
- m_copy/deep_copy_log0d
- m_copy/deep_copy_log1d
- m_copy/deep_copy_log2d
- m_copy/deep_copy_log3d
- m_copy/deep_copy_log4d
- m_copy/deep_copy_rdp0d
- m_copy/deep_copy_rdp1d
- m_copy/deep_copy_rdp2d
- m_copy/deep_copy_rdp3d
- m_copy/deep_copy_rdp4d
ABINIT/m_copy [ Modules ]
NAME
m_copy
FUNCTION
This module provides a generic interface used to copy pointers: deep_copy: used to return a deep copy of pointers. The procedure is useful if data types with several pointers have to be copied. addr_copy: used to copy the address contained in a pointer
COPYRIGHT
Copyright (C) 2008-2024 ABINIT group (MG,MT) This file is distributed under the terms of the GNU General Public License, see ~abinit/COPYING or http://www.gnu.org/copyleft/gpl.txt .
NOTES
* The intent for pointer arguments is not specified since we have to conform to the F90 specifications. However xval is IN while copy is OUT * copy is a pointer and is supposed to be *not allocated*. If the value to be copied points to null(), also the copy will be nullified. * On the alloc_copy routine: Since copy is INTENT(OUT), if the associated actual argument is currently allocated, the actual argument is deallocated on procedure invocation so that the dummy argument has an allocation status of not currently allocated.
SOURCE
31 #if defined HAVE_CONFIG_H 32 #include "config.h" 33 #endif 34 35 #include "abi_common.h" 36 37 MODULE m_copy 38 39 use defs_basis, only : dp, spc, dpc 40 use, intrinsic :: iso_c_binding 41 use m_abicore 42 43 implicit none 44 45 private 46 47 public :: deep_copy ! Performs deep copy of two pointers 48 public :: alloc_copy ! Allocate an allocable array and copy data. See notes in alloc_copy_int1d 49 public :: addr_copy ! Performs a bitwise copy of a pointer (copy address) 50 51 interface deep_copy 52 module procedure deep_copy_int0d 53 module procedure deep_copy_int1d 54 module procedure deep_copy_int2d 55 module procedure deep_copy_int3d 56 module procedure deep_copy_int4d 57 module procedure deep_copy_rdp0d 58 module procedure deep_copy_rdp1d 59 module procedure deep_copy_rdp2d 60 module procedure deep_copy_rdp3d 61 module procedure deep_copy_rdp4d 62 module procedure deep_copy_csp0d 63 module procedure deep_copy_csp1d 64 module procedure deep_copy_csp2d 65 module procedure deep_copy_csp3d 66 module procedure deep_copy_csp4d 67 module procedure deep_copy_cdp0d 68 module procedure deep_copy_cdp1d 69 module procedure deep_copy_cdp2d 70 module procedure deep_copy_cdp3d 71 module procedure deep_copy_cdp4d 72 module procedure deep_copy_log0d 73 module procedure deep_copy_log1d 74 module procedure deep_copy_log2d 75 module procedure deep_copy_log3d 76 module procedure deep_copy_log4d 77 !module procedure deep_copy_ch1d !Does not work on XLF, do not use it for the time being. 78 end interface deep_copy 79 80 interface alloc_copy 81 module procedure alloc_copy_int1d 82 module procedure alloc_copy_int2d 83 module procedure alloc_copy_int3d 84 module procedure alloc_copy_int4d_1b 85 module procedure alloc_copy_int4d 86 module procedure alloc_copy_rdp1d 87 module procedure alloc_copy_rdp2d 88 module procedure alloc_copy_rdp3d 89 module procedure alloc_copy_rdp4d 90 module procedure alloc_copy_rdp5d 91 module procedure alloc_copy_rdp6d 92 module procedure alloc_copy_csp1d 93 module procedure alloc_copy_csp2d 94 module procedure alloc_copy_csp3d 95 module procedure alloc_copy_csp4d 96 module procedure alloc_copy_cdp1d 97 module procedure alloc_copy_cdp2d 98 module procedure alloc_copy_cdp3d 99 module procedure alloc_copy_cdp4d 100 module procedure alloc_copy_log1d 101 module procedure alloc_copy_log2d 102 module procedure alloc_copy_log3d 103 module procedure alloc_copy_log4d 104 end interface alloc_copy 105 106 interface addr_copy 107 module procedure addr_copy_int1d 108 module procedure addr_copy_int2d 109 module procedure addr_copy_int3d 110 module procedure addr_copy_int4d 111 module procedure addr_copy_dp1d 112 module procedure addr_copy_dp2d 113 module procedure addr_copy_dp3d 114 module procedure addr_copy_dp4d 115 module procedure addr_copy_dp5d 116 end interface addr_copy 117 118 CONTAINS !===========================================================
m_copy/addr_copy_dp1d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
addr_copy_dp1d
FUNCTION
Performs a bitwise copy of a pointer.
SOURCE
1842 subroutine addr_copy_dp1d(xval,copy) 1843 1844 !Arguments ------------------------------------ 1845 real(dp),pointer :: xval(:) 1846 real(dp),pointer :: copy(:) 1847 1848 !Local variables------------------------------- 1849 #if defined HAVE_FC_ISO_C_BINDING 1850 integer :: shp(1) 1851 type(C_PTR) :: ham_ptr 1852 #endif 1853 1854 ! ********************************************************************* 1855 1856 if (associated(xval)) then 1857 #if defined HAVE_FC_ISO_C_BINDING 1858 shp=shape(xval) 1859 if (product(shp)>0) then 1860 ham_ptr=c_loc(xval(1)) 1861 call c_f_pointer(ham_ptr,copy,shp) 1862 else 1863 ABI_MALLOC(copy,(0)) 1864 end if 1865 #else 1866 copy=transfer(xval,copy) 1867 #endif 1868 else 1869 nullify(copy) 1870 end if 1871 1872 end subroutine addr_copy_dp1d
m_copy/addr_copy_dp2d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
addr_copy_dp2d
FUNCTION
Performs a bitwise copy of a pointer.
SOURCE
1886 subroutine addr_copy_dp2d(xval,copy) 1887 1888 !Arguments ------------------------------------ 1889 real(dp),pointer :: xval(:,:) 1890 real(dp),pointer :: copy(:,:) 1891 1892 !Local variables------------------------------- 1893 #if defined HAVE_FC_ISO_C_BINDING 1894 integer :: shp(2) 1895 type(C_PTR) :: ham_ptr 1896 #endif 1897 1898 ! ********************************************************************* 1899 1900 if (associated(xval)) then 1901 #if defined HAVE_FC_ISO_C_BINDING 1902 shp=shape(xval) 1903 if (product(shp)>0) then 1904 ham_ptr=c_loc(xval(1,1)) 1905 call c_f_pointer(ham_ptr,copy,shp) 1906 else 1907 ABI_MALLOC(copy,(0,0)) 1908 end if 1909 #else 1910 copy=transfer(xval,copy) 1911 #endif 1912 else 1913 nullify(copy) 1914 end if 1915 1916 end subroutine addr_copy_dp2d
m_copy/addr_copy_dp3d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
addr_copy_dp3d
FUNCTION
Performs a bitwise copy of a pointer.
SOURCE
1930 subroutine addr_copy_dp3d(xval,copy) 1931 1932 !Arguments ------------------------------------ 1933 real(dp),pointer :: xval(:,:,:) 1934 real(dp),pointer :: copy(:,:,:) 1935 1936 !Local variables------------------------------- 1937 #if defined HAVE_FC_ISO_C_BINDING 1938 integer :: shp(3) 1939 type(C_PTR) :: ham_ptr 1940 #endif 1941 1942 ! ********************************************************************* 1943 1944 if (associated(xval)) then 1945 #if defined HAVE_FC_ISO_C_BINDING 1946 shp=shape(xval) 1947 if (product(shp)>0) then 1948 ham_ptr=c_loc(xval(1,1,1)) 1949 call c_f_pointer(ham_ptr,copy,shp) 1950 else 1951 ABI_MALLOC(copy,(0,0,0)) 1952 end if 1953 #else 1954 copy=transfer(xval,copy) 1955 #endif 1956 else 1957 nullify(copy) 1958 end if 1959 1960 end subroutine addr_copy_dp3d
m_copy/addr_copy_dp4d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
addr_copy_dp4d
FUNCTION
Performs a bitwise copy of a pointer.
SOURCE
1974 subroutine addr_copy_dp4d(xval,copy) 1975 1976 !Arguments ------------------------------------ 1977 real(dp),pointer :: xval(:,:,:,:) 1978 real(dp),pointer :: copy(:,:,:,:) 1979 1980 !Local variables------------------------------- 1981 #if defined HAVE_FC_ISO_C_BINDING 1982 integer :: shp(4) 1983 type(C_PTR) :: ham_ptr 1984 #endif 1985 1986 ! ********************************************************************* 1987 1988 if (associated(xval)) then 1989 #if defined HAVE_FC_ISO_C_BINDING 1990 shp=shape(xval) 1991 if (product(shp)>0) then 1992 ham_ptr=c_loc(xval(1,1,1,1)) 1993 call c_f_pointer(ham_ptr,copy,shp) 1994 else 1995 ABI_MALLOC(copy,(0,0,0,0)) 1996 end if 1997 #else 1998 copy=transfer(xval,copy) 1999 #endif 2000 else 2001 nullify(copy) 2002 end if 2003 2004 end subroutine addr_copy_dp4d
m_copy/addr_copy_dp5d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
addr_copy_dp5d
FUNCTION
Performs a bitwise copy of a pointer.
SOURCE
2018 subroutine addr_copy_dp5d(xval,copy) 2019 2020 !Arguments ------------------------------------ 2021 real(dp),pointer :: xval(:,:,:,:,:) 2022 real(dp),pointer :: copy(:,:,:,:,:) 2023 2024 !Local variables------------------------------- 2025 #if defined HAVE_FC_ISO_C_BINDING 2026 integer :: shp(5) 2027 type(C_PTR) :: ham_ptr 2028 #endif 2029 2030 ! ********************************************************************* 2031 2032 if (associated(xval)) then 2033 #if defined HAVE_FC_ISO_C_BINDING 2034 shp=shape(xval) 2035 if (product(shp)>0) then 2036 ham_ptr=c_loc(xval(1,1,1,1,1)) 2037 call c_f_pointer(ham_ptr,copy,shp) 2038 else 2039 ABI_MALLOC(copy,(0,0,0,0,0)) 2040 end if 2041 #else 2042 copy=transfer(xval,copy) 2043 #endif 2044 else 2045 nullify(copy) 2046 end if 2047 2048 end subroutine addr_copy_dp5d
m_copy/addr_copy_int1d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
addr_copy_int1d
FUNCTION
Performs a bitwise copy of a pointer.
SOURCE
1666 subroutine addr_copy_int1d(xval,copy) 1667 1668 !Arguments ------------------------------------ 1669 integer,pointer :: xval(:) 1670 integer,pointer :: copy(:) 1671 1672 !Local variables------------------------------- 1673 #if defined HAVE_FC_ISO_C_BINDING 1674 integer :: shp(1) 1675 type(C_PTR) :: ham_ptr 1676 #endif 1677 1678 ! ********************************************************************* 1679 1680 if (associated(xval)) then 1681 #if defined HAVE_FC_ISO_C_BINDING 1682 shp=shape(xval) 1683 if (product(shp)>0) then 1684 ham_ptr=c_loc(xval(1)) 1685 call c_f_pointer(ham_ptr,copy,shp) 1686 else 1687 ABI_MALLOC(copy,(0)) 1688 end if 1689 #else 1690 copy=transfer(xval,copy) 1691 #endif 1692 else 1693 nullify(copy) 1694 end if 1695 1696 end subroutine addr_copy_int1d
m_copy/addr_copy_int2d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
addr_copy_int2d
FUNCTION
Performs a bitwise copy of a pointer.
SOURCE
1710 subroutine addr_copy_int2d(xval,copy) 1711 1712 !Arguments ------------------------------------ 1713 integer,pointer :: xval(:,:) 1714 integer,pointer :: copy(:,:) 1715 1716 !Local variables------------------------------- 1717 #if defined HAVE_FC_ISO_C_BINDING 1718 integer :: shp(2) 1719 type(C_PTR) :: ham_ptr 1720 #endif 1721 1722 ! ********************************************************************* 1723 1724 if (associated(xval)) then 1725 #if defined HAVE_FC_ISO_C_BINDING 1726 shp=shape(xval) 1727 if (product(shp)>0) then 1728 ham_ptr=c_loc(xval(1,1)) 1729 call c_f_pointer(ham_ptr,copy,shp) 1730 else 1731 ABI_MALLOC(copy,(0,0)) 1732 end if 1733 #else 1734 copy=transfer(xval,copy) 1735 #endif 1736 else 1737 nullify(copy) 1738 end if 1739 1740 end subroutine addr_copy_int2d
m_copy/addr_copy_int3d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
addr_copy_int3d
FUNCTION
Performs a bitwise copy of a pointer.
SOURCE
1754 subroutine addr_copy_int3d(xval,copy) 1755 1756 !Arguments ------------------------------------ 1757 integer,pointer :: xval(:,:,:) 1758 integer,pointer :: copy(:,:,:) 1759 1760 !Local variables------------------------------- 1761 #if defined HAVE_FC_ISO_C_BINDING 1762 integer :: shp(3) 1763 type(C_PTR) :: ham_ptr 1764 #endif 1765 1766 ! ********************************************************************* 1767 1768 if (associated(xval)) then 1769 #if defined HAVE_FC_ISO_C_BINDING 1770 shp=shape(xval) 1771 if (product(shp)>0) then 1772 ham_ptr=c_loc(xval(1,1,1)) 1773 call c_f_pointer(ham_ptr,copy,shp) 1774 else 1775 ABI_MALLOC(copy,(0,0,0)) 1776 end if 1777 #else 1778 copy=transfer(xval,copy) 1779 #endif 1780 else 1781 nullify(copy) 1782 end if 1783 1784 end subroutine addr_copy_int3d
m_copy/addr_copy_int4d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
addr_copy_int4d
FUNCTION
Performs a bitwise copy of a pointer.
SOURCE
1798 subroutine addr_copy_int4d(xval,copy) 1799 1800 !Arguments ------------------------------------ 1801 integer,pointer :: xval(:,:,:,:) 1802 integer,pointer :: copy(:,:,:,:) 1803 1804 !Local variables------------------------------- 1805 #if defined HAVE_FC_ISO_C_BINDING 1806 integer :: shp(4) 1807 type(C_PTR) :: ham_ptr 1808 #endif 1809 1810 ! ********************************************************************* 1811 1812 if (associated(xval)) then 1813 #if defined HAVE_FC_ISO_C_BINDING 1814 shp=shape(xval) 1815 if (product(shp)>0) then 1816 ham_ptr=c_loc(xval(1,1,1,1)) 1817 call c_f_pointer(ham_ptr,copy,shp) 1818 else 1819 ABI_MALLOC(copy,(0,0,0,0)) 1820 end if 1821 #else 1822 copy=transfer(xval,copy) 1823 #endif 1824 else 1825 nullify(copy) 1826 end if 1827 1828 end subroutine addr_copy_int4d
m_copy/alloc_copy_cdp1d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
alloc_copy_cdp1d
FUNCTION
Performs a copy of an array.
SOURCE
1397 subroutine alloc_copy_cdp1d(xval,copy) 1398 1399 !Arguments ------------------------------------ 1400 complex(dpc),intent(in) :: xval(:) 1401 complex(dpc),allocatable,intent(out) :: copy(:) 1402 1403 !Local variables------------------------------- 1404 integer :: il,iu 1405 ! ********************************************************************* 1406 1407 il=lbound(xval,DIM=1); iu=ubound(xval,DIM=1) 1408 ABI_MALLOC(copy,(il:iu)) 1409 copy(:)=xval(:) 1410 1411 end subroutine alloc_copy_cdp1d
m_copy/alloc_copy_cdp2d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
alloc_copy_cdp2d
FUNCTION
Performs a copy of an array.
SOURCE
1425 subroutine alloc_copy_cdp2d(xval,copy) 1426 1427 !Arguments ------------------------------------ 1428 complex(dpc),intent(in) :: xval(:,:) 1429 complex(dpc),allocatable,intent(out) :: copy(:,:) 1430 1431 !Local variables------------------------------- 1432 integer :: il1,iu1,il2,iu2 1433 ! ********************************************************************* 1434 1435 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 1436 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 1437 ABI_MALLOC(copy,(il1:iu1,il2:iu2)) 1438 copy(:,:)=xval(:,:) 1439 1440 end subroutine alloc_copy_cdp2d
m_copy/alloc_copy_cdp3d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
alloc_copy_cdp3d
FUNCTION
Performs a copy of an array.
SOURCE
1454 subroutine alloc_copy_cdp3d(xval,copy) 1455 1456 !Arguments ------------------------------------ 1457 complex(dpc),intent(in) :: xval(:,:,:) 1458 complex(dpc),allocatable,intent(out) :: copy(:,:,:) 1459 1460 !Local variables------------------------------- 1461 integer :: il1,iu1,il2,iu2,il3,iu3 1462 ! ********************************************************************* 1463 1464 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 1465 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 1466 il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) 1467 ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3)) 1468 copy(:,:,:)=xval(:,:,:) 1469 1470 end subroutine alloc_copy_cdp3d
m_copy/alloc_copy_cdp4d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
alloc_copy_cdp4d
FUNCTION
Performs a copy of an array.
SOURCE
1484 subroutine alloc_copy_cdp4d(xval,copy) 1485 1486 !Arguments ------------------------------------ 1487 complex(dpc),intent(in) :: xval(:,:,:,:) 1488 complex(dpc),allocatable,intent(out) :: copy(:,:,:,:) 1489 1490 !Local variables------------------------------- 1491 integer :: il1,iu1,il2,iu2,il3,iu3,il4,iu4 1492 ! ********************************************************************* 1493 1494 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 1495 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 1496 il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) 1497 il4=lbound(xval,DIM=4); iu4=ubound(xval,DIM=4) 1498 ABI_MALLOC(copy,(il1:iu1,il2:il2,il3:iu3,il4:iu4)) 1499 copy(:,:,:,:)=xval(:,:,:,:) 1500 1501 end subroutine alloc_copy_cdp4d
m_copy/alloc_copy_ch1d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
alloc_copy_ch1d
FUNCTION
Performs a copy of an array.
NOTES
This routine segfaults on XLF, disabled for the time being Should test whether passing slen fixes the problem
SOURCE
1519 subroutine alloc_copy_ch1d(xval,copy,slen) 1520 1521 !Arguments ------------------------------------ 1522 integer,intent(in) :: slen 1523 character(len=slen),intent(in) :: xval(:) 1524 character(len=slen),allocatable,intent(out) :: copy(:) 1525 1526 !Local variables------------------------------- 1527 integer :: il,iu 1528 ! ********************************************************************* 1529 1530 il=lbound(xval,DIM=1); iu=ubound(xval,DIM=1) 1531 ABI_MALLOC(copy,(il:iu)) 1532 copy(:)=xval(:) 1533 1534 end subroutine alloc_copy_ch1d
m_copy/alloc_copy_csp1d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
alloc_copy_csp1d
FUNCTION
Performs a copy of an array.
SOURCE
1279 subroutine alloc_copy_csp1d(xval,copy) 1280 1281 !Arguments ------------------------------------ 1282 complex(spc),intent(in) :: xval(:) 1283 complex(spc),allocatable,intent(out) :: copy(:) 1284 1285 !Local variables------------------------------- 1286 integer :: il,iu 1287 ! ********************************************************************* 1288 1289 il=lbound(xval,DIM=1); iu=ubound(xval,DIM=1) 1290 ABI_MALLOC(copy,(il:iu)) 1291 copy(:)=xval(:) 1292 1293 end subroutine alloc_copy_csp1d
m_copy/alloc_copy_csp2d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
alloc_copy_csp2d
FUNCTION
Performs a copy of an array.
SOURCE
1307 subroutine alloc_copy_csp2d(xval,copy) 1308 1309 !Arguments ------------------------------------ 1310 complex(spc),intent(in) :: xval(:,:) 1311 complex(spc),allocatable,intent(out) :: copy(:,:) 1312 1313 !Local variables------------------------------- 1314 integer :: il1,iu1,il2,iu2 1315 ! ********************************************************************* 1316 1317 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 1318 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 1319 ABI_MALLOC(copy,(il1:iu1,il2:iu2)) 1320 copy(:,:)=xval(:,:) 1321 1322 end subroutine alloc_copy_csp2d
m_copy/alloc_copy_csp3d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
alloc_copy_csp3d
FUNCTION
Performs a copy of an array.
SOURCE
1336 subroutine alloc_copy_csp3d(xval,copy) 1337 1338 !Arguments ------------------------------------ 1339 complex(spc),intent(in) :: xval(:,:,:) 1340 complex(spc),allocatable,intent(out) :: copy(:,:,:) 1341 1342 !Local variables------------------------------- 1343 integer :: il1,iu1,il2,iu2,il3,iu3 1344 ! ********************************************************************* 1345 1346 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 1347 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 1348 il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) 1349 ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3)) 1350 copy(:,:,:)=xval(:,:,:) 1351 1352 end subroutine alloc_copy_csp3d
m_copy/alloc_copy_csp4d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
alloc_copy_csp4d
FUNCTION
Performs a copy of an array.
SOURCE
1366 subroutine alloc_copy_csp4d(xval,copy) 1367 1368 !Arguments ------------------------------------ 1369 complex(spc),intent(in) :: xval(:,:,:,:) 1370 complex(spc),allocatable,intent(out) :: copy(:,:,:,:) 1371 1372 !Local variables------------------------------- 1373 integer :: il1,iu1,il2,iu2,il3,iu3,il4,iu4 1374 ! ********************************************************************* 1375 1376 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 1377 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 1378 il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) 1379 il4=lbound(xval,DIM=4); iu4=ubound(xval,DIM=4) 1380 ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3,il4:iu4)) 1381 copy(:,:,:,:)=xval(:,:,:,:) 1382 1383 end subroutine alloc_copy_csp4d
m_copy/alloc_copy_int1d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
alloc_copy_int1d
FUNCTION
Performs a copy of an array.
SOURCE
947 subroutine alloc_copy_int1d(xval,copy) 948 949 !Arguments ------------------------------------ 950 integer,intent(in) :: xval(:) 951 integer,allocatable,intent(out) :: copy(:) 952 953 !Local variables------------------------------- 954 integer :: il,iu 955 ! ********************************************************************* 956 957 il=lbound(xval,DIM=1); iu=ubound(xval,DIM=1) 958 ABI_MALLOC(copy,(il:iu)) 959 copy(:)=xval(:) 960 961 end subroutine alloc_copy_int1d
m_copy/alloc_copy_int2d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
alloc_copy_int2d
FUNCTION
Performs a copy of an array.
SOURCE
975 subroutine alloc_copy_int2d(xval,copy) 976 977 !Arguments ------------------------------------ 978 integer,intent(in) :: xval(:,:) 979 integer,allocatable,intent(out) :: copy(:,:) 980 981 !Local variables------------------------------- 982 integer :: il1,iu1,il2,iu2 983 ! ********************************************************************* 984 985 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 986 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 987 ABI_MALLOC(copy,(il1:iu1,il2:iu2)) 988 copy(:,:)=xval(:,:) 989 990 end subroutine alloc_copy_int2d
m_copy/alloc_copy_int3d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
alloc_copy_int3d
FUNCTION
Performs a copy of an array.
SOURCE
1004 subroutine alloc_copy_int3d(xval,copy) 1005 1006 !Arguments ------------------------------------ 1007 integer,intent(in) :: xval(:,:,:) 1008 integer,allocatable,intent(out) :: copy(:,:,:) 1009 1010 !Local variables------------------------------- 1011 integer :: il1,iu1,il2,iu2,il3,iu3 1012 ! ********************************************************************* 1013 1014 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 1015 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 1016 il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) 1017 ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3)) 1018 copy(:,:,:)=xval(:,:,:) 1019 1020 end subroutine alloc_copy_int3d
m_copy/alloc_copy_int4d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
alloc_copy_int4d
FUNCTION
Performs a copy of an array.
SOURCE
1065 subroutine alloc_copy_int4d(xval, copy) 1066 1067 !Arguments ------------------------------------ 1068 integer,intent(in) :: xval(:,:,:,:) 1069 integer,allocatable,intent(out) :: copy(:,:,:,:) 1070 1071 !Local variables------------------------------- 1072 integer :: il1,iu1,il2,iu2,il3,iu3,il4,iu4 1073 ! ********************************************************************* 1074 1075 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 1076 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 1077 il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) 1078 il4=lbound(xval,DIM=4); iu4=ubound(xval,DIM=4) 1079 ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3,il4:iu4)) 1080 copy(:,:,:,:)=xval(:,:,:,:) 1081 1082 end subroutine alloc_copy_int4d
m_copy/alloc_copy_int4d_1b [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
alloc_copy_int4d_1b
FUNCTION
Performs a copy of an array.
SOURCE
1034 subroutine alloc_copy_int4d_1b(xval, copy) 1035 1036 !Arguments ------------------------------------ 1037 integer(c_int8_t),intent(in) :: xval(:,:,:,:) 1038 integer(c_int8_t),allocatable,intent(out) :: copy(:,:,:,:) 1039 1040 !Local variables------------------------------- 1041 integer :: il1,iu1,il2,iu2,il3,iu3,il4,iu4 1042 ! ********************************************************************* 1043 1044 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 1045 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 1046 il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) 1047 il4=lbound(xval,DIM=4); iu4=ubound(xval,DIM=4) 1048 ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3,il4:iu4)) 1049 copy(:,:,:,:)=xval(:,:,:,:) 1050 1051 end subroutine alloc_copy_int4d_1b
m_copy/alloc_copy_log1d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
alloc_copy_log1d
FUNCTION
Performs a copy of an array.
SOURCE
1548 subroutine alloc_copy_log1d(xval,copy) 1549 1550 !Arguments ------------------------------------ 1551 logical,intent(in) :: xval(:) 1552 logical,allocatable,intent(out) :: copy(:) 1553 1554 !Local variables------------------------------- 1555 integer :: il,iu 1556 ! ********************************************************************* 1557 1558 il=lbound(xval,DIM=1); iu=ubound(xval,DIM=1) 1559 ABI_MALLOC(copy,(il:iu)) 1560 copy(:)=xval(:) 1561 1562 end subroutine alloc_copy_log1d
m_copy/alloc_copy_log2d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
alloc_copy_log2d
FUNCTION
Performs a copy of an array.
SOURCE
1576 subroutine alloc_copy_log2d(xval,copy) 1577 1578 !Arguments ------------------------------------ 1579 logical,intent(in) :: xval(:,:) 1580 logical,allocatable,intent(out) :: copy(:,:) 1581 1582 !Local variables------------------------------- 1583 integer :: il1,iu1,il2,iu2 1584 ! ********************************************************************* 1585 1586 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 1587 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 1588 ABI_MALLOC(copy,(il1:iu1,il2:iu2)) 1589 copy(:,:)=xval(:,:) 1590 1591 end subroutine alloc_copy_log2d
m_copy/alloc_copy_log3d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
alloc_copy_log3d
FUNCTION
Performs a copy of an array.
SOURCE
1605 subroutine alloc_copy_log3d(xval,copy) 1606 1607 !Arguments ------------------------------------ 1608 logical,intent(in) :: xval(:,:,:) 1609 logical,allocatable,intent(out) :: copy(:,:,:) 1610 1611 !Local variables------------------------------- 1612 integer :: il1,iu1,il2,iu2,il3,iu3 1613 ! ********************************************************************* 1614 1615 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 1616 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 1617 il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) 1618 ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3)) 1619 copy(:,:,:)=xval(:,:,:) 1620 1621 end subroutine alloc_copy_log3d
m_copy/alloc_copy_log4d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
alloc_copy_log4d
FUNCTION
Performs a copy of an array.
SOURCE
1635 subroutine alloc_copy_log4d(xval,copy) 1636 1637 !Arguments ------------------------------------ 1638 logical,intent(in) :: xval(:,:,:,:) 1639 logical,allocatable,intent(out) :: copy(:,:,:,:) 1640 1641 !Local variables------------------------------- 1642 integer :: il1,iu1,il2,iu2,il3,iu3,il4,iu4 1643 ! ********************************************************************* 1644 1645 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 1646 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 1647 il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) 1648 il4=lbound(xval,DIM=4); iu4=ubound(xval,DIM=4) 1649 ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3,il4:iu4)) 1650 copy(:,:,:,:)=xval(:,:,:,:) 1651 1652 end subroutine alloc_copy_log4d
m_copy/alloc_copy_rdp1d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
alloc_copy_rdp1d
FUNCTION
Performs a copy of an array.
SOURCE
1096 subroutine alloc_copy_rdp1d(xval,copy) 1097 1098 !Arguments ------------------------------------ 1099 real(dp),intent(in) :: xval(:) 1100 real(dp),allocatable,intent(out) :: copy(:) 1101 1102 !Local variables------------------------------- 1103 integer :: il,iu 1104 ! ********************************************************************* 1105 1106 il=lbound(xval,DIM=1); iu=ubound(xval,DIM=1) 1107 ABI_MALLOC(copy,(il:iu)) 1108 copy(:)=xval(:) 1109 1110 end subroutine alloc_copy_rdp1d
m_copy/alloc_copy_rdp2d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
alloc_copy_rdp2d
FUNCTION
Performs a copy of an array.
SOURCE
1124 subroutine alloc_copy_rdp2d(xval,copy) 1125 1126 !Arguments ------------------------------------ 1127 real(dp),intent(in) :: xval(:,:) 1128 real(dp),allocatable,intent(out) :: copy(:,:) 1129 1130 !Local variables------------------------------- 1131 integer :: il1,iu1,il2,iu2 1132 ! ********************************************************************* 1133 1134 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 1135 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 1136 ABI_MALLOC(copy,(il1:iu1,il2:iu2)) 1137 copy(:,:)=xval(:,:) 1138 1139 end subroutine alloc_copy_rdp2d
m_copy/alloc_copy_rdp3d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
alloc_copy_rdp3d
FUNCTION
Performs a copy of an array.
SOURCE
1153 subroutine alloc_copy_rdp3d(xval,copy) 1154 1155 !Arguments ------------------------------------ 1156 real(dp),intent(in) :: xval(:,:,:) 1157 real(dp),allocatable,intent(out) :: copy(:,:,:) 1158 1159 !Local variables------------------------------- 1160 integer :: il1,iu1,il2,iu2,il3,iu3 1161 ! ********************************************************************* 1162 1163 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 1164 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 1165 il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) 1166 ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3)) 1167 copy(:,:,:)=xval(:,:,:) 1168 1169 end subroutine alloc_copy_rdp3d
m_copy/alloc_copy_rdp4d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
alloc_copy_rdp4d
FUNCTION
Performs a copy of an array.
SOURCE
1183 subroutine alloc_copy_rdp4d(xval,copy) 1184 1185 !Arguments ------------------------------------ 1186 real(dp),intent(in) :: xval(:,:,:,:) 1187 real(dp),allocatable,intent(out) :: copy(:,:,:,:) 1188 1189 !Local variables------------------------------- 1190 integer :: il1,iu1,il2,iu2,il3,iu3,il4,iu4 1191 ! ********************************************************************* 1192 1193 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 1194 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 1195 il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) 1196 il4=lbound(xval,DIM=4); iu4=ubound(xval,DIM=4) 1197 ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3,il4:iu4)) 1198 copy(:,:,:,:)=xval(:,:,:,:) 1199 1200 end subroutine alloc_copy_rdp4d
m_copy/alloc_copy_rdp5d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
alloc_copy_rdp5d
FUNCTION
Performs a copy of an array.
SOURCE
1214 subroutine alloc_copy_rdp5d(xval,copy) 1215 1216 !Arguments ------------------------------------ 1217 real(dp),intent(in) :: xval(:,:,:,:,:) 1218 real(dp),allocatable,intent(out) :: copy(:,:,:,:,:) 1219 1220 !Local variables------------------------------- 1221 integer :: il1,iu1,il2,iu2,il3,iu3,il4,iu4,il5,iu5 1222 ! ********************************************************************* 1223 1224 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 1225 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 1226 il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) 1227 il4=lbound(xval,DIM=4); iu4=ubound(xval,DIM=4) 1228 il5=lbound(xval,DIM=5); iu5=ubound(xval,DIM=5) 1229 ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3,il4:iu4,il5:iu5)) 1230 copy(:,:,:,:,:)=xval(:,:,:,:,:) 1231 1232 end subroutine alloc_copy_rdp5d
m_copy/alloc_copy_rdp6d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
alloc_copy_rdp6d
FUNCTION
Performs a copy of an array.
SOURCE
1246 subroutine alloc_copy_rdp6d(xval,copy) 1247 1248 !Arguments ------------------------------------ 1249 real(dp),intent(in) :: xval(:,:,:,:,:,:) 1250 real(dp),allocatable,intent(out) :: copy(:,:,:,:,:,:) 1251 1252 !Local variables------------------------------- 1253 integer :: il1,iu1,il2,iu2,il3,iu3,il4,iu4,il5,iu5,il6,iu6 1254 ! ********************************************************************* 1255 1256 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 1257 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 1258 il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) 1259 il4=lbound(xval,DIM=4); iu4=ubound(xval,DIM=4) 1260 il5=lbound(xval,DIM=5); iu5=ubound(xval,DIM=5) 1261 il6=lbound(xval,DIM=6); iu6=ubound(xval,DIM=6) 1262 ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3,il4:iu4,il5:iu5,il6:iu6)) 1263 copy(:,:,:,:,:,:)=xval(:,:,:,:,:,:) 1264 1265 end subroutine alloc_copy_rdp6d
m_copy/deep_copy_cdp0d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
deep_copy_cdp0d
FUNCTION
Performs a deep copy of a pointer.
SOURCE
599 subroutine deep_copy_cdp0d(xval,copy) 600 601 !Arguments ------------------------------------ 602 complex(dpc),intent(in) :: xval 603 complex(dpc),intent(out) :: copy 604 ! ********************************************************************* 605 copy=xval 606 607 end subroutine deep_copy_cdp0d
m_copy/deep_copy_cdp1d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
deep_copy_cdp1d
FUNCTION
Performs a deep copy of a pointer.
SOURCE
621 subroutine deep_copy_cdp1d(xval,copy) 622 623 !Arguments ------------------------------------ 624 complex(dpc),pointer :: xval(:) 625 complex(dpc),pointer :: copy(:) 626 627 !Local variables------------------------------- 628 integer :: il,iu 629 ! ********************************************************************* 630 631 if (associated(xval)) then 632 il=lbound(xval,DIM=1); iu=ubound(xval,DIM=1) 633 ABI_MALLOC(copy,(il:iu)) 634 copy(:)=xval(:) 635 else 636 nullify(copy) 637 end if 638 639 end subroutine deep_copy_cdp1d
m_copy/deep_copy_cdp2d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
deep_copy_cdp2d
FUNCTION
Performs a deep copy of a pointer.
SOURCE
653 subroutine deep_copy_cdp2d(xval,copy) 654 655 !Arguments ------------------------------------ 656 complex(dpc),pointer :: xval(:,:) 657 complex(dpc),pointer :: copy(:,:) 658 659 !Local variables------------------------------- 660 integer :: il1,iu1,il2,iu2 661 ! ********************************************************************* 662 663 if (associated(xval)) then 664 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 665 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 666 ABI_MALLOC(copy,(il1:iu1,il2:iu2)) 667 copy(:,:)=xval(:,:) 668 else 669 nullify(copy) 670 end if 671 672 end subroutine deep_copy_cdp2d
m_copy/deep_copy_cdp3d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
deep_copy_cdp3d
FUNCTION
Performs a deep copy of a pointer.
SOURCE
686 subroutine deep_copy_cdp3d(xval,copy) 687 688 !Arguments ------------------------------------ 689 complex(dpc),pointer :: xval(:,:,:) 690 complex(dpc),pointer :: copy(:,:,:) 691 692 !Local variables------------------------------- 693 integer :: il1,iu1,il2,iu2,il3,iu3 694 ! ********************************************************************* 695 696 if (associated(xval)) then 697 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 698 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 699 il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) 700 ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3)) 701 copy(:,:,:)=xval(:,:,:) 702 else 703 nullify(copy) 704 end if 705 706 end subroutine deep_copy_cdp3d
m_copy/deep_copy_cdp4d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
deep_copy_cdp4d
FUNCTION
Performs a deep copy of a pointer.
SOURCE
720 subroutine deep_copy_cdp4d(xval,copy) 721 722 !Arguments ------------------------------------ 723 complex(dpc),pointer :: xval(:,:,:,:) 724 complex(dpc),pointer :: copy(:,:,:,:) 725 726 !Local variables------------------------------- 727 integer :: il1,iu1,il2,iu2,il3,iu3,il4,iu4 728 ! ********************************************************************* 729 730 if (associated(xval)) then 731 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 732 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 733 il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) 734 il4=lbound(xval,DIM=4); iu4=ubound(xval,DIM=4) 735 ABI_MALLOC(copy,(il1:iu1,il2:il2,il3:iu3,il4:iu4)) 736 copy(:,:,:,:)=xval(:,:,:,:) 737 else 738 nullify(copy) 739 end if 740 741 end subroutine deep_copy_cdp4d
m_copy/deep_copy_ch1d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
deep_copy_ch1d
FUNCTION
Performs a deep copy of a pointer.
NOTES
This routine segfaults on XLF, disabled for the time being Should test whether passing slen fixes the problem
SOURCE
759 subroutine deep_copy_ch1d(xval,copy,slen) 760 761 !Arguments ------------------------------------ 762 integer,intent(in) :: slen 763 character(len=slen),pointer :: xval(:) 764 character(len=slen),pointer :: copy(:) 765 766 !Local variables------------------------------- 767 integer :: il,iu 768 ! ********************************************************************* 769 770 if (associated(xval)) then 771 il=lbound(xval,DIM=1); iu=ubound(xval,DIM=1) 772 ABI_MALLOC(copy,(il:iu)) 773 copy(:)=xval(:) 774 else 775 nullify(copy) 776 end if 777 778 end subroutine deep_copy_ch1d
m_copy/deep_copy_csp0d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
deep_copy_csp0d
FUNCTION
Performs a deep copy of a pointer.
SOURCE
443 subroutine deep_copy_csp0d(xval,copy) 444 445 !Arguments ------------------------------------ 446 complex(spc),intent(in) :: xval 447 complex(spc),intent(out) :: copy 448 ! ********************************************************************* 449 copy=xval 450 451 end subroutine deep_copy_csp0d
m_copy/deep_copy_csp1d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
deep_copy_csp1d
FUNCTION
Performs a deep copy of a pointer.
SOURCE
465 subroutine deep_copy_csp1d(xval,copy) 466 467 !Arguments ------------------------------------ 468 complex(spc),pointer :: xval(:) 469 complex(spc),pointer :: copy(:) 470 471 !Local variables------------------------------- 472 integer :: il,iu 473 ! ********************************************************************* 474 475 if (associated(xval)) then 476 il=lbound(xval,DIM=1); iu=ubound(xval,DIM=1) 477 ABI_MALLOC(copy,(il:iu)) 478 copy(:)=xval(:) 479 else 480 nullify(copy) 481 end if 482 483 end subroutine deep_copy_csp1d
m_copy/deep_copy_csp2d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
deep_copy_csp2d
FUNCTION
Performs a deep copy of a pointer.
SOURCE
497 subroutine deep_copy_csp2d(xval,copy) 498 499 !Arguments ------------------------------------ 500 complex(spc),pointer :: xval(:,:) 501 complex(spc),pointer :: copy(:,:) 502 503 !Local variables------------------------------- 504 integer :: il1,iu1,il2,iu2 505 ! ********************************************************************* 506 507 if (associated(xval)) then 508 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 509 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 510 ABI_MALLOC(copy,(il1:iu1,il2:iu2)) 511 copy(:,:)=xval(:,:) 512 else 513 nullify(copy) 514 end if 515 516 end subroutine deep_copy_csp2d
m_copy/deep_copy_csp3d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
deep_copy_csp3d
FUNCTION
Performs a deep copy of a pointer.
SOURCE
530 subroutine deep_copy_csp3d(xval,copy) 531 532 !Arguments ------------------------------------ 533 complex(spc),pointer :: xval(:,:,:) 534 complex(spc),pointer :: copy(:,:,:) 535 536 !Local variables------------------------------- 537 integer :: il1,iu1,il2,iu2,il3,iu3 538 ! ********************************************************************* 539 540 if (associated(xval)) then 541 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 542 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 543 il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) 544 ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3)) 545 copy(:,:,:)=xval(:,:,:) 546 else 547 nullify(copy) 548 end if 549 550 end subroutine deep_copy_csp3d
m_copy/deep_copy_csp4d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
deep_copy_csp4d
FUNCTION
Performs a deep copy of a pointer.
SOURCE
564 subroutine deep_copy_csp4d(xval,copy) 565 566 !Arguments ------------------------------------ 567 complex(spc),pointer :: xval(:,:,:,:) 568 complex(spc),pointer :: copy(:,:,:,:) 569 570 !Local variables------------------------------- 571 integer :: il1,iu1,il2,iu2,il3,iu3,il4,iu4 572 ! ********************************************************************* 573 574 if (associated(xval)) then 575 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 576 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 577 il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) 578 il4=lbound(xval,DIM=4); iu4=ubound(xval,DIM=4) 579 ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3,il4:iu4)) 580 copy(:,:,:,:)=xval(:,:,:,:) 581 else 582 nullify(copy) 583 end if 584 585 end subroutine deep_copy_csp4d
m_copy/deep_copy_int0d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
deep_copy_int0d
FUNCTION
Performs a deep copy of a pointer.
SOURCE
130 subroutine deep_copy_int0d(xval,copy) 131 132 !Arguments ------------------------------------ 133 integer,intent(in) :: xval 134 integer,intent(out) :: copy 135 ! ********************************************************************* 136 137 copy=xval 138 139 end subroutine deep_copy_int0d
m_copy/deep_copy_int1d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
deep_copy_int1d
FUNCTION
Performs a deep copy of a pointer.
SOURCE
153 subroutine deep_copy_int1d(xval,copy) 154 155 !Arguments ------------------------------------ 156 integer,pointer :: xval(:) 157 integer,pointer :: copy(:) 158 159 !Local variables------------------------------- 160 integer :: il,iu 161 ! ********************************************************************* 162 163 if (associated(xval)) then 164 il=lbound(xval,DIM=1); iu=ubound(xval,DIM=1) 165 ABI_MALLOC(copy,(il:iu)) 166 copy(:)=xval(:) 167 else 168 nullify(copy) 169 end if 170 171 end subroutine deep_copy_int1d
m_copy/deep_copy_int2d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
deep_copy_int2d
FUNCTION
Performs a deep copy of a pointer.
SOURCE
185 subroutine deep_copy_int2d(xval,copy) 186 187 !Arguments ------------------------------------ 188 integer,pointer :: xval(:,:) 189 integer,pointer :: copy(:,:) 190 191 !Local variables------------------------------- 192 integer :: il1,iu1,il2,iu2 193 ! ********************************************************************* 194 195 if (associated(xval)) then 196 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 197 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 198 ABI_MALLOC(copy,(il1:iu1,il2:iu2)) 199 copy(:,:)=xval(:,:) 200 else 201 nullify(copy) 202 end if 203 204 end subroutine deep_copy_int2d
m_copy/deep_copy_int3d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
deep_copy_int3d
FUNCTION
Performs a deep copy of a pointer.
SOURCE
218 subroutine deep_copy_int3d(xval,copy) 219 220 !Arguments ------------------------------------ 221 integer,pointer :: xval(:,:,:) 222 integer,pointer :: copy(:,:,:) 223 224 !Local variables------------------------------- 225 integer :: il1,iu1,il2,iu2,il3,iu3 226 ! ********************************************************************* 227 228 if (associated(xval)) then 229 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 230 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 231 il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) 232 ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3)) 233 copy(:,:,:)=xval(:,:,:) 234 else 235 nullify(copy) 236 end if 237 238 end subroutine deep_copy_int3d
m_copy/deep_copy_int4d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
deep_copy_int4d
FUNCTION
Performs a deep copy of a pointer.
SOURCE
252 subroutine deep_copy_int4d(xval,copy) 253 254 !Arguments ------------------------------------ 255 integer,pointer :: xval(:,:,:,:) 256 integer,pointer :: copy(:,:,:,:) 257 258 !Local variables------------------------------- 259 integer :: il1,iu1,il2,iu2,il3,iu3,il4,iu4 260 ! ********************************************************************* 261 262 if (associated(xval)) then 263 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 264 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 265 il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) 266 il4=lbound(xval,DIM=4); iu4=ubound(xval,DIM=4) 267 ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3,il4:iu4)) 268 copy(:,:,:,:)=xval(:,:,:,:) 269 else 270 nullify(copy) 271 end if 272 273 end subroutine deep_copy_int4d
m_copy/deep_copy_log0d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
deep_copy_log0d
FUNCTION
Performs a deep copy of a pointer.
SOURCE
790 subroutine deep_copy_log0d(xval,copy) 791 792 !Arguments ------------------------------------ 793 logical,intent(in) :: xval 794 logical,intent(out) :: copy 795 ! ********************************************************************* 796 797 copy=xval 798 799 end subroutine deep_copy_log0d
m_copy/deep_copy_log1d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
deep_copy_log1d
FUNCTION
Performs a deep copy of a pointer.
SOURCE
813 subroutine deep_copy_log1d(xval,copy) 814 815 !Arguments ------------------------------------ 816 logical,pointer :: xval(:) 817 logical,pointer :: copy(:) 818 819 !Local variables------------------------------- 820 integer :: il,iu 821 ! ********************************************************************* 822 823 if (associated(xval)) then 824 il=lbound(xval,DIM=1); iu=ubound(xval,DIM=1) 825 ABI_MALLOC(copy,(il:iu)) 826 copy(:)=xval(:) 827 else 828 nullify(copy) 829 end if 830 831 end subroutine deep_copy_log1d
m_copy/deep_copy_log2d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
deep_copy_log2d
FUNCTION
Performs a deep copy of a pointer.
SOURCE
845 subroutine deep_copy_log2d(xval,copy) 846 847 !Arguments ------------------------------------ 848 logical,pointer :: xval(:,:) 849 logical,pointer :: copy(:,:) 850 851 !Local variables------------------------------- 852 integer :: il1,iu1,il2,iu2 853 ! ********************************************************************* 854 855 if (associated(xval)) then 856 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 857 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 858 ABI_MALLOC(copy,(il1:iu1,il2:iu2)) 859 copy(:,:)=xval(:,:) 860 else 861 nullify(copy) 862 end if 863 864 end subroutine deep_copy_log2d
m_copy/deep_copy_log3d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
deep_copy_log3d
FUNCTION
Performs a deep copy of a pointer.
SOURCE
878 subroutine deep_copy_log3d(xval,copy) 879 880 !Arguments ------------------------------------ 881 logical,pointer :: xval(:,:,:) 882 logical,pointer :: copy(:,:,:) 883 884 !Local variables------------------------------- 885 integer :: il1,iu1,il2,iu2,il3,iu3 886 ! ********************************************************************* 887 888 if (associated(xval)) then 889 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 890 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 891 il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) 892 ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3)) 893 copy(:,:,:)=xval(:,:,:) 894 else 895 nullify(copy) 896 end if 897 898 end subroutine deep_copy_log3d
m_copy/deep_copy_log4d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
deep_copy_log4d
FUNCTION
Performs a deep copy of a pointer.
SOURCE
912 subroutine deep_copy_log4d(xval,copy) 913 914 !Arguments ------------------------------------ 915 logical,pointer :: xval(:,:,:,:) 916 logical,pointer :: copy(:,:,:,:) 917 918 !Local variables------------------------------- 919 integer :: il1,iu1,il2,iu2,il3,iu3,il4,iu4 920 ! ********************************************************************* 921 922 if (associated(xval)) then 923 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 924 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 925 il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) 926 il4=lbound(xval,DIM=4); iu4=ubound(xval,DIM=4) 927 ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3,il4:iu4)) 928 copy(:,:,:,:)=xval(:,:,:,:) 929 else 930 nullify(copy) 931 end if 932 933 end subroutine deep_copy_log4d
m_copy/deep_copy_rdp0d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
deep_copy_rdp0d
FUNCTION
Performs a deep copy of a pointer.
SOURCE
287 subroutine deep_copy_rdp0d(xval,copy) 288 289 !Arguments ------------------------------------ 290 real(dp),intent(in) :: xval 291 real(dp),intent(out) :: copy 292 ! ********************************************************************* 293 copy=xval 294 295 end subroutine deep_copy_rdp0d
m_copy/deep_copy_rdp1d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
deep_copy_rdp1d
FUNCTION
Performs a deep copy of a pointer.
SOURCE
309 subroutine deep_copy_rdp1d(xval,copy) 310 311 !Arguments ------------------------------------ 312 real(dp),pointer :: xval(:) 313 real(dp),pointer :: copy(:) 314 315 !Local variables------------------------------- 316 integer :: il,iu 317 ! ********************************************************************* 318 319 if (associated(xval)) then 320 il=lbound(xval,DIM=1); iu=ubound(xval,DIM=1) 321 ABI_MALLOC(copy,(il:iu)) 322 copy(:)=xval(:) 323 else 324 nullify(copy) 325 end if 326 327 end subroutine deep_copy_rdp1d
m_copy/deep_copy_rdp2d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
deep_copy_rdp2d
FUNCTION
Performs a deep copy of a pointer.
SOURCE
341 subroutine deep_copy_rdp2d(xval,copy) 342 343 !Arguments ------------------------------------ 344 real(dp),pointer :: xval(:,:) 345 real(dp),pointer :: copy(:,:) 346 347 !Local variables------------------------------- 348 integer :: il1,iu1,il2,iu2 349 ! ********************************************************************* 350 351 if (associated(xval)) then 352 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 353 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 354 ABI_MALLOC(copy,(il1:iu1,il2:iu2)) 355 copy(:,:)=xval(:,:) 356 else 357 nullify(copy) 358 end if 359 360 end subroutine deep_copy_rdp2d
m_copy/deep_copy_rdp3d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
deep_copy_rdp3d
FUNCTION
Performs a deep copy of a pointer.
SOURCE
374 subroutine deep_copy_rdp3d(xval,copy) 375 376 !Arguments ------------------------------------ 377 real(dp),pointer :: xval(:,:,:) 378 real(dp),pointer :: copy(:,:,:) 379 380 !Local variables------------------------------- 381 integer :: il1,iu1,il2,iu2,il3,iu3 382 ! ********************************************************************* 383 384 if (associated(xval)) then 385 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 386 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 387 il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) 388 ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3)) 389 copy(:,:,:)=xval(:,:,:) 390 else 391 nullify(copy) 392 end if 393 394 end subroutine deep_copy_rdp3d
m_copy/deep_copy_rdp4d [ Functions ]
[ Top ] [ m_copy ] [ Functions ]
NAME
deep_copy_rdp4d
FUNCTION
Performs a deep copy of a pointer.
SOURCE
408 subroutine deep_copy_rdp4d(xval,copy) 409 410 !Arguments ------------------------------------ 411 real(dp),pointer :: xval(:,:,:,:) 412 real(dp),pointer :: copy(:,:,:,:) 413 414 !Local variables------------------------------- 415 integer :: il1,iu1,il2,iu2,il3,iu3,il4,iu4 416 ! ********************************************************************* 417 418 if (associated(xval)) then 419 il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) 420 il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) 421 il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) 422 il4=lbound(xval,DIM=4); iu4=ubound(xval,DIM=4) 423 ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3,il4:iu4)) 424 copy(:,:,:,:)=xval(:,:,:,:) 425 else 426 nullify(copy) 427 end if 428 429 end subroutine deep_copy_rdp4d