diff --git a/control/chameleon_zcf90.F90 b/control/chameleon_zcf90.F90
index dc36329f3cacbb32ab07719f0e52a0463bb7f3fb..7ae88ff1592e0ff84d155788b917191b64c4c620 100644
--- a/control/chameleon_zcf90.F90
+++ b/control/chameleon_zcf90.F90
@@ -1,5 +1,22 @@
 !!!
 !
+! @file chameleon_zcf90.F90
+!
+!  CHAMELEON Fortran 90 interfaces using Fortran 2003 ISO C bindings
+!  CHAMELEON is a software package provided by Univ. of Tennessee,
+!  Univ. of California Berkeley and Univ. of Colorado Denver
+!
+! @copyright 2012-2018 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
+!                      Univ. Bordeaux. All rights reserved.
+!
+! @version 1.0.0
+! @author Numerical Algorithm Group
+! @author Mathieu Faverge
+! @author Emmanuel Agullo
+! @author Cedric Castagnede
+! @date 2011-09-15
+! @precisions mixed zc -> ds
+!
 ! -- Inria
 ! -- (C) Copyright 2012
 !
@@ -64,19 +81,6 @@
 !     software, even if advised of the possibility of such damage.
 !
 !
-!
-!  CHAMELEON Fortran 90 interfaces using Fortran 2003 ISO C bindings
-!  CHAMELEON is a software package provided by Univ. of Tennessee,
-!  Univ. of California Berkeley and Univ. of Colorado Denver
-!
-! @version 1.0.0
-! @author Numerical Algorithms Group
-! @author Mathieu Faverge
-! @author Emmanuel Agullo
-! @author Cedric Castagnede
-! @date 2011-12-15
-! @precisions mixed zc -> ds
-!
 module chameleon_zc
 
       interface
diff --git a/control/chameleon_zf90.F90 b/control/chameleon_zf90.F90
index 21bfb621474ab8ed76a00cba539f8056c506c2b6..a02c51d766f5195064c9182121f1225524f25b84 100644
--- a/control/chameleon_zf90.F90
+++ b/control/chameleon_zf90.F90
@@ -1,24 +1,41 @@
 !!!
 !
+! @file chameleon_zf90.F90
+!
+!  CHAMELEON Fortran 90 interfaces using Fortran 2003 ISO C bindings
+!  CHAMELEON is a software package provided by Univ. of Tennessee,
+!  Univ. of California Berkeley and Univ. of Colorado Denver
+!
+! @copyright 2012-2018 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
+!                      Univ. Bordeaux. All rights reserved.
+!
+! @version 1.0.0
+! @author Numerical Algorithm Group
+! @author Mathieu Faverge
+! @author Emmanuel Agullo
+! @author Cedric Castagnede
+! @date 2011-09-15
+! @precisions normal z -> c d s
+!
 ! -- Inria
 ! -- (C) Copyright 2012
 !
 ! This software is a computer program whose purpose is to process
 ! Matrices Over Runtime Systems @ Exascale (MORSE). More information
 ! can be found on the following website: http://www.inria.fr/en/teams/morse.
-! 
+!
 ! This software is governed by the CeCILL-B license under French law and
-! abiding by the rules of distribution of free software.  You can  use, 
+! abiding by the rules of distribution of free software.  You can  use,
 ! modify and/ or redistribute the software under the terms of the CeCILL-B
 ! license as circulated by CEA, CNRS and INRIA at the following URL
-! "http://www.cecill.info". 
-! 
+! "http://www.cecill.info".
+!
 ! As a counterpart to the access to the source code and  rights to copy,
 ! modify and redistribute granted by the license, users are provided only
 ! with a limited warranty  and the software's author,  the holder of the
 ! economic rights,  and the successive licensors  have only  limited
-! liability. 
-! 
+! liability.
+!
 ! In this respect, the user's attention is drawn to the risks associated
 ! with loading,  using,  modifying and/or developing or reproducing the
 ! software by the user in light of its specific status of free software,
@@ -26,18 +43,17 @@
 ! therefore means  that it is reserved for developers  and  experienced
 ! professionals having in-depth computer knowledge. Users are therefore
 ! encouraged to load and test the software's suitability as regards their
-! requirements in conditions enabling the security of their systems and/or 
-! data to be ensured and,  more generally, to use and operate it in the 
-! same conditions as regards security. 
-! 
+! requirements in conditions enabling the security of their systems and/or
+! data to be ensured and,  more generally, to use and operate it in the
+! same conditions as regards security.
+!
 ! The fact that you are presently reading this means that you have had
 ! knowledge of the CeCILL-B license and that you accept its terms.
 !
 !!!
-
 !
 !     Copyright © 2011 The Numerical Algorithms Group Ltd. All rights reserved.
-!   
+!
 !     Redistribution and use in source and binary forms, with or without
 !     modification, are permitted provided that the following conditions are
 !     met:
@@ -50,7 +66,7 @@
 !     - Neither the name of the copyright holders nor the names of its
 !       contributors may be used to endorse or promote products derived from
 !       this software without specific prior written permission.
-!     
+!
 !     This software is provided by the copyright holders and contributors "as
 !     is" and any express or implied warranties, including, but not limited
 !     to, the implied warranties of merchantability and fitness for a
@@ -64,5418 +80,5405 @@
 !     software, even if advised of the possibility of such damage.
 !
 !
-!
-!  CHAMELEON Fortran 90 interfaces using Fortran 2003 ISO C bindings
-!  CHAMELEON is a software package provided by Univ. of Tennessee,
-!  Univ. of California Berkeley and Univ. of Colorado Denver
-!
-! @version 1.0.0
-! @author Numerical Algorithms Group
-! @author Mathieu Faverge
-! @author Emmanuel Agullo
-! @author Cedric Castagnede
-! @date 2011-12-15
-! @precisions normal z -> c d s
-!
 #define PRECISION_z
 
 module chameleon_z
-    !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-    !  FORTRAN API - math functions (simple interface)
-    !
-      interface
-         function CHAMELEON_zLapack_to_Tile_c(Af77,LDA,A) &
+  !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+  !  FORTRAN API - math functions (simple interface)
+  !
+  interface
+     function CHAMELEON_zLapack_to_Tile_c(Af77,LDA,A) &
           & bind(c, name='CHAMELEON_zLapack_to_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zLapack_to_Tile_c
-            type(c_ptr), value :: Af77
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: A
-          end function CHAMELEON_zLapack_to_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zTile_to_Lapack_c(A,Af77,LDA) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zLapack_to_Tile_c
+       type(c_ptr), value :: Af77
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: A
+     end function CHAMELEON_zLapack_to_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zTile_to_Lapack_c(A,Af77,LDA) &
           & bind(c, name='CHAMELEON_zTile_to_Lapack')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zTile_to_Lapack_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: Af77
-            integer(kind=c_int), value :: LDA
-          end function CHAMELEON_zTile_to_Lapack_c
-      end interface
-
-      interface
-         function CHAMELEON_zgebrd_c(M,N,A,LDA,D,E,descT) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zTile_to_Lapack_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: Af77
+       integer(kind=c_int), value :: LDA
+     end function CHAMELEON_zTile_to_Lapack_c
+  end interface
+
+  interface
+     function CHAMELEON_zgebrd_c(M,N,A,LDA,D,E,descT) &
           & bind(c, name='CHAMELEON_zgebrd')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgebrd_c
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: D
-            type(c_ptr), value :: E
-            type(c_ptr), value :: descT
-          end function CHAMELEON_zgebrd_c
-      end interface
-
-      interface
-         function CHAMELEON_zgecfi_c(m,n,A,fin,imb,inb,fout,omb,onb) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgebrd_c
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: D
+       type(c_ptr), value :: E
+       type(c_ptr), value :: descT
+     end function CHAMELEON_zgebrd_c
+  end interface
+
+  interface
+     function CHAMELEON_zgecfi_c(m,n,A,fin,imb,inb,fout,omb,onb) &
           & bind(c, name='CHAMELEON_zgecfi')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgecfi_c
-            integer(kind=c_int), value :: m
-            integer(kind=c_int), value :: n
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: fin
-            integer(kind=c_int), value :: imb
-            integer(kind=c_int), value :: inb
-            integer(kind=c_int), value :: fout
-            integer(kind=c_int), value :: omb
-            integer(kind=c_int), value :: onb
-          end function CHAMELEON_zgecfi_c
-      end interface
-
-      interface
-         function CHAMELEON_zgecfi_Async_c(m,n,A,f_in,imb,inb,f_out,omb,onb,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgecfi_c
+       integer(kind=c_int), value :: m
+       integer(kind=c_int), value :: n
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: fin
+       integer(kind=c_int), value :: imb
+       integer(kind=c_int), value :: inb
+       integer(kind=c_int), value :: fout
+       integer(kind=c_int), value :: omb
+       integer(kind=c_int), value :: onb
+     end function CHAMELEON_zgecfi_c
+  end interface
+
+  interface
+     function CHAMELEON_zgecfi_Async_c(m,n,A,f_in,imb,inb,f_out,omb,onb,sequence,request) &
           & bind(c, name='CHAMELEON_zgecfi_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgecfi_Async_c
-            integer(kind=c_int), value :: m
-            integer(kind=c_int), value :: n
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: f_in
-            integer(kind=c_int), value :: imb
-            integer(kind=c_int), value :: inb
-            integer(kind=c_int), value :: f_out
-            integer(kind=c_int), value :: omb
-            integer(kind=c_int), value :: onb
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zgecfi_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zgelqf_c(M,N,A,LDA,descT) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgecfi_Async_c
+       integer(kind=c_int), value :: m
+       integer(kind=c_int), value :: n
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: f_in
+       integer(kind=c_int), value :: imb
+       integer(kind=c_int), value :: inb
+       integer(kind=c_int), value :: f_out
+       integer(kind=c_int), value :: omb
+       integer(kind=c_int), value :: onb
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zgecfi_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zgelqf_c(M,N,A,LDA,descT) &
           & bind(c, name='CHAMELEON_zgelqf')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgelqf_c
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: descT
-          end function CHAMELEON_zgelqf_c
-      end interface
-
-      interface
-         function CHAMELEON_zgelqs_c(M,N,NRHS,A,LDA,descT,B,LDB) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgelqf_c
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: descT
+     end function CHAMELEON_zgelqf_c
+  end interface
+
+  interface
+     function CHAMELEON_zgelqs_c(M,N,NRHS,A,LDA,descT,B,LDB) &
           & bind(c, name='CHAMELEON_zgelqs')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgelqs_c
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            integer(kind=c_int), value :: NRHS
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: descT
-            type(c_ptr), value :: B
-            integer(kind=c_int), value :: LDB
-          end function CHAMELEON_zgelqs_c
-      end interface
-
-      interface
-         function CHAMELEON_zgels_c(trans,M,N,NRHS,A,LDA,descT,B,LDB) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgelqs_c
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       integer(kind=c_int), value :: NRHS
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: descT
+       type(c_ptr), value :: B
+       integer(kind=c_int), value :: LDB
+     end function CHAMELEON_zgelqs_c
+  end interface
+
+  interface
+     function CHAMELEON_zgels_c(trans,M,N,NRHS,A,LDA,descT,B,LDB) &
           & bind(c, name='CHAMELEON_zgels')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgels_c
-            integer(kind=c_int), value :: trans
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            integer(kind=c_int), value :: NRHS
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: descT
-            type(c_ptr), value :: B
-            integer(kind=c_int), value :: LDB
-          end function CHAMELEON_zgels_c
-      end interface
-
-      interface
-         function CHAMELEON_zgemm_c(transA,transB,M,N,K,alpha,A,LDA,B,LDB,beta,C,LDC) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgels_c
+       integer(kind=c_int), value :: trans
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       integer(kind=c_int), value :: NRHS
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: descT
+       type(c_ptr), value :: B
+       integer(kind=c_int), value :: LDB
+     end function CHAMELEON_zgels_c
+  end interface
+
+  interface
+     function CHAMELEON_zgemm_c(transA,transB,M,N,K,alpha,A,LDA,B,LDB,beta,C,LDC) &
           & bind(c, name='CHAMELEON_zgemm')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgemm_c
-            integer(kind=c_int), value :: transA
-            integer(kind=c_int), value :: transB
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            integer(kind=c_int), value :: K
-            complex(kind=c_double_complex), value :: alpha
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: B
-            integer(kind=c_int), value :: LDB
-            complex(kind=c_double_complex), value :: beta
-            type(c_ptr), value :: C
-            integer(kind=c_int), value :: LDC
-          end function CHAMELEON_zgemm_c
-      end interface
-
-      interface
-         function CHAMELEON_zgeqrf_c(M,N,A,LDA,descT) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgemm_c
+       integer(kind=c_int), value :: transA
+       integer(kind=c_int), value :: transB
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       integer(kind=c_int), value :: K
+       complex(kind=c_double_complex), value :: alpha
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: B
+       integer(kind=c_int), value :: LDB
+       complex(kind=c_double_complex), value :: beta
+       type(c_ptr), value :: C
+       integer(kind=c_int), value :: LDC
+     end function CHAMELEON_zgemm_c
+  end interface
+
+  interface
+     function CHAMELEON_zgeqrf_c(M,N,A,LDA,descT) &
           & bind(c, name='CHAMELEON_zgeqrf')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgeqrf_c
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: descT
-          end function CHAMELEON_zgeqrf_c
-      end interface
-
-      interface
-         function CHAMELEON_zgeqrs_c(M,N,NRHS,A,LDA,descT,B,LDB) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgeqrf_c
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: descT
+     end function CHAMELEON_zgeqrf_c
+  end interface
+
+  interface
+     function CHAMELEON_zgeqrs_c(M,N,NRHS,A,LDA,descT,B,LDB) &
           & bind(c, name='CHAMELEON_zgeqrs')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgeqrs_c
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            integer(kind=c_int), value :: NRHS
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: descT
-            type(c_ptr), value :: B
-            integer(kind=c_int), value :: LDB
-          end function CHAMELEON_zgeqrs_c
-      end interface
-
-      interface
-         function CHAMELEON_zgesv_c(N,NRHS,A,LDA,IPIV,B,LDB) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgeqrs_c
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       integer(kind=c_int), value :: NRHS
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: descT
+       type(c_ptr), value :: B
+       integer(kind=c_int), value :: LDB
+     end function CHAMELEON_zgeqrs_c
+  end interface
+
+  interface
+     function CHAMELEON_zgesv_c(N,NRHS,A,LDA,IPIV,B,LDB) &
           & bind(c, name='CHAMELEON_zgesv')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgesv_c
-            integer(kind=c_int), value :: N
-            integer(kind=c_int), value :: NRHS
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: IPIV
-            type(c_ptr), value :: B
-            integer(kind=c_int), value :: LDB
-          end function CHAMELEON_zgesv_c
-      end interface
-
-      interface
-         function CHAMELEON_zgesv_incpiv_c(N,NRHS,A,LDA,descL,IPIV,B,LDB) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgesv_c
+       integer(kind=c_int), value :: N
+       integer(kind=c_int), value :: NRHS
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: IPIV
+       type(c_ptr), value :: B
+       integer(kind=c_int), value :: LDB
+     end function CHAMELEON_zgesv_c
+  end interface
+
+  interface
+     function CHAMELEON_zgesv_incpiv_c(N,NRHS,A,LDA,descL,IPIV,B,LDB) &
           & bind(c, name='CHAMELEON_zgesv_incpiv')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgesv_incpiv_c
-            integer(kind=c_int), value :: N
-            integer(kind=c_int), value :: NRHS
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: descL
-            type(c_ptr), value :: IPIV
-            type(c_ptr), value :: B
-            integer(kind=c_int), value :: LDB
-          end function CHAMELEON_zgesv_incpiv_c
-      end interface
-
-      interface
-         function CHAMELEON_zgesvd_c(jobu,jobvt,M,N,A,LDA,S,U,LDU,VT,LDVT,descT) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgesv_incpiv_c
+       integer(kind=c_int), value :: N
+       integer(kind=c_int), value :: NRHS
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: descL
+       type(c_ptr), value :: IPIV
+       type(c_ptr), value :: B
+       integer(kind=c_int), value :: LDB
+     end function CHAMELEON_zgesv_incpiv_c
+  end interface
+
+  interface
+     function CHAMELEON_zgesvd_c(jobu,jobvt,M,N,A,LDA,S,U,LDU,VT,LDVT,descT) &
           & bind(c, name='CHAMELEON_zgesvd')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgesvd_c
-            integer(kind=c_int), value :: jobu
-            integer(kind=c_int), value :: jobvt
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: S
-            type(c_ptr), value :: U
-            integer(kind=c_int), value :: LDU
-            type(c_ptr), value :: VT
-            integer(kind=c_int), value :: LDVT
-            type(c_ptr), value :: descT
-          end function CHAMELEON_zgesvd_c
-      end interface
-
-      interface
-         function CHAMELEON_zgetmi_c(m,n,A,fin,mb,nb) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgesvd_c
+       integer(kind=c_int), value :: jobu
+       integer(kind=c_int), value :: jobvt
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: S
+       type(c_ptr), value :: U
+       integer(kind=c_int), value :: LDU
+       type(c_ptr), value :: VT
+       integer(kind=c_int), value :: LDVT
+       type(c_ptr), value :: descT
+     end function CHAMELEON_zgesvd_c
+  end interface
+
+  interface
+     function CHAMELEON_zgetmi_c(m,n,A,fin,mb,nb) &
           & bind(c, name='CHAMELEON_zgetmi')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgetmi_c
-            integer(kind=c_int), value :: m
-            integer(kind=c_int), value :: n
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: fin
-            integer(kind=c_int), value :: mb
-            integer(kind=c_int), value :: nb
-          end function CHAMELEON_zgetmi_c
-      end interface
-
-      interface
-         function CHAMELEON_zgetmi_Async_c(m,n,A,f_in,mb,inb,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgetmi_c
+       integer(kind=c_int), value :: m
+       integer(kind=c_int), value :: n
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: fin
+       integer(kind=c_int), value :: mb
+       integer(kind=c_int), value :: nb
+     end function CHAMELEON_zgetmi_c
+  end interface
+
+  interface
+     function CHAMELEON_zgetmi_Async_c(m,n,A,f_in,mb,inb,sequence,request) &
           & bind(c, name='CHAMELEON_zgetmi_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgetmi_Async_c
-            integer(kind=c_int), value :: m
-            integer(kind=c_int), value :: n
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: f_in
-            integer(kind=c_int), value :: mb
-            integer(kind=c_int), value :: inb
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zgetmi_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zgetrf_c(M,N,A,LDA,IPIV) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgetmi_Async_c
+       integer(kind=c_int), value :: m
+       integer(kind=c_int), value :: n
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: f_in
+       integer(kind=c_int), value :: mb
+       integer(kind=c_int), value :: inb
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zgetmi_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zgetrf_c(M,N,A,LDA,IPIV) &
           & bind(c, name='CHAMELEON_zgetrf')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgetrf_c
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: IPIV
-          end function CHAMELEON_zgetrf_c
-      end interface
-
-      interface
-         function CHAMELEON_zgetrf_incpiv_c(M,N,A,LDA,descL,IPIV) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgetrf_c
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: IPIV
+     end function CHAMELEON_zgetrf_c
+  end interface
+
+  interface
+     function CHAMELEON_zgetrf_incpiv_c(M,N,A,LDA,descL,IPIV) &
           & bind(c, name='CHAMELEON_zgetrf_incpiv')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgetrf_incpiv_c
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: descL
-            type(c_ptr), value :: IPIV
-          end function CHAMELEON_zgetrf_incpiv_c
-      end interface
-
-      interface
-         function CHAMELEON_zgetrf_nopiv_c(M,N,A,LDA) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgetrf_incpiv_c
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: descL
+       type(c_ptr), value :: IPIV
+     end function CHAMELEON_zgetrf_incpiv_c
+  end interface
+
+  interface
+     function CHAMELEON_zgetrf_nopiv_c(M,N,A,LDA) &
           & bind(c, name='CHAMELEON_zgetrf_nopiv')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgetrf_nopiv_c
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-          end function CHAMELEON_zgetrf_nopiv_c
-      end interface
-
-      interface
-         function CHAMELEON_zgetri_c(N,A,LDA,IPIV) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgetrf_nopiv_c
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+     end function CHAMELEON_zgetrf_nopiv_c
+  end interface
+
+  interface
+     function CHAMELEON_zgetri_c(N,A,LDA,IPIV) &
           & bind(c, name='CHAMELEON_zgetri')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgetri_c
-            integer(kind=c_int), value :: N
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: IPIV
-          end function CHAMELEON_zgetri_c
-      end interface
-
-      interface
-         function CHAMELEON_zgetrs_c(trans,N,NRHS,A,LDA,IPIV,B,LDB) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgetri_c
+       integer(kind=c_int), value :: N
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: IPIV
+     end function CHAMELEON_zgetri_c
+  end interface
+
+  interface
+     function CHAMELEON_zgetrs_c(trans,N,NRHS,A,LDA,IPIV,B,LDB) &
           & bind(c, name='CHAMELEON_zgetrs')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgetrs_c
-            integer(kind=c_int), value :: trans
-            integer(kind=c_int), value :: N
-            integer(kind=c_int), value :: NRHS
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: IPIV
-            type(c_ptr), value :: B
-            integer(kind=c_int), value :: LDB
-          end function CHAMELEON_zgetrs_c
-      end interface
-
-      interface
-         function CHAMELEON_zgetrs_incpiv_c(trans,N,NRHS,A,LDA,descL,IPIV,B,LDB) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgetrs_c
+       integer(kind=c_int), value :: trans
+       integer(kind=c_int), value :: N
+       integer(kind=c_int), value :: NRHS
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: IPIV
+       type(c_ptr), value :: B
+       integer(kind=c_int), value :: LDB
+     end function CHAMELEON_zgetrs_c
+  end interface
+
+  interface
+     function CHAMELEON_zgetrs_incpiv_c(trans,N,NRHS,A,LDA,descL,IPIV,B,LDB) &
           & bind(c, name='CHAMELEON_zgetrs_incpiv')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgetrs_incpiv_c
-            integer(kind=c_int), value :: trans
-            integer(kind=c_int), value :: N
-            integer(kind=c_int), value :: NRHS
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: descL
-            type(c_ptr), value :: IPIV
-            type(c_ptr), value :: B
-            integer(kind=c_int), value :: LDB
-          end function CHAMELEON_zgetrs_incpiv_c
-      end interface
-
-      interface
-         function CHAMELEON_zheev_c(jobz,uplo,N,A,LDA,W,descT,Q,LDQ) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgetrs_incpiv_c
+       integer(kind=c_int), value :: trans
+       integer(kind=c_int), value :: N
+       integer(kind=c_int), value :: NRHS
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: descL
+       type(c_ptr), value :: IPIV
+       type(c_ptr), value :: B
+       integer(kind=c_int), value :: LDB
+     end function CHAMELEON_zgetrs_incpiv_c
+  end interface
+
+  interface
+     function CHAMELEON_zheev_c(jobz,uplo,N,A,LDA,W,descT,Q,LDQ) &
           & bind(c, name='CHAMELEON_zheev')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zheev_c
-            integer(kind=c_int), value :: jobz
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: N
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: W
-            type(c_ptr), value :: descT
-            type(c_ptr), value :: Q
-            integer(kind=c_int), value :: LDQ
-          end function CHAMELEON_zheev_c
-      end interface
-
-      interface
-         function CHAMELEON_zheevd_c(jobz,uplo,N,A,LDA,W,descT,Q,LDQ) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zheev_c
+       integer(kind=c_int), value :: jobz
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: N
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: W
+       type(c_ptr), value :: descT
+       type(c_ptr), value :: Q
+       integer(kind=c_int), value :: LDQ
+     end function CHAMELEON_zheev_c
+  end interface
+
+  interface
+     function CHAMELEON_zheevd_c(jobz,uplo,N,A,LDA,W,descT,Q,LDQ) &
           & bind(c, name='CHAMELEON_zheevd')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zheevd_c
-            integer(kind=c_int), value :: jobz
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: N
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: W
-            type(c_ptr), value :: descT
-            type(c_ptr), value :: Q
-            integer(kind=c_int), value :: LDQ
-          end function CHAMELEON_zheevd_c
-      end interface
-
-      interface
-         function CHAMELEON_zhegst_c(itype,uplo,N,A,LDA,B,LDB) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zheevd_c
+       integer(kind=c_int), value :: jobz
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: N
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: W
+       type(c_ptr), value :: descT
+       type(c_ptr), value :: Q
+       integer(kind=c_int), value :: LDQ
+     end function CHAMELEON_zheevd_c
+  end interface
+
+  interface
+     function CHAMELEON_zhegst_c(itype,uplo,N,A,LDA,B,LDB) &
           & bind(c, name='CHAMELEON_zhegst')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zhegst_c
-            integer(kind=c_int), value :: itype
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: N
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: B
-            integer(kind=c_int), value :: LDB
-          end function CHAMELEON_zhegst_c
-      end interface
-
-      interface
-         function CHAMELEON_zhegv_c(itype,jobz,uplo,N,A,LDA,B,LDB,W,descT,Q,LDQ) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zhegst_c
+       integer(kind=c_int), value :: itype
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: N
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: B
+       integer(kind=c_int), value :: LDB
+     end function CHAMELEON_zhegst_c
+  end interface
+
+  interface
+     function CHAMELEON_zhegv_c(itype,jobz,uplo,N,A,LDA,B,LDB,W,descT,Q,LDQ) &
           & bind(c, name='CHAMELEON_zhegv')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zhegv_c
-            integer(kind=c_int), value :: itype
-            integer(kind=c_int), value :: jobz
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: N
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: B
-            integer(kind=c_int), value :: LDB
-            type(c_ptr), value :: W
-            type(c_ptr), value :: descT
-            type(c_ptr), value :: Q
-            integer(kind=c_int), value :: LDQ
-          end function CHAMELEON_zhegv_c
-      end interface
-
-      interface
-         function CHAMELEON_zhegvd_c(itype,jobz,uplo,N,A,LDA,B,LDB,W,descT,Q,LDQ) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zhegv_c
+       integer(kind=c_int), value :: itype
+       integer(kind=c_int), value :: jobz
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: N
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: B
+       integer(kind=c_int), value :: LDB
+       type(c_ptr), value :: W
+       type(c_ptr), value :: descT
+       type(c_ptr), value :: Q
+       integer(kind=c_int), value :: LDQ
+     end function CHAMELEON_zhegv_c
+  end interface
+
+  interface
+     function CHAMELEON_zhegvd_c(itype,jobz,uplo,N,A,LDA,B,LDB,W,descT,Q,LDQ) &
           & bind(c, name='CHAMELEON_zhegvd')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zhegvd_c
-            integer(kind=c_int), value :: itype
-            integer(kind=c_int), value :: jobz
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: N
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: B
-            integer(kind=c_int), value :: LDB
-            type(c_ptr), value :: W
-            type(c_ptr), value :: descT
-            type(c_ptr), value :: Q
-            integer(kind=c_int), value :: LDQ
-          end function CHAMELEON_zhegvd_c
-      end interface
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zhegvd_c
+       integer(kind=c_int), value :: itype
+       integer(kind=c_int), value :: jobz
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: N
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: B
+       integer(kind=c_int), value :: LDB
+       type(c_ptr), value :: W
+       type(c_ptr), value :: descT
+       type(c_ptr), value :: Q
+       integer(kind=c_int), value :: LDQ
+     end function CHAMELEON_zhegvd_c
+  end interface
 
 #if defined(PRECISION_z) || defined(PRECISION_c)
-      interface
-         function CHAMELEON_zhemm_c(side,uplo,M,N,alpha,A,LDA,B,LDB,beta,C,LDC) &
+  interface
+     function CHAMELEON_zhemm_c(side,uplo,M,N,alpha,A,LDA,B,LDB,beta,C,LDC) &
           & bind(c, name='CHAMELEON_zhemm')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zhemm_c
-            integer(kind=c_int), value :: side
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            complex(kind=c_double_complex), value :: alpha
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: B
-            integer(kind=c_int), value :: LDB
-            complex(kind=c_double_complex), value :: beta
-            type(c_ptr), value :: C
-            integer(kind=c_int), value :: LDC
-          end function CHAMELEON_zhemm_c
-      end interface
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zhemm_c
+       integer(kind=c_int), value :: side
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       complex(kind=c_double_complex), value :: alpha
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: B
+       integer(kind=c_int), value :: LDB
+       complex(kind=c_double_complex), value :: beta
+       type(c_ptr), value :: C
+       integer(kind=c_int), value :: LDC
+     end function CHAMELEON_zhemm_c
+  end interface
 #endif
 
 #if defined(PRECISION_z) || defined(PRECISION_c)
-      interface
-         function CHAMELEON_zher2k_c(uplo,trans,N,K,alpha,A,LDA,B,LDB,beta,C,LDC) &
+  interface
+     function CHAMELEON_zher2k_c(uplo,trans,N,K,alpha,A,LDA,B,LDB,beta,C,LDC) &
           & bind(c, name='CHAMELEON_zher2k')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zher2k_c
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: trans
-            integer(kind=c_int), value :: N
-            integer(kind=c_int), value :: K
-            complex(kind=c_double_complex), value :: alpha
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: B
-            integer(kind=c_int), value :: LDB
-            real(kind=c_double), value :: beta
-            type(c_ptr), value :: C
-            integer(kind=c_int), value :: LDC
-          end function CHAMELEON_zher2k_c
-      end interface
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zher2k_c
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: trans
+       integer(kind=c_int), value :: N
+       integer(kind=c_int), value :: K
+       complex(kind=c_double_complex), value :: alpha
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: B
+       integer(kind=c_int), value :: LDB
+       real(kind=c_double), value :: beta
+       type(c_ptr), value :: C
+       integer(kind=c_int), value :: LDC
+     end function CHAMELEON_zher2k_c
+  end interface
 #endif
 
 #if defined(PRECISION_z) || defined(PRECISION_c)
-      interface
-         function CHAMELEON_zherk_c(uplo,trans,N,K,alpha,A,LDA,beta,C,LDC) &
+  interface
+     function CHAMELEON_zherk_c(uplo,trans,N,K,alpha,A,LDA,beta,C,LDC) &
           & bind(c, name='CHAMELEON_zherk')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zherk_c
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: trans
-            integer(kind=c_int), value :: N
-            integer(kind=c_int), value :: K
-            real(kind=c_double), value :: alpha
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            real(kind=c_double), value :: beta
-            type(c_ptr), value :: C
-            integer(kind=c_int), value :: LDC
-          end function CHAMELEON_zherk_c
-      end interface
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zherk_c
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: trans
+       integer(kind=c_int), value :: N
+       integer(kind=c_int), value :: K
+       real(kind=c_double), value :: alpha
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       real(kind=c_double), value :: beta
+       type(c_ptr), value :: C
+       integer(kind=c_int), value :: LDC
+     end function CHAMELEON_zherk_c
+  end interface
 #endif
 
-      interface
-         function CHAMELEON_zhetrd_c(jobz,uplo,N,A,LDA,D,E,descT,Q,LDQ) &
+  interface
+     function CHAMELEON_zhetrd_c(jobz,uplo,N,A,LDA,D,E,descT,Q,LDQ) &
           & bind(c, name='CHAMELEON_zhetrd')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zhetrd_c
-            integer(kind=c_int), value :: jobz
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: N
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: D
-            type(c_ptr), value :: E
-            type(c_ptr), value :: descT
-            type(c_ptr), value :: Q
-            integer(kind=c_int), value :: LDQ
-          end function CHAMELEON_zhetrd_c
-      end interface
-
-      interface
-         function CHAMELEON_zlacpy_c(uplo,M,N,A,LDA,B,LDB) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zhetrd_c
+       integer(kind=c_int), value :: jobz
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: N
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: D
+       type(c_ptr), value :: E
+       type(c_ptr), value :: descT
+       type(c_ptr), value :: Q
+       integer(kind=c_int), value :: LDQ
+     end function CHAMELEON_zhetrd_c
+  end interface
+
+  interface
+     function CHAMELEON_zlacpy_c(uplo,M,N,A,LDA,B,LDB) &
           & bind(c, name='CHAMELEON_zlacpy')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zlacpy_c
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: B
-            integer(kind=c_int), value :: LDB
-          end function CHAMELEON_zlacpy_c
-      end interface
-
-      interface
-         function CHAMELEON_zlange_c(norm,M,N,A,LDA,work) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zlacpy_c
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: B
+       integer(kind=c_int), value :: LDB
+     end function CHAMELEON_zlacpy_c
+  end interface
+
+  interface
+     function CHAMELEON_zlange_c(norm,M,N,A,LDA,work) &
           & bind(c, name='CHAMELEON_zlange')
-            use iso_c_binding
-            implicit none
-            real(kind=c_double) :: CHAMELEON_zlange_c
-            integer(kind=c_int), value :: norm
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: work
-          end function CHAMELEON_zlange_c
-      end interface
+       use iso_c_binding
+       implicit none
+       real(kind=c_double) :: CHAMELEON_zlange_c
+       integer(kind=c_int), value :: norm
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: work
+     end function CHAMELEON_zlange_c
+  end interface
 
 #if defined(PRECISION_z) || defined(PRECISION_c)
-      interface
-         function CHAMELEON_zlanhe_c(norm,uplo,N,A,LDA,work) &
+  interface
+     function CHAMELEON_zlanhe_c(norm,uplo,N,A,LDA,work) &
           & bind(c, name='CHAMELEON_zlanhe')
-            use iso_c_binding
-            implicit none
-            real(kind=c_double) :: CHAMELEON_zlanhe_c
-            integer(kind=c_int), value :: norm
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: N
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: work
-          end function CHAMELEON_zlanhe_c
-      end interface
+       use iso_c_binding
+       implicit none
+       real(kind=c_double) :: CHAMELEON_zlanhe_c
+       integer(kind=c_int), value :: norm
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: N
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: work
+     end function CHAMELEON_zlanhe_c
+  end interface
 #endif
 
-      interface
-         function CHAMELEON_zlansy_c(norm,uplo,N,A,LDA,work) &
+  interface
+     function CHAMELEON_zlansy_c(norm,uplo,N,A,LDA,work) &
           & bind(c, name='CHAMELEON_zlansy')
-            use iso_c_binding
-            implicit none
-            real(kind=c_double) :: CHAMELEON_zlansy_c
-            integer(kind=c_int), value :: norm
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: N
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: work
-          end function CHAMELEON_zlansy_c
-      end interface
-
-      interface
-         function CHAMELEON_zlaset_c(uplo,M,N,alpha,beta,A,LDA) &
+       use iso_c_binding
+       implicit none
+       real(kind=c_double) :: CHAMELEON_zlansy_c
+       integer(kind=c_int), value :: norm
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: N
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: work
+     end function CHAMELEON_zlansy_c
+  end interface
+
+  interface
+     function CHAMELEON_zlaset_c(uplo,M,N,alpha,beta,A,LDA) &
           & bind(c, name='CHAMELEON_zlaset')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zlaset_c
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            complex(kind=c_double_complex), value :: alpha
-            complex(kind=c_double_complex), value :: beta
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-          end function CHAMELEON_zlaset_c
-      end interface
-
-      interface
-         function CHAMELEON_zlaswp_c(N,A,LDA,K1,K2,IPIV,INCX) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zlaset_c
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       complex(kind=c_double_complex), value :: alpha
+       complex(kind=c_double_complex), value :: beta
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+     end function CHAMELEON_zlaset_c
+  end interface
+
+  interface
+     function CHAMELEON_zlaswp_c(N,A,LDA,K1,K2,IPIV,INCX) &
           & bind(c, name='CHAMELEON_zlaswp')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zlaswp_c
-            integer(kind=c_int), value :: N
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            integer(kind=c_int), value :: K1
-            integer(kind=c_int), value :: K2
-            type(c_ptr), value :: IPIV
-            integer(kind=c_int), value :: INCX
-          end function CHAMELEON_zlaswp_c
-      end interface
-
-      interface
-         function CHAMELEON_zlaswpc_c(N,A,LDA,K1,K2,IPIV,INCX) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zlaswp_c
+       integer(kind=c_int), value :: N
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       integer(kind=c_int), value :: K1
+       integer(kind=c_int), value :: K2
+       type(c_ptr), value :: IPIV
+       integer(kind=c_int), value :: INCX
+     end function CHAMELEON_zlaswp_c
+  end interface
+
+  interface
+     function CHAMELEON_zlaswpc_c(N,A,LDA,K1,K2,IPIV,INCX) &
           & bind(c, name='CHAMELEON_zlaswpc')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zlaswpc_c
-            integer(kind=c_int), value :: N
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            integer(kind=c_int), value :: K1
-            integer(kind=c_int), value :: K2
-            type(c_ptr), value :: IPIV
-            integer(kind=c_int), value :: INCX
-          end function CHAMELEON_zlaswpc_c
-      end interface
-
-      interface
-         function CHAMELEON_zlauum_c(uplo,N,A,LDA) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zlaswpc_c
+       integer(kind=c_int), value :: N
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       integer(kind=c_int), value :: K1
+       integer(kind=c_int), value :: K2
+       type(c_ptr), value :: IPIV
+       integer(kind=c_int), value :: INCX
+     end function CHAMELEON_zlaswpc_c
+  end interface
+
+  interface
+     function CHAMELEON_zlauum_c(uplo,N,A,LDA) &
           & bind(c, name='CHAMELEON_zlauum')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zlauum_c
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: N
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-          end function CHAMELEON_zlauum_c
-      end interface
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zlauum_c
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: N
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+     end function CHAMELEON_zlauum_c
+  end interface
 
 #if defined(PRECISION_z) || defined(PRECISION_c)
-      interface
-         function CHAMELEON_zplghe_c(bump,uplo,N,A,LDA,seed) &
+  interface
+     function CHAMELEON_zplghe_c(bump,uplo,N,A,LDA,seed) &
           & bind(c, name='CHAMELEON_zplghe')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zplghe_c
-            real(kind=c_double), value :: bump
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: N
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            integer(kind=c_long_long), value :: seed
-          end function CHAMELEON_zplghe_c
-      end interface
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zplghe_c
+       real(kind=c_double), value :: bump
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: N
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       integer(kind=c_long_long), value :: seed
+     end function CHAMELEON_zplghe_c
+  end interface
 #endif
 
-      interface
-         function CHAMELEON_zplgsy_c(bump,uplo,N,A,LDA,seed) &
+  interface
+     function CHAMELEON_zplgsy_c(bump,uplo,N,A,LDA,seed) &
           & bind(c, name='CHAMELEON_zplgsy')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zplgsy_c
-            complex(kind=c_double_complex), value :: bump
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: N
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            integer(kind=c_long_long), value :: seed
-          end function CHAMELEON_zplgsy_c
-      end interface
-
-      interface
-         function CHAMELEON_zplrnt_c(M,N,A,LDA,seed) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zplgsy_c
+       complex(kind=c_double_complex), value :: bump
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: N
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       integer(kind=c_long_long), value :: seed
+     end function CHAMELEON_zplgsy_c
+  end interface
+
+  interface
+     function CHAMELEON_zplrnt_c(M,N,A,LDA,seed) &
           & bind(c, name='CHAMELEON_zplrnt')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zplrnt_c
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            integer(kind=c_long_long), value :: seed
-          end function CHAMELEON_zplrnt_c
-      end interface
-
-      interface
-         function CHAMELEON_zposv_c(uplo,N,NRHS,A,LDA,B,LDB) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zplrnt_c
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       integer(kind=c_long_long), value :: seed
+     end function CHAMELEON_zplrnt_c
+  end interface
+
+  interface
+     function CHAMELEON_zposv_c(uplo,N,NRHS,A,LDA,B,LDB) &
           & bind(c, name='CHAMELEON_zposv')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zposv_c
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: N
-            integer(kind=c_int), value :: NRHS
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: B
-            integer(kind=c_int), value :: LDB
-          end function CHAMELEON_zposv_c
-      end interface
-
-      interface
-         function CHAMELEON_zsysv_c(uplo,N,NRHS,A,LDA,B,LDB) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zposv_c
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: N
+       integer(kind=c_int), value :: NRHS
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: B
+       integer(kind=c_int), value :: LDB
+     end function CHAMELEON_zposv_c
+  end interface
+
+  interface
+     function CHAMELEON_zsysv_c(uplo,N,NRHS,A,LDA,B,LDB) &
           & bind(c, name='CHAMELEON_zsysv')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zsysv_c
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: N
-            integer(kind=c_int), value :: NRHS
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: B
-            integer(kind=c_int), value :: LDB
-          end function CHAMELEON_zsysv_c
-      end interface
-
-      interface
-         function CHAMELEON_zpotrf_c(uplo,N,A,LDA) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zsysv_c
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: N
+       integer(kind=c_int), value :: NRHS
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: B
+       integer(kind=c_int), value :: LDB
+     end function CHAMELEON_zsysv_c
+  end interface
+
+  interface
+     function CHAMELEON_zpotrf_c(uplo,N,A,LDA) &
           & bind(c, name='CHAMELEON_zpotrf')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zpotrf_c
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: N
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-          end function CHAMELEON_zpotrf_c
-      end interface
-
-      interface
-         function CHAMELEON_zsytrf_c(uplo,N,A,LDA) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zpotrf_c
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: N
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+     end function CHAMELEON_zpotrf_c
+  end interface
+
+  interface
+     function CHAMELEON_zsytrf_c(uplo,N,A,LDA) &
           & bind(c, name='CHAMELEON_zsytrf')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zsytrf_c
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: N
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-          end function CHAMELEON_zsytrf_c
-      end interface
-
-      interface
-         function CHAMELEON_zpotri_c(uplo,N,A,LDA) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zsytrf_c
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: N
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+     end function CHAMELEON_zsytrf_c
+  end interface
+
+  interface
+     function CHAMELEON_zpotri_c(uplo,N,A,LDA) &
           & bind(c, name='CHAMELEON_zpotri')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zpotri_c
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: N
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-          end function CHAMELEON_zpotri_c
-      end interface
-
-      interface
-         function CHAMELEON_zpotrs_c(uplo,N,NRHS,A,LDA,B,LDB) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zpotri_c
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: N
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+     end function CHAMELEON_zpotri_c
+  end interface
+
+  interface
+     function CHAMELEON_zpotrs_c(uplo,N,NRHS,A,LDA,B,LDB) &
           & bind(c, name='CHAMELEON_zpotrs')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zpotrs_c
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: N
-            integer(kind=c_int), value :: NRHS
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: B
-            integer(kind=c_int), value :: LDB
-          end function CHAMELEON_zpotrs_c
-      end interface
-
-      interface
-         function CHAMELEON_zsytrs_c(uplo,N,NRHS,A,LDA,B,LDB) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zpotrs_c
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: N
+       integer(kind=c_int), value :: NRHS
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: B
+       integer(kind=c_int), value :: LDB
+     end function CHAMELEON_zpotrs_c
+  end interface
+
+  interface
+     function CHAMELEON_zsytrs_c(uplo,N,NRHS,A,LDA,B,LDB) &
           & bind(c, name='CHAMELEON_zsytrs')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zsytrs_c
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: N
-            integer(kind=c_int), value :: NRHS
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: B
-            integer(kind=c_int), value :: LDB
-          end function CHAMELEON_zsytrs_c
-      end interface
-
-      interface
-         function CHAMELEON_zsymm_c(side,uplo,M,N,alpha,A,LDA,B,LDB,beta,C,LDC) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zsytrs_c
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: N
+       integer(kind=c_int), value :: NRHS
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: B
+       integer(kind=c_int), value :: LDB
+     end function CHAMELEON_zsytrs_c
+  end interface
+
+  interface
+     function CHAMELEON_zsymm_c(side,uplo,M,N,alpha,A,LDA,B,LDB,beta,C,LDC) &
           & bind(c, name='CHAMELEON_zsymm')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zsymm_c
-            integer(kind=c_int), value :: side
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            complex(kind=c_double_complex), value :: alpha
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: B
-            integer(kind=c_int), value :: LDB
-            complex(kind=c_double_complex), value :: beta
-            type(c_ptr), value :: C
-            integer(kind=c_int), value :: LDC
-          end function CHAMELEON_zsymm_c
-      end interface
-
-      interface
-         function CHAMELEON_zsyr2k_c(uplo,trans,N,K,alpha,A,LDA,B,LDB,beta,C,LDC) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zsymm_c
+       integer(kind=c_int), value :: side
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       complex(kind=c_double_complex), value :: alpha
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: B
+       integer(kind=c_int), value :: LDB
+       complex(kind=c_double_complex), value :: beta
+       type(c_ptr), value :: C
+       integer(kind=c_int), value :: LDC
+     end function CHAMELEON_zsymm_c
+  end interface
+
+  interface
+     function CHAMELEON_zsyr2k_c(uplo,trans,N,K,alpha,A,LDA,B,LDB,beta,C,LDC) &
           & bind(c, name='CHAMELEON_zsyr2k')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zsyr2k_c
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: trans
-            integer(kind=c_int), value :: N
-            integer(kind=c_int), value :: K
-            complex(kind=c_double_complex), value :: alpha
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: B
-            integer(kind=c_int), value :: LDB
-            complex(kind=c_double_complex), value :: beta
-            type(c_ptr), value :: C
-            integer(kind=c_int), value :: LDC
-          end function CHAMELEON_zsyr2k_c
-      end interface
-
-      interface
-         function CHAMELEON_zsyrk_c(uplo,trans,N,K,alpha,A,LDA,beta,C,LDC) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zsyr2k_c
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: trans
+       integer(kind=c_int), value :: N
+       integer(kind=c_int), value :: K
+       complex(kind=c_double_complex), value :: alpha
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: B
+       integer(kind=c_int), value :: LDB
+       complex(kind=c_double_complex), value :: beta
+       type(c_ptr), value :: C
+       integer(kind=c_int), value :: LDC
+     end function CHAMELEON_zsyr2k_c
+  end interface
+
+  interface
+     function CHAMELEON_zsyrk_c(uplo,trans,N,K,alpha,A,LDA,beta,C,LDC) &
           & bind(c, name='CHAMELEON_zsyrk')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zsyrk_c
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: trans
-            integer(kind=c_int), value :: N
-            integer(kind=c_int), value :: K
-            complex(kind=c_double_complex), value :: alpha
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            complex(kind=c_double_complex), value :: beta
-            type(c_ptr), value :: C
-            integer(kind=c_int), value :: LDC
-          end function CHAMELEON_zsyrk_c
-      end interface
-
-      interface
-         function CHAMELEON_ztrmm_c(side,uplo,transA,diag,N,NRHS,alpha,A,LDA,B,LDB) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zsyrk_c
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: trans
+       integer(kind=c_int), value :: N
+       integer(kind=c_int), value :: K
+       complex(kind=c_double_complex), value :: alpha
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       complex(kind=c_double_complex), value :: beta
+       type(c_ptr), value :: C
+       integer(kind=c_int), value :: LDC
+     end function CHAMELEON_zsyrk_c
+  end interface
+
+  interface
+     function CHAMELEON_ztrmm_c(side,uplo,transA,diag,N,NRHS,alpha,A,LDA,B,LDB) &
           & bind(c, name='CHAMELEON_ztrmm')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_ztrmm_c
-            integer(kind=c_int), value :: side
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: transA
-            integer(kind=c_int), value :: diag
-            integer(kind=c_int), value :: N
-            integer(kind=c_int), value :: NRHS
-            complex(kind=c_double_complex), value :: alpha
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: B
-            integer(kind=c_int), value :: LDB
-          end function CHAMELEON_ztrmm_c
-      end interface
-
-      interface
-         function CHAMELEON_ztrsm_c(side,uplo,transA,diag,N,NRHS,alpha,A,LDA,B,LDB) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_ztrmm_c
+       integer(kind=c_int), value :: side
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: transA
+       integer(kind=c_int), value :: diag
+       integer(kind=c_int), value :: N
+       integer(kind=c_int), value :: NRHS
+       complex(kind=c_double_complex), value :: alpha
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: B
+       integer(kind=c_int), value :: LDB
+     end function CHAMELEON_ztrmm_c
+  end interface
+
+  interface
+     function CHAMELEON_ztrsm_c(side,uplo,transA,diag,N,NRHS,alpha,A,LDA,B,LDB) &
           & bind(c, name='CHAMELEON_ztrsm')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_ztrsm_c
-            integer(kind=c_int), value :: side
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: transA
-            integer(kind=c_int), value :: diag
-            integer(kind=c_int), value :: N
-            integer(kind=c_int), value :: NRHS
-            complex(kind=c_double_complex), value :: alpha
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: B
-            integer(kind=c_int), value :: LDB
-          end function CHAMELEON_ztrsm_c
-      end interface
-
-      interface
-         function CHAMELEON_ztrsmpl_c(N,NRHS,A,LDA,descL,IPIV,B,LDB) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_ztrsm_c
+       integer(kind=c_int), value :: side
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: transA
+       integer(kind=c_int), value :: diag
+       integer(kind=c_int), value :: N
+       integer(kind=c_int), value :: NRHS
+       complex(kind=c_double_complex), value :: alpha
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: B
+       integer(kind=c_int), value :: LDB
+     end function CHAMELEON_ztrsm_c
+  end interface
+
+  interface
+     function CHAMELEON_ztrsmpl_c(N,NRHS,A,LDA,descL,IPIV,B,LDB) &
           & bind(c, name='CHAMELEON_ztrsmpl')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_ztrsmpl_c
-            integer(kind=c_int), value :: N
-            integer(kind=c_int), value :: NRHS
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: descL
-            type(c_ptr), value :: IPIV
-            type(c_ptr), value :: B
-            integer(kind=c_int), value :: LDB
-          end function CHAMELEON_ztrsmpl_c
-      end interface
-
-      interface
-         function CHAMELEON_ztrsmrv_c(side,uplo,transA,diag,N,NRHS,alpha,A,LDA,B,LDB) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_ztrsmpl_c
+       integer(kind=c_int), value :: N
+       integer(kind=c_int), value :: NRHS
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: descL
+       type(c_ptr), value :: IPIV
+       type(c_ptr), value :: B
+       integer(kind=c_int), value :: LDB
+     end function CHAMELEON_ztrsmpl_c
+  end interface
+
+  interface
+     function CHAMELEON_ztrsmrv_c(side,uplo,transA,diag,N,NRHS,alpha,A,LDA,B,LDB) &
           & bind(c, name='CHAMELEON_ztrsmrv')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_ztrsmrv_c
-            integer(kind=c_int), value :: side
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: transA
-            integer(kind=c_int), value :: diag
-            integer(kind=c_int), value :: N
-            integer(kind=c_int), value :: NRHS
-            complex(kind=c_double_complex), value :: alpha
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: B
-            integer(kind=c_int), value :: LDB
-          end function CHAMELEON_ztrsmrv_c
-      end interface
-
-      interface
-         function CHAMELEON_ztrtri_c(uplo,diag,N,A,LDA) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_ztrsmrv_c
+       integer(kind=c_int), value :: side
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: transA
+       integer(kind=c_int), value :: diag
+       integer(kind=c_int), value :: N
+       integer(kind=c_int), value :: NRHS
+       complex(kind=c_double_complex), value :: alpha
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: B
+       integer(kind=c_int), value :: LDB
+     end function CHAMELEON_ztrsmrv_c
+  end interface
+
+  interface
+     function CHAMELEON_ztrtri_c(uplo,diag,N,A,LDA) &
           & bind(c, name='CHAMELEON_ztrtri')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_ztrtri_c
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: diag
-            integer(kind=c_int), value :: N
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-          end function CHAMELEON_ztrtri_c
-      end interface
-
-      interface
-         function CHAMELEON_zunglq_c(M,N,K,A,LDA,descT,B,LDB) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_ztrtri_c
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: diag
+       integer(kind=c_int), value :: N
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+     end function CHAMELEON_ztrtri_c
+  end interface
+
+  interface
+     function CHAMELEON_zunglq_c(M,N,K,A,LDA,descT,B,LDB) &
           & bind(c, name='CHAMELEON_zunglq')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zunglq_c
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            integer(kind=c_int), value :: K
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: descT
-            type(c_ptr), value :: B
-            integer(kind=c_int), value :: LDB
-          end function CHAMELEON_zunglq_c
-      end interface
-
-      interface
-         function CHAMELEON_zungqr_c(M,N,K,A,LDA,descT,B,LDB) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zunglq_c
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       integer(kind=c_int), value :: K
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: descT
+       type(c_ptr), value :: B
+       integer(kind=c_int), value :: LDB
+     end function CHAMELEON_zunglq_c
+  end interface
+
+  interface
+     function CHAMELEON_zungqr_c(M,N,K,A,LDA,descT,B,LDB) &
           & bind(c, name='CHAMELEON_zungqr')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zungqr_c
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            integer(kind=c_int), value :: K
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: descT
-            type(c_ptr), value :: B
-            integer(kind=c_int), value :: LDB
-          end function CHAMELEON_zungqr_c
-      end interface
-
-      interface
-         function CHAMELEON_zunmlq_c(side,trans,M,N,K,A,LDA,descT,B,LDB) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zungqr_c
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       integer(kind=c_int), value :: K
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: descT
+       type(c_ptr), value :: B
+       integer(kind=c_int), value :: LDB
+     end function CHAMELEON_zungqr_c
+  end interface
+
+  interface
+     function CHAMELEON_zunmlq_c(side,trans,M,N,K,A,LDA,descT,B,LDB) &
           & bind(c, name='CHAMELEON_zunmlq')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zunmlq_c
-            integer(kind=c_int), value :: side
-            integer(kind=c_int), value :: trans
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            integer(kind=c_int), value :: K
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: descT
-            type(c_ptr), value :: B
-            integer(kind=c_int), value :: LDB
-          end function CHAMELEON_zunmlq_c
-      end interface
-
-      interface
-         function CHAMELEON_zunmqr_c(side,trans,M,N,K,A,LDA,descT,B,LDB) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zunmlq_c
+       integer(kind=c_int), value :: side
+       integer(kind=c_int), value :: trans
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       integer(kind=c_int), value :: K
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: descT
+       type(c_ptr), value :: B
+       integer(kind=c_int), value :: LDB
+     end function CHAMELEON_zunmlq_c
+  end interface
+
+  interface
+     function CHAMELEON_zunmqr_c(side,trans,M,N,K,A,LDA,descT,B,LDB) &
           & bind(c, name='CHAMELEON_zunmqr')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zunmqr_c
-            integer(kind=c_int), value :: side
-            integer(kind=c_int), value :: trans
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            integer(kind=c_int), value :: K
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: LDA
-            type(c_ptr), value :: descT
-            type(c_ptr), value :: B
-            integer(kind=c_int), value :: LDB
-          end function CHAMELEON_zunmqr_c
-      end interface
-
-    !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-    !  FORTRAN API - math functions (native interface)
-    !
-      interface
-         function CHAMELEON_zgebrd_Tile_c(A,D,E,T) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zunmqr_c
+       integer(kind=c_int), value :: side
+       integer(kind=c_int), value :: trans
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       integer(kind=c_int), value :: K
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: LDA
+       type(c_ptr), value :: descT
+       type(c_ptr), value :: B
+       integer(kind=c_int), value :: LDB
+     end function CHAMELEON_zunmqr_c
+  end interface
+
+  !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+  !  FORTRAN API - math functions (native interface)
+  !
+  interface
+     function CHAMELEON_zgebrd_Tile_c(A,D,E,T) &
           & bind(c, name='CHAMELEON_zgebrd_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgebrd_Tile_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: D
-            type(c_ptr), value :: E
-            type(c_ptr), value :: T
-          end function CHAMELEON_zgebrd_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zgelqf_Tile_c(A,T) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgebrd_Tile_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: D
+       type(c_ptr), value :: E
+       type(c_ptr), value :: T
+     end function CHAMELEON_zgebrd_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zgelqf_Tile_c(A,T) &
           & bind(c, name='CHAMELEON_zgelqf_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgelqf_Tile_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: T
-          end function CHAMELEON_zgelqf_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zgelqs_Tile_c(A,T,B) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgelqf_Tile_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: T
+     end function CHAMELEON_zgelqf_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zgelqs_Tile_c(A,T,B) &
           & bind(c, name='CHAMELEON_zgelqs_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgelqs_Tile_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: T
-            type(c_ptr), value :: B
-          end function CHAMELEON_zgelqs_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zgels_Tile_c(trans,A,T,B) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgelqs_Tile_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: T
+       type(c_ptr), value :: B
+     end function CHAMELEON_zgelqs_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zgels_Tile_c(trans,A,T,B) &
           & bind(c, name='CHAMELEON_zgels_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgels_Tile_c
-            integer(kind=c_int), value :: trans
-            type(c_ptr), value :: A
-            type(c_ptr), value :: T
-            type(c_ptr), value :: B
-          end function CHAMELEON_zgels_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zgemm_Tile_c(transA,transB,alpha,A,B,beta,C) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgels_Tile_c
+       integer(kind=c_int), value :: trans
+       type(c_ptr), value :: A
+       type(c_ptr), value :: T
+       type(c_ptr), value :: B
+     end function CHAMELEON_zgels_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zgemm_Tile_c(transA,transB,alpha,A,B,beta,C) &
           & bind(c, name='CHAMELEON_zgemm_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgemm_Tile_c
-            integer(kind=c_int), value :: transA
-            integer(kind=c_int), value :: transB
-            complex(kind=c_double_complex), value :: alpha
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-            complex(kind=c_double_complex), value :: beta
-            type(c_ptr), value :: C
-          end function CHAMELEON_zgemm_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zgeqrf_Tile_c(A,T) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgemm_Tile_c
+       integer(kind=c_int), value :: transA
+       integer(kind=c_int), value :: transB
+       complex(kind=c_double_complex), value :: alpha
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+       complex(kind=c_double_complex), value :: beta
+       type(c_ptr), value :: C
+     end function CHAMELEON_zgemm_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zgeqrf_Tile_c(A,T) &
           & bind(c, name='CHAMELEON_zgeqrf_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgeqrf_Tile_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: T
-          end function CHAMELEON_zgeqrf_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zgeqrs_Tile_c(A,T,B) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgeqrf_Tile_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: T
+     end function CHAMELEON_zgeqrf_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zgeqrs_Tile_c(A,T,B) &
           & bind(c, name='CHAMELEON_zgeqrs_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgeqrs_Tile_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: T
-            type(c_ptr), value :: B
-          end function CHAMELEON_zgeqrs_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zgesv_Tile_c(A,IPIV,B) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgeqrs_Tile_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: T
+       type(c_ptr), value :: B
+     end function CHAMELEON_zgeqrs_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zgesv_Tile_c(A,IPIV,B) &
           & bind(c, name='CHAMELEON_zgesv_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgesv_Tile_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: IPIV
-            type(c_ptr), value :: B
-          end function CHAMELEON_zgesv_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zgesv_incpiv_Tile_c(A,L,IPIV,B) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgesv_Tile_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: IPIV
+       type(c_ptr), value :: B
+     end function CHAMELEON_zgesv_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zgesv_incpiv_Tile_c(A,L,IPIV,B) &
           & bind(c, name='CHAMELEON_zgesv_incpiv_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgesv_incpiv_Tile_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: L
-            type(c_ptr), value :: IPIV
-            type(c_ptr), value :: B
-          end function CHAMELEON_zgesv_incpiv_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zgesvd_Tile_c(jobu,jobvt,A,S,U,VT,T) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgesv_incpiv_Tile_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: L
+       type(c_ptr), value :: IPIV
+       type(c_ptr), value :: B
+     end function CHAMELEON_zgesv_incpiv_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zgesvd_Tile_c(jobu,jobvt,A,S,U,VT,T) &
           & bind(c, name='CHAMELEON_zgesvd_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgesvd_Tile_c
-            integer(kind=c_int), value :: jobu
-            integer(kind=c_int), value :: jobvt
-            type(c_ptr), value :: A
-            type(c_ptr), value :: S
-            type(c_ptr), value :: U
-            type(c_ptr), value :: VT
-            type(c_ptr), value :: T
-          end function CHAMELEON_zgesvd_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zgetrf_Tile_c(A,IPIV) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgesvd_Tile_c
+       integer(kind=c_int), value :: jobu
+       integer(kind=c_int), value :: jobvt
+       type(c_ptr), value :: A
+       type(c_ptr), value :: S
+       type(c_ptr), value :: U
+       type(c_ptr), value :: VT
+       type(c_ptr), value :: T
+     end function CHAMELEON_zgesvd_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zgetrf_Tile_c(A,IPIV) &
           & bind(c, name='CHAMELEON_zgetrf_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgetrf_Tile_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: IPIV
-          end function CHAMELEON_zgetrf_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zgetrf_incpiv_Tile_c(A,L,IPIV) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgetrf_Tile_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: IPIV
+     end function CHAMELEON_zgetrf_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zgetrf_incpiv_Tile_c(A,L,IPIV) &
           & bind(c, name='CHAMELEON_zgetrf_incpiv_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgetrf_incpiv_Tile_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: L
-            type(c_ptr), value :: IPIV
-          end function CHAMELEON_zgetrf_incpiv_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zgetrf_nopiv_Tile_c(A) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgetrf_incpiv_Tile_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: L
+       type(c_ptr), value :: IPIV
+     end function CHAMELEON_zgetrf_incpiv_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zgetrf_nopiv_Tile_c(A) &
           & bind(c, name='CHAMELEON_zgetrf_nopiv_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgetrf_nopiv_Tile_c
-            type(c_ptr), value :: A
-          end function CHAMELEON_zgetrf_nopiv_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zgetri_Tile_c(A,IPIV) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgetrf_nopiv_Tile_c
+       type(c_ptr), value :: A
+     end function CHAMELEON_zgetrf_nopiv_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zgetri_Tile_c(A,IPIV) &
           & bind(c, name='CHAMELEON_zgetri_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgetri_Tile_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: IPIV
-          end function CHAMELEON_zgetri_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zgetrs_Tile_c(trans,A,IPIV,B) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgetri_Tile_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: IPIV
+     end function CHAMELEON_zgetri_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zgetrs_Tile_c(trans,A,IPIV,B) &
           & bind(c, name='CHAMELEON_zgetrs_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgetrs_Tile_c
-            integer(kind=c_int), value :: trans
-            type(c_ptr), value :: A
-            type(c_ptr), value :: IPIV
-            type(c_ptr), value :: B
-          end function CHAMELEON_zgetrs_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zgetrs_incpiv_Tile_c(A,L,IPIV,B) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgetrs_Tile_c
+       integer(kind=c_int), value :: trans
+       type(c_ptr), value :: A
+       type(c_ptr), value :: IPIV
+       type(c_ptr), value :: B
+     end function CHAMELEON_zgetrs_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zgetrs_incpiv_Tile_c(A,L,IPIV,B) &
           & bind(c, name='CHAMELEON_zgetrs_incpiv_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgetrs_incpiv_Tile_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: L
-            type(c_ptr), value :: IPIV
-            type(c_ptr), value :: B
-          end function CHAMELEON_zgetrs_incpiv_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zheev_Tile_c(jobz,uplo,A,W,T,Q,LDQ) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgetrs_incpiv_Tile_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: L
+       type(c_ptr), value :: IPIV
+       type(c_ptr), value :: B
+     end function CHAMELEON_zgetrs_incpiv_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zheev_Tile_c(jobz,uplo,A,W,T,Q,LDQ) &
           & bind(c, name='CHAMELEON_zheev_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zheev_Tile_c
-            integer(kind=c_int), value :: jobz
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: W
-            type(c_ptr), value :: T
-            type(c_ptr), value :: Q
-            integer(kind=c_int), value :: LDQ
-          end function CHAMELEON_zheev_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zheevd_Tile_c(jobz,uplo,A,W,T,Q,LDQ) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zheev_Tile_c
+       integer(kind=c_int), value :: jobz
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: W
+       type(c_ptr), value :: T
+       type(c_ptr), value :: Q
+       integer(kind=c_int), value :: LDQ
+     end function CHAMELEON_zheev_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zheevd_Tile_c(jobz,uplo,A,W,T,Q,LDQ) &
           & bind(c, name='CHAMELEON_zheevd_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zheevd_Tile_c
-            integer(kind=c_int), value :: jobz
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: W
-            type(c_ptr), value :: T
-            type(c_ptr), value :: Q
-            integer(kind=c_int), value :: LDQ
-          end function CHAMELEON_zheevd_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zhegst_Tile_c(itype,uplo,A,B) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zheevd_Tile_c
+       integer(kind=c_int), value :: jobz
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: W
+       type(c_ptr), value :: T
+       type(c_ptr), value :: Q
+       integer(kind=c_int), value :: LDQ
+     end function CHAMELEON_zheevd_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zhegst_Tile_c(itype,uplo,A,B) &
           & bind(c, name='CHAMELEON_zhegst_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zhegst_Tile_c
-            integer(kind=c_int), value :: itype
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-          end function CHAMELEON_zhegst_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zhegv_Tile_c(itype,jobz,uplo,A,B,W,T,Q) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zhegst_Tile_c
+       integer(kind=c_int), value :: itype
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+     end function CHAMELEON_zhegst_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zhegv_Tile_c(itype,jobz,uplo,A,B,W,T,Q) &
           & bind(c, name='CHAMELEON_zhegv_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zhegv_Tile_c
-            integer(kind=c_int), value :: itype
-            integer(kind=c_int), value :: jobz
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-            type(c_ptr), value :: W
-            type(c_ptr), value :: T
-            type(c_ptr), value :: Q
-          end function CHAMELEON_zhegv_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zhegvd_Tile_c(itype,jobz,uplo,A,B,W,T,Q) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zhegv_Tile_c
+       integer(kind=c_int), value :: itype
+       integer(kind=c_int), value :: jobz
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+       type(c_ptr), value :: W
+       type(c_ptr), value :: T
+       type(c_ptr), value :: Q
+     end function CHAMELEON_zhegv_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zhegvd_Tile_c(itype,jobz,uplo,A,B,W,T,Q) &
           & bind(c, name='CHAMELEON_zhegvd_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zhegvd_Tile_c
-            integer(kind=c_int), value :: itype
-            integer(kind=c_int), value :: jobz
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-            type(c_ptr), value :: W
-            type(c_ptr), value :: T
-            type(c_ptr), value :: Q
-          end function CHAMELEON_zhegvd_Tile_c
-      end interface
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zhegvd_Tile_c
+       integer(kind=c_int), value :: itype
+       integer(kind=c_int), value :: jobz
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+       type(c_ptr), value :: W
+       type(c_ptr), value :: T
+       type(c_ptr), value :: Q
+     end function CHAMELEON_zhegvd_Tile_c
+  end interface
 
 #if defined(PRECISION_z) || defined(PRECISION_c)
-      interface
-         function CHAMELEON_zhemm_Tile_c(side,uplo,alpha,A,B,beta,C) &
+  interface
+     function CHAMELEON_zhemm_Tile_c(side,uplo,alpha,A,B,beta,C) &
           & bind(c, name='CHAMELEON_zhemm_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zhemm_Tile_c
-            integer(kind=c_int), value :: side
-            integer(kind=c_int), value :: uplo
-            complex(kind=c_double_complex), value :: alpha
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-            complex(kind=c_double_complex), value :: beta
-            type(c_ptr), value :: C
-          end function CHAMELEON_zhemm_Tile_c
-      end interface
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zhemm_Tile_c
+       integer(kind=c_int), value :: side
+       integer(kind=c_int), value :: uplo
+       complex(kind=c_double_complex), value :: alpha
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+       complex(kind=c_double_complex), value :: beta
+       type(c_ptr), value :: C
+     end function CHAMELEON_zhemm_Tile_c
+  end interface
 #endif
 
 #if defined(PRECISION_z) || defined(PRECISION_c)
-      interface
-         function CHAMELEON_zher2k_Tile_c(uplo,trans,alpha,A,B,beta,C) &
+  interface
+     function CHAMELEON_zher2k_Tile_c(uplo,trans,alpha,A,B,beta,C) &
           & bind(c, name='CHAMELEON_zher2k_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zher2k_Tile_c
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: trans
-            complex(kind=c_double_complex), value :: alpha
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-            real(kind=c_double), value :: beta
-            type(c_ptr), value :: C
-          end function CHAMELEON_zher2k_Tile_c
-      end interface
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zher2k_Tile_c
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: trans
+       complex(kind=c_double_complex), value :: alpha
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+       real(kind=c_double), value :: beta
+       type(c_ptr), value :: C
+     end function CHAMELEON_zher2k_Tile_c
+  end interface
 #endif
 
 #if defined(PRECISION_z) || defined(PRECISION_c)
-      interface
-         function CHAMELEON_zherk_Tile_c(uplo,trans,alpha,A,beta,C) &
+  interface
+     function CHAMELEON_zherk_Tile_c(uplo,trans,alpha,A,beta,C) &
           & bind(c, name='CHAMELEON_zherk_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zherk_Tile_c
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: trans
-            real(kind=c_double), value :: alpha
-            type(c_ptr), value :: A
-            real(kind=c_double), value :: beta
-            type(c_ptr), value :: C
-          end function CHAMELEON_zherk_Tile_c
-      end interface
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zherk_Tile_c
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: trans
+       real(kind=c_double), value :: alpha
+       type(c_ptr), value :: A
+       real(kind=c_double), value :: beta
+       type(c_ptr), value :: C
+     end function CHAMELEON_zherk_Tile_c
+  end interface
 #endif
 
-      interface
-         function CHAMELEON_zhetrd_Tile_c(jobz,uplo,A,D,E,T,Q,LDQ) &
+  interface
+     function CHAMELEON_zhetrd_Tile_c(jobz,uplo,A,D,E,T,Q,LDQ) &
           & bind(c, name='CHAMELEON_zhetrd_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zhetrd_Tile_c
-            integer(kind=c_int), value :: jobz
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: D
-            type(c_ptr), value :: E
-            type(c_ptr), value :: T
-            type(c_ptr), value :: Q
-            integer(kind=c_int), value :: LDQ
-          end function CHAMELEON_zhetrd_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zlacpy_Tile_c(uplo,A,B) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zhetrd_Tile_c
+       integer(kind=c_int), value :: jobz
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: D
+       type(c_ptr), value :: E
+       type(c_ptr), value :: T
+       type(c_ptr), value :: Q
+       integer(kind=c_int), value :: LDQ
+     end function CHAMELEON_zhetrd_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zlacpy_Tile_c(uplo,A,B) &
           & bind(c, name='CHAMELEON_zlacpy_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zlacpy_Tile_c
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-          end function CHAMELEON_zlacpy_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zlange_Tile_c(norm,A,work) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zlacpy_Tile_c
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+     end function CHAMELEON_zlacpy_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zlange_Tile_c(norm,A,work) &
           & bind(c, name='CHAMELEON_zlange_Tile')
-            use iso_c_binding
-            implicit none
-            real(kind=c_double) :: CHAMELEON_zlange_Tile_c
-            integer(kind=c_int), value :: norm
-            type(c_ptr), value :: A
-            type(c_ptr), value :: work
-          end function CHAMELEON_zlange_Tile_c
-      end interface
+       use iso_c_binding
+       implicit none
+       real(kind=c_double) :: CHAMELEON_zlange_Tile_c
+       integer(kind=c_int), value :: norm
+       type(c_ptr), value :: A
+       type(c_ptr), value :: work
+     end function CHAMELEON_zlange_Tile_c
+  end interface
 
 #if defined(PRECISION_z) || defined(PRECISION_c)
-      interface
-         function CHAMELEON_zlanhe_Tile_c(norm,uplo,A,work) &
+  interface
+     function CHAMELEON_zlanhe_Tile_c(norm,uplo,A,work) &
           & bind(c, name='CHAMELEON_zlanhe_Tile')
-            use iso_c_binding
-            implicit none
-            real(kind=c_double) :: CHAMELEON_zlanhe_Tile_c
-            integer(kind=c_int), value :: norm
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: work
-          end function CHAMELEON_zlanhe_Tile_c
-      end interface
+       use iso_c_binding
+       implicit none
+       real(kind=c_double) :: CHAMELEON_zlanhe_Tile_c
+       integer(kind=c_int), value :: norm
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: work
+     end function CHAMELEON_zlanhe_Tile_c
+  end interface
 #endif
 
-      interface
-         function CHAMELEON_zlansy_Tile_c(norm,uplo,A,work) &
+  interface
+     function CHAMELEON_zlansy_Tile_c(norm,uplo,A,work) &
           & bind(c, name='CHAMELEON_zlansy_Tile')
-            use iso_c_binding
-            implicit none
-            real(kind=c_double) :: CHAMELEON_zlansy_Tile_c
-            integer(kind=c_int), value :: norm
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: work
-          end function CHAMELEON_zlansy_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zlaset_Tile_c(uplo,alpha,beta,A) &
+       use iso_c_binding
+       implicit none
+       real(kind=c_double) :: CHAMELEON_zlansy_Tile_c
+       integer(kind=c_int), value :: norm
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: work
+     end function CHAMELEON_zlansy_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zlaset_Tile_c(uplo,alpha,beta,A) &
           & bind(c, name='CHAMELEON_zlaset_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zlaset_Tile_c
-            integer(kind=c_int), value :: uplo
-            complex(kind=c_double_complex), value :: alpha
-            complex(kind=c_double_complex), value :: beta
-            type(c_ptr), value :: A
-          end function CHAMELEON_zlaset_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zlaswp_Tile_c(A,K1,K2,IPIV,INCX) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zlaset_Tile_c
+       integer(kind=c_int), value :: uplo
+       complex(kind=c_double_complex), value :: alpha
+       complex(kind=c_double_complex), value :: beta
+       type(c_ptr), value :: A
+     end function CHAMELEON_zlaset_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zlaswp_Tile_c(A,K1,K2,IPIV,INCX) &
           & bind(c, name='CHAMELEON_zlaswp_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zlaswp_Tile_c
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: K1
-            integer(kind=c_int), value :: K2
-            type(c_ptr), value :: IPIV
-            integer(kind=c_int), value :: INCX
-          end function CHAMELEON_zlaswp_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zlaswpc_Tile_c(A,K1,K2,IPIV,INCX) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zlaswp_Tile_c
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: K1
+       integer(kind=c_int), value :: K2
+       type(c_ptr), value :: IPIV
+       integer(kind=c_int), value :: INCX
+     end function CHAMELEON_zlaswp_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zlaswpc_Tile_c(A,K1,K2,IPIV,INCX) &
           & bind(c, name='CHAMELEON_zlaswpc_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zlaswpc_Tile_c
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: K1
-            integer(kind=c_int), value :: K2
-            type(c_ptr), value :: IPIV
-            integer(kind=c_int), value :: INCX
-          end function CHAMELEON_zlaswpc_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zlauum_Tile_c(uplo,A) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zlaswpc_Tile_c
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: K1
+       integer(kind=c_int), value :: K2
+       type(c_ptr), value :: IPIV
+       integer(kind=c_int), value :: INCX
+     end function CHAMELEON_zlaswpc_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zlauum_Tile_c(uplo,A) &
           & bind(c, name='CHAMELEON_zlauum_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zlauum_Tile_c
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-          end function CHAMELEON_zlauum_Tile_c
-      end interface
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zlauum_Tile_c
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+     end function CHAMELEON_zlauum_Tile_c
+  end interface
 
 #if defined(PRECISION_z) || defined(PRECISION_c)
-      interface
-         function CHAMELEON_zplghe_Tile_c(bump,uplo,A,seed) &
+  interface
+     function CHAMELEON_zplghe_Tile_c(bump,uplo,A,seed) &
           & bind(c, name='CHAMELEON_zplghe_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zplghe_Tile_c
-            real(kind=c_double), value :: bump
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            integer(kind=c_long_long), value :: seed
-          end function CHAMELEON_zplghe_Tile_c
-      end interface
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zplghe_Tile_c
+       real(kind=c_double), value :: bump
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       integer(kind=c_long_long), value :: seed
+     end function CHAMELEON_zplghe_Tile_c
+  end interface
 #endif
 
-      interface
-         function CHAMELEON_zplgsy_Tile_c(bump,uplo,A,seed) &
+  interface
+     function CHAMELEON_zplgsy_Tile_c(bump,uplo,A,seed) &
           & bind(c, name='CHAMELEON_zplgsy_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zplgsy_Tile_c
-            complex(kind=c_double_complex), value :: bump
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            integer(kind=c_long_long), value :: seed
-          end function CHAMELEON_zplgsy_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zplrnt_Tile_c(A,seed) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zplgsy_Tile_c
+       complex(kind=c_double_complex), value :: bump
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       integer(kind=c_long_long), value :: seed
+     end function CHAMELEON_zplgsy_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zplrnt_Tile_c(A,seed) &
           & bind(c, name='CHAMELEON_zplrnt_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zplrnt_Tile_c
-            type(c_ptr), value :: A
-            integer(kind=c_long_long), value :: seed
-          end function CHAMELEON_zplrnt_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zposv_Tile_c(uplo,A,B) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zplrnt_Tile_c
+       type(c_ptr), value :: A
+       integer(kind=c_long_long), value :: seed
+     end function CHAMELEON_zplrnt_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zposv_Tile_c(uplo,A,B) &
           & bind(c, name='CHAMELEON_zposv_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zposv_Tile_c
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-          end function CHAMELEON_zposv_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zsysv_Tile_c(uplo,A,B) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zposv_Tile_c
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+     end function CHAMELEON_zposv_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zsysv_Tile_c(uplo,A,B) &
           & bind(c, name='CHAMELEON_zsysv_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zsysv_Tile_c
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-          end function CHAMELEON_zsysv_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zpotrf_Tile_c(uplo,A) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zsysv_Tile_c
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+     end function CHAMELEON_zsysv_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zpotrf_Tile_c(uplo,A) &
           & bind(c, name='CHAMELEON_zpotrf_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zpotrf_Tile_c
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-          end function CHAMELEON_zpotrf_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zsytrf_Tile_c(uplo,A) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zpotrf_Tile_c
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+     end function CHAMELEON_zpotrf_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zsytrf_Tile_c(uplo,A) &
           & bind(c, name='CHAMELEON_zsytrf_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zsytrf_Tile_c
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-          end function CHAMELEON_zsytrf_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zpotri_Tile_c(uplo,A) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zsytrf_Tile_c
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+     end function CHAMELEON_zsytrf_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zpotri_Tile_c(uplo,A) &
           & bind(c, name='CHAMELEON_zpotri_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zpotri_Tile_c
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-          end function CHAMELEON_zpotri_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zpotrs_Tile_c(uplo,A,B) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zpotri_Tile_c
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+     end function CHAMELEON_zpotri_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zpotrs_Tile_c(uplo,A,B) &
           & bind(c, name='CHAMELEON_zpotrs_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zpotrs_Tile_c
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-          end function CHAMELEON_zpotrs_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zsytrs_Tile_c(uplo,A,B) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zpotrs_Tile_c
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+     end function CHAMELEON_zpotrs_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zsytrs_Tile_c(uplo,A,B) &
           & bind(c, name='CHAMELEON_zsytrs_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zsytrs_Tile_c
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-          end function CHAMELEON_zsytrs_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zsymm_Tile_c(side,uplo,alpha,A,B,beta,C) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zsytrs_Tile_c
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+     end function CHAMELEON_zsytrs_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zsymm_Tile_c(side,uplo,alpha,A,B,beta,C) &
           & bind(c, name='CHAMELEON_zsymm_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zsymm_Tile_c
-            integer(kind=c_int), value :: side
-            integer(kind=c_int), value :: uplo
-            complex(kind=c_double_complex), value :: alpha
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-            complex(kind=c_double_complex), value :: beta
-            type(c_ptr), value :: C
-          end function CHAMELEON_zsymm_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zsyr2k_Tile_c(uplo,trans,alpha,A,B,beta,C) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zsymm_Tile_c
+       integer(kind=c_int), value :: side
+       integer(kind=c_int), value :: uplo
+       complex(kind=c_double_complex), value :: alpha
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+       complex(kind=c_double_complex), value :: beta
+       type(c_ptr), value :: C
+     end function CHAMELEON_zsymm_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zsyr2k_Tile_c(uplo,trans,alpha,A,B,beta,C) &
           & bind(c, name='CHAMELEON_zsyr2k_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zsyr2k_Tile_c
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: trans
-            complex(kind=c_double_complex), value :: alpha
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-            complex(kind=c_double_complex), value :: beta
-            type(c_ptr), value :: C
-          end function CHAMELEON_zsyr2k_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zsyrk_Tile_c(uplo,trans,alpha,A,beta,C) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zsyr2k_Tile_c
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: trans
+       complex(kind=c_double_complex), value :: alpha
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+       complex(kind=c_double_complex), value :: beta
+       type(c_ptr), value :: C
+     end function CHAMELEON_zsyr2k_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zsyrk_Tile_c(uplo,trans,alpha,A,beta,C) &
           & bind(c, name='CHAMELEON_zsyrk_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zsyrk_Tile_c
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: trans
-            complex(kind=c_double_complex), value :: alpha
-            type(c_ptr), value :: A
-            complex(kind=c_double_complex), value :: beta
-            type(c_ptr), value :: C
-          end function CHAMELEON_zsyrk_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_ztrmm_Tile_c(side,uplo,transA,diag,alpha,A,B) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zsyrk_Tile_c
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: trans
+       complex(kind=c_double_complex), value :: alpha
+       type(c_ptr), value :: A
+       complex(kind=c_double_complex), value :: beta
+       type(c_ptr), value :: C
+     end function CHAMELEON_zsyrk_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_ztrmm_Tile_c(side,uplo,transA,diag,alpha,A,B) &
           & bind(c, name='CHAMELEON_ztrmm_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_ztrmm_Tile_c
-            integer(kind=c_int), value :: side
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: transA
-            integer(kind=c_int), value :: diag
-            complex(kind=c_double_complex), value :: alpha
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-          end function CHAMELEON_ztrmm_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_ztrsm_Tile_c(side,uplo,transA,diag,alpha,A,B) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_ztrmm_Tile_c
+       integer(kind=c_int), value :: side
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: transA
+       integer(kind=c_int), value :: diag
+       complex(kind=c_double_complex), value :: alpha
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+     end function CHAMELEON_ztrmm_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_ztrsm_Tile_c(side,uplo,transA,diag,alpha,A,B) &
           & bind(c, name='CHAMELEON_ztrsm_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_ztrsm_Tile_c
-            integer(kind=c_int), value :: side
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: transA
-            integer(kind=c_int), value :: diag
-            complex(kind=c_double_complex), value :: alpha
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-          end function CHAMELEON_ztrsm_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_ztrsmpl_Tile_c(A,L,IPIV,B) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_ztrsm_Tile_c
+       integer(kind=c_int), value :: side
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: transA
+       integer(kind=c_int), value :: diag
+       complex(kind=c_double_complex), value :: alpha
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+     end function CHAMELEON_ztrsm_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_ztrsmpl_Tile_c(A,L,IPIV,B) &
           & bind(c, name='CHAMELEON_ztrsmpl_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_ztrsmpl_Tile_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: L
-            type(c_ptr), value :: IPIV
-            type(c_ptr), value :: B
-          end function CHAMELEON_ztrsmpl_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_ztrsmrv_Tile_c(side,uplo,transA,diag,alpha,A,B) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_ztrsmpl_Tile_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: L
+       type(c_ptr), value :: IPIV
+       type(c_ptr), value :: B
+     end function CHAMELEON_ztrsmpl_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_ztrsmrv_Tile_c(side,uplo,transA,diag,alpha,A,B) &
           & bind(c, name='CHAMELEON_ztrsmrv_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_ztrsmrv_Tile_c
-            integer(kind=c_int), value :: side
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: transA
-            integer(kind=c_int), value :: diag
-            complex(kind=c_double_complex), value :: alpha
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-          end function CHAMELEON_ztrsmrv_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_ztrtri_Tile_c(uplo,diag,A) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_ztrsmrv_Tile_c
+       integer(kind=c_int), value :: side
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: transA
+       integer(kind=c_int), value :: diag
+       complex(kind=c_double_complex), value :: alpha
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+     end function CHAMELEON_ztrsmrv_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_ztrtri_Tile_c(uplo,diag,A) &
           & bind(c, name='CHAMELEON_ztrtri_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_ztrtri_Tile_c
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: diag
-            type(c_ptr), value :: A
-          end function CHAMELEON_ztrtri_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zunglq_Tile_c(A,T,B) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_ztrtri_Tile_c
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: diag
+       type(c_ptr), value :: A
+     end function CHAMELEON_ztrtri_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zunglq_Tile_c(A,T,B) &
           & bind(c, name='CHAMELEON_zunglq_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zunglq_Tile_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: T
-            type(c_ptr), value :: B
-          end function CHAMELEON_zunglq_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zungqr_Tile_c(A,T,B) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zunglq_Tile_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: T
+       type(c_ptr), value :: B
+     end function CHAMELEON_zunglq_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zungqr_Tile_c(A,T,B) &
           & bind(c, name='CHAMELEON_zungqr_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zungqr_Tile_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: T
-            type(c_ptr), value :: B
-          end function CHAMELEON_zungqr_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zunmlq_Tile_c(side,trans,A,T,B) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zungqr_Tile_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: T
+       type(c_ptr), value :: B
+     end function CHAMELEON_zungqr_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zunmlq_Tile_c(side,trans,A,T,B) &
           & bind(c, name='CHAMELEON_zunmlq_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zunmlq_Tile_c
-            integer(kind=c_int), value :: side
-            integer(kind=c_int), value :: trans
-            type(c_ptr), value :: A
-            type(c_ptr), value :: T
-            type(c_ptr), value :: B
-          end function CHAMELEON_zunmlq_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_zunmqr_Tile_c(side,trans,A,T,B) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zunmlq_Tile_c
+       integer(kind=c_int), value :: side
+       integer(kind=c_int), value :: trans
+       type(c_ptr), value :: A
+       type(c_ptr), value :: T
+       type(c_ptr), value :: B
+     end function CHAMELEON_zunmlq_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_zunmqr_Tile_c(side,trans,A,T,B) &
           & bind(c, name='CHAMELEON_zunmqr_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zunmqr_Tile_c
-            integer(kind=c_int), value :: side
-            integer(kind=c_int), value :: trans
-            type(c_ptr), value :: A
-            type(c_ptr), value :: T
-            type(c_ptr), value :: B
-          end function CHAMELEON_zunmqr_Tile_c
-      end interface
-
-    !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-    !  FORTRAN API - math functions (asynchronous interface)
-    !
-      interface
-         function CHAMELEON_zgebrd_Tile_Async_c(A,D,E,T,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zunmqr_Tile_c
+       integer(kind=c_int), value :: side
+       integer(kind=c_int), value :: trans
+       type(c_ptr), value :: A
+       type(c_ptr), value :: T
+       type(c_ptr), value :: B
+     end function CHAMELEON_zunmqr_Tile_c
+  end interface
+
+  !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+  !  FORTRAN API - math functions (asynchronous interface)
+  !
+  interface
+     function CHAMELEON_zgebrd_Tile_Async_c(A,D,E,T,sequence,request) &
           & bind(c, name='CHAMELEON_zgebrd_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgebrd_Tile_Async_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: D
-            type(c_ptr), value :: E
-            type(c_ptr), value :: T
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zgebrd_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zgelqf_Tile_Async_c(A,T,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgebrd_Tile_Async_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: D
+       type(c_ptr), value :: E
+       type(c_ptr), value :: T
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zgebrd_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zgelqf_Tile_Async_c(A,T,sequence,request) &
           & bind(c, name='CHAMELEON_zgelqf_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgelqf_Tile_Async_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: T
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zgelqf_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zgelqs_Tile_Async_c(A,T,B,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgelqf_Tile_Async_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: T
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zgelqf_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zgelqs_Tile_Async_c(A,T,B,sequence,request) &
           & bind(c, name='CHAMELEON_zgelqs_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgelqs_Tile_Async_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: T
-            type(c_ptr), value :: B
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zgelqs_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zgels_Tile_Async_c(trans,A,T,B,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgelqs_Tile_Async_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: T
+       type(c_ptr), value :: B
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zgelqs_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zgels_Tile_Async_c(trans,A,T,B,sequence,request) &
           & bind(c, name='CHAMELEON_zgels_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgels_Tile_Async_c
-            integer(kind=c_int), value :: trans
-            type(c_ptr), value :: A
-            type(c_ptr), value :: T
-            type(c_ptr), value :: B
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zgels_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zgemm_Tile_Async_c(transA,transB,alpha,A,B,beta,C,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgels_Tile_Async_c
+       integer(kind=c_int), value :: trans
+       type(c_ptr), value :: A
+       type(c_ptr), value :: T
+       type(c_ptr), value :: B
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zgels_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zgemm_Tile_Async_c(transA,transB,alpha,A,B,beta,C,sequence,request) &
           & bind(c, name='CHAMELEON_zgemm_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgemm_Tile_Async_c
-            integer(kind=c_int), value :: transA
-            integer(kind=c_int), value :: transB
-            complex(kind=c_double_complex), value :: alpha
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-            complex(kind=c_double_complex), value :: beta
-            type(c_ptr), value :: C
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zgemm_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zgeqrf_Tile_Async_c(A,T,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgemm_Tile_Async_c
+       integer(kind=c_int), value :: transA
+       integer(kind=c_int), value :: transB
+       complex(kind=c_double_complex), value :: alpha
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+       complex(kind=c_double_complex), value :: beta
+       type(c_ptr), value :: C
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zgemm_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zgeqrf_Tile_Async_c(A,T,sequence,request) &
           & bind(c, name='CHAMELEON_zgeqrf_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgeqrf_Tile_Async_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: T
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zgeqrf_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zgeqrs_Tile_Async_c(A,T,B,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgeqrf_Tile_Async_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: T
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zgeqrf_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zgeqrs_Tile_Async_c(A,T,B,sequence,request) &
           & bind(c, name='CHAMELEON_zgeqrs_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgeqrs_Tile_Async_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: T
-            type(c_ptr), value :: B
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zgeqrs_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zgesv_Tile_Async_c(A,IPIV,B,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgeqrs_Tile_Async_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: T
+       type(c_ptr), value :: B
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zgeqrs_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zgesv_Tile_Async_c(A,IPIV,B,sequence,request) &
           & bind(c, name='CHAMELEON_zgesv_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgesv_Tile_Async_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: IPIV
-            type(c_ptr), value :: B
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zgesv_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zgesv_incpiv_Tile_Async_c(A,L,IPIV,B,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgesv_Tile_Async_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: IPIV
+       type(c_ptr), value :: B
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zgesv_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zgesv_incpiv_Tile_Async_c(A,L,IPIV,B,sequence,request) &
           & bind(c, name='CHAMELEON_zgesv_incpiv_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgesv_incpiv_Tile_Async_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: L
-            type(c_ptr), value :: IPIV
-            type(c_ptr), value :: B
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zgesv_incpiv_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zgesvd_Tile_Async_c(jobu,jobvt,A,S,U,VT,T,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgesv_incpiv_Tile_Async_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: L
+       type(c_ptr), value :: IPIV
+       type(c_ptr), value :: B
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zgesv_incpiv_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zgesvd_Tile_Async_c(jobu,jobvt,A,S,U,VT,T,sequence,request) &
           & bind(c, name='CHAMELEON_zgesvd_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgesvd_Tile_Async_c
-            integer(kind=c_int), value :: jobu
-            integer(kind=c_int), value :: jobvt
-            type(c_ptr), value :: A
-            type(c_ptr), value :: S
-            type(c_ptr), value :: U
-            type(c_ptr), value :: VT
-            type(c_ptr), value :: T
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zgesvd_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zgetrf_Tile_Async_c(A,IPIV,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgesvd_Tile_Async_c
+       integer(kind=c_int), value :: jobu
+       integer(kind=c_int), value :: jobvt
+       type(c_ptr), value :: A
+       type(c_ptr), value :: S
+       type(c_ptr), value :: U
+       type(c_ptr), value :: VT
+       type(c_ptr), value :: T
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zgesvd_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zgetrf_Tile_Async_c(A,IPIV,sequence,request) &
           & bind(c, name='CHAMELEON_zgetrf_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgetrf_Tile_Async_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: IPIV
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zgetrf_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zgetrf_incpiv_Tile_Async_c(A,L,IPIV,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgetrf_Tile_Async_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: IPIV
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zgetrf_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zgetrf_incpiv_Tile_Async_c(A,L,IPIV,sequence,request) &
           & bind(c, name='CHAMELEON_zgetrf_incpiv_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgetrf_incpiv_Tile_Async_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: L
-            type(c_ptr), value :: IPIV
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zgetrf_incpiv_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zgetrf_nopiv_Tile_Async_c(A,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgetrf_incpiv_Tile_Async_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: L
+       type(c_ptr), value :: IPIV
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zgetrf_incpiv_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zgetrf_nopiv_Tile_Async_c(A,sequence,request) &
           & bind(c, name='CHAMELEON_zgetrf_nopiv_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgetrf_nopiv_Tile_Async_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zgetrf_nopiv_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zgetri_Tile_Async_c(A,IPIV,W,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgetrf_nopiv_Tile_Async_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zgetrf_nopiv_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zgetri_Tile_Async_c(A,IPIV,W,sequence,request) &
           & bind(c, name='CHAMELEON_zgetri_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgetri_Tile_Async_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: IPIV
-            type(c_ptr), value :: W
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zgetri_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zgetrs_Tile_Async_c(trans,A,IPIV,B,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgetri_Tile_Async_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: IPIV
+       type(c_ptr), value :: W
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zgetri_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zgetrs_Tile_Async_c(trans,A,IPIV,B,sequence,request) &
           & bind(c, name='CHAMELEON_zgetrs_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgetrs_Tile_Async_c
-            integer(kind=c_int), value :: trans
-            type(c_ptr), value :: A
-            type(c_ptr), value :: IPIV
-            type(c_ptr), value :: B
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zgetrs_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zgetrs_incpiv_Tile_Async_c(A,L,IPIV,B,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgetrs_Tile_Async_c
+       integer(kind=c_int), value :: trans
+       type(c_ptr), value :: A
+       type(c_ptr), value :: IPIV
+       type(c_ptr), value :: B
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zgetrs_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zgetrs_incpiv_Tile_Async_c(A,L,IPIV,B,sequence,request) &
           & bind(c, name='CHAMELEON_zgetrs_incpiv_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zgetrs_incpiv_Tile_Async_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: L
-            type(c_ptr), value :: IPIV
-            type(c_ptr), value :: B
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zgetrs_incpiv_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zheev_Tile_Async_c(jobz,uplo,A,W,T,Q,LDQ,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zgetrs_incpiv_Tile_Async_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: L
+       type(c_ptr), value :: IPIV
+       type(c_ptr), value :: B
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zgetrs_incpiv_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zheev_Tile_Async_c(jobz,uplo,A,W,T,Q,LDQ,sequence,request) &
           & bind(c, name='CHAMELEON_zheev_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zheev_Tile_Async_c
-            integer(kind=c_int), value :: jobz
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: W
-            type(c_ptr), value :: T
-            type(c_ptr), value :: Q
-            integer(kind=c_int), value :: LDQ
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zheev_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zheevd_Tile_Async_c(jobz,uplo,A,W,T,Q,LDQ,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zheev_Tile_Async_c
+       integer(kind=c_int), value :: jobz
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: W
+       type(c_ptr), value :: T
+       type(c_ptr), value :: Q
+       integer(kind=c_int), value :: LDQ
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zheev_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zheevd_Tile_Async_c(jobz,uplo,A,W,T,Q,LDQ,sequence,request) &
           & bind(c, name='CHAMELEON_zheevd_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zheevd_Tile_Async_c
-            integer(kind=c_int), value :: jobz
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: W
-            type(c_ptr), value :: T
-            type(c_ptr), value :: Q
-            integer(kind=c_int), value :: LDQ
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zheevd_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zhegst_Tile_Async_c(itype,uplo,A,B,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zheevd_Tile_Async_c
+       integer(kind=c_int), value :: jobz
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: W
+       type(c_ptr), value :: T
+       type(c_ptr), value :: Q
+       integer(kind=c_int), value :: LDQ
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zheevd_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zhegst_Tile_Async_c(itype,uplo,A,B,sequence,request) &
           & bind(c, name='CHAMELEON_zhegst_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zhegst_Tile_Async_c
-            integer(kind=c_int), value :: itype
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zhegst_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zhegv_Tile_Async_c(itype,jobz,uplo,A,B,W,T,Q,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zhegst_Tile_Async_c
+       integer(kind=c_int), value :: itype
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zhegst_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zhegv_Tile_Async_c(itype,jobz,uplo,A,B,W,T,Q,sequence,request) &
           & bind(c, name='CHAMELEON_zhegv_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zhegv_Tile_Async_c
-            integer(kind=c_int), value :: itype
-            integer(kind=c_int), value :: jobz
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-            type(c_ptr), value :: W
-            type(c_ptr), value :: T
-            type(c_ptr), value :: Q
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zhegv_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zhegvd_Tile_Async_c(itype,jobz,uplo,A,B,W,T,Q,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zhegv_Tile_Async_c
+       integer(kind=c_int), value :: itype
+       integer(kind=c_int), value :: jobz
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+       type(c_ptr), value :: W
+       type(c_ptr), value :: T
+       type(c_ptr), value :: Q
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zhegv_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zhegvd_Tile_Async_c(itype,jobz,uplo,A,B,W,T,Q,sequence,request) &
           & bind(c, name='CHAMELEON_zhegvd_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zhegvd_Tile_Async_c
-            integer(kind=c_int), value :: itype
-            integer(kind=c_int), value :: jobz
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-            type(c_ptr), value :: W
-            type(c_ptr), value :: T
-            type(c_ptr), value :: Q
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zhegvd_Tile_Async_c
-      end interface
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zhegvd_Tile_Async_c
+       integer(kind=c_int), value :: itype
+       integer(kind=c_int), value :: jobz
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+       type(c_ptr), value :: W
+       type(c_ptr), value :: T
+       type(c_ptr), value :: Q
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zhegvd_Tile_Async_c
+  end interface
 
 #if defined(PRECISION_z) || defined(PRECISION_c)
-      interface
-         function CHAMELEON_zhemm_Tile_Async_c(side,uplo,alpha,A,B,beta,C,sequence,request) &
+  interface
+     function CHAMELEON_zhemm_Tile_Async_c(side,uplo,alpha,A,B,beta,C,sequence,request) &
           & bind(c, name='CHAMELEON_zhemm_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zhemm_Tile_Async_c
-            integer(kind=c_int), value :: side
-            integer(kind=c_int), value :: uplo
-            complex(kind=c_double_complex), value :: alpha
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-            complex(kind=c_double_complex), value :: beta
-            type(c_ptr), value :: C
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zhemm_Tile_Async_c
-      end interface
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zhemm_Tile_Async_c
+       integer(kind=c_int), value :: side
+       integer(kind=c_int), value :: uplo
+       complex(kind=c_double_complex), value :: alpha
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+       complex(kind=c_double_complex), value :: beta
+       type(c_ptr), value :: C
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zhemm_Tile_Async_c
+  end interface
 #endif
 
 #if defined(PRECISION_z) || defined(PRECISION_c)
-      interface
-         function CHAMELEON_zher2k_Tile_Async_c(uplo,trans,alpha,A,B,beta,C,sequence,request) &
+  interface
+     function CHAMELEON_zher2k_Tile_Async_c(uplo,trans,alpha,A,B,beta,C,sequence,request) &
           & bind(c, name='CHAMELEON_zher2k_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zher2k_Tile_Async_c
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: trans
-            complex(kind=c_double_complex), value :: alpha
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-            real(kind=c_double), value :: beta
-            type(c_ptr), value :: C
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zher2k_Tile_Async_c
-      end interface
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zher2k_Tile_Async_c
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: trans
+       complex(kind=c_double_complex), value :: alpha
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+       real(kind=c_double), value :: beta
+       type(c_ptr), value :: C
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zher2k_Tile_Async_c
+  end interface
 #endif
 
 #if defined(PRECISION_z) || defined(PRECISION_c)
-      interface
-         function CHAMELEON_zherk_Tile_Async_c(uplo,trans,alpha,A,beta,C,sequence,request) &
+  interface
+     function CHAMELEON_zherk_Tile_Async_c(uplo,trans,alpha,A,beta,C,sequence,request) &
           & bind(c, name='CHAMELEON_zherk_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zherk_Tile_Async_c
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: trans
-            real(kind=c_double), value :: alpha
-            type(c_ptr), value :: A
-            real(kind=c_double), value :: beta
-            type(c_ptr), value :: C
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zherk_Tile_Async_c
-      end interface
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zherk_Tile_Async_c
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: trans
+       real(kind=c_double), value :: alpha
+       type(c_ptr), value :: A
+       real(kind=c_double), value :: beta
+       type(c_ptr), value :: C
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zherk_Tile_Async_c
+  end interface
 #endif
 
-      interface
-         function CHAMELEON_zhetrd_Tile_Async_c(jobz,uplo,A,D,E,T,Q,LDQ,sequence,request) &
+  interface
+     function CHAMELEON_zhetrd_Tile_Async_c(jobz,uplo,A,D,E,T,Q,LDQ,sequence,request) &
           & bind(c, name='CHAMELEON_zhetrd_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zhetrd_Tile_Async_c
-            integer(kind=c_int), value :: jobz
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: D
-            type(c_ptr), value :: E
-            type(c_ptr), value :: T
-            type(c_ptr), value :: Q
-            integer(kind=c_int), value :: LDQ
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zhetrd_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zlacpy_Tile_Async_c(uplo,A,B,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zhetrd_Tile_Async_c
+       integer(kind=c_int), value :: jobz
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: D
+       type(c_ptr), value :: E
+       type(c_ptr), value :: T
+       type(c_ptr), value :: Q
+       integer(kind=c_int), value :: LDQ
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zhetrd_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zlacpy_Tile_Async_c(uplo,A,B,sequence,request) &
           & bind(c, name='CHAMELEON_zlacpy_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zlacpy_Tile_Async_c
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zlacpy_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zlange_Tile_Async_c(norm,A,work,value,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zlacpy_Tile_Async_c
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zlacpy_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zlange_Tile_Async_c(norm,A,work,value,sequence,request) &
           & bind(c, name='CHAMELEON_zlange_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zlange_Tile_Async_c
-            integer(kind=c_int), value :: norm
-            type(c_ptr), value :: A
-            type(c_ptr), value :: work
-            type(c_ptr), value :: value
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zlange_Tile_Async_c
-      end interface
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zlange_Tile_Async_c
+       integer(kind=c_int), value :: norm
+       type(c_ptr), value :: A
+       type(c_ptr), value :: work
+       type(c_ptr), value :: value
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zlange_Tile_Async_c
+  end interface
 
 #if defined(PRECISION_z) || defined(PRECISION_c)
-      interface
-         function CHAMELEON_zlanhe_Tile_Async_c(norm,uplo,A,work,value,sequence,request) &
+  interface
+     function CHAMELEON_zlanhe_Tile_Async_c(norm,uplo,A,work,value,sequence,request) &
           & bind(c, name='CHAMELEON_zlanhe_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zlanhe_Tile_Async_c
-            integer(kind=c_int), value :: norm
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: work
-            type(c_ptr), value :: value
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zlanhe_Tile_Async_c
-      end interface
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zlanhe_Tile_Async_c
+       integer(kind=c_int), value :: norm
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: work
+       type(c_ptr), value :: value
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zlanhe_Tile_Async_c
+  end interface
 #endif
 
-      interface
-         function CHAMELEON_zlansy_Tile_Async_c(norm,uplo,A,work,value,sequence,request) &
+  interface
+     function CHAMELEON_zlansy_Tile_Async_c(norm,uplo,A,work,value,sequence,request) &
           & bind(c, name='CHAMELEON_zlansy_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zlansy_Tile_Async_c
-            integer(kind=c_int), value :: norm
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: work
-            type(c_ptr), value :: value
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zlansy_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zlaset_Tile_Async_c(uplo,alpha,beta,A,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zlansy_Tile_Async_c
+       integer(kind=c_int), value :: norm
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: work
+       type(c_ptr), value :: value
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zlansy_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zlaset_Tile_Async_c(uplo,alpha,beta,A,sequence,request) &
           & bind(c, name='CHAMELEON_zlaset_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zlaset_Tile_Async_c
-            integer(kind=c_int), value :: uplo
-            complex(kind=c_double_complex), value :: alpha
-            complex(kind=c_double_complex), value :: beta
-            type(c_ptr), value :: A
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zlaset_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zlaswp_Tile_Async_c(A,K1,K2,IPIV,INCX,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zlaset_Tile_Async_c
+       integer(kind=c_int), value :: uplo
+       complex(kind=c_double_complex), value :: alpha
+       complex(kind=c_double_complex), value :: beta
+       type(c_ptr), value :: A
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zlaset_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zlaswp_Tile_Async_c(A,K1,K2,IPIV,INCX,sequence,request) &
           & bind(c, name='CHAMELEON_zlaswp_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zlaswp_Tile_Async_c
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: K1
-            integer(kind=c_int), value :: K2
-            type(c_ptr), value :: IPIV
-            integer(kind=c_int), value :: INCX
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zlaswp_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zlaswpc_Tile_Async_c(A,K1,K2,IPIV,INCX,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zlaswp_Tile_Async_c
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: K1
+       integer(kind=c_int), value :: K2
+       type(c_ptr), value :: IPIV
+       integer(kind=c_int), value :: INCX
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zlaswp_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zlaswpc_Tile_Async_c(A,K1,K2,IPIV,INCX,sequence,request) &
           & bind(c, name='CHAMELEON_zlaswpc_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zlaswpc_Tile_Async_c
-            type(c_ptr), value :: A
-            integer(kind=c_int), value :: K1
-            integer(kind=c_int), value :: K2
-            type(c_ptr), value :: IPIV
-            integer(kind=c_int), value :: INCX
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zlaswpc_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zlauum_Tile_Async_c(uplo,A,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zlaswpc_Tile_Async_c
+       type(c_ptr), value :: A
+       integer(kind=c_int), value :: K1
+       integer(kind=c_int), value :: K2
+       type(c_ptr), value :: IPIV
+       integer(kind=c_int), value :: INCX
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zlaswpc_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zlauum_Tile_Async_c(uplo,A,sequence,request) &
           & bind(c, name='CHAMELEON_zlauum_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zlauum_Tile_Async_c
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zlauum_Tile_Async_c
-      end interface
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zlauum_Tile_Async_c
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zlauum_Tile_Async_c
+  end interface
 
 #if defined(PRECISION_z) || defined(PRECISION_c)
-      interface
-         function CHAMELEON_zplghe_Tile_Async_c(bump,uplo,A,seed,sequence,request) &
+  interface
+     function CHAMELEON_zplghe_Tile_Async_c(bump,uplo,A,seed,sequence,request) &
           & bind(c, name='CHAMELEON_zplghe_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zplghe_Tile_Async_c
-            real(kind=c_double), value :: bump
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            integer(kind=c_long_long), value :: seed
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zplghe_Tile_Async_c
-      end interface
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zplghe_Tile_Async_c
+       real(kind=c_double), value :: bump
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       integer(kind=c_long_long), value :: seed
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zplghe_Tile_Async_c
+  end interface
 #endif
 
-      interface
-         function CHAMELEON_zplgsy_Tile_Async_c(bump,uplo,A,seed,sequence,request) &
+  interface
+     function CHAMELEON_zplgsy_Tile_Async_c(bump,uplo,A,seed,sequence,request) &
           & bind(c, name='CHAMELEON_zplgsy_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zplgsy_Tile_Async_c
-            complex(kind=c_double_complex), value :: bump
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            integer(kind=c_long_long), value :: seed
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zplgsy_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zplrnt_Tile_Async_c(A,seed,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zplgsy_Tile_Async_c
+       complex(kind=c_double_complex), value :: bump
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       integer(kind=c_long_long), value :: seed
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zplgsy_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zplrnt_Tile_Async_c(A,seed,sequence,request) &
           & bind(c, name='CHAMELEON_zplrnt_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zplrnt_Tile_Async_c
-            type(c_ptr), value :: A
-            integer(kind=c_long_long), value :: seed
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zplrnt_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zposv_Tile_Async_c(uplo,A,B,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zplrnt_Tile_Async_c
+       type(c_ptr), value :: A
+       integer(kind=c_long_long), value :: seed
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zplrnt_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zposv_Tile_Async_c(uplo,A,B,sequence,request) &
           & bind(c, name='CHAMELEON_zposv_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zposv_Tile_Async_c
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zposv_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zsysv_Tile_Async_c(uplo,A,B,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zposv_Tile_Async_c
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zposv_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zsysv_Tile_Async_c(uplo,A,B,sequence,request) &
           & bind(c, name='CHAMELEON_zsysv_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zsysv_Tile_Async_c
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zsysv_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zpotrf_Tile_Async_c(uplo,A,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zsysv_Tile_Async_c
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zsysv_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zpotrf_Tile_Async_c(uplo,A,sequence,request) &
           & bind(c, name='CHAMELEON_zpotrf_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zpotrf_Tile_Async_c
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zpotrf_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zsytrf_Tile_Async_c(uplo,A,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zpotrf_Tile_Async_c
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zpotrf_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zsytrf_Tile_Async_c(uplo,A,sequence,request) &
           & bind(c, name='CHAMELEON_zsytrf_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zsytrf_Tile_Async_c
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zsytrf_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zpotri_Tile_Async_c(uplo,A,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zsytrf_Tile_Async_c
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zsytrf_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zpotri_Tile_Async_c(uplo,A,sequence,request) &
           & bind(c, name='CHAMELEON_zpotri_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zpotri_Tile_Async_c
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zpotri_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zpotrs_Tile_Async_c(uplo,A,B,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zpotri_Tile_Async_c
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zpotri_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zpotrs_Tile_Async_c(uplo,A,B,sequence,request) &
           & bind(c, name='CHAMELEON_zpotrs_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zpotrs_Tile_Async_c
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zpotrs_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zsytrs_Tile_Async_c(uplo,A,B,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zpotrs_Tile_Async_c
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zpotrs_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zsytrs_Tile_Async_c(uplo,A,B,sequence,request) &
           & bind(c, name='CHAMELEON_zsytrs_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zsytrs_Tile_Async_c
-            integer(kind=c_int), value :: uplo
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zsytrs_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zsymm_Tile_Async_c(side,uplo,alpha,A,B,beta,C,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zsytrs_Tile_Async_c
+       integer(kind=c_int), value :: uplo
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zsytrs_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zsymm_Tile_Async_c(side,uplo,alpha,A,B,beta,C,sequence,request) &
           & bind(c, name='CHAMELEON_zsymm_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zsymm_Tile_Async_c
-            integer(kind=c_int), value :: side
-            integer(kind=c_int), value :: uplo
-            complex(kind=c_double_complex), value :: alpha
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-            complex(kind=c_double_complex), value :: beta
-            type(c_ptr), value :: C
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zsymm_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zsyr2k_Tile_Async_c(uplo,trans,alpha,A,B,beta,C,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zsymm_Tile_Async_c
+       integer(kind=c_int), value :: side
+       integer(kind=c_int), value :: uplo
+       complex(kind=c_double_complex), value :: alpha
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+       complex(kind=c_double_complex), value :: beta
+       type(c_ptr), value :: C
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zsymm_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zsyr2k_Tile_Async_c(uplo,trans,alpha,A,B,beta,C,sequence,request) &
           & bind(c, name='CHAMELEON_zsyr2k_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zsyr2k_Tile_Async_c
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: trans
-            complex(kind=c_double_complex), value :: alpha
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-            complex(kind=c_double_complex), value :: beta
-            type(c_ptr), value :: C
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zsyr2k_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zsyrk_Tile_Async_c(uplo,trans,alpha,A,beta,C,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zsyr2k_Tile_Async_c
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: trans
+       complex(kind=c_double_complex), value :: alpha
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+       complex(kind=c_double_complex), value :: beta
+       type(c_ptr), value :: C
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zsyr2k_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zsyrk_Tile_Async_c(uplo,trans,alpha,A,beta,C,sequence,request) &
           & bind(c, name='CHAMELEON_zsyrk_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zsyrk_Tile_Async_c
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: trans
-            complex(kind=c_double_complex), value :: alpha
-            type(c_ptr), value :: A
-            complex(kind=c_double_complex), value :: beta
-            type(c_ptr), value :: C
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zsyrk_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_ztrmm_Tile_Async_c(side,uplo,transA,diag,alpha,A,B,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zsyrk_Tile_Async_c
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: trans
+       complex(kind=c_double_complex), value :: alpha
+       type(c_ptr), value :: A
+       complex(kind=c_double_complex), value :: beta
+       type(c_ptr), value :: C
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zsyrk_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_ztrmm_Tile_Async_c(side,uplo,transA,diag,alpha,A,B,sequence,request) &
           & bind(c, name='CHAMELEON_ztrmm_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_ztrmm_Tile_Async_c
-            integer(kind=c_int), value :: side
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: transA
-            integer(kind=c_int), value :: diag
-            complex(kind=c_double_complex), value :: alpha
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_ztrmm_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_ztrsm_Tile_Async_c(side,uplo,transA,diag,alpha,A,B,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_ztrmm_Tile_Async_c
+       integer(kind=c_int), value :: side
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: transA
+       integer(kind=c_int), value :: diag
+       complex(kind=c_double_complex), value :: alpha
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_ztrmm_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_ztrsm_Tile_Async_c(side,uplo,transA,diag,alpha,A,B,sequence,request) &
           & bind(c, name='CHAMELEON_ztrsm_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_ztrsm_Tile_Async_c
-            integer(kind=c_int), value :: side
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: transA
-            integer(kind=c_int), value :: diag
-            complex(kind=c_double_complex), value :: alpha
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_ztrsm_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_ztrsmpl_Tile_Async_c(A,L,IPIV,B,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_ztrsm_Tile_Async_c
+       integer(kind=c_int), value :: side
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: transA
+       integer(kind=c_int), value :: diag
+       complex(kind=c_double_complex), value :: alpha
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_ztrsm_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_ztrsmpl_Tile_Async_c(A,L,IPIV,B,sequence,request) &
           & bind(c, name='CHAMELEON_ztrsmpl_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_ztrsmpl_Tile_Async_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: L
-            type(c_ptr), value :: IPIV
-            type(c_ptr), value :: B
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_ztrsmpl_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_ztrsmrv_Tile_Async_c(side,uplo,transA,diag,alpha,A,B,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_ztrsmpl_Tile_Async_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: L
+       type(c_ptr), value :: IPIV
+       type(c_ptr), value :: B
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_ztrsmpl_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_ztrsmrv_Tile_Async_c(side,uplo,transA,diag,alpha,A,B,sequence,request) &
           & bind(c, name='CHAMELEON_ztrsmrv_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_ztrsmrv_Tile_Async_c
-            integer(kind=c_int), value :: side
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: transA
-            integer(kind=c_int), value :: diag
-            complex(kind=c_double_complex), value :: alpha
-            type(c_ptr), value :: A
-            type(c_ptr), value :: B
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_ztrsmrv_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_ztrtri_Tile_Async_c(uplo,diag,A,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_ztrsmrv_Tile_Async_c
+       integer(kind=c_int), value :: side
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: transA
+       integer(kind=c_int), value :: diag
+       complex(kind=c_double_complex), value :: alpha
+       type(c_ptr), value :: A
+       type(c_ptr), value :: B
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_ztrsmrv_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_ztrtri_Tile_Async_c(uplo,diag,A,sequence,request) &
           & bind(c, name='CHAMELEON_ztrtri_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_ztrtri_Tile_Async_c
-            integer(kind=c_int), value :: uplo
-            integer(kind=c_int), value :: diag
-            type(c_ptr), value :: A
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_ztrtri_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zunglq_Tile_Async_c(A,T,B,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_ztrtri_Tile_Async_c
+       integer(kind=c_int), value :: uplo
+       integer(kind=c_int), value :: diag
+       type(c_ptr), value :: A
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_ztrtri_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zunglq_Tile_Async_c(A,T,B,sequence,request) &
           & bind(c, name='CHAMELEON_zunglq_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zunglq_Tile_Async_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: T
-            type(c_ptr), value :: B
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zunglq_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zungqr_Tile_Async_c(A,T,B,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zunglq_Tile_Async_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: T
+       type(c_ptr), value :: B
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zunglq_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zungqr_Tile_Async_c(A,T,B,sequence,request) &
           & bind(c, name='CHAMELEON_zungqr_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zungqr_Tile_Async_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: T
-            type(c_ptr), value :: B
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zungqr_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zunmlq_Tile_Async_c(side,trans,A,T,B,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zungqr_Tile_Async_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: T
+       type(c_ptr), value :: B
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zungqr_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zunmlq_Tile_Async_c(side,trans,A,T,B,sequence,request) &
           & bind(c, name='CHAMELEON_zunmlq_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zunmlq_Tile_Async_c
-            integer(kind=c_int), value :: side
-            integer(kind=c_int), value :: trans
-            type(c_ptr), value :: A
-            type(c_ptr), value :: T
-            type(c_ptr), value :: B
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zunmlq_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_zunmqr_Tile_Async_c(side,trans,A,T,B,sequence,request) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zunmlq_Tile_Async_c
+       integer(kind=c_int), value :: side
+       integer(kind=c_int), value :: trans
+       type(c_ptr), value :: A
+       type(c_ptr), value :: T
+       type(c_ptr), value :: B
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zunmlq_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_zunmqr_Tile_Async_c(side,trans,A,T,B,sequence,request) &
           & bind(c, name='CHAMELEON_zunmqr_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_zunmqr_Tile_Async_c
-            integer(kind=c_int), value :: side
-            integer(kind=c_int), value :: trans
-            type(c_ptr), value :: A
-            type(c_ptr), value :: T
-            type(c_ptr), value :: B
-            type(c_ptr), value :: sequence
-            type(c_ptr), value :: request
-          end function CHAMELEON_zunmqr_Tile_Async_c
-      end interface
-
-    !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-    !  FORTRAN API - workspace allocation
-    !
-      interface
-         function CHAMELEON_Alloc_Workspace_zgebrd_c(M,N,descT,p,q) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_zunmqr_Tile_Async_c
+       integer(kind=c_int), value :: side
+       integer(kind=c_int), value :: trans
+       type(c_ptr), value :: A
+       type(c_ptr), value :: T
+       type(c_ptr), value :: B
+       type(c_ptr), value :: sequence
+       type(c_ptr), value :: request
+     end function CHAMELEON_zunmqr_Tile_Async_c
+  end interface
+
+  !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+  !  FORTRAN API - workspace allocation
+  !
+  interface
+     function CHAMELEON_Alloc_Workspace_zgebrd_c(M,N,descT,p,q) &
           & bind(c, name='CHAMELEON_Alloc_Workspace_zgebrd')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgebrd_c
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            type(c_ptr) :: descT ! descT is **, so pass by reference
-            integer(kind=c_int), value :: p
-            integer(kind=c_int), value :: q
-          end function CHAMELEON_Alloc_Workspace_zgebrd_c
-      end interface
-
-      interface
-         function CHAMELEON_Alloc_Workspace_zgeev_c(N,descT,p,q) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgebrd_c
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       type(c_ptr) :: descT ! descT is **, so pass by reference
+       integer(kind=c_int), value :: p
+       integer(kind=c_int), value :: q
+     end function CHAMELEON_Alloc_Workspace_zgebrd_c
+  end interface
+
+  interface
+     function CHAMELEON_Alloc_Workspace_zgeev_c(N,descT,p,q) &
           & bind(c, name='CHAMELEON_Alloc_Workspace_zgeev')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgeev_c
-            integer(kind=c_int), value :: N
-            type(c_ptr) :: descT ! descT is **, so pass by reference
-            integer(kind=c_int), value :: p
-            integer(kind=c_int), value :: q
-          end function CHAMELEON_Alloc_Workspace_zgeev_c
-      end interface
-
-      interface
-         function CHAMELEON_Alloc_Workspace_zgehrd_c(N,descT,p,q) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgeev_c
+       integer(kind=c_int), value :: N
+       type(c_ptr) :: descT ! descT is **, so pass by reference
+       integer(kind=c_int), value :: p
+       integer(kind=c_int), value :: q
+     end function CHAMELEON_Alloc_Workspace_zgeev_c
+  end interface
+
+  interface
+     function CHAMELEON_Alloc_Workspace_zgehrd_c(N,descT,p,q) &
           & bind(c, name='CHAMELEON_Alloc_Workspace_zgehrd')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgehrd_c
-            integer(kind=c_int), value :: N
-            type(c_ptr) :: descT ! descT is **, so pass by reference
-            integer(kind=c_int), value :: p
-            integer(kind=c_int), value :: q
-          end function CHAMELEON_Alloc_Workspace_zgehrd_c
-      end interface
-
-      interface
-         function CHAMELEON_Alloc_Workspace_zgelqf_c(M,N,T,p,q) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgehrd_c
+       integer(kind=c_int), value :: N
+       type(c_ptr) :: descT ! descT is **, so pass by reference
+       integer(kind=c_int), value :: p
+       integer(kind=c_int), value :: q
+     end function CHAMELEON_Alloc_Workspace_zgehrd_c
+  end interface
+
+  interface
+     function CHAMELEON_Alloc_Workspace_zgelqf_c(M,N,T,p,q) &
           & bind(c, name='CHAMELEON_Alloc_Workspace_zgelqf')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgelqf_c
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            type(c_ptr) :: T ! T is **, so pass by reference
-            integer(kind=c_int), value :: p
-            integer(kind=c_int), value :: q
-          end function CHAMELEON_Alloc_Workspace_zgelqf_c
-      end interface
-
-      interface
-         function CHAMELEON_Alloc_Workspace_zgelqf_Tile_c(M,N,descT,p,q) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgelqf_c
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       type(c_ptr) :: T ! T is **, so pass by reference
+       integer(kind=c_int), value :: p
+       integer(kind=c_int), value :: q
+     end function CHAMELEON_Alloc_Workspace_zgelqf_c
+  end interface
+
+  interface
+     function CHAMELEON_Alloc_Workspace_zgelqf_Tile_c(M,N,descT,p,q) &
           & bind(c, name='CHAMELEON_Alloc_Workspace_zgelqf_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgelqf_Tile_c
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            type(c_ptr) :: descT ! descT is **, so pass by reference
-            integer(kind=c_int), value :: p
-            integer(kind=c_int), value :: q
-          end function CHAMELEON_Alloc_Workspace_zgelqf_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_Alloc_Workspace_zgels_c(M,N,T,p,q) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgelqf_Tile_c
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       type(c_ptr) :: descT ! descT is **, so pass by reference
+       integer(kind=c_int), value :: p
+       integer(kind=c_int), value :: q
+     end function CHAMELEON_Alloc_Workspace_zgelqf_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_Alloc_Workspace_zgels_c(M,N,T,p,q) &
           & bind(c, name='CHAMELEON_Alloc_Workspace_zgels')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgels_c
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            type(c_ptr) :: T ! T is **, so pass by reference
-            integer(kind=c_int), value :: p
-            integer(kind=c_int), value :: q
-          end function CHAMELEON_Alloc_Workspace_zgels_c
-      end interface
-
-      interface
-         function CHAMELEON_Alloc_Workspace_zgels_Tile_c(M,N,descT,p,q) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgels_c
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       type(c_ptr) :: T ! T is **, so pass by reference
+       integer(kind=c_int), value :: p
+       integer(kind=c_int), value :: q
+     end function CHAMELEON_Alloc_Workspace_zgels_c
+  end interface
+
+  interface
+     function CHAMELEON_Alloc_Workspace_zgels_Tile_c(M,N,descT,p,q) &
           & bind(c, name='CHAMELEON_Alloc_Workspace_zgels_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgels_Tile_c
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            type(c_ptr) :: descT ! descT is **, so pass by reference
-            integer(kind=c_int), value :: p
-            integer(kind=c_int), value :: q
-          end function CHAMELEON_Alloc_Workspace_zgels_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_Alloc_Workspace_zgeqrf_c(M,N,T,p,q) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgels_Tile_c
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       type(c_ptr) :: descT ! descT is **, so pass by reference
+       integer(kind=c_int), value :: p
+       integer(kind=c_int), value :: q
+     end function CHAMELEON_Alloc_Workspace_zgels_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_Alloc_Workspace_zgeqrf_c(M,N,T,p,q) &
           & bind(c, name='CHAMELEON_Alloc_Workspace_zgeqrf')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgeqrf_c
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            type(c_ptr) :: T ! T is **, so pass by reference
-            integer(kind=c_int), value :: p
-            integer(kind=c_int), value :: q
-          end function CHAMELEON_Alloc_Workspace_zgeqrf_c
-      end interface
-
-      interface
-         function CHAMELEON_Alloc_Workspace_zgeqrf_Tile_c(M,N,descT,p,q) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgeqrf_c
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       type(c_ptr) :: T ! T is **, so pass by reference
+       integer(kind=c_int), value :: p
+       integer(kind=c_int), value :: q
+     end function CHAMELEON_Alloc_Workspace_zgeqrf_c
+  end interface
+
+  interface
+     function CHAMELEON_Alloc_Workspace_zgeqrf_Tile_c(M,N,descT,p,q) &
           & bind(c, name='CHAMELEON_Alloc_Workspace_zgeqrf_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgeqrf_Tile_c
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            type(c_ptr) :: descT ! descT is **, so pass by reference
-            integer(kind=c_int), value :: p
-            integer(kind=c_int), value :: q
-          end function CHAMELEON_Alloc_Workspace_zgeqrf_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_Alloc_Workspace_zgesv_incpiv_c(N,descL,IPIV,p,q) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgeqrf_Tile_c
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       type(c_ptr) :: descT ! descT is **, so pass by reference
+       integer(kind=c_int), value :: p
+       integer(kind=c_int), value :: q
+     end function CHAMELEON_Alloc_Workspace_zgeqrf_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_Alloc_Workspace_zgesv_incpiv_c(N,descL,IPIV,p,q) &
           & bind(c, name='CHAMELEON_Alloc_Workspace_zgesv_incpiv')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgesv_incpiv_c
-            integer(kind=c_int), value :: N
-            type(c_ptr) :: descL ! descL is **, so pass by reference
-            type(c_ptr) :: IPIV ! IPIV is **, so pass by reference
-            integer(kind=c_int), value :: p
-            integer(kind=c_int), value :: q
-          end function CHAMELEON_Alloc_Workspace_zgesv_incpiv_c
-      end interface
-
-      interface
-         function CHAMELEON_Alloc_Workspace_zgesv_incpiv_Tile_c(N,descL,IPIV,p,q) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgesv_incpiv_c
+       integer(kind=c_int), value :: N
+       type(c_ptr) :: descL ! descL is **, so pass by reference
+       type(c_ptr) :: IPIV ! IPIV is **, so pass by reference
+       integer(kind=c_int), value :: p
+       integer(kind=c_int), value :: q
+     end function CHAMELEON_Alloc_Workspace_zgesv_incpiv_c
+  end interface
+
+  interface
+     function CHAMELEON_Alloc_Workspace_zgesv_incpiv_Tile_c(N,descL,IPIV,p,q) &
           & bind(c, name='CHAMELEON_Alloc_Workspace_zgesv_incpiv_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgesv_incpiv_Tile_c
-            integer(kind=c_int), value :: N
-            type(c_ptr) :: descL ! descL is **, so pass by reference
-            type(c_ptr) :: IPIV ! IPIV is **, so pass by reference
-            integer(kind=c_int), value :: p
-            integer(kind=c_int), value :: q
-          end function CHAMELEON_Alloc_Workspace_zgesv_incpiv_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_Alloc_Workspace_zgesvd_c(M,N,descT,p,q) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgesv_incpiv_Tile_c
+       integer(kind=c_int), value :: N
+       type(c_ptr) :: descL ! descL is **, so pass by reference
+       type(c_ptr) :: IPIV ! IPIV is **, so pass by reference
+       integer(kind=c_int), value :: p
+       integer(kind=c_int), value :: q
+     end function CHAMELEON_Alloc_Workspace_zgesv_incpiv_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_Alloc_Workspace_zgesvd_c(M,N,descT,p,q) &
           & bind(c, name='CHAMELEON_Alloc_Workspace_zgesvd')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgesvd_c
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            type(c_ptr) :: descT ! descT is **, so pass by reference
-            integer(kind=c_int), value :: p
-            integer(kind=c_int), value :: q
-          end function CHAMELEON_Alloc_Workspace_zgesvd_c
-      end interface
-
-      interface
-         function CHAMELEON_Alloc_Workspace_zgetrf_incpiv_c(M,N,descL,IPIV,p,q) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgesvd_c
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       type(c_ptr) :: descT ! descT is **, so pass by reference
+       integer(kind=c_int), value :: p
+       integer(kind=c_int), value :: q
+     end function CHAMELEON_Alloc_Workspace_zgesvd_c
+  end interface
+
+  interface
+     function CHAMELEON_Alloc_Workspace_zgetrf_incpiv_c(M,N,descL,IPIV,p,q) &
           & bind(c, name='CHAMELEON_Alloc_Workspace_zgetrf_incpiv')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgetrf_incpiv_c
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            type(c_ptr) :: descL ! descL is **, so pass by reference
-            type(c_ptr) :: IPIV ! IPIV is **, so pass by reference
-            integer(kind=c_int), value :: p
-            integer(kind=c_int), value :: q
-          end function CHAMELEON_Alloc_Workspace_zgetrf_incpiv_c
-      end interface
-
-      interface
-         function CHAMELEON_Alloc_Workspace_zgetrf_incpiv_Tile_c(N,descL,IPIV,p,q) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgetrf_incpiv_c
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       type(c_ptr) :: descL ! descL is **, so pass by reference
+       type(c_ptr) :: IPIV ! IPIV is **, so pass by reference
+       integer(kind=c_int), value :: p
+       integer(kind=c_int), value :: q
+     end function CHAMELEON_Alloc_Workspace_zgetrf_incpiv_c
+  end interface
+
+  interface
+     function CHAMELEON_Alloc_Workspace_zgetrf_incpiv_Tile_c(N,descL,IPIV,p,q) &
           & bind(c, name='CHAMELEON_Alloc_Workspace_zgetrf_incpiv_Tile')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgetrf_incpiv_Tile_c
-            integer(kind=c_int), value :: N
-            type(c_ptr) :: descL ! descL is **, so pass by reference
-            type(c_ptr) :: IPIV ! IPIV is **, so pass by reference
-            integer(kind=c_int), value :: p
-            integer(kind=c_int), value :: q
-          end function CHAMELEON_Alloc_Workspace_zgetrf_incpiv_Tile_c
-      end interface
-
-      interface
-         function CHAMELEON_Alloc_Workspace_zgetri_Tile_Async_c(A,W) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgetrf_incpiv_Tile_c
+       integer(kind=c_int), value :: N
+       type(c_ptr) :: descL ! descL is **, so pass by reference
+       type(c_ptr) :: IPIV ! IPIV is **, so pass by reference
+       integer(kind=c_int), value :: p
+       integer(kind=c_int), value :: q
+     end function CHAMELEON_Alloc_Workspace_zgetrf_incpiv_Tile_c
+  end interface
+
+  interface
+     function CHAMELEON_Alloc_Workspace_zgetri_Tile_Async_c(A,W) &
           & bind(c, name='CHAMELEON_Alloc_Workspace_zgetri_Tile_Async')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgetri_Tile_Async_c
-            type(c_ptr), value :: A
-            type(c_ptr), value :: W
-          end function CHAMELEON_Alloc_Workspace_zgetri_Tile_Async_c
-      end interface
-
-      interface
-         function CHAMELEON_Alloc_Workspace_zheev_c(M,N,descT,p,q) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zgetri_Tile_Async_c
+       type(c_ptr), value :: A
+       type(c_ptr), value :: W
+     end function CHAMELEON_Alloc_Workspace_zgetri_Tile_Async_c
+  end interface
+
+  interface
+     function CHAMELEON_Alloc_Workspace_zheev_c(M,N,descT,p,q) &
           & bind(c, name='CHAMELEON_Alloc_Workspace_zheev')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zheev_c
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            type(c_ptr) :: descT ! descT is **, so pass by reference
-            integer(kind=c_int), value :: p
-            integer(kind=c_int), value :: q
-          end function CHAMELEON_Alloc_Workspace_zheev_c
-      end interface
-
-      interface
-         function CHAMELEON_Alloc_Workspace_zheevd_c(M,N,descT,p,q) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zheev_c
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       type(c_ptr) :: descT ! descT is **, so pass by reference
+       integer(kind=c_int), value :: p
+       integer(kind=c_int), value :: q
+     end function CHAMELEON_Alloc_Workspace_zheev_c
+  end interface
+
+  interface
+     function CHAMELEON_Alloc_Workspace_zheevd_c(M,N,descT,p,q) &
           & bind(c, name='CHAMELEON_Alloc_Workspace_zheevd')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zheevd_c
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            type(c_ptr) :: descT ! descT is **, so pass by reference
-            integer(kind=c_int), value :: p
-            integer(kind=c_int), value :: q
-          end function CHAMELEON_Alloc_Workspace_zheevd_c
-      end interface
-
-      interface
-         function CHAMELEON_Alloc_Workspace_zhegv_c(M,N,descT,p,q) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zheevd_c
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       type(c_ptr) :: descT ! descT is **, so pass by reference
+       integer(kind=c_int), value :: p
+       integer(kind=c_int), value :: q
+     end function CHAMELEON_Alloc_Workspace_zheevd_c
+  end interface
+
+  interface
+     function CHAMELEON_Alloc_Workspace_zhegv_c(M,N,descT,p,q) &
           & bind(c, name='CHAMELEON_Alloc_Workspace_zhegv')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zhegv_c
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            type(c_ptr) :: descT ! descT is **, so pass by reference
-            integer(kind=c_int), value :: p
-            integer(kind=c_int), value :: q
-          end function CHAMELEON_Alloc_Workspace_zhegv_c
-      end interface
-
-      interface
-         function CHAMELEON_Alloc_Workspace_zhegvd_c(M,N,descT,p,q) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zhegv_c
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       type(c_ptr) :: descT ! descT is **, so pass by reference
+       integer(kind=c_int), value :: p
+       integer(kind=c_int), value :: q
+     end function CHAMELEON_Alloc_Workspace_zhegv_c
+  end interface
+
+  interface
+     function CHAMELEON_Alloc_Workspace_zhegvd_c(M,N,descT,p,q) &
           & bind(c, name='CHAMELEON_Alloc_Workspace_zhegvd')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zhegvd_c
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            type(c_ptr) :: descT ! descT is **, so pass by reference
-            integer(kind=c_int), value :: p
-            integer(kind=c_int), value :: q
-          end function CHAMELEON_Alloc_Workspace_zhegvd_c
-      end interface
-
-      interface
-         function CHAMELEON_Alloc_Workspace_zhetrd_c(M,N,descT,p,q) &
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zhegvd_c
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       type(c_ptr) :: descT ! descT is **, so pass by reference
+       integer(kind=c_int), value :: p
+       integer(kind=c_int), value :: q
+     end function CHAMELEON_Alloc_Workspace_zhegvd_c
+  end interface
+
+  interface
+     function CHAMELEON_Alloc_Workspace_zhetrd_c(M,N,descT,p,q) &
           & bind(c, name='CHAMELEON_Alloc_Workspace_zhetrd')
-            use iso_c_binding
-            implicit none
-            integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zhetrd_c
-            integer(kind=c_int), value :: M
-            integer(kind=c_int), value :: N
-            type(c_ptr) :: descT ! descT is **, so pass by reference
-            integer(kind=c_int), value :: p
-            integer(kind=c_int), value :: q
-          end function CHAMELEON_Alloc_Workspace_zhetrd_c
-      end interface
-
-  contains
-
-       subroutine CHAMELEON_zgebrd(M,N,A,LDA,D,E,T,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         real(kind=c_double), intent(out), target :: D(*)
-         real(kind=c_double), intent(out), target :: E(*)
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgebrd_c(M,N,c_loc(A),LDA,c_loc(D),c_loc(E),T)
-      end subroutine CHAMELEON_zgebrd
-
-      subroutine CHAMELEON_zgelqf(M,N,A,LDA,T,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgelqf_c(M,N,c_loc(A),LDA,T)
-      end subroutine CHAMELEON_zgelqf
-
-      subroutine CHAMELEON_zgelqs(M,N,NRHS,A,LDA,T,B,LDB,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDB
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: NRHS
-         complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
-         complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgelqs_c(M,N,NRHS,c_loc(A),LDA,T,c_loc(B),LDB)
-      end subroutine CHAMELEON_zgelqs
-
-      subroutine CHAMELEON_zgels(trans,M,N,NRHS,A,LDA,T,B,LDB,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDB
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: NRHS
-         integer(kind=c_int), intent(in) :: trans
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgels_c(trans,M,N,NRHS,c_loc(A),LDA,T,c_loc(B),LDB)
-      end subroutine CHAMELEON_zgels
-
-      subroutine CHAMELEON_zgemm(transA,transB,M,N,K,alpha,A,LDA,B,LDB,beta,C,LDC,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: K
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDB
-         integer(kind=c_int), intent(in) :: LDC
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: transA
-         integer(kind=c_int), intent(in) :: transB
-         complex(kind=c_double_complex), intent(in) :: alpha
-         complex(kind=c_double_complex), intent(in) :: beta
-         complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
-         complex(kind=c_double_complex), intent(in), target :: B(LDB,*)
-         complex(kind=c_double_complex), intent(inout), target :: C(LDC,*)
-         info = CHAMELEON_zgemm_c(transA,transB,M,N,K,alpha,c_loc(A),LDA,c_loc(B),LDB,beta,c_loc(C),LDC)
-      end subroutine CHAMELEON_zgemm
-
-      subroutine CHAMELEON_zgeqrf(M,N,A,LDA,T,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgeqrf_c(M,N,c_loc(A),LDA,T)
-      end subroutine CHAMELEON_zgeqrf
-
-      subroutine CHAMELEON_zgeqrs(M,N,NRHS,A,LDA,T,B,LDB,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDB
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: NRHS
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgeqrs_c(M,N,NRHS,c_loc(A),LDA,T,c_loc(B),LDB)
-      end subroutine CHAMELEON_zgeqrs
-
-      subroutine CHAMELEON_zgesv(N,NRHS,A,LDA,IPIV,B,LDB,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDB
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: NRHS
-         integer(kind=c_int), intent(out), target :: IPIV(*)
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
-         info = CHAMELEON_zgesv_c(N,NRHS,c_loc(A),LDA,c_loc(IPIV),c_loc(B),LDB)
-      end subroutine CHAMELEON_zgesv
-
-      subroutine CHAMELEON_zgesv_incpiv(N,NRHS,A,LDA,L,IPIV,B,LDB,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDB
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: NRHS
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
-         type(c_ptr), value :: IPIV ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: L ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgesv_incpiv_c(N,NRHS,c_loc(A),LDA,L,IPIV,c_loc(B),LDB)
-      end subroutine CHAMELEON_zgesv_incpiv
-
-      subroutine CHAMELEON_zgesvd(jobu,jobvt,M,N,A,LDA,S,U,LDU,VT,LDVT,T,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDU
-         integer(kind=c_int), intent(in) :: LDVT
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: jobu
-         integer(kind=c_int), intent(in) :: jobvt
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         complex(kind=c_double_complex), intent(out), target :: U(LDU,*)
-         complex(kind=c_double_complex), intent(out), target :: VT(LDVT,*)
-         real(kind=c_double), intent(out), target :: S(*)
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgesvd_c(jobu,jobvt,M,N,c_loc(A),LDA,c_loc(S),c_loc(U),LDU,c_loc(VT),LDVT,T)
-      end subroutine CHAMELEON_zgesvd
-
-      subroutine CHAMELEON_zgetrf(M,N,A,LDA,IPIV,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(out), target :: IPIV(*)
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         info = CHAMELEON_zgetrf_c(M,N,c_loc(A),LDA,c_loc(IPIV))
-      end subroutine CHAMELEON_zgetrf
-
-      subroutine CHAMELEON_zgetrf_incpiv(M,N,A,LDA,L,IPIV,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         type(c_ptr), value :: IPIV ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: L    ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgetrf_incpiv_c(M,N,c_loc(A),LDA,L,IPIV)
-      end subroutine CHAMELEON_zgetrf_incpiv
-
-      subroutine CHAMELEON_zgetrf_nopiv(M,N,A,LDA,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         info = CHAMELEON_zgetrf_nopiv_c(M,N,c_loc(A),LDA)
-      end subroutine CHAMELEON_zgetrf_nopiv
-
-      subroutine CHAMELEON_zgetrs(trans,N,NRHS,A,LDA,IPIV,B,LDB,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDB
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: NRHS
-         integer(kind=c_int), intent(in) :: trans
-         integer(kind=c_int), intent(in), target :: IPIV(*)
-         complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
-         complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
-         info = CHAMELEON_zgetrs_c(trans,N,NRHS,c_loc(A),LDA,c_loc(IPIV),c_loc(B),LDB)
-      end subroutine CHAMELEON_zgetrs
-
-      subroutine CHAMELEON_zgetrs_incpiv(trans,N,NRHS,A,LDA,L,IPIV,B,LDB,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDB
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: NRHS
-         integer(kind=c_int), intent(in) :: trans
-         complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
-         complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
-         type(c_ptr), value :: IPIV ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: L    ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgetrs_incpiv_c(trans,N,NRHS,c_loc(A),LDA,L,IPIV,c_loc(B),LDB)
-      end subroutine CHAMELEON_zgetrs_incpiv
+       use iso_c_binding
+       implicit none
+       integer(kind=c_int) :: CHAMELEON_Alloc_Workspace_zhetrd_c
+       integer(kind=c_int), value :: M
+       integer(kind=c_int), value :: N
+       type(c_ptr) :: descT ! descT is **, so pass by reference
+       integer(kind=c_int), value :: p
+       integer(kind=c_int), value :: q
+     end function CHAMELEON_Alloc_Workspace_zhetrd_c
+  end interface
+
+contains
+
+  subroutine CHAMELEON_zgebrd(M,N,A,LDA,D,E,T,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    real(kind=c_double), intent(out), target :: D(*)
+    real(kind=c_double), intent(out), target :: E(*)
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgebrd_c(M,N,c_loc(A),LDA,c_loc(D),c_loc(E),T)
+  end subroutine CHAMELEON_zgebrd
+
+  subroutine CHAMELEON_zgelqf(M,N,A,LDA,T,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgelqf_c(M,N,c_loc(A),LDA,T)
+  end subroutine CHAMELEON_zgelqf
+
+  subroutine CHAMELEON_zgelqs(M,N,NRHS,A,LDA,T,B,LDB,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDB
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: NRHS
+    complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
+    complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgelqs_c(M,N,NRHS,c_loc(A),LDA,T,c_loc(B),LDB)
+  end subroutine CHAMELEON_zgelqs
+
+  subroutine CHAMELEON_zgels(trans,M,N,NRHS,A,LDA,T,B,LDB,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDB
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: NRHS
+    integer(kind=c_int), intent(in) :: trans
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgels_c(trans,M,N,NRHS,c_loc(A),LDA,T,c_loc(B),LDB)
+  end subroutine CHAMELEON_zgels
+
+  subroutine CHAMELEON_zgemm(transA,transB,M,N,K,alpha,A,LDA,B,LDB,beta,C,LDC,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: K
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDB
+    integer(kind=c_int), intent(in) :: LDC
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: transA
+    integer(kind=c_int), intent(in) :: transB
+    complex(kind=c_double_complex), intent(in) :: alpha
+    complex(kind=c_double_complex), intent(in) :: beta
+    complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
+    complex(kind=c_double_complex), intent(in), target :: B(LDB,*)
+    complex(kind=c_double_complex), intent(inout), target :: C(LDC,*)
+    info = CHAMELEON_zgemm_c(transA,transB,M,N,K,alpha,c_loc(A),LDA,c_loc(B),LDB,beta,c_loc(C),LDC)
+  end subroutine CHAMELEON_zgemm
+
+  subroutine CHAMELEON_zgeqrf(M,N,A,LDA,T,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgeqrf_c(M,N,c_loc(A),LDA,T)
+  end subroutine CHAMELEON_zgeqrf
+
+  subroutine CHAMELEON_zgeqrs(M,N,NRHS,A,LDA,T,B,LDB,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDB
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: NRHS
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgeqrs_c(M,N,NRHS,c_loc(A),LDA,T,c_loc(B),LDB)
+  end subroutine CHAMELEON_zgeqrs
+
+  subroutine CHAMELEON_zgesv(N,NRHS,A,LDA,IPIV,B,LDB,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDB
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: NRHS
+    integer(kind=c_int), intent(out), target :: IPIV(*)
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
+    info = CHAMELEON_zgesv_c(N,NRHS,c_loc(A),LDA,c_loc(IPIV),c_loc(B),LDB)
+  end subroutine CHAMELEON_zgesv
+
+  subroutine CHAMELEON_zgesv_incpiv(N,NRHS,A,LDA,L,IPIV,B,LDB,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDB
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: NRHS
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
+    type(c_ptr), value :: IPIV ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: L ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgesv_incpiv_c(N,NRHS,c_loc(A),LDA,L,IPIV,c_loc(B),LDB)
+  end subroutine CHAMELEON_zgesv_incpiv
+
+  subroutine CHAMELEON_zgesvd(jobu,jobvt,M,N,A,LDA,S,U,LDU,VT,LDVT,T,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDU
+    integer(kind=c_int), intent(in) :: LDVT
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: jobu
+    integer(kind=c_int), intent(in) :: jobvt
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    complex(kind=c_double_complex), intent(out), target :: U(LDU,*)
+    complex(kind=c_double_complex), intent(out), target :: VT(LDVT,*)
+    real(kind=c_double), intent(out), target :: S(*)
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgesvd_c(jobu,jobvt,M,N,c_loc(A),LDA,c_loc(S),c_loc(U),LDU,c_loc(VT),LDVT,T)
+  end subroutine CHAMELEON_zgesvd
+
+  subroutine CHAMELEON_zgetrf(M,N,A,LDA,IPIV,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(out), target :: IPIV(*)
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    info = CHAMELEON_zgetrf_c(M,N,c_loc(A),LDA,c_loc(IPIV))
+  end subroutine CHAMELEON_zgetrf
+
+  subroutine CHAMELEON_zgetrf_incpiv(M,N,A,LDA,L,IPIV,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    type(c_ptr), value :: IPIV ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: L    ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgetrf_incpiv_c(M,N,c_loc(A),LDA,L,IPIV)
+  end subroutine CHAMELEON_zgetrf_incpiv
+
+  subroutine CHAMELEON_zgetrf_nopiv(M,N,A,LDA,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    info = CHAMELEON_zgetrf_nopiv_c(M,N,c_loc(A),LDA)
+  end subroutine CHAMELEON_zgetrf_nopiv
+
+  subroutine CHAMELEON_zgetrs(trans,N,NRHS,A,LDA,IPIV,B,LDB,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDB
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: NRHS
+    integer(kind=c_int), intent(in) :: trans
+    integer(kind=c_int), intent(in), target :: IPIV(*)
+    complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
+    complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
+    info = CHAMELEON_zgetrs_c(trans,N,NRHS,c_loc(A),LDA,c_loc(IPIV),c_loc(B),LDB)
+  end subroutine CHAMELEON_zgetrs
+
+  subroutine CHAMELEON_zgetrs_incpiv(trans,N,NRHS,A,LDA,L,IPIV,B,LDB,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDB
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: NRHS
+    integer(kind=c_int), intent(in) :: trans
+    complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
+    complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
+    type(c_ptr), value :: IPIV ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: L    ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgetrs_incpiv_c(trans,N,NRHS,c_loc(A),LDA,L,IPIV,c_loc(B),LDB)
+  end subroutine CHAMELEON_zgetrs_incpiv
 
 #if defined(PRECISION_z) || defined(PRECISION_c)
-      subroutine CHAMELEON_zhemm(side,uplo,M,N,alpha,A,LDA,B,LDB,beta,C,LDC,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDB
-         integer(kind=c_int), intent(in) :: LDC
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: side
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in) :: alpha
-         complex(kind=c_double_complex), intent(in) :: beta
-         complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
-         complex(kind=c_double_complex), intent(in), target :: B(LDB,*)
-         complex(kind=c_double_complex), intent(inout), target :: C(LDC,*)
-         info = CHAMELEON_zhemm_c(side,uplo,M,N,alpha,c_loc(A),LDA,c_loc(B),LDB,beta,c_loc(C),LDC)
-      end subroutine CHAMELEON_zhemm
-
-      subroutine CHAMELEON_zherk(uplo,trans,N,K,alpha,A,LDA,beta,C,LDC,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: K
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDC
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: trans
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
-         complex(kind=c_double_complex), intent(inout), target :: C(LDC,*)
-         real(kind=c_double), intent(in) :: alpha
-         real(kind=c_double), intent(in) :: beta
-         info = CHAMELEON_zherk_c(uplo,trans,N,K,alpha,c_loc(A),LDA,beta,c_loc(C),LDC)
-      end subroutine CHAMELEON_zherk
-
-      subroutine CHAMELEON_zher2k(uplo,trans,N,K,alpha,A,LDA,B,LDB,beta,C,LDC,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: K
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDB
-         integer(kind=c_int), intent(in) :: LDC
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: trans
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in) :: alpha
-         complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
-         complex(kind=c_double_complex), intent(in), target :: B(LDB,*)
-         complex(kind=c_double_complex), intent(inout), target :: C(LDC,*)
-         real(kind=c_double), intent(in) :: beta
-         info = CHAMELEON_zher2k_c(uplo,trans,N,K,alpha,c_loc(A),LDA,c_loc(B),LDB,beta,c_loc(C),LDC)
-      end subroutine CHAMELEON_zher2k
+  subroutine CHAMELEON_zhemm(side,uplo,M,N,alpha,A,LDA,B,LDB,beta,C,LDC,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDB
+    integer(kind=c_int), intent(in) :: LDC
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: side
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in) :: alpha
+    complex(kind=c_double_complex), intent(in) :: beta
+    complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
+    complex(kind=c_double_complex), intent(in), target :: B(LDB,*)
+    complex(kind=c_double_complex), intent(inout), target :: C(LDC,*)
+    info = CHAMELEON_zhemm_c(side,uplo,M,N,alpha,c_loc(A),LDA,c_loc(B),LDB,beta,c_loc(C),LDC)
+  end subroutine CHAMELEON_zhemm
+
+  subroutine CHAMELEON_zherk(uplo,trans,N,K,alpha,A,LDA,beta,C,LDC,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: K
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDC
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: trans
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
+    complex(kind=c_double_complex), intent(inout), target :: C(LDC,*)
+    real(kind=c_double), intent(in) :: alpha
+    real(kind=c_double), intent(in) :: beta
+    info = CHAMELEON_zherk_c(uplo,trans,N,K,alpha,c_loc(A),LDA,beta,c_loc(C),LDC)
+  end subroutine CHAMELEON_zherk
+
+  subroutine CHAMELEON_zher2k(uplo,trans,N,K,alpha,A,LDA,B,LDB,beta,C,LDC,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: K
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDB
+    integer(kind=c_int), intent(in) :: LDC
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: trans
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in) :: alpha
+    complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
+    complex(kind=c_double_complex), intent(in), target :: B(LDB,*)
+    complex(kind=c_double_complex), intent(inout), target :: C(LDC,*)
+    real(kind=c_double), intent(in) :: beta
+    info = CHAMELEON_zher2k_c(uplo,trans,N,K,alpha,c_loc(A),LDA,c_loc(B),LDB,beta,c_loc(C),LDC)
+  end subroutine CHAMELEON_zher2k
 #endif
 
-      subroutine CHAMELEON_zheev(jobz,uplo,N,A,LDA,W,T,Q,LDQ,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDQ
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: jobz
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         real(kind=c_double), intent(out), target :: W(*)
-         complex(kind=c_double_complex), intent(out), target :: Q(LDQ,*)
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zheev_c(jobz,uplo,N,c_loc(A),LDA,c_loc(W),T,c_loc(Q),LDQ)
-      end subroutine CHAMELEON_zheev
-
-      subroutine CHAMELEON_zheevd(jobz,uplo,N,A,LDA,W,T,Q,LDQ,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDQ
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: jobz
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         real(kind=c_double), intent(out), target :: W(*)
-         complex(kind=c_double_complex), intent(out), target :: Q(LDQ,*)
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zheevd_c(jobz,uplo,N,c_loc(A),LDA,c_loc(W),T,c_loc(Q),LDQ)
-      end subroutine CHAMELEON_zheevd
-
-      subroutine CHAMELEON_zhegv(itype,jobz,uplo,N,A,LDA,B,LDB,W,T,Q,LDQ,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDB
-         integer(kind=c_int), intent(in) :: LDQ
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: itype
-         integer(kind=c_int), intent(in) :: jobz
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
-         real(kind=c_double), intent(out), target :: W(*)
-         complex(kind=c_double_complex), intent(out), target :: Q(LDQ,*)
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zhegv_c(itype,jobz,uplo,N,c_loc(A),LDA,c_loc(B),LDB,c_loc(W),T,c_loc(Q),LDQ)
-      end subroutine CHAMELEON_zhegv
-
-      subroutine CHAMELEON_zhegvd(itype,jobz,uplo,N,A,LDA,B,LDB,W,T,Q,LDQ,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDB
-         integer(kind=c_int), intent(in) :: LDQ
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: itype
-         integer(kind=c_int), intent(in) :: jobz
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
-         real(kind=c_double), intent(out), target :: W(*)
-         complex(kind=c_double_complex), intent(out), target :: Q(LDQ,*)
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zhegvd_c(itype,jobz,uplo,N,c_loc(A),LDA,c_loc(B),LDB,c_loc(W),T,c_loc(Q),LDQ)
-      end subroutine CHAMELEON_zhegvd
-
-      subroutine CHAMELEON_zhegst(itype,uplo,N,A,LDA,B,LDB,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDB
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: itype
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in), target :: B(LDB,*)
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         info = CHAMELEON_zhegst_c(itype,uplo,N,c_loc(A),LDA,c_loc(B),LDB)
-      end subroutine CHAMELEON_zhegst
-
-      subroutine CHAMELEON_zhetrd(jobz,uplo,N,A,LDA,D,E,descT,Q,LDQ,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: jobz
-         integer(kind=c_int), intent(in) :: uplo
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDQ
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         real(kind=c_double), intent(out), target :: D(*)
-         real(kind=c_double), intent(out), target :: E(*)
-         type(c_ptr), value :: descT ! Arg managed by CHAMELEON: opaque to Fortran
-         complex(kind=c_double_complex), intent(inout), target :: Q(LDQ,*)
-         info = CHAMELEON_zhetrd_c(jobz,uplo,N,c_loc(A),LDA,c_loc(D),c_loc(E),descT,c_loc(Q),LDQ)
-      end subroutine CHAMELEON_zhetrd
-
-      function CHAMELEON_zlange(norm,M,N,A,LDA,work)
-         use iso_c_binding
-         implicit none
-         real(kind=c_double) :: CHAMELEON_zlange
-         real(kind=c_double), intent(inout), target :: work(*)
-         integer(kind=c_int), intent(in) :: norm
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
-         CHAMELEON_zlange = CHAMELEON_zlange_c(norm,M,N,c_loc(A),LDA,c_loc(work))
-      end function CHAMELEON_zlange
+  subroutine CHAMELEON_zheev(jobz,uplo,N,A,LDA,W,T,Q,LDQ,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDQ
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: jobz
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    real(kind=c_double), intent(out), target :: W(*)
+    complex(kind=c_double_complex), intent(out), target :: Q(LDQ,*)
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zheev_c(jobz,uplo,N,c_loc(A),LDA,c_loc(W),T,c_loc(Q),LDQ)
+  end subroutine CHAMELEON_zheev
+
+  subroutine CHAMELEON_zheevd(jobz,uplo,N,A,LDA,W,T,Q,LDQ,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDQ
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: jobz
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    real(kind=c_double), intent(out), target :: W(*)
+    complex(kind=c_double_complex), intent(out), target :: Q(LDQ,*)
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zheevd_c(jobz,uplo,N,c_loc(A),LDA,c_loc(W),T,c_loc(Q),LDQ)
+  end subroutine CHAMELEON_zheevd
+
+  subroutine CHAMELEON_zhegv(itype,jobz,uplo,N,A,LDA,B,LDB,W,T,Q,LDQ,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDB
+    integer(kind=c_int), intent(in) :: LDQ
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: itype
+    integer(kind=c_int), intent(in) :: jobz
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
+    real(kind=c_double), intent(out), target :: W(*)
+    complex(kind=c_double_complex), intent(out), target :: Q(LDQ,*)
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zhegv_c(itype,jobz,uplo,N,c_loc(A),LDA,c_loc(B),LDB,c_loc(W),T,c_loc(Q),LDQ)
+  end subroutine CHAMELEON_zhegv
+
+  subroutine CHAMELEON_zhegvd(itype,jobz,uplo,N,A,LDA,B,LDB,W,T,Q,LDQ,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDB
+    integer(kind=c_int), intent(in) :: LDQ
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: itype
+    integer(kind=c_int), intent(in) :: jobz
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
+    real(kind=c_double), intent(out), target :: W(*)
+    complex(kind=c_double_complex), intent(out), target :: Q(LDQ,*)
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zhegvd_c(itype,jobz,uplo,N,c_loc(A),LDA,c_loc(B),LDB,c_loc(W),T,c_loc(Q),LDQ)
+  end subroutine CHAMELEON_zhegvd
+
+  subroutine CHAMELEON_zhegst(itype,uplo,N,A,LDA,B,LDB,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDB
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: itype
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in), target :: B(LDB,*)
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    info = CHAMELEON_zhegst_c(itype,uplo,N,c_loc(A),LDA,c_loc(B),LDB)
+  end subroutine CHAMELEON_zhegst
+
+  subroutine CHAMELEON_zhetrd(jobz,uplo,N,A,LDA,D,E,descT,Q,LDQ,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: jobz
+    integer(kind=c_int), intent(in) :: uplo
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDQ
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    real(kind=c_double), intent(out), target :: D(*)
+    real(kind=c_double), intent(out), target :: E(*)
+    type(c_ptr), value :: descT ! Arg managed by CHAMELEON: opaque to Fortran
+    complex(kind=c_double_complex), intent(inout), target :: Q(LDQ,*)
+    info = CHAMELEON_zhetrd_c(jobz,uplo,N,c_loc(A),LDA,c_loc(D),c_loc(E),descT,c_loc(Q),LDQ)
+  end subroutine CHAMELEON_zhetrd
+
+  function CHAMELEON_zlange(norm,M,N,A,LDA,work)
+    use iso_c_binding
+    implicit none
+    real(kind=c_double) :: CHAMELEON_zlange
+    real(kind=c_double), intent(inout), target :: work(*)
+    integer(kind=c_int), intent(in) :: norm
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
+    CHAMELEON_zlange = CHAMELEON_zlange_c(norm,M,N,c_loc(A),LDA,c_loc(work))
+  end function CHAMELEON_zlange
 
 #if defined(PRECISION_z) || defined(PRECISION_c)
-      function CHAMELEON_zlanhe(norm,uplo,N,A,LDA,work)
-         use iso_c_binding
-         implicit none
-         real(kind=c_double) :: CHAMELEON_zlanhe
-         real(kind=c_double), intent(inout), target :: work(*)
-         integer(kind=c_int), intent(in) :: norm
-         integer(kind=c_int), intent(in) :: uplo
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: N
-         complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
-         CHAMELEON_zlanhe = CHAMELEON_zlanhe_c(norm,uplo,N,c_loc(A),LDA,c_loc(work))
-      end function CHAMELEON_zlanhe
+  function CHAMELEON_zlanhe(norm,uplo,N,A,LDA,work)
+    use iso_c_binding
+    implicit none
+    real(kind=c_double) :: CHAMELEON_zlanhe
+    real(kind=c_double), intent(inout), target :: work(*)
+    integer(kind=c_int), intent(in) :: norm
+    integer(kind=c_int), intent(in) :: uplo
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: N
+    complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
+    CHAMELEON_zlanhe = CHAMELEON_zlanhe_c(norm,uplo,N,c_loc(A),LDA,c_loc(work))
+  end function CHAMELEON_zlanhe
 #endif
 
-      function CHAMELEON_zlansy(norm,uplo,N,A,LDA,work)
-         use iso_c_binding
-         implicit none
-         real(kind=c_double) :: CHAMELEON_zlansy
-         real(kind=c_double), intent(inout), target :: work(*)
-         integer(kind=c_int), intent(in) :: norm
-         integer(kind=c_int), intent(in) :: uplo
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: N
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         CHAMELEON_zlansy = CHAMELEON_zlansy_c(norm,uplo,N,c_loc(A),LDA,c_loc(work))
-      end function CHAMELEON_zlansy
-
-      subroutine CHAMELEON_zlaswp(N,A,LDA,K1,K2,IPIV,INCX,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: INCX
-         integer(kind=c_int), intent(in) :: K1
-         integer(kind=c_int), intent(in) :: K2
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in), target :: IPIV(*)
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         info = CHAMELEON_zlaswp_c(N,c_loc(A),LDA,K1,K2,c_loc(IPIV),INCX)
-      end subroutine CHAMELEON_zlaswp
-
-      subroutine CHAMELEON_zlauum(uplo,N,A,LDA,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         info = CHAMELEON_zlauum_c(uplo,N,c_loc(A),LDA)
-      end subroutine CHAMELEON_zlauum
+  function CHAMELEON_zlansy(norm,uplo,N,A,LDA,work)
+    use iso_c_binding
+    implicit none
+    real(kind=c_double) :: CHAMELEON_zlansy
+    real(kind=c_double), intent(inout), target :: work(*)
+    integer(kind=c_int), intent(in) :: norm
+    integer(kind=c_int), intent(in) :: uplo
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: N
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    CHAMELEON_zlansy = CHAMELEON_zlansy_c(norm,uplo,N,c_loc(A),LDA,c_loc(work))
+  end function CHAMELEON_zlansy
+
+  subroutine CHAMELEON_zlaswp(N,A,LDA,K1,K2,IPIV,INCX,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: INCX
+    integer(kind=c_int), intent(in) :: K1
+    integer(kind=c_int), intent(in) :: K2
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in), target :: IPIV(*)
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    info = CHAMELEON_zlaswp_c(N,c_loc(A),LDA,K1,K2,c_loc(IPIV),INCX)
+  end subroutine CHAMELEON_zlaswp
+
+  subroutine CHAMELEON_zlauum(uplo,N,A,LDA,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    info = CHAMELEON_zlauum_c(uplo,N,c_loc(A),LDA)
+  end subroutine CHAMELEON_zlauum
 
 #if defined(PRECISION_z) || defined(PRECISION_c)
-      subroutine CHAMELEON_zplghe(bump,uplo,N,A,LDA,seed,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         real(kind=c_double), intent(in) :: bump
-         integer(kind=c_int), intent(in) :: uplo
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_long_long), intent(in) :: seed
-         complex(kind=c_double_complex), intent(out), target :: A(LDA,*)
-         info = CHAMELEON_zplghe_c(bump,N,c_loc(A),LDA,seed)
-       end subroutine CHAMELEON_zplghe
+  subroutine CHAMELEON_zplghe(bump,uplo,N,A,LDA,seed,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    real(kind=c_double), intent(in) :: bump
+    integer(kind=c_int), intent(in) :: uplo
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_long_long), intent(in) :: seed
+    complex(kind=c_double_complex), intent(out), target :: A(LDA,*)
+    info = CHAMELEON_zplghe_c(bump,N,c_loc(A),LDA,seed)
+  end subroutine CHAMELEON_zplghe
 #endif
 
-      subroutine CHAMELEON_zplgsy(bump,uplo,N,A,LDA,seed,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         complex(kind=c_double_complex), intent(in) :: bump
-         integer(kind=c_int), intent(in) :: uplo
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_long_long), intent(in) :: seed
-         complex(kind=c_double_complex), intent(out), target :: A(LDA,*)
-         info = CHAMELEON_zplgsy_c(bump,N,c_loc(A),LDA,seed)
-      end subroutine CHAMELEON_zplgsy
-       
-      subroutine CHAMELEON_zplrnt(M,N,A,LDA,seed,info) 
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_long_long), intent(in) :: seed
-         complex(kind=c_double_complex), intent(out), target :: A(LDA,*)
-         info = CHAMELEON_zplrnt_c(M,N,c_loc(A),LDA,seed)
-      end subroutine CHAMELEON_zplrnt
-       
-      subroutine CHAMELEON_zposv(uplo,N,NRHS,A,LDA,B,LDB,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDB
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: NRHS
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
-         info = CHAMELEON_zposv_c(uplo,N,NRHS,c_loc(A),LDA,c_loc(B),LDB)
-      end subroutine CHAMELEON_zposv
-
-      subroutine CHAMELEON_zpotrf(uplo,N,A,LDA,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         info = CHAMELEON_zpotrf_c(uplo,N,c_loc(A),LDA)
-      end subroutine CHAMELEON_zpotrf
-
-      subroutine CHAMELEON_zsytrf(uplo,N,A,LDA,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         info = CHAMELEON_zsytrf_c(uplo,N,c_loc(A),LDA)
-      end subroutine CHAMELEON_zsytrf
-
-      subroutine CHAMELEON_zpotri(uplo,N,A,LDA,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         info = CHAMELEON_zpotri_c(uplo,N,c_loc(A),LDA)
-      end subroutine CHAMELEON_zpotri
-
-      subroutine CHAMELEON_zpotrs(uplo,N,NRHS,A,LDA,B,LDB,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDB
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: NRHS
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
-         complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
-         info = CHAMELEON_zpotrs_c(uplo,N,NRHS,c_loc(A),LDA,c_loc(B),LDB)
-      end subroutine CHAMELEON_zpotrs
-
-      subroutine CHAMELEON_zsytrs(uplo,N,NRHS,A,LDA,B,LDB,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDB
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: NRHS
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
-         complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
-         info = CHAMELEON_zsytrs_c(uplo,N,NRHS,c_loc(A),LDA,c_loc(B),LDB)
-      end subroutine CHAMELEON_zsytrs
-
-      subroutine CHAMELEON_zsymm(side,uplo,M,N,alpha,A,LDA,B,LDB,beta,C,LDC,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDB
-         integer(kind=c_int), intent(in) :: LDC
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: side
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in) :: alpha
-         complex(kind=c_double_complex), intent(in) :: beta
-         complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
-         complex(kind=c_double_complex), intent(in), target :: B(LDB,*)
-         complex(kind=c_double_complex), intent(inout), target :: C(LDC,*)
-         info = CHAMELEON_zsymm_c(side,uplo,M,N,alpha,c_loc(A),LDA,c_loc(B),LDB,beta,c_loc(C),LDC)
-      end subroutine CHAMELEON_zsymm
-
-      subroutine CHAMELEON_zsyrk(uplo,trans,N,K,alpha,A,LDA,beta,C,LDC,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: K
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDC
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: trans
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in) :: alpha
-         complex(kind=c_double_complex), intent(in) :: beta
-         complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
-         complex(kind=c_double_complex), intent(inout), target :: C(LDC,*)
-         info = CHAMELEON_zsyrk_c(uplo,trans,N,K,alpha,c_loc(A),LDA,beta,c_loc(C),LDC)
-      end subroutine CHAMELEON_zsyrk
-
-      subroutine CHAMELEON_zsyr2k(uplo,trans,N,K,alpha,A,LDA,B,LDB,beta,C,LDC,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: K
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDB
-         integer(kind=c_int), intent(in) :: LDC
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: trans
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in) :: alpha
-         complex(kind=c_double_complex), intent(in) :: beta
-         complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
-         complex(kind=c_double_complex), intent(in), target :: B(LDB,*)
-         complex(kind=c_double_complex), intent(inout), target :: C(LDC,*)
-         info = CHAMELEON_zsyr2k_c(uplo,trans,N,K,alpha,c_loc(A),LDA,c_loc(B),LDB,beta,c_loc(C),LDC)
-      end subroutine CHAMELEON_zsyr2k
-
-      subroutine CHAMELEON_ztrmm(side,uplo,transA,diag,N,NRHS,alpha,A,LDA,B,LDB,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDB
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: NRHS
-         integer(kind=c_int), intent(in) :: diag
-         integer(kind=c_int), intent(in) :: side
-         integer(kind=c_int), intent(in) :: transA
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in) :: alpha
-         complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
-         complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
-         info = CHAMELEON_ztrmm_c(side,uplo,transA,diag,N,NRHS,alpha,c_loc(A),LDA,c_loc(B),LDB)
-      end subroutine CHAMELEON_ztrmm
-
-      subroutine CHAMELEON_ztrsm(side,uplo,transA,diag,N,NRHS,alpha,A,LDA,B,LDB,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDB
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: NRHS
-         integer(kind=c_int), intent(in) :: diag
-         integer(kind=c_int), intent(in) :: side
-         integer(kind=c_int), intent(in) :: transA
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in) :: alpha
-         complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
-         complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
-         info = CHAMELEON_ztrsm_c(side,uplo,transA,diag,N,NRHS,alpha,c_loc(A),LDA,c_loc(B),LDB)
-      end subroutine CHAMELEON_ztrsm
-
-      subroutine CHAMELEON_ztrsmpl(N,NRHS,A,LDA,L,IPIV,B,LDB,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDB
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: NRHS
-         complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
-         type(c_ptr), value :: L    ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: IPIV ! Arg managed by CHAMELEON: opaque to Fortran
-         complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
-         info = CHAMELEON_ztrsmpl_c(N,NRHS,c_loc(A),LDA,L,IPIV,c_loc(B),LDB)
-      end subroutine CHAMELEON_ztrsmpl
-
-      subroutine CHAMELEON_ztrtri(uplo,diag,N,A,LDA,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: diag
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         info = CHAMELEON_ztrtri_c(uplo,diag,N,c_loc(A),LDA)
-      end subroutine CHAMELEON_ztrtri
-
-      subroutine CHAMELEON_zunglq(M,N,K,A,LDA,T,B,LDB,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         integer(kind=c_int), intent(in) :: K
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDB
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         complex(kind=c_double_complex), intent(out), target :: B(LDB,*)
-         info = CHAMELEON_zunglq_c(M,N,K,c_loc(A),LDA,T,c_loc(B),LDB)
-      end subroutine CHAMELEON_zunglq
-
-      subroutine CHAMELEON_zungqr(M,N,K,A,LDA,T,B,LDB,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         integer(kind=c_int), intent(in) :: K
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDB
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         complex(kind=c_double_complex), intent(out), target :: B(LDB,*)
-         info = CHAMELEON_zungqr_c(M,N,K,c_loc(A),LDA,T,c_loc(B),LDB)
-      end subroutine CHAMELEON_zungqr
-
-      subroutine CHAMELEON_zunmlq(side,trans,M,N,K,A,LDA,T,B,LDB,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         integer(kind=c_int), intent(in) :: K
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDB
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: side
-         integer(kind=c_int), intent(in) :: trans
-         complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
-         complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
-         info = CHAMELEON_zunmlq_c(side,trans,M,N,K,c_loc(A),LDA,T,c_loc(B),LDB)
-      end subroutine CHAMELEON_zunmlq
-
-      subroutine CHAMELEON_zunmqr(side,trans,M,N,K,A,LDA,T,B,LDB,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         integer(kind=c_int), intent(in) :: K
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDB
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: side
-         integer(kind=c_int), intent(in) :: trans
-         complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
-         complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
-         info = CHAMELEON_zunmqr_c(side,trans,M,N,K,c_loc(A),LDA,T,c_loc(B),LDB)
-      end subroutine CHAMELEON_zunmqr
-
-      subroutine CHAMELEON_zgecfi(m,n,A,fin,imb,inb,fout,omb,onb,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         complex(kind=c_double_complex), intent(inout), target :: A(*)
-         integer(kind=c_int), intent(in) :: fin
-         integer(kind=c_int), intent(in) :: fout
-         integer(kind=c_int), intent(in) :: imb
-         integer(kind=c_int), intent(in) :: inb
-         integer(kind=c_int), intent(in) :: omb
-         integer(kind=c_int), intent(in) :: onb
-         integer(kind=c_int), intent(in) :: m
-         integer(kind=c_int), intent(in) :: n
-         info = CHAMELEON_zgecfi_c(m,n,c_loc(A),fin,imb,inb,fout,omb,onb)
-      end subroutine CHAMELEON_zgecfi
-
-      subroutine CHAMELEON_zgetmi(m,n,A,fin,mb,nb,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         complex(kind=c_double_complex), intent(inout), target :: A(*)
-         integer(kind=c_int), intent(in) :: fin
-         integer(kind=c_int), intent(in) :: mb
-         integer(kind=c_int), intent(in) :: nb
-         integer(kind=c_int), intent(in) :: m
-         integer(kind=c_int), intent(in) :: n
-         info = CHAMELEON_zgetmi_c(m,n,c_loc(A),fin,mb,nb)
-      end subroutine CHAMELEON_zgetmi
-
-      subroutine CHAMELEON_zgetri(N,A,LDA,IPIV,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in), target :: IPIV(*)
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         info = CHAMELEON_zgetri_c(N,c_loc(A),LDA,c_loc(IPIV))
-      end subroutine CHAMELEON_zgetri
-
-      subroutine CHAMELEON_zlacpy(uplo,M,N,A,LDA,B,LDB,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDB
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
-         complex(kind=c_double_complex), intent(out), target :: B(LDB,*)
-         info = CHAMELEON_zlacpy_c(uplo,M,N,c_loc(A),LDA,c_loc(B),LDB)
-      end subroutine CHAMELEON_zlacpy
-
-      subroutine CHAMELEON_zlaset(uplo,M,N,alpha,beta,A,LDA,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in) :: alpha
-         complex(kind=c_double_complex), intent(in) :: beta
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         info = CHAMELEON_zlaset_c(uplo,M,N,alpha,beta,c_loc(A),LDA)
-      end subroutine CHAMELEON_zlaset
-
-      subroutine CHAMELEON_zlaswpc(N,A,LDA,K1,K2,IPIV,INCX,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in), target :: IPIV(*)
-         integer(kind=c_int), intent(in) :: INCX
-         integer(kind=c_int), intent(in) :: K1
-         integer(kind=c_int), intent(in) :: K2
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: N
-         complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
-         info = CHAMELEON_zlaswpc_c(N,c_loc(A),LDA,K1,K2,c_loc(IPIV),INCX)
-      end subroutine CHAMELEON_zlaswpc
-
-      subroutine CHAMELEON_ztrsmrv(side,uplo,transA,diag,N,NRHS,alpha,A,LDA,B,LDB,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: diag
-         integer(kind=c_int), intent(in) :: side
-         integer(kind=c_int), intent(in) :: transA
-         integer(kind=c_int), intent(in) :: uplo
-         integer(kind=c_int), intent(in) :: LDA
-         integer(kind=c_int), intent(in) :: LDB
-         integer(kind=c_int), intent(in) :: N
-         integer(kind=c_int), intent(in) :: NRHS
-         complex(kind=c_double_complex), intent(in) :: alpha
-         complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
-         complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
-         info = CHAMELEON_ztrsmrv_c(side,uplo,transA,diag,N,NRHS,alpha,c_loc(A),LDA,c_loc(B),LDB)
-      end subroutine CHAMELEON_ztrsmrv
-
-      subroutine CHAMELEON_zgebrd_Tile(A,D,E,T,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         real(kind=c_double), intent(out), target :: D(*)
-         real(kind=c_double), intent(out), target :: E(*)
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgebrd_Tile_c(A,c_loc(D),c_loc(E),T)
-      end subroutine CHAMELEON_zgebrd_Tile
-
-      subroutine CHAMELEON_zgelqf_Tile(A,T,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgelqf_Tile_c(A,T)
-      end subroutine CHAMELEON_zgelqf_Tile
-
-      subroutine CHAMELEON_zgelqs_Tile(A,T,B,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgelqs_Tile_c(A,T,B)
-      end subroutine CHAMELEON_zgelqs_Tile
-
-      subroutine CHAMELEON_zgels_Tile(trans,A,T,B,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: trans
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgels_Tile_c(trans,A,T,B)
-      end subroutine CHAMELEON_zgels_Tile
-
-      subroutine CHAMELEON_zgemm_Tile(transA,transB,alpha,A,B,beta,C,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: transA
-         integer(kind=c_int), intent(in) :: transB
-         complex(kind=c_double_complex), intent(in) :: alpha
-         complex(kind=c_double_complex), intent(in) :: beta
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: C ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgemm_Tile_c(transA,transB,alpha,A,B,beta,C)
-      end subroutine CHAMELEON_zgemm_Tile
-
-      subroutine CHAMELEON_zgeqrf_Tile(A,T,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgeqrf_Tile_c(A,T)
-      end subroutine CHAMELEON_zgeqrf_Tile
-
-      subroutine CHAMELEON_zgeqrs_Tile(A,T,B,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgeqrs_Tile_c(A,T,B)
-      end subroutine CHAMELEON_zgeqrs_Tile
-
-      subroutine CHAMELEON_zgesv_Tile(A,IPIV,B,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(out), target :: IPIV(*)
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgesv_Tile_c(A,c_loc(IPIV),B)
-      end subroutine CHAMELEON_zgesv_Tile
-
-      subroutine CHAMELEON_zgesv_incpiv_Tile(A,L,IPIV,B,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: IPIV ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: L ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgesv_incpiv_Tile_c(A,L,IPIV,B)
-      end subroutine CHAMELEON_zgesv_incpiv_Tile
-
-      subroutine CHAMELEON_zgesvd_Tile(jobu,jobvt,A,S,U,VT,T,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: jobu
-         integer(kind=c_int), intent(in) :: jobvt
-         real(kind=c_double), intent(out), target :: S(*)
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: U ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: VT ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgesvd_Tile_c(jobu,jobvt,A,c_loc(S),U,VT,T)
-      end subroutine CHAMELEON_zgesvd_Tile
-
-      subroutine CHAMELEON_zgetrf_Tile(A,IPIV,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(out), target :: IPIV(*)
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgetrf_Tile_c(A,c_loc(IPIV))
-      end subroutine CHAMELEON_zgetrf_Tile
-
-      subroutine CHAMELEON_zgetrf_incpiv_Tile(A,L,IPIV,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: IPIV ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: L ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgetrf_incpiv_Tile_c(A,L,IPIV)
-      end subroutine CHAMELEON_zgetrf_incpiv_Tile
-
-      subroutine CHAMELEON_zgetrf_nopiv_Tile(A,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgetrf_nopiv_Tile_c(A)
-      end subroutine CHAMELEON_zgetrf_nopiv_Tile
-
-      subroutine CHAMELEON_zgetrs_Tile(trans,A,IPIV,B,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: trans
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         integer(kind=c_int), intent(in), target :: IPIV(*)
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgetrs_Tile_c(trans,A,c_loc(IPIV),B)
-      end subroutine CHAMELEON_zgetrs_Tile
-
-      subroutine CHAMELEON_zgetrs_incpiv_Tile(A,L,IPIV,B,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: L ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: IPIV ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgetrs_incpiv_Tile_c(A,L,IPIV,B)
-      end subroutine CHAMELEON_zgetrs_incpiv_Tile
+  subroutine CHAMELEON_zplgsy(bump,uplo,N,A,LDA,seed,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    complex(kind=c_double_complex), intent(in) :: bump
+    integer(kind=c_int), intent(in) :: uplo
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_long_long), intent(in) :: seed
+    complex(kind=c_double_complex), intent(out), target :: A(LDA,*)
+    info = CHAMELEON_zplgsy_c(bump,N,c_loc(A),LDA,seed)
+  end subroutine CHAMELEON_zplgsy
+
+  subroutine CHAMELEON_zplrnt(M,N,A,LDA,seed,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_long_long), intent(in) :: seed
+    complex(kind=c_double_complex), intent(out), target :: A(LDA,*)
+    info = CHAMELEON_zplrnt_c(M,N,c_loc(A),LDA,seed)
+  end subroutine CHAMELEON_zplrnt
+
+  subroutine CHAMELEON_zposv(uplo,N,NRHS,A,LDA,B,LDB,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDB
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: NRHS
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
+    info = CHAMELEON_zposv_c(uplo,N,NRHS,c_loc(A),LDA,c_loc(B),LDB)
+  end subroutine CHAMELEON_zposv
+
+  subroutine CHAMELEON_zpotrf(uplo,N,A,LDA,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    info = CHAMELEON_zpotrf_c(uplo,N,c_loc(A),LDA)
+  end subroutine CHAMELEON_zpotrf
+
+  subroutine CHAMELEON_zsytrf(uplo,N,A,LDA,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    info = CHAMELEON_zsytrf_c(uplo,N,c_loc(A),LDA)
+  end subroutine CHAMELEON_zsytrf
+
+  subroutine CHAMELEON_zpotri(uplo,N,A,LDA,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    info = CHAMELEON_zpotri_c(uplo,N,c_loc(A),LDA)
+  end subroutine CHAMELEON_zpotri
+
+  subroutine CHAMELEON_zpotrs(uplo,N,NRHS,A,LDA,B,LDB,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDB
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: NRHS
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
+    complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
+    info = CHAMELEON_zpotrs_c(uplo,N,NRHS,c_loc(A),LDA,c_loc(B),LDB)
+  end subroutine CHAMELEON_zpotrs
+
+  subroutine CHAMELEON_zsytrs(uplo,N,NRHS,A,LDA,B,LDB,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDB
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: NRHS
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
+    complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
+    info = CHAMELEON_zsytrs_c(uplo,N,NRHS,c_loc(A),LDA,c_loc(B),LDB)
+  end subroutine CHAMELEON_zsytrs
+
+  subroutine CHAMELEON_zsymm(side,uplo,M,N,alpha,A,LDA,B,LDB,beta,C,LDC,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDB
+    integer(kind=c_int), intent(in) :: LDC
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: side
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in) :: alpha
+    complex(kind=c_double_complex), intent(in) :: beta
+    complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
+    complex(kind=c_double_complex), intent(in), target :: B(LDB,*)
+    complex(kind=c_double_complex), intent(inout), target :: C(LDC,*)
+    info = CHAMELEON_zsymm_c(side,uplo,M,N,alpha,c_loc(A),LDA,c_loc(B),LDB,beta,c_loc(C),LDC)
+  end subroutine CHAMELEON_zsymm
+
+  subroutine CHAMELEON_zsyrk(uplo,trans,N,K,alpha,A,LDA,beta,C,LDC,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: K
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDC
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: trans
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in) :: alpha
+    complex(kind=c_double_complex), intent(in) :: beta
+    complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
+    complex(kind=c_double_complex), intent(inout), target :: C(LDC,*)
+    info = CHAMELEON_zsyrk_c(uplo,trans,N,K,alpha,c_loc(A),LDA,beta,c_loc(C),LDC)
+  end subroutine CHAMELEON_zsyrk
+
+  subroutine CHAMELEON_zsyr2k(uplo,trans,N,K,alpha,A,LDA,B,LDB,beta,C,LDC,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: K
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDB
+    integer(kind=c_int), intent(in) :: LDC
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: trans
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in) :: alpha
+    complex(kind=c_double_complex), intent(in) :: beta
+    complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
+    complex(kind=c_double_complex), intent(in), target :: B(LDB,*)
+    complex(kind=c_double_complex), intent(inout), target :: C(LDC,*)
+    info = CHAMELEON_zsyr2k_c(uplo,trans,N,K,alpha,c_loc(A),LDA,c_loc(B),LDB,beta,c_loc(C),LDC)
+  end subroutine CHAMELEON_zsyr2k
+
+  subroutine CHAMELEON_ztrmm(side,uplo,transA,diag,N,NRHS,alpha,A,LDA,B,LDB,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDB
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: NRHS
+    integer(kind=c_int), intent(in) :: diag
+    integer(kind=c_int), intent(in) :: side
+    integer(kind=c_int), intent(in) :: transA
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in) :: alpha
+    complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
+    complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
+    info = CHAMELEON_ztrmm_c(side,uplo,transA,diag,N,NRHS,alpha,c_loc(A),LDA,c_loc(B),LDB)
+  end subroutine CHAMELEON_ztrmm
+
+  subroutine CHAMELEON_ztrsm(side,uplo,transA,diag,N,NRHS,alpha,A,LDA,B,LDB,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDB
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: NRHS
+    integer(kind=c_int), intent(in) :: diag
+    integer(kind=c_int), intent(in) :: side
+    integer(kind=c_int), intent(in) :: transA
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in) :: alpha
+    complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
+    complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
+    info = CHAMELEON_ztrsm_c(side,uplo,transA,diag,N,NRHS,alpha,c_loc(A),LDA,c_loc(B),LDB)
+  end subroutine CHAMELEON_ztrsm
+
+  subroutine CHAMELEON_ztrsmpl(N,NRHS,A,LDA,L,IPIV,B,LDB,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDB
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: NRHS
+    complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
+    type(c_ptr), value :: L    ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: IPIV ! Arg managed by CHAMELEON: opaque to Fortran
+    complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
+    info = CHAMELEON_ztrsmpl_c(N,NRHS,c_loc(A),LDA,L,IPIV,c_loc(B),LDB)
+  end subroutine CHAMELEON_ztrsmpl
+
+  subroutine CHAMELEON_ztrtri(uplo,diag,N,A,LDA,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: diag
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    info = CHAMELEON_ztrtri_c(uplo,diag,N,c_loc(A),LDA)
+  end subroutine CHAMELEON_ztrtri
+
+  subroutine CHAMELEON_zunglq(M,N,K,A,LDA,T,B,LDB,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    integer(kind=c_int), intent(in) :: K
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDB
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    complex(kind=c_double_complex), intent(out), target :: B(LDB,*)
+    info = CHAMELEON_zunglq_c(M,N,K,c_loc(A),LDA,T,c_loc(B),LDB)
+  end subroutine CHAMELEON_zunglq
+
+  subroutine CHAMELEON_zungqr(M,N,K,A,LDA,T,B,LDB,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    integer(kind=c_int), intent(in) :: K
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDB
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    complex(kind=c_double_complex), intent(out), target :: B(LDB,*)
+    info = CHAMELEON_zungqr_c(M,N,K,c_loc(A),LDA,T,c_loc(B),LDB)
+  end subroutine CHAMELEON_zungqr
+
+  subroutine CHAMELEON_zunmlq(side,trans,M,N,K,A,LDA,T,B,LDB,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    integer(kind=c_int), intent(in) :: K
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDB
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: side
+    integer(kind=c_int), intent(in) :: trans
+    complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
+    complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
+    info = CHAMELEON_zunmlq_c(side,trans,M,N,K,c_loc(A),LDA,T,c_loc(B),LDB)
+  end subroutine CHAMELEON_zunmlq
+
+  subroutine CHAMELEON_zunmqr(side,trans,M,N,K,A,LDA,T,B,LDB,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    integer(kind=c_int), intent(in) :: K
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDB
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: side
+    integer(kind=c_int), intent(in) :: trans
+    complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
+    complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
+    info = CHAMELEON_zunmqr_c(side,trans,M,N,K,c_loc(A),LDA,T,c_loc(B),LDB)
+  end subroutine CHAMELEON_zunmqr
+
+  subroutine CHAMELEON_zgecfi(m,n,A,fin,imb,inb,fout,omb,onb,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    complex(kind=c_double_complex), intent(inout), target :: A(*)
+    integer(kind=c_int), intent(in) :: fin
+    integer(kind=c_int), intent(in) :: fout
+    integer(kind=c_int), intent(in) :: imb
+    integer(kind=c_int), intent(in) :: inb
+    integer(kind=c_int), intent(in) :: omb
+    integer(kind=c_int), intent(in) :: onb
+    integer(kind=c_int), intent(in) :: m
+    integer(kind=c_int), intent(in) :: n
+    info = CHAMELEON_zgecfi_c(m,n,c_loc(A),fin,imb,inb,fout,omb,onb)
+  end subroutine CHAMELEON_zgecfi
+
+  subroutine CHAMELEON_zgetmi(m,n,A,fin,mb,nb,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    complex(kind=c_double_complex), intent(inout), target :: A(*)
+    integer(kind=c_int), intent(in) :: fin
+    integer(kind=c_int), intent(in) :: mb
+    integer(kind=c_int), intent(in) :: nb
+    integer(kind=c_int), intent(in) :: m
+    integer(kind=c_int), intent(in) :: n
+    info = CHAMELEON_zgetmi_c(m,n,c_loc(A),fin,mb,nb)
+  end subroutine CHAMELEON_zgetmi
+
+  subroutine CHAMELEON_zgetri(N,A,LDA,IPIV,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in), target :: IPIV(*)
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    info = CHAMELEON_zgetri_c(N,c_loc(A),LDA,c_loc(IPIV))
+  end subroutine CHAMELEON_zgetri
+
+  subroutine CHAMELEON_zlacpy(uplo,M,N,A,LDA,B,LDB,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDB
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
+    complex(kind=c_double_complex), intent(out), target :: B(LDB,*)
+    info = CHAMELEON_zlacpy_c(uplo,M,N,c_loc(A),LDA,c_loc(B),LDB)
+  end subroutine CHAMELEON_zlacpy
+
+  subroutine CHAMELEON_zlaset(uplo,M,N,alpha,beta,A,LDA,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in) :: alpha
+    complex(kind=c_double_complex), intent(in) :: beta
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    info = CHAMELEON_zlaset_c(uplo,M,N,alpha,beta,c_loc(A),LDA)
+  end subroutine CHAMELEON_zlaset
+
+  subroutine CHAMELEON_zlaswpc(N,A,LDA,K1,K2,IPIV,INCX,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in), target :: IPIV(*)
+    integer(kind=c_int), intent(in) :: INCX
+    integer(kind=c_int), intent(in) :: K1
+    integer(kind=c_int), intent(in) :: K2
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: N
+    complex(kind=c_double_complex), intent(inout), target :: A(LDA,*)
+    info = CHAMELEON_zlaswpc_c(N,c_loc(A),LDA,K1,K2,c_loc(IPIV),INCX)
+  end subroutine CHAMELEON_zlaswpc
+
+  subroutine CHAMELEON_ztrsmrv(side,uplo,transA,diag,N,NRHS,alpha,A,LDA,B,LDB,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: diag
+    integer(kind=c_int), intent(in) :: side
+    integer(kind=c_int), intent(in) :: transA
+    integer(kind=c_int), intent(in) :: uplo
+    integer(kind=c_int), intent(in) :: LDA
+    integer(kind=c_int), intent(in) :: LDB
+    integer(kind=c_int), intent(in) :: N
+    integer(kind=c_int), intent(in) :: NRHS
+    complex(kind=c_double_complex), intent(in) :: alpha
+    complex(kind=c_double_complex), intent(in), target :: A(LDA,*)
+    complex(kind=c_double_complex), intent(inout), target :: B(LDB,*)
+    info = CHAMELEON_ztrsmrv_c(side,uplo,transA,diag,N,NRHS,alpha,c_loc(A),LDA,c_loc(B),LDB)
+  end subroutine CHAMELEON_ztrsmrv
+
+  subroutine CHAMELEON_zgebrd_Tile(A,D,E,T,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    real(kind=c_double), intent(out), target :: D(*)
+    real(kind=c_double), intent(out), target :: E(*)
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgebrd_Tile_c(A,c_loc(D),c_loc(E),T)
+  end subroutine CHAMELEON_zgebrd_Tile
+
+  subroutine CHAMELEON_zgelqf_Tile(A,T,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgelqf_Tile_c(A,T)
+  end subroutine CHAMELEON_zgelqf_Tile
+
+  subroutine CHAMELEON_zgelqs_Tile(A,T,B,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgelqs_Tile_c(A,T,B)
+  end subroutine CHAMELEON_zgelqs_Tile
+
+  subroutine CHAMELEON_zgels_Tile(trans,A,T,B,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: trans
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgels_Tile_c(trans,A,T,B)
+  end subroutine CHAMELEON_zgels_Tile
+
+  subroutine CHAMELEON_zgemm_Tile(transA,transB,alpha,A,B,beta,C,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: transA
+    integer(kind=c_int), intent(in) :: transB
+    complex(kind=c_double_complex), intent(in) :: alpha
+    complex(kind=c_double_complex), intent(in) :: beta
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: C ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgemm_Tile_c(transA,transB,alpha,A,B,beta,C)
+  end subroutine CHAMELEON_zgemm_Tile
+
+  subroutine CHAMELEON_zgeqrf_Tile(A,T,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgeqrf_Tile_c(A,T)
+  end subroutine CHAMELEON_zgeqrf_Tile
+
+  subroutine CHAMELEON_zgeqrs_Tile(A,T,B,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgeqrs_Tile_c(A,T,B)
+  end subroutine CHAMELEON_zgeqrs_Tile
+
+  subroutine CHAMELEON_zgesv_Tile(A,IPIV,B,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(out), target :: IPIV(*)
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgesv_Tile_c(A,c_loc(IPIV),B)
+  end subroutine CHAMELEON_zgesv_Tile
+
+  subroutine CHAMELEON_zgesv_incpiv_Tile(A,L,IPIV,B,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: IPIV ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: L ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgesv_incpiv_Tile_c(A,L,IPIV,B)
+  end subroutine CHAMELEON_zgesv_incpiv_Tile
+
+  subroutine CHAMELEON_zgesvd_Tile(jobu,jobvt,A,S,U,VT,T,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: jobu
+    integer(kind=c_int), intent(in) :: jobvt
+    real(kind=c_double), intent(out), target :: S(*)
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: U ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: VT ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgesvd_Tile_c(jobu,jobvt,A,c_loc(S),U,VT,T)
+  end subroutine CHAMELEON_zgesvd_Tile
+
+  subroutine CHAMELEON_zgetrf_Tile(A,IPIV,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(out), target :: IPIV(*)
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgetrf_Tile_c(A,c_loc(IPIV))
+  end subroutine CHAMELEON_zgetrf_Tile
+
+  subroutine CHAMELEON_zgetrf_incpiv_Tile(A,L,IPIV,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: IPIV ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: L ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgetrf_incpiv_Tile_c(A,L,IPIV)
+  end subroutine CHAMELEON_zgetrf_incpiv_Tile
+
+  subroutine CHAMELEON_zgetrf_nopiv_Tile(A,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgetrf_nopiv_Tile_c(A)
+  end subroutine CHAMELEON_zgetrf_nopiv_Tile
+
+  subroutine CHAMELEON_zgetrs_Tile(trans,A,IPIV,B,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: trans
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    integer(kind=c_int), intent(in), target :: IPIV(*)
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgetrs_Tile_c(trans,A,c_loc(IPIV),B)
+  end subroutine CHAMELEON_zgetrs_Tile
+
+  subroutine CHAMELEON_zgetrs_incpiv_Tile(A,L,IPIV,B,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: L ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: IPIV ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgetrs_incpiv_Tile_c(A,L,IPIV,B)
+  end subroutine CHAMELEON_zgetrs_incpiv_Tile
 
 #if defined(PRECISION_z) || defined(PRECISION_c)
-      subroutine CHAMELEON_zhemm_Tile(side,uplo,alpha,A,B,beta,C,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: side
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in) :: alpha
-         complex(kind=c_double_complex), intent(in) :: beta
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: C ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zhemm_Tile_c(side,uplo,alpha,A,B,beta,C)
-      end subroutine CHAMELEON_zhemm_Tile
-
-      subroutine CHAMELEON_zherk_Tile(uplo,trans,alpha,A,beta,C,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: trans
-         integer(kind=c_int), intent(in) :: uplo
-         real(kind=c_double), intent(in) :: alpha
-         real(kind=c_double), intent(in) :: beta
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: C ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zherk_Tile_c(uplo,trans,alpha,A,beta,C)
-      end subroutine CHAMELEON_zherk_Tile
-
-      subroutine CHAMELEON_zher2k_Tile(uplo,trans,alpha,A,B,beta,C,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: trans
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in) :: alpha
-         real(kind=c_double), intent(in) :: beta
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: C ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zher2k_Tile_c(uplo,trans,alpha,A,B,beta,C)
-      end subroutine CHAMELEON_zher2k_Tile
+  subroutine CHAMELEON_zhemm_Tile(side,uplo,alpha,A,B,beta,C,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: side
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in) :: alpha
+    complex(kind=c_double_complex), intent(in) :: beta
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: C ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zhemm_Tile_c(side,uplo,alpha,A,B,beta,C)
+  end subroutine CHAMELEON_zhemm_Tile
+
+  subroutine CHAMELEON_zherk_Tile(uplo,trans,alpha,A,beta,C,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: trans
+    integer(kind=c_int), intent(in) :: uplo
+    real(kind=c_double), intent(in) :: alpha
+    real(kind=c_double), intent(in) :: beta
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: C ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zherk_Tile_c(uplo,trans,alpha,A,beta,C)
+  end subroutine CHAMELEON_zherk_Tile
+
+  subroutine CHAMELEON_zher2k_Tile(uplo,trans,alpha,A,B,beta,C,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: trans
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in) :: alpha
+    real(kind=c_double), intent(in) :: beta
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: C ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zher2k_Tile_c(uplo,trans,alpha,A,B,beta,C)
+  end subroutine CHAMELEON_zher2k_Tile
 #endif
 
-      subroutine CHAMELEON_zheev_Tile(jobz,uplo,A,W,T,Q,LDQ,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: jobz
-         integer(kind=c_int), intent(in) :: uplo
-         integer(kind=c_int), intent(in) :: LDQ
-         real(kind=c_double), intent(out), target :: W(*)
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         complex(kind=c_double_complex), intent(out), target :: Q(LDQ,*)
-         info = CHAMELEON_zheev_Tile_c(jobz,uplo,A,c_loc(W),T,c_loc(Q),LDQ)
-      end subroutine CHAMELEON_zheev_Tile
-
-      subroutine CHAMELEON_zheevd_Tile(jobz,uplo,A,W,T,Q,LDQ,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: jobz
-         integer(kind=c_int), intent(in) :: uplo
-         integer(kind=c_int), intent(in) :: LDQ
-         real(kind=c_double), intent(out), target :: W(*)
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         complex(kind=c_double_complex), intent(out), target :: Q(LDQ,*)
-         info = CHAMELEON_zheevd_Tile_c(jobz,uplo,A,c_loc(W),T,c_loc(Q),LDQ)
-      end subroutine CHAMELEON_zheevd_Tile
-
-      subroutine CHAMELEON_zhegv_Tile(itype,jobz,uplo,A,B,W,T,Q,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: itype
-         integer(kind=c_int), intent(in) :: jobz
-         integer(kind=c_int), intent(in) :: uplo
-         real(kind=c_double), intent(out), target :: W(*)
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: Q ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zhegv_Tile_c(itype,jobz,uplo,A,B,c_loc(W),T,Q)
-      end subroutine CHAMELEON_zhegv_Tile
-
-      subroutine CHAMELEON_zhegvd_Tile(itype,jobz,uplo,A,B,W,T,Q,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: itype
-         integer(kind=c_int), intent(in) :: jobz
-         integer(kind=c_int), intent(in) :: uplo
-         real(kind=c_double), intent(out), target :: W(*)
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: Q ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zhegvd_Tile_c(itype,jobz,uplo,A,B,c_loc(W),T,Q)
-      end subroutine CHAMELEON_zhegvd_Tile
-
-      subroutine CHAMELEON_zhegst_Tile(itype,uplo,A,B,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: itype
-         integer(kind=c_int), intent(in) :: uplo
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zhegst_Tile_c(itype,uplo,A,B)
-      end subroutine CHAMELEON_zhegst_Tile
-
-      subroutine CHAMELEON_zhetrd_Tile(jobz,uplo,A,D,E,T,Q,LDQ,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: jobz
-         integer(kind=c_int), intent(in) :: uplo
-         integer(kind=c_int), intent(in) :: LDQ
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         real(kind=c_double), intent(out), target :: D(*)
-         real(kind=c_double), intent(out), target :: E(*)
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         complex(kind=c_double_complex), intent(out), target :: Q(LDQ,*)
-         info = CHAMELEON_zhetrd_Tile_c(jobz,uplo,A,c_loc(D),c_loc(E),T,c_loc(Q),LDQ)
-      end subroutine CHAMELEON_zhetrd_Tile
-
-      function CHAMELEON_zlange_Tile(norm,A,work)
-         use iso_c_binding
-         implicit none
-         real(kind=c_double) :: CHAMELEON_zlange_Tile
-         integer(kind=c_int), intent(in) :: norm
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         real(kind=c_double), intent(inout), target :: work(*)
-         CHAMELEON_zlange_Tile = CHAMELEON_zlange_Tile_c(norm,A,c_loc(work))
-       end function CHAMELEON_zlange_Tile
+  subroutine CHAMELEON_zheev_Tile(jobz,uplo,A,W,T,Q,LDQ,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: jobz
+    integer(kind=c_int), intent(in) :: uplo
+    integer(kind=c_int), intent(in) :: LDQ
+    real(kind=c_double), intent(out), target :: W(*)
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    complex(kind=c_double_complex), intent(out), target :: Q(LDQ,*)
+    info = CHAMELEON_zheev_Tile_c(jobz,uplo,A,c_loc(W),T,c_loc(Q),LDQ)
+  end subroutine CHAMELEON_zheev_Tile
+
+  subroutine CHAMELEON_zheevd_Tile(jobz,uplo,A,W,T,Q,LDQ,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: jobz
+    integer(kind=c_int), intent(in) :: uplo
+    integer(kind=c_int), intent(in) :: LDQ
+    real(kind=c_double), intent(out), target :: W(*)
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    complex(kind=c_double_complex), intent(out), target :: Q(LDQ,*)
+    info = CHAMELEON_zheevd_Tile_c(jobz,uplo,A,c_loc(W),T,c_loc(Q),LDQ)
+  end subroutine CHAMELEON_zheevd_Tile
+
+  subroutine CHAMELEON_zhegv_Tile(itype,jobz,uplo,A,B,W,T,Q,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: itype
+    integer(kind=c_int), intent(in) :: jobz
+    integer(kind=c_int), intent(in) :: uplo
+    real(kind=c_double), intent(out), target :: W(*)
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: Q ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zhegv_Tile_c(itype,jobz,uplo,A,B,c_loc(W),T,Q)
+  end subroutine CHAMELEON_zhegv_Tile
+
+  subroutine CHAMELEON_zhegvd_Tile(itype,jobz,uplo,A,B,W,T,Q,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: itype
+    integer(kind=c_int), intent(in) :: jobz
+    integer(kind=c_int), intent(in) :: uplo
+    real(kind=c_double), intent(out), target :: W(*)
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: Q ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zhegvd_Tile_c(itype,jobz,uplo,A,B,c_loc(W),T,Q)
+  end subroutine CHAMELEON_zhegvd_Tile
+
+  subroutine CHAMELEON_zhegst_Tile(itype,uplo,A,B,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: itype
+    integer(kind=c_int), intent(in) :: uplo
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zhegst_Tile_c(itype,uplo,A,B)
+  end subroutine CHAMELEON_zhegst_Tile
+
+  subroutine CHAMELEON_zhetrd_Tile(jobz,uplo,A,D,E,T,Q,LDQ,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: jobz
+    integer(kind=c_int), intent(in) :: uplo
+    integer(kind=c_int), intent(in) :: LDQ
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    real(kind=c_double), intent(out), target :: D(*)
+    real(kind=c_double), intent(out), target :: E(*)
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    complex(kind=c_double_complex), intent(out), target :: Q(LDQ,*)
+    info = CHAMELEON_zhetrd_Tile_c(jobz,uplo,A,c_loc(D),c_loc(E),T,c_loc(Q),LDQ)
+  end subroutine CHAMELEON_zhetrd_Tile
+
+  function CHAMELEON_zlange_Tile(norm,A,work)
+    use iso_c_binding
+    implicit none
+    real(kind=c_double) :: CHAMELEON_zlange_Tile
+    integer(kind=c_int), intent(in) :: norm
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    real(kind=c_double), intent(inout), target :: work(*)
+    CHAMELEON_zlange_Tile = CHAMELEON_zlange_Tile_c(norm,A,c_loc(work))
+  end function CHAMELEON_zlange_Tile
 
 #if defined(PRECISION_z) || defined(PRECISION_c)
-      function CHAMELEON_zlanhe_Tile(norm,uplo,A,work)
-         use iso_c_binding
-         implicit none
-         real(kind=c_double) :: CHAMELEON_zlanhe_Tile
-         real(kind=c_double), intent(inout), target :: work(*)
-         integer(kind=c_int), intent(in) :: norm
-         integer(kind=c_int), intent(in) :: uplo
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         CHAMELEON_zlanhe_Tile = CHAMELEON_zlanhe_Tile_c(norm,uplo,A,c_loc(work))
-      end function CHAMELEON_zlanhe_Tile
+  function CHAMELEON_zlanhe_Tile(norm,uplo,A,work)
+    use iso_c_binding
+    implicit none
+    real(kind=c_double) :: CHAMELEON_zlanhe_Tile
+    real(kind=c_double), intent(inout), target :: work(*)
+    integer(kind=c_int), intent(in) :: norm
+    integer(kind=c_int), intent(in) :: uplo
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    CHAMELEON_zlanhe_Tile = CHAMELEON_zlanhe_Tile_c(norm,uplo,A,c_loc(work))
+  end function CHAMELEON_zlanhe_Tile
 #endif
 
-      function CHAMELEON_zlansy_Tile(norm,uplo,A,work)
-         use iso_c_binding
-         implicit none
-         real(kind=c_double) :: CHAMELEON_zlansy_Tile
-         real(kind=c_double), intent(inout), target :: work(*)
-         integer(kind=c_int), intent(in) :: norm
-         integer(kind=c_int), intent(in) :: uplo
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         CHAMELEON_zlansy_Tile = CHAMELEON_zlansy_Tile_c(norm,uplo,A,c_loc(work))
-      end function CHAMELEON_zlansy_Tile
-
-      subroutine CHAMELEON_zlaswp_Tile(A,K1,K2,IPIV,INCX,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: INCX
-         integer(kind=c_int), intent(in) :: K1
-         integer(kind=c_int), intent(in) :: K2
-         integer(kind=c_int), intent(in), target :: IPIV(*)
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zlaswp_Tile_c(A,K1,K2,c_loc(IPIV),INCX)
-      end subroutine CHAMELEON_zlaswp_Tile
-
-      subroutine CHAMELEON_zlauum_Tile(uplo,A,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: uplo
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zlauum_Tile_c(uplo,A)
-      end subroutine CHAMELEON_zlauum_Tile
+  function CHAMELEON_zlansy_Tile(norm,uplo,A,work)
+    use iso_c_binding
+    implicit none
+    real(kind=c_double) :: CHAMELEON_zlansy_Tile
+    real(kind=c_double), intent(inout), target :: work(*)
+    integer(kind=c_int), intent(in) :: norm
+    integer(kind=c_int), intent(in) :: uplo
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    CHAMELEON_zlansy_Tile = CHAMELEON_zlansy_Tile_c(norm,uplo,A,c_loc(work))
+  end function CHAMELEON_zlansy_Tile
+
+  subroutine CHAMELEON_zlaswp_Tile(A,K1,K2,IPIV,INCX,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: INCX
+    integer(kind=c_int), intent(in) :: K1
+    integer(kind=c_int), intent(in) :: K2
+    integer(kind=c_int), intent(in), target :: IPIV(*)
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zlaswp_Tile_c(A,K1,K2,c_loc(IPIV),INCX)
+  end subroutine CHAMELEON_zlaswp_Tile
+
+  subroutine CHAMELEON_zlauum_Tile(uplo,A,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: uplo
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zlauum_Tile_c(uplo,A)
+  end subroutine CHAMELEON_zlauum_Tile
 
 #if defined(PRECISION_z) || defined(PRECISION_c)
-      subroutine CHAMELEON_zplghe_Tile(bump,uplo,A,seed,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         real(kind=c_double), intent(in) :: bump
-         integer(kind=c_int), intent(in) :: uplo
-         integer(kind=c_long_long), intent(in) :: seed
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zplghe_Tile_c(bump,A,seed)
-      end subroutine CHAMELEON_zplghe_Tile
+  subroutine CHAMELEON_zplghe_Tile(bump,uplo,A,seed,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    real(kind=c_double), intent(in) :: bump
+    integer(kind=c_int), intent(in) :: uplo
+    integer(kind=c_long_long), intent(in) :: seed
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zplghe_Tile_c(bump,A,seed)
+  end subroutine CHAMELEON_zplghe_Tile
 #endif
 
-      subroutine CHAMELEON_zplgsy_Tile(bump,uplo,A,seed,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         complex(kind=c_double_complex), intent(in) :: bump
-         integer(kind=c_int), intent(in) :: uplo
-         integer(kind=c_long_long), intent(in) :: seed
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zplgsy_Tile_c(bump,A,seed)
-      end subroutine CHAMELEON_zplgsy_Tile
-       
-      subroutine CHAMELEON_zplrnt_Tile(A,seed,info) 
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_long_long), intent(in) :: seed
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zplrnt_Tile_c(A,seed)
-      end subroutine CHAMELEON_zplrnt_Tile
-       
-      subroutine CHAMELEON_zposv_Tile(uplo,A,B,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: uplo
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zposv_Tile_c(uplo,A,B)
-      end subroutine CHAMELEON_zposv_Tile
-
-      subroutine CHAMELEON_zpotrf_Tile(uplo,A,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: uplo
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zpotrf_Tile_c(uplo,A)
-      end subroutine CHAMELEON_zpotrf_Tile
-
-      subroutine CHAMELEON_zsytrf_Tile(uplo,A,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: uplo
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zsytrf_Tile_c(uplo,A)
-      end subroutine CHAMELEON_zsytrf_Tile
-
-      subroutine CHAMELEON_zpotri_Tile(uplo,A,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: uplo
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zpotri_Tile_c(uplo,A)
-      end subroutine CHAMELEON_zpotri_Tile
-
-      subroutine CHAMELEON_zpotrs_Tile(uplo,A,B,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: uplo
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zpotrs_Tile_c(uplo,A,B)
-      end subroutine CHAMELEON_zpotrs_Tile
-
-      subroutine CHAMELEON_zsytrs_Tile(uplo,A,B,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: uplo
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zsytrs_Tile_c(uplo,A,B)
-      end subroutine CHAMELEON_zsytrs_Tile
-
-      subroutine CHAMELEON_zsymm_Tile(side,uplo,alpha,A,B,beta,C,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: side
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in) :: alpha
-         complex(kind=c_double_complex), intent(in) :: beta
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: C ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zsymm_Tile_c(side,uplo,alpha,A,B,beta,C)
-      end subroutine CHAMELEON_zsymm_Tile
-
-      subroutine CHAMELEON_zsyrk_Tile(uplo,trans,alpha,A,beta,C,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: trans
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in) :: alpha
-         complex(kind=c_double_complex), intent(in) :: beta
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: C ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zsyrk_Tile_c(uplo,trans,alpha,A,beta,C)
-      end subroutine CHAMELEON_zsyrk_Tile
-
-      subroutine CHAMELEON_zsyr2k_Tile(uplo,trans,alpha,A,B,beta,C,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: trans
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in) :: alpha
-         complex(kind=c_double_complex), intent(in) :: beta
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: C ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zsyr2k_Tile_c(uplo,trans,alpha,A,B,beta,C)
-      end subroutine CHAMELEON_zsyr2k_Tile
-
-      subroutine CHAMELEON_ztrmm_Tile(side,uplo,transA,diag,alpha,A,B,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: diag
-         integer(kind=c_int), intent(in) :: side
-         integer(kind=c_int), intent(in) :: transA
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in) :: alpha
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_ztrmm_Tile_c(side,uplo,transA,diag,alpha,A,B)
-      end subroutine CHAMELEON_ztrmm_Tile
-
-      subroutine CHAMELEON_ztrsm_Tile(side,uplo,transA,diag,alpha,A,B,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: diag
-         integer(kind=c_int), intent(in) :: side
-         integer(kind=c_int), intent(in) :: transA
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in) :: alpha
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_ztrsm_Tile_c(side,uplo,transA,diag,alpha,A,B)
-      end subroutine CHAMELEON_ztrsm_Tile
-
-      subroutine CHAMELEON_ztrsmpl_Tile(A,L,IPIV,B,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: L ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: IPIV ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_ztrsmpl_Tile_c(A,L,IPIV,B)
-      end subroutine CHAMELEON_ztrsmpl_Tile
-
-      subroutine CHAMELEON_ztrtri_Tile(uplo,diag,A,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: diag
-         integer(kind=c_int), intent(in) :: uplo
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_ztrtri_Tile_c(uplo,diag,A)
-      end subroutine CHAMELEON_ztrtri_Tile
-
-      subroutine CHAMELEON_zunglq_Tile(A,T,B,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zunglq_Tile_c(A,T,B)
-      end subroutine CHAMELEON_zunglq_Tile
-
-      subroutine CHAMELEON_zungqr_Tile(A,T,B,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zungqr_Tile_c(A,T,B)
-      end subroutine CHAMELEON_zungqr_Tile
-
-      subroutine CHAMELEON_zunmlq_Tile(side,trans,A,T,B,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: side
-         integer(kind=c_int), intent(in) :: trans
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zunmlq_Tile_c(side,trans,A,T,B)
-      end subroutine CHAMELEON_zunmlq_Tile
-
-      subroutine CHAMELEON_zunmqr_Tile(side,trans,A,T,B,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: side
-         integer(kind=c_int), intent(in) :: trans
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zunmqr_Tile_c(side,trans,A,T,B)
-      end subroutine CHAMELEON_zunmqr_Tile
-
-      subroutine CHAMELEON_zgetri_Tile(A,IPIV,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in), target :: IPIV(*)
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgetri_Tile_c(A,c_loc(IPIV))
-      end subroutine CHAMELEON_zgetri_Tile
-
-      subroutine CHAMELEON_zlacpy_Tile(uplo,A,B,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: uplo
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zlacpy_Tile_c(uplo,A,B)
-      end subroutine CHAMELEON_zlacpy_Tile
-
-      subroutine CHAMELEON_zlaset_Tile(uplo,alpha,beta,A,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in) :: alpha
-         complex(kind=c_double_complex), intent(in) :: beta
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zlaset_Tile_c(uplo,alpha,beta,A)
-      end subroutine CHAMELEON_zlaset_Tile
-
-      subroutine CHAMELEON_zlaswpc_Tile(A,K1,K2,IPIV,INCX,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in), target :: IPIV(*)
-         integer(kind=c_int), intent(in) :: INCX
-         integer(kind=c_int), intent(in) :: K1
-         integer(kind=c_int), intent(in) :: K2
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zlaswpc_Tile_c(A,K1,K2,c_loc(IPIV),INCX)
-      end subroutine CHAMELEON_zlaswpc_Tile
-
-      subroutine CHAMELEON_ztrsmrv_Tile(side,uplo,transA,diag,alpha,A,B,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: diag
-         integer(kind=c_int), intent(in) :: side
-         integer(kind=c_int), intent(in) :: transA
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in) :: alpha
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_ztrsmrv_Tile_c(side,uplo,transA,diag,alpha,A,B)
-      end subroutine CHAMELEON_ztrsmrv_Tile
-
-      subroutine CHAMELEON_zgetri_Tile_Async(A,IPIV,W,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in), target :: IPIV(*)
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: W ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgetri_Tile_Async_c(A,c_loc(IPIV),W,sequence,request)
-      end subroutine CHAMELEON_zgetri_Tile_Async
-
-      subroutine CHAMELEON_zlange_Tile_Async(norm,A,work,value,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int) :: info
-         real(kind=c_double), intent(out), target :: value
-         real(kind=c_double), intent(inout), target :: work(*)
-         integer(kind=c_int), intent(in) :: norm
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zlange_Tile_Async_c(norm,A,c_loc(work),c_loc(value),sequence,request)
-      end subroutine CHAMELEON_zlange_Tile_Async
-
-      subroutine CHAMELEON_zlansy_Tile_Async(norm,uplo,A,work,value,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int) :: info
-         real(kind=c_double), intent(out), target :: value
-         real(kind=c_double), intent(inout), target :: work(*)
-         integer(kind=c_int), intent(in) :: norm
-         integer(kind=c_int), intent(in) :: uplo
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zlansy_Tile_Async_c(norm,uplo,A,c_loc(work),c_loc(value),sequence,request)
-      end subroutine CHAMELEON_zlansy_Tile_Async
-
-      subroutine CHAMELEON_zgebrd_Tile_Async(A,D,E,T,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         real(kind=c_double), intent(out), target :: D(*)
-         real(kind=c_double), intent(out), target :: E(*)
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgebrd_Tile_Async_c(A,c_loc(D),c_loc(E),T,sequence,request)
-      end subroutine CHAMELEON_zgebrd_Tile_Async
-
-      subroutine CHAMELEON_zgecfi_Async(m,n,A,fin,imb,inb,fout,omb,onb,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         complex(kind=c_double_complex), intent(inout), target :: A(*)
-         integer(kind=c_int), intent(in) :: fin
-         integer(kind=c_int), intent(in) :: fout
-         integer(kind=c_int), intent(in) :: imb
-         integer(kind=c_int), intent(in) :: inb
-         integer(kind=c_int), intent(in) :: omb
-         integer(kind=c_int), intent(in) :: onb
-         integer(kind=c_int), intent(in) :: m
-         integer(kind=c_int), intent(in) :: n
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgecfi_Async_c(m,n,c_loc(A),fin,imb,inb,fout,omb,onb,sequence,request)
-      end subroutine CHAMELEON_zgecfi_Async
-
-      subroutine CHAMELEON_zgelqf_Tile_Async(A,T,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgelqf_Tile_Async_c(A,T,sequence,request)
-      end subroutine CHAMELEON_zgelqf_Tile_Async
-
-      subroutine CHAMELEON_zgelqs_Tile_Async(A,T,B,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgelqs_Tile_Async_c(A,T,B,sequence,request)
-      end subroutine CHAMELEON_zgelqs_Tile_Async
-
-      subroutine CHAMELEON_zgels_Tile_Async(trans,A,T,B,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: trans
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgels_Tile_Async_c(trans,A,T,B,sequence,request)
-      end subroutine CHAMELEON_zgels_Tile_Async
-
-      subroutine CHAMELEON_zgemm_Tile_Async(transA,transB,alpha,A,B,beta,C,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: transA
-         integer(kind=c_int), intent(in) :: transB
-         complex(kind=c_double_complex), intent(in) :: alpha
-         complex(kind=c_double_complex), intent(in) :: beta
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: C ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgemm_Tile_Async_c(transA,transB,alpha,A,B,beta,C,sequence,request)
-      end subroutine CHAMELEON_zgemm_Tile_Async
-
-      subroutine CHAMELEON_zgeqrf_Tile_Async(A,T,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgeqrf_Tile_Async_c(A,T,sequence,request)
-      end subroutine CHAMELEON_zgeqrf_Tile_Async
-
-      subroutine CHAMELEON_zgeqrs_Tile_Async(A,T,B,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgeqrs_Tile_Async_c(A,T,B,sequence,request)
-      end subroutine CHAMELEON_zgeqrs_Tile_Async
-
-      subroutine CHAMELEON_zgesv_Tile_Async(A,IPIV,B,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(out), target :: IPIV(*)
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgesv_Tile_Async_c(A,c_loc(IPIV),B,sequence,request)
-      end subroutine CHAMELEON_zgesv_Tile_Async
-
-      subroutine CHAMELEON_zgesv_incpiv_Tile_Async(A,L,IPIV,B,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: IPIV ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: L ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgesv_incpiv_Tile_Async_c(A,L,IPIV,B,sequence,request)
-      end subroutine CHAMELEON_zgesv_incpiv_Tile_Async
-
-      subroutine CHAMELEON_zgesvd_Tile_Async(jobu,jobvt,A,S,U,VT,T,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: jobu
-         integer(kind=c_int), intent(in) :: jobvt
-         real(kind=c_double), intent(out), target :: S(*)
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: U ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: VT ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgesvd_Tile_Async_c(jobu,jobvt,A,c_loc(S),U,VT,T,sequence,request)
-      end subroutine CHAMELEON_zgesvd_Tile_Async
-
-      subroutine CHAMELEON_zgetmi_Async(m,n,A,fin,mb,nb,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         complex(kind=c_double_complex), intent(inout), target :: A(*)
-         integer(kind=c_int), intent(in) :: fin
-         integer(kind=c_int), intent(in) :: mb
-         integer(kind=c_int), intent(in) :: nb
-         integer(kind=c_int), intent(in) :: m
-         integer(kind=c_int), intent(in) :: n
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgetmi_Async_c(m,n,c_loc(A),fin,mb,nb,sequence,request)
-      end subroutine CHAMELEON_zgetmi_Async
-
-      subroutine CHAMELEON_zgetrf_Tile_Async(A,IPIV,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(out), target :: IPIV(*)
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgetrf_Tile_Async_c(A,c_loc(IPIV),sequence,request)
-      end subroutine CHAMELEON_zgetrf_Tile_Async
-
-      subroutine CHAMELEON_zgetrf_incpiv_Tile_Async(A,L,IPIV,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: IPIV ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: L ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgetrf_incpiv_Tile_Async_c(A,L,IPIV,sequence,request)
-      end subroutine CHAMELEON_zgetrf_incpiv_Tile_Async
-
-      subroutine CHAMELEON_zgetrf_nopiv_Tile_Async(A,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgetrf_nopiv_Tile_Async_c(A,sequence,request)
-      end subroutine CHAMELEON_zgetrf_nopiv_Tile_Async
-
-      subroutine CHAMELEON_zgetrs_Tile_Async(trans,A,IPIV,B,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: trans
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         integer(kind=c_int), intent(in), target :: IPIV(*)
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgetrs_Tile_Async_c(trans,A,c_loc(IPIV),B,sequence,request)
-      end subroutine CHAMELEON_zgetrs_Tile_Async
-
-      subroutine CHAMELEON_zgetrs_incpiv_Tile_Async(A,L,IPIV,B,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: L ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: IPIV ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zgetrs_incpiv_Tile_Async_c(A,L,IPIV,B,sequence,request)
-      end subroutine CHAMELEON_zgetrs_incpiv_Tile_Async
+  subroutine CHAMELEON_zplgsy_Tile(bump,uplo,A,seed,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    complex(kind=c_double_complex), intent(in) :: bump
+    integer(kind=c_int), intent(in) :: uplo
+    integer(kind=c_long_long), intent(in) :: seed
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zplgsy_Tile_c(bump,A,seed)
+  end subroutine CHAMELEON_zplgsy_Tile
+
+  subroutine CHAMELEON_zplrnt_Tile(A,seed,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_long_long), intent(in) :: seed
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zplrnt_Tile_c(A,seed)
+  end subroutine CHAMELEON_zplrnt_Tile
+
+  subroutine CHAMELEON_zposv_Tile(uplo,A,B,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: uplo
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zposv_Tile_c(uplo,A,B)
+  end subroutine CHAMELEON_zposv_Tile
+
+  subroutine CHAMELEON_zpotrf_Tile(uplo,A,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: uplo
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zpotrf_Tile_c(uplo,A)
+  end subroutine CHAMELEON_zpotrf_Tile
+
+  subroutine CHAMELEON_zsytrf_Tile(uplo,A,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: uplo
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zsytrf_Tile_c(uplo,A)
+  end subroutine CHAMELEON_zsytrf_Tile
+
+  subroutine CHAMELEON_zpotri_Tile(uplo,A,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: uplo
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zpotri_Tile_c(uplo,A)
+  end subroutine CHAMELEON_zpotri_Tile
+
+  subroutine CHAMELEON_zpotrs_Tile(uplo,A,B,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: uplo
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zpotrs_Tile_c(uplo,A,B)
+  end subroutine CHAMELEON_zpotrs_Tile
+
+  subroutine CHAMELEON_zsytrs_Tile(uplo,A,B,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: uplo
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zsytrs_Tile_c(uplo,A,B)
+  end subroutine CHAMELEON_zsytrs_Tile
+
+  subroutine CHAMELEON_zsymm_Tile(side,uplo,alpha,A,B,beta,C,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: side
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in) :: alpha
+    complex(kind=c_double_complex), intent(in) :: beta
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: C ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zsymm_Tile_c(side,uplo,alpha,A,B,beta,C)
+  end subroutine CHAMELEON_zsymm_Tile
+
+  subroutine CHAMELEON_zsyrk_Tile(uplo,trans,alpha,A,beta,C,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: trans
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in) :: alpha
+    complex(kind=c_double_complex), intent(in) :: beta
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: C ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zsyrk_Tile_c(uplo,trans,alpha,A,beta,C)
+  end subroutine CHAMELEON_zsyrk_Tile
+
+  subroutine CHAMELEON_zsyr2k_Tile(uplo,trans,alpha,A,B,beta,C,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: trans
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in) :: alpha
+    complex(kind=c_double_complex), intent(in) :: beta
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: C ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zsyr2k_Tile_c(uplo,trans,alpha,A,B,beta,C)
+  end subroutine CHAMELEON_zsyr2k_Tile
+
+  subroutine CHAMELEON_ztrmm_Tile(side,uplo,transA,diag,alpha,A,B,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: diag
+    integer(kind=c_int), intent(in) :: side
+    integer(kind=c_int), intent(in) :: transA
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in) :: alpha
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_ztrmm_Tile_c(side,uplo,transA,diag,alpha,A,B)
+  end subroutine CHAMELEON_ztrmm_Tile
+
+  subroutine CHAMELEON_ztrsm_Tile(side,uplo,transA,diag,alpha,A,B,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: diag
+    integer(kind=c_int), intent(in) :: side
+    integer(kind=c_int), intent(in) :: transA
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in) :: alpha
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_ztrsm_Tile_c(side,uplo,transA,diag,alpha,A,B)
+  end subroutine CHAMELEON_ztrsm_Tile
+
+  subroutine CHAMELEON_ztrsmpl_Tile(A,L,IPIV,B,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: L ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: IPIV ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_ztrsmpl_Tile_c(A,L,IPIV,B)
+  end subroutine CHAMELEON_ztrsmpl_Tile
+
+  subroutine CHAMELEON_ztrtri_Tile(uplo,diag,A,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: diag
+    integer(kind=c_int), intent(in) :: uplo
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_ztrtri_Tile_c(uplo,diag,A)
+  end subroutine CHAMELEON_ztrtri_Tile
+
+  subroutine CHAMELEON_zunglq_Tile(A,T,B,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zunglq_Tile_c(A,T,B)
+  end subroutine CHAMELEON_zunglq_Tile
+
+  subroutine CHAMELEON_zungqr_Tile(A,T,B,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zungqr_Tile_c(A,T,B)
+  end subroutine CHAMELEON_zungqr_Tile
+
+  subroutine CHAMELEON_zunmlq_Tile(side,trans,A,T,B,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: side
+    integer(kind=c_int), intent(in) :: trans
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zunmlq_Tile_c(side,trans,A,T,B)
+  end subroutine CHAMELEON_zunmlq_Tile
+
+  subroutine CHAMELEON_zunmqr_Tile(side,trans,A,T,B,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: side
+    integer(kind=c_int), intent(in) :: trans
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zunmqr_Tile_c(side,trans,A,T,B)
+  end subroutine CHAMELEON_zunmqr_Tile
+
+  subroutine CHAMELEON_zgetri_Tile(A,IPIV,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in), target :: IPIV(*)
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgetri_Tile_c(A,c_loc(IPIV))
+  end subroutine CHAMELEON_zgetri_Tile
+
+  subroutine CHAMELEON_zlacpy_Tile(uplo,A,B,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: uplo
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zlacpy_Tile_c(uplo,A,B)
+  end subroutine CHAMELEON_zlacpy_Tile
+
+  subroutine CHAMELEON_zlaset_Tile(uplo,alpha,beta,A,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in) :: alpha
+    complex(kind=c_double_complex), intent(in) :: beta
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zlaset_Tile_c(uplo,alpha,beta,A)
+  end subroutine CHAMELEON_zlaset_Tile
+
+  subroutine CHAMELEON_zlaswpc_Tile(A,K1,K2,IPIV,INCX,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in), target :: IPIV(*)
+    integer(kind=c_int), intent(in) :: INCX
+    integer(kind=c_int), intent(in) :: K1
+    integer(kind=c_int), intent(in) :: K2
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zlaswpc_Tile_c(A,K1,K2,c_loc(IPIV),INCX)
+  end subroutine CHAMELEON_zlaswpc_Tile
+
+  subroutine CHAMELEON_ztrsmrv_Tile(side,uplo,transA,diag,alpha,A,B,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: diag
+    integer(kind=c_int), intent(in) :: side
+    integer(kind=c_int), intent(in) :: transA
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in) :: alpha
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_ztrsmrv_Tile_c(side,uplo,transA,diag,alpha,A,B)
+  end subroutine CHAMELEON_ztrsmrv_Tile
+
+  subroutine CHAMELEON_zgetri_Tile_Async(A,IPIV,W,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in), target :: IPIV(*)
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: W ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgetri_Tile_Async_c(A,c_loc(IPIV),W,sequence,request)
+  end subroutine CHAMELEON_zgetri_Tile_Async
+
+  subroutine CHAMELEON_zlange_Tile_Async(norm,A,work,value,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int) :: info
+    real(kind=c_double), intent(out), target :: value
+    real(kind=c_double), intent(inout), target :: work(*)
+    integer(kind=c_int), intent(in) :: norm
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zlange_Tile_Async_c(norm,A,c_loc(work),c_loc(value),sequence,request)
+  end subroutine CHAMELEON_zlange_Tile_Async
+
+  subroutine CHAMELEON_zlansy_Tile_Async(norm,uplo,A,work,value,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int) :: info
+    real(kind=c_double), intent(out), target :: value
+    real(kind=c_double), intent(inout), target :: work(*)
+    integer(kind=c_int), intent(in) :: norm
+    integer(kind=c_int), intent(in) :: uplo
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zlansy_Tile_Async_c(norm,uplo,A,c_loc(work),c_loc(value),sequence,request)
+  end subroutine CHAMELEON_zlansy_Tile_Async
+
+  subroutine CHAMELEON_zgebrd_Tile_Async(A,D,E,T,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    real(kind=c_double), intent(out), target :: D(*)
+    real(kind=c_double), intent(out), target :: E(*)
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgebrd_Tile_Async_c(A,c_loc(D),c_loc(E),T,sequence,request)
+  end subroutine CHAMELEON_zgebrd_Tile_Async
+
+  subroutine CHAMELEON_zgecfi_Async(m,n,A,fin,imb,inb,fout,omb,onb,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    complex(kind=c_double_complex), intent(inout), target :: A(*)
+    integer(kind=c_int), intent(in) :: fin
+    integer(kind=c_int), intent(in) :: fout
+    integer(kind=c_int), intent(in) :: imb
+    integer(kind=c_int), intent(in) :: inb
+    integer(kind=c_int), intent(in) :: omb
+    integer(kind=c_int), intent(in) :: onb
+    integer(kind=c_int), intent(in) :: m
+    integer(kind=c_int), intent(in) :: n
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgecfi_Async_c(m,n,c_loc(A),fin,imb,inb,fout,omb,onb,sequence,request)
+  end subroutine CHAMELEON_zgecfi_Async
+
+  subroutine CHAMELEON_zgelqf_Tile_Async(A,T,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgelqf_Tile_Async_c(A,T,sequence,request)
+  end subroutine CHAMELEON_zgelqf_Tile_Async
+
+  subroutine CHAMELEON_zgelqs_Tile_Async(A,T,B,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgelqs_Tile_Async_c(A,T,B,sequence,request)
+  end subroutine CHAMELEON_zgelqs_Tile_Async
+
+  subroutine CHAMELEON_zgels_Tile_Async(trans,A,T,B,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: trans
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgels_Tile_Async_c(trans,A,T,B,sequence,request)
+  end subroutine CHAMELEON_zgels_Tile_Async
+
+  subroutine CHAMELEON_zgemm_Tile_Async(transA,transB,alpha,A,B,beta,C,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: transA
+    integer(kind=c_int), intent(in) :: transB
+    complex(kind=c_double_complex), intent(in) :: alpha
+    complex(kind=c_double_complex), intent(in) :: beta
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: C ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgemm_Tile_Async_c(transA,transB,alpha,A,B,beta,C,sequence,request)
+  end subroutine CHAMELEON_zgemm_Tile_Async
+
+  subroutine CHAMELEON_zgeqrf_Tile_Async(A,T,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgeqrf_Tile_Async_c(A,T,sequence,request)
+  end subroutine CHAMELEON_zgeqrf_Tile_Async
+
+  subroutine CHAMELEON_zgeqrs_Tile_Async(A,T,B,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgeqrs_Tile_Async_c(A,T,B,sequence,request)
+  end subroutine CHAMELEON_zgeqrs_Tile_Async
+
+  subroutine CHAMELEON_zgesv_Tile_Async(A,IPIV,B,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(out), target :: IPIV(*)
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgesv_Tile_Async_c(A,c_loc(IPIV),B,sequence,request)
+  end subroutine CHAMELEON_zgesv_Tile_Async
+
+  subroutine CHAMELEON_zgesv_incpiv_Tile_Async(A,L,IPIV,B,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: IPIV ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: L ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgesv_incpiv_Tile_Async_c(A,L,IPIV,B,sequence,request)
+  end subroutine CHAMELEON_zgesv_incpiv_Tile_Async
+
+  subroutine CHAMELEON_zgesvd_Tile_Async(jobu,jobvt,A,S,U,VT,T,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: jobu
+    integer(kind=c_int), intent(in) :: jobvt
+    real(kind=c_double), intent(out), target :: S(*)
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: U ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: VT ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgesvd_Tile_Async_c(jobu,jobvt,A,c_loc(S),U,VT,T,sequence,request)
+  end subroutine CHAMELEON_zgesvd_Tile_Async
+
+  subroutine CHAMELEON_zgetmi_Async(m,n,A,fin,mb,nb,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    complex(kind=c_double_complex), intent(inout), target :: A(*)
+    integer(kind=c_int), intent(in) :: fin
+    integer(kind=c_int), intent(in) :: mb
+    integer(kind=c_int), intent(in) :: nb
+    integer(kind=c_int), intent(in) :: m
+    integer(kind=c_int), intent(in) :: n
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgetmi_Async_c(m,n,c_loc(A),fin,mb,nb,sequence,request)
+  end subroutine CHAMELEON_zgetmi_Async
+
+  subroutine CHAMELEON_zgetrf_Tile_Async(A,IPIV,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(out), target :: IPIV(*)
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgetrf_Tile_Async_c(A,c_loc(IPIV),sequence,request)
+  end subroutine CHAMELEON_zgetrf_Tile_Async
+
+  subroutine CHAMELEON_zgetrf_incpiv_Tile_Async(A,L,IPIV,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: IPIV ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: L ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgetrf_incpiv_Tile_Async_c(A,L,IPIV,sequence,request)
+  end subroutine CHAMELEON_zgetrf_incpiv_Tile_Async
+
+  subroutine CHAMELEON_zgetrf_nopiv_Tile_Async(A,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgetrf_nopiv_Tile_Async_c(A,sequence,request)
+  end subroutine CHAMELEON_zgetrf_nopiv_Tile_Async
+
+  subroutine CHAMELEON_zgetrs_Tile_Async(trans,A,IPIV,B,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: trans
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    integer(kind=c_int), intent(in), target :: IPIV(*)
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgetrs_Tile_Async_c(trans,A,c_loc(IPIV),B,sequence,request)
+  end subroutine CHAMELEON_zgetrs_Tile_Async
+
+  subroutine CHAMELEON_zgetrs_incpiv_Tile_Async(A,L,IPIV,B,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: L ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: IPIV ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zgetrs_incpiv_Tile_Async_c(A,L,IPIV,B,sequence,request)
+  end subroutine CHAMELEON_zgetrs_incpiv_Tile_Async
 
 #if defined(PRECISION_z) || defined(PRECISION_c)
-      subroutine CHAMELEON_zhemm_Tile_Async(side,uplo,alpha,A,B,beta,C,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: side
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in) :: alpha
-         complex(kind=c_double_complex), intent(in) :: beta
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: C ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zhemm_Tile_Async_c(side,uplo,alpha,A,B,beta,C,sequence,request)
-      end subroutine CHAMELEON_zhemm_Tile_Async
-
-      subroutine CHAMELEON_zherk_Tile_Async(uplo,trans,alpha,A,beta,C,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: trans
-         integer(kind=c_int), intent(in) :: uplo
-         real(kind=c_double), intent(in) :: alpha
-         real(kind=c_double), intent(in) :: beta
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: C ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zherk_Tile_Async_c(uplo,trans,alpha,A,beta,C,sequence,request)
-      end subroutine CHAMELEON_zherk_Tile_Async
-
-      subroutine CHAMELEON_zher2k_Tile_Async(uplo,trans,alpha,A,B,beta,C,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: trans
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in) :: alpha
-         real(kind=c_double), intent(in) :: beta
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: C ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zher2k_Tile_Async_c(uplo,trans,alpha,A,B,beta,C,sequence,request)
-      end subroutine CHAMELEON_zher2k_Tile_Async
+  subroutine CHAMELEON_zhemm_Tile_Async(side,uplo,alpha,A,B,beta,C,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: side
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in) :: alpha
+    complex(kind=c_double_complex), intent(in) :: beta
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: C ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zhemm_Tile_Async_c(side,uplo,alpha,A,B,beta,C,sequence,request)
+  end subroutine CHAMELEON_zhemm_Tile_Async
+
+  subroutine CHAMELEON_zherk_Tile_Async(uplo,trans,alpha,A,beta,C,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: trans
+    integer(kind=c_int), intent(in) :: uplo
+    real(kind=c_double), intent(in) :: alpha
+    real(kind=c_double), intent(in) :: beta
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: C ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zherk_Tile_Async_c(uplo,trans,alpha,A,beta,C,sequence,request)
+  end subroutine CHAMELEON_zherk_Tile_Async
+
+  subroutine CHAMELEON_zher2k_Tile_Async(uplo,trans,alpha,A,B,beta,C,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: trans
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in) :: alpha
+    real(kind=c_double), intent(in) :: beta
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: C ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zher2k_Tile_Async_c(uplo,trans,alpha,A,B,beta,C,sequence,request)
+  end subroutine CHAMELEON_zher2k_Tile_Async
 #endif
 
-      subroutine CHAMELEON_zheev_Tile_Async(jobz,uplo,A,W,T,Q,LDQ,sequence,request,info) 
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: jobz
-         integer(kind=c_int), intent(in) :: uplo
-         integer(kind=c_int), intent(in) :: LDQ
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         real(kind=c_double), intent(out), target :: W(*)
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         complex(kind=c_double_complex), intent(out), target :: Q(LDQ, *)
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zheev_Tile_Async_c(jobz,uplo,A,c_loc(W),T,c_loc(Q),LDQ,sequence,request)
-      end subroutine CHAMELEON_zheev_Tile_Async
-
-      subroutine CHAMELEON_zheevd_Tile_Async(jobz,uplo,A,W,T,Q,LDQ,sequence,request,info) 
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: jobz
-         integer(kind=c_int), intent(in) :: uplo
-         integer(kind=c_int), intent(in) :: LDQ
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         real(kind=c_double), intent(out), target :: W(*)
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         complex(kind=c_double_complex), intent(out), target :: Q(LDQ, *)
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zheevd_Tile_Async_c(jobz,uplo,A,c_loc(W),T,c_loc(Q),LDQ,sequence,request)
-      end subroutine CHAMELEON_zheevd_Tile_Async
-
-      subroutine CHAMELEON_zhegv_Tile_Async(itype,jobz,uplo,A,B,W,T,Q,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: itype
-         integer(kind=c_int), intent(in) :: jobz
-         integer(kind=c_int), intent(in) :: uplo
-         real(kind=c_double), intent(out), target :: W(*)
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: Q ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zhegv_Tile_Async_c(itype,jobz,uplo,A,B,c_loc(W),T,Q,sequence,request)
-      end subroutine CHAMELEON_zhegv_Tile_Async
-
-      subroutine CHAMELEON_zhegvd_Tile_Async(itype,jobz,uplo,A,B,W,T,Q,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: itype
-         integer(kind=c_int), intent(in) :: jobz
-         integer(kind=c_int), intent(in) :: uplo
-         real(kind=c_double), intent(out), target :: W(*)
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: Q ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zhegvd_Tile_Async_c(itype,jobz,uplo,A,B,c_loc(W),T,Q,sequence,request)
-      end subroutine CHAMELEON_zhegvd_Tile_Async
-
-      subroutine CHAMELEON_zhegst_Tile_Async(itype,uplo,A,B,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: itype
-         integer(kind=c_int), intent(in) :: uplo
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zhegst_Tile_Async_c(itype,uplo,A,B,sequence,request)
-      end subroutine CHAMELEON_zhegst_Tile_Async
-
-      subroutine CHAMELEON_zhetrd_Tile_Async(jobz,uplo,A,D,E,T,Q,LDQ,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: jobz
-         integer(kind=c_int), intent(in) :: uplo
-         integer(kind=c_int), intent(in) :: LDQ
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         real(kind=c_double), intent(out), target :: D(*)
-         real(kind=c_double), intent(out), target :: E(*)
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         complex(kind=c_double_complex), intent(out), target :: Q(LDQ, *)
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zhetrd_Tile_Async_c(jobz,uplo,A,c_loc(D),c_loc(E),T,c_loc(Q),LDQ,sequence,request)
-      end subroutine CHAMELEON_zhetrd_Tile_Async
+  subroutine CHAMELEON_zheev_Tile_Async(jobz,uplo,A,W,T,Q,LDQ,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: jobz
+    integer(kind=c_int), intent(in) :: uplo
+    integer(kind=c_int), intent(in) :: LDQ
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    real(kind=c_double), intent(out), target :: W(*)
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    complex(kind=c_double_complex), intent(out), target :: Q(LDQ, *)
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zheev_Tile_Async_c(jobz,uplo,A,c_loc(W),T,c_loc(Q),LDQ,sequence,request)
+  end subroutine CHAMELEON_zheev_Tile_Async
+
+  subroutine CHAMELEON_zheevd_Tile_Async(jobz,uplo,A,W,T,Q,LDQ,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: jobz
+    integer(kind=c_int), intent(in) :: uplo
+    integer(kind=c_int), intent(in) :: LDQ
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    real(kind=c_double), intent(out), target :: W(*)
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    complex(kind=c_double_complex), intent(out), target :: Q(LDQ, *)
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zheevd_Tile_Async_c(jobz,uplo,A,c_loc(W),T,c_loc(Q),LDQ,sequence,request)
+  end subroutine CHAMELEON_zheevd_Tile_Async
+
+  subroutine CHAMELEON_zhegv_Tile_Async(itype,jobz,uplo,A,B,W,T,Q,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: itype
+    integer(kind=c_int), intent(in) :: jobz
+    integer(kind=c_int), intent(in) :: uplo
+    real(kind=c_double), intent(out), target :: W(*)
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: Q ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zhegv_Tile_Async_c(itype,jobz,uplo,A,B,c_loc(W),T,Q,sequence,request)
+  end subroutine CHAMELEON_zhegv_Tile_Async
+
+  subroutine CHAMELEON_zhegvd_Tile_Async(itype,jobz,uplo,A,B,W,T,Q,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: itype
+    integer(kind=c_int), intent(in) :: jobz
+    integer(kind=c_int), intent(in) :: uplo
+    real(kind=c_double), intent(out), target :: W(*)
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: Q ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zhegvd_Tile_Async_c(itype,jobz,uplo,A,B,c_loc(W),T,Q,sequence,request)
+  end subroutine CHAMELEON_zhegvd_Tile_Async
+
+  subroutine CHAMELEON_zhegst_Tile_Async(itype,uplo,A,B,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: itype
+    integer(kind=c_int), intent(in) :: uplo
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zhegst_Tile_Async_c(itype,uplo,A,B,sequence,request)
+  end subroutine CHAMELEON_zhegst_Tile_Async
+
+  subroutine CHAMELEON_zhetrd_Tile_Async(jobz,uplo,A,D,E,T,Q,LDQ,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: jobz
+    integer(kind=c_int), intent(in) :: uplo
+    integer(kind=c_int), intent(in) :: LDQ
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    real(kind=c_double), intent(out), target :: D(*)
+    real(kind=c_double), intent(out), target :: E(*)
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    complex(kind=c_double_complex), intent(out), target :: Q(LDQ, *)
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zhetrd_Tile_Async_c(jobz,uplo,A,c_loc(D),c_loc(E),T,c_loc(Q),LDQ,sequence,request)
+  end subroutine CHAMELEON_zhetrd_Tile_Async
 
 #if defined(PRECISION_z) || defined(PRECISION_c)
-      subroutine CHAMELEON_zlanhe_Tile_Async(norm,uplo,A,work,value,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         real(kind=c_double), intent(inout), target :: work(*)
-         integer(kind=c_int), intent(in) :: norm
-         integer(kind=c_int), intent(in) :: uplo
-         integer(kind=c_int), intent(out), target :: value
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zlanhe_Tile_Async_c(norm,uplo,A,c_loc(work),c_loc(value),sequence,request)
-      end subroutine CHAMELEON_zlanhe_Tile_Async
+  subroutine CHAMELEON_zlanhe_Tile_Async(norm,uplo,A,work,value,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    real(kind=c_double), intent(inout), target :: work(*)
+    integer(kind=c_int), intent(in) :: norm
+    integer(kind=c_int), intent(in) :: uplo
+    integer(kind=c_int), intent(out), target :: value
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zlanhe_Tile_Async_c(norm,uplo,A,c_loc(work),c_loc(value),sequence,request)
+  end subroutine CHAMELEON_zlanhe_Tile_Async
 #endif
 
-      subroutine CHAMELEON_zlaswp_Tile_Async(A,K1,K2,IPIV,INCX,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: INCX
-         integer(kind=c_int), intent(in) :: K1
-         integer(kind=c_int), intent(in) :: K2
-         integer(kind=c_int), intent(in), target :: IPIV(*)
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zlaswp_Tile_Async_c(A,K1,K2,c_loc(IPIV),INCX,sequence,request)
-      end subroutine CHAMELEON_zlaswp_Tile_Async
-
-      subroutine CHAMELEON_zlauum_Tile_Async(uplo,A,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: uplo
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zlauum_Tile_Async_c(uplo,A,sequence,request)
-      end subroutine CHAMELEON_zlauum_Tile_Async
+  subroutine CHAMELEON_zlaswp_Tile_Async(A,K1,K2,IPIV,INCX,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: INCX
+    integer(kind=c_int), intent(in) :: K1
+    integer(kind=c_int), intent(in) :: K2
+    integer(kind=c_int), intent(in), target :: IPIV(*)
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zlaswp_Tile_Async_c(A,K1,K2,c_loc(IPIV),INCX,sequence,request)
+  end subroutine CHAMELEON_zlaswp_Tile_Async
+
+  subroutine CHAMELEON_zlauum_Tile_Async(uplo,A,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: uplo
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zlauum_Tile_Async_c(uplo,A,sequence,request)
+  end subroutine CHAMELEON_zlauum_Tile_Async
 
 #if defined(PRECISION_z) || defined(PRECISION_c)
-      subroutine CHAMELEON_zplghe_Tile_Async(bump,uplo,A,seed,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         real(kind=c_double), intent(in) :: bump
-         integer(kind=c_int), intent(in) :: uplo
-         integer(kind=c_long_long), intent(in) :: seed
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zplghe_Tile_Async_c(bump,A,seed,sequence,request)
-      end subroutine CHAMELEON_zplghe_Tile_Async
+  subroutine CHAMELEON_zplghe_Tile_Async(bump,uplo,A,seed,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    real(kind=c_double), intent(in) :: bump
+    integer(kind=c_int), intent(in) :: uplo
+    integer(kind=c_long_long), intent(in) :: seed
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zplghe_Tile_Async_c(bump,A,seed,sequence,request)
+  end subroutine CHAMELEON_zplghe_Tile_Async
 #endif
 
-      subroutine CHAMELEON_zplgsy_Tile_Async(bump,uplo,A,seed,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         complex(kind=c_double_complex), intent(in) :: bump
-         integer(kind=c_int), intent(in) :: uplo
-         integer(kind=c_long_long), intent(in) :: seed
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zplgsy_Tile_Async_c(bump,A,seed,sequence,request)
-      end subroutine CHAMELEON_zplgsy_Tile_Async
-       
-      subroutine CHAMELEON_zplrnt_Tile_Async(A,seed,sequence,request,info) 
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_long_long), intent(in) :: seed
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zplrnt_Tile_Async_c(A,seed,sequence,request)
-      end subroutine CHAMELEON_zplrnt_Tile_Async
-
-      subroutine CHAMELEON_zposv_Tile_Async(uplo,A,B,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: uplo
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zposv_Tile_Async_c(uplo,A,B,sequence,request)
-      end subroutine CHAMELEON_zposv_Tile_Async
-
-      subroutine CHAMELEON_zpotrf_Tile_Async(uplo,A,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: uplo
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zpotrf_Tile_Async_c(uplo,A,sequence,request)
-      end subroutine CHAMELEON_zpotrf_Tile_Async
-
-      subroutine CHAMELEON_zsytrf_Tile_Async(uplo,A,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: uplo
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zsytrf_Tile_Async_c(uplo,A,sequence,request)
-      end subroutine CHAMELEON_zsytrf_Tile_Async
-
-      subroutine CHAMELEON_zpotri_Tile_Async(uplo,A,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: uplo
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zpotri_Tile_Async_c(uplo,A,sequence,request)
-      end subroutine CHAMELEON_zpotri_Tile_Async
-
-      subroutine CHAMELEON_zpotrs_Tile_Async(uplo,A,B,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: uplo
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zpotrs_Tile_Async_c(uplo,A,B,sequence,request)
-      end subroutine CHAMELEON_zpotrs_Tile_Async
-
-      subroutine CHAMELEON_zsytrs_Tile_Async(uplo,A,B,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: uplo
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zsytrs_Tile_Async_c(uplo,A,B,sequence,request)
-      end subroutine CHAMELEON_zsytrs_Tile_Async
-
-      subroutine CHAMELEON_zsymm_Tile_Async(side,uplo,alpha,A,B,beta,C,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: side
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in) :: alpha
-         complex(kind=c_double_complex), intent(in) :: beta
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: C ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zsymm_Tile_Async_c(side,uplo,alpha,A,B,beta,C,sequence,request)
-      end subroutine CHAMELEON_zsymm_Tile_Async
-
-      subroutine CHAMELEON_zsyrk_Tile_Async(uplo,trans,alpha,A,beta,C,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: trans
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in) :: alpha
-         complex(kind=c_double_complex), intent(in) :: beta
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: C ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zsyrk_Tile_Async_c(uplo,trans,alpha,A,beta,C,sequence,request)
-      end subroutine CHAMELEON_zsyrk_Tile_Async
-
-      subroutine CHAMELEON_zsyr2k_Tile_Async(uplo,trans,alpha,A,B,beta,C,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: trans
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in) :: alpha
-         complex(kind=c_double_complex), intent(in) :: beta
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: C ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zsyr2k_Tile_Async_c(uplo,trans,alpha,A,B,beta,C,sequence,request)
-      end subroutine CHAMELEON_zsyr2k_Tile_Async
-
-      subroutine CHAMELEON_ztrmm_Tile_Async(side,uplo,transA,diag,alpha,A,B,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: diag
-         integer(kind=c_int), intent(in) :: side
-         integer(kind=c_int), intent(in) :: transA
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in) :: alpha
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_ztrmm_Tile_Async_c(side,uplo,transA,diag,alpha,A,B,sequence,request)
-      end subroutine CHAMELEON_ztrmm_Tile_Async
-
-      subroutine CHAMELEON_ztrsm_Tile_Async(side,uplo,transA,diag,alpha,A,B,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: diag
-         integer(kind=c_int), intent(in) :: side
-         integer(kind=c_int), intent(in) :: transA
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in) :: alpha
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_ztrsm_Tile_Async_c(side,uplo,transA,diag,alpha,A,B,sequence,request)
-      end subroutine CHAMELEON_ztrsm_Tile_Async
-
-      subroutine CHAMELEON_ztrsmpl_Tile_Async(A,L,IPIV,B,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: L ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: IPIV ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_ztrsmpl_Tile_Async_c(A,L,IPIV,B,sequence,request)
-      end subroutine CHAMELEON_ztrsmpl_Tile_Async
-
-      subroutine CHAMELEON_ztrtri_Tile_Async(uplo,diag,A,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: diag
-         integer(kind=c_int), intent(in) :: uplo
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_ztrtri_Tile_Async_c(uplo,diag,A,sequence,request)
-      end subroutine CHAMELEON_ztrtri_Tile_Async
-
-      subroutine CHAMELEON_zunglq_Tile_Async(A,T,B,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zunglq_Tile_Async_c(A,T,B,sequence,request)
-      end subroutine CHAMELEON_zunglq_Tile_Async
-
-      subroutine CHAMELEON_zungqr_Tile_Async(A,T,B,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zungqr_Tile_Async_c(A,T,B,sequence,request)
-      end subroutine CHAMELEON_zungqr_Tile_Async
-
-      subroutine CHAMELEON_zunmlq_Tile_Async(side,trans,A,T,B,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: side
-         integer(kind=c_int), intent(in) :: trans
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zunmlq_Tile_Async_c(side,trans,A,T,B,sequence,request)
-      end subroutine CHAMELEON_zunmlq_Tile_Async
-
-      subroutine CHAMELEON_zunmqr_Tile_Async(side,trans,A,T,B,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: side
-         integer(kind=c_int), intent(in) :: trans
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zunmqr_Tile_Async_c(side,trans,A,T,B,sequence,request)
-      end subroutine CHAMELEON_zunmqr_Tile_Async
-
-      subroutine CHAMELEON_zlacpy_Tile_Async(uplo,A,B,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: uplo
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zlacpy_Tile_Async_c(uplo,A,B,sequence,request)
-      end subroutine CHAMELEON_zlacpy_Tile_Async
-
-      subroutine CHAMELEON_zlaset_Tile_Async(uplo,alpha,beta,A,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in) :: alpha
-         complex(kind=c_double_complex), intent(in) :: beta
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zlaset_Tile_Async_c(uplo,alpha,beta,A,sequence,request)
-      end subroutine CHAMELEON_zlaset_Tile_Async
-
-      subroutine CHAMELEON_zlaswpc_Tile_Async(A,K1,K2,IPIV,INCX,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in), target :: IPIV(*)
-         integer(kind=c_int), intent(in) :: INCX
-         integer(kind=c_int), intent(in) :: K1
-         integer(kind=c_int), intent(in) :: K2
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zlaswpc_Tile_Async_c(A,K1,K2,c_loc(IPIV),INCX,sequence,request)
-      end subroutine CHAMELEON_zlaswpc_Tile_Async
-
-      subroutine CHAMELEON_ztrsmrv_Tile_Async(side,uplo,transA,diag,alpha,A,B,sequence,request,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: diag
-         integer(kind=c_int), intent(in) :: side
-         integer(kind=c_int), intent(in) :: transA
-         integer(kind=c_int), intent(in) :: uplo
-         complex(kind=c_double_complex), intent(in) :: alpha
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_ztrsmrv_Tile_Async_c(side,uplo,transA,diag,alpha,A,B,sequence,request)
-      end subroutine CHAMELEON_ztrsmrv_Tile_Async
-
-      subroutine CHAMELEON_Alloc_Workspace_zgelqf(M,N,T,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         type(c_ptr) :: T ! T is **, so pass by reference
-         info = CHAMELEON_Alloc_Workspace_zgelqf_c(M,N,T)
-      end subroutine CHAMELEON_Alloc_Workspace_zgelqf
-
-      subroutine CHAMELEON_Alloc_Workspace_zgels(M,N,T,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         type(c_ptr) :: T ! T is **, so pass by reference
-         info = CHAMELEON_Alloc_Workspace_zgels_c(M,N,T)
-      end subroutine CHAMELEON_Alloc_Workspace_zgels
-
-      subroutine CHAMELEON_Alloc_Workspace_zgeqrf(M,N,T,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         type(c_ptr) :: T ! T is **, so pass by reference
-         info = CHAMELEON_Alloc_Workspace_zgeqrf_c(M,N,T)
-      end subroutine CHAMELEON_Alloc_Workspace_zgeqrf
-
-      subroutine CHAMELEON_Alloc_Workspace_zgesv_incpiv(N,L,IPIV,p,q,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: N
-         type(c_ptr) :: IPIV ! IPIV is **, so pass by reference
-         type(c_ptr) :: L ! L is **, so pass by reference
-         integer(kind=c_int), value :: p
-         integer(kind=c_int), value :: q
-         info = CHAMELEON_Alloc_Workspace_zgesv_incpiv_c(N,L,IPIV,p,q)
-      end subroutine CHAMELEON_Alloc_Workspace_zgesv_incpiv
-
-      subroutine CHAMELEON_Alloc_Workspace_zgetrf_incpiv(M,N,L,IPIV,p,q,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         type(c_ptr) :: IPIV ! IPIV is **, so pass by reference
-         type(c_ptr) :: L ! L is **, so pass by reference
-         integer(kind=c_int), value :: p
-         integer(kind=c_int), value :: q
-         info = CHAMELEON_Alloc_Workspace_zgetrf_incpiv_c(M,N,L,IPIV,p,q)
-      end subroutine CHAMELEON_Alloc_Workspace_zgetrf_incpiv
-
-      subroutine CHAMELEON_Alloc_Workspace_zgeev(N,T,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: N
-         type(c_ptr) :: T ! T is **, so pass by reference
-         info = CHAMELEON_Alloc_Workspace_zgeev_c(N,T)
-      end subroutine CHAMELEON_Alloc_Workspace_zgeev
-
-      subroutine CHAMELEON_Alloc_Workspace_zgebrd(M,N,T,p,q,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         type(c_ptr) :: T ! T is **, so pass by reference
-         integer(kind=c_int), value :: p
-         integer(kind=c_int), value :: q
-         info = CHAMELEON_Alloc_Workspace_zgebrd_c(M,N,T,p,q)
-      end subroutine CHAMELEON_Alloc_Workspace_zgebrd
-
-      subroutine CHAMELEON_Alloc_Workspace_zgehrd(N,T,p,q,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: N
-         type(c_ptr) :: T ! T is **, so pass by reference
-         integer(kind=c_int), value :: p
-         integer(kind=c_int), value :: q
-         info = CHAMELEON_Alloc_Workspace_zgehrd_c(N,T,p,q)
-      end subroutine CHAMELEON_Alloc_Workspace_zgehrd
-
-      subroutine CHAMELEON_Alloc_Workspace_zgesvd(M,N,T,p,q,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         type(c_ptr) :: T ! T is **, so pass by reference
-         integer(kind=c_int), value :: p
-         integer(kind=c_int), value :: q
-         info = CHAMELEON_Alloc_Workspace_zgesvd_c(M,N,T,p,q)
-      end subroutine CHAMELEON_Alloc_Workspace_zgesvd
-
-      subroutine CHAMELEON_Alloc_Workspace_zheev(M,N,T,p,q,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         type(c_ptr) :: T ! T is **, so pass by reference
-         integer(kind=c_int), value :: p
-         integer(kind=c_int), value :: q
-         info = CHAMELEON_Alloc_Workspace_zheev_c(M,N,T,p,q)
-      end subroutine CHAMELEON_Alloc_Workspace_zheev
-
-      subroutine CHAMELEON_Alloc_Workspace_zheevd(M,N,T,p,q,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         type(c_ptr) :: T ! T is **, so pass by reference
-         integer(kind=c_int), value :: p
-         integer(kind=c_int), value :: q
-         info = CHAMELEON_Alloc_Workspace_zheevd_c(M,N,T,p,q)
-      end subroutine CHAMELEON_Alloc_Workspace_zheevd
-
-      subroutine CHAMELEON_Alloc_Workspace_zhegv(M,N,T,p,q,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         type(c_ptr) :: T ! T is **, so pass by reference
-         integer(kind=c_int), value :: p
-         integer(kind=c_int), value :: q
-         info = CHAMELEON_Alloc_Workspace_zhegv_c(M,N,T,p,q)
-      end subroutine CHAMELEON_Alloc_Workspace_zhegv
-
-      subroutine CHAMELEON_Alloc_Workspace_zhegvd(M,N,T,p,q,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         type(c_ptr) :: T ! T is **, so pass by reference
-         integer(kind=c_int), value :: p
-         integer(kind=c_int), value :: q
-         info = CHAMELEON_Alloc_Workspace_zhegvd_c(M,N,T,p,q)
-      end subroutine CHAMELEON_Alloc_Workspace_zhegvd
-
-      subroutine CHAMELEON_Alloc_Workspace_zhetrd(M,N,T,p,q,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         type(c_ptr) :: T ! T is **, so pass by reference
-         integer(kind=c_int), value :: p
-         integer(kind=c_int), value :: q
-         info = CHAMELEON_Alloc_Workspace_zhetrd_c(M,N,T,p,q)
-      end subroutine CHAMELEON_Alloc_Workspace_zhetrd
-
-      subroutine CHAMELEON_Alloc_Workspace_zgelqf_Tile(M,N,descT,p,q,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         type(c_ptr) :: descT ! descT is **, so pass by reference
-         integer(kind=c_int), value :: p
-         integer(kind=c_int), value :: q
-         info = CHAMELEON_Alloc_Workspace_zgelqf_Tile_c(M,N,descT,p,q)
-      end subroutine CHAMELEON_Alloc_Workspace_zgelqf_Tile
-
-      subroutine CHAMELEON_Alloc_Workspace_zgels_Tile(M,N,descT,p,q,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         type(c_ptr) :: descT ! descT is **, so pass by reference
-         integer(kind=c_int), value :: p
-         integer(kind=c_int), value :: q
-         info = CHAMELEON_Alloc_Workspace_zgels_Tile_c(M,N,descT,p,q)
-      end subroutine CHAMELEON_Alloc_Workspace_zgels_Tile
-
-      subroutine CHAMELEON_Alloc_Workspace_zgeqrf_Tile(M,N,descT,p,q,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: M
-         integer(kind=c_int), intent(in) :: N
-         type(c_ptr) :: descT ! descT is **, so pass by reference
-         integer(kind=c_int), value :: p
-         integer(kind=c_int), value :: q
-         info = CHAMELEON_Alloc_Workspace_zgeqrf_Tile_c(M,N,descT,p,q)
-      end subroutine CHAMELEON_Alloc_Workspace_zgeqrf_Tile
-
-      subroutine CHAMELEON_Alloc_Workspace_zgesv_incpiv_Tile(N,descL,IPIV,p,q,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: N
-         type(c_ptr) :: IPIV ! IPIV is **, so pass by reference
-         type(c_ptr) :: descL ! descL is **, so pass by reference
-         integer(kind=c_int), value :: p
-         integer(kind=c_int), value :: q
-         info = CHAMELEON_Alloc_Workspace_zgesv_incpiv_Tile_c(N,descL,IPIV,p,q)
-      end subroutine CHAMELEON_Alloc_Workspace_zgesv_incpiv_Tile
-
-      subroutine CHAMELEON_Alloc_Workspace_zgetrf_incpiv_Tile(N,descL,IPIV,p,q,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: N
-         type(c_ptr) :: IPIV ! IPIV is **, so pass by reference
-         type(c_ptr) :: descL ! descL is **, so pass by reference
-         integer(kind=c_int), value :: p
-         integer(kind=c_int), value :: q
-         info = CHAMELEON_Alloc_Workspace_zgetrf_incpiv_Tile_c(N,descL,IPIV,p,q)
-      end subroutine CHAMELEON_Alloc_Workspace_zgetrf_incpiv_Tile
-
-      subroutine CHAMELEON_Alloc_Workspace_zgetri_Tile_Async(A,W,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         type(c_ptr), value :: W ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_Alloc_Workspace_zgetri_Tile_Async_c(A,W)
-      end subroutine CHAMELEON_Alloc_Workspace_zgetri_Tile_Async
-
-      subroutine CHAMELEON_zLapack_to_Tile(Af77,LDA,A,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         complex(kind=c_double_complex), intent(in), target :: Af77(LDA,*)
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zLapack_to_Tile_c(c_loc(Af77),LDA,A)
-      end subroutine CHAMELEON_zLapack_to_Tile
-
-      subroutine CHAMELEON_zTile_to_Lapack(A,Af77,LDA,info)
-         use iso_c_binding
-         implicit none
-         integer(kind=c_int), intent(out) :: info
-         integer(kind=c_int), intent(in) :: LDA
-         complex(kind=c_double_complex), intent(out), target :: Af77(LDA,*)
-         type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
-         info = CHAMELEON_zTile_to_Lapack_c(A,c_loc(Af77),LDA)
-      end subroutine CHAMELEON_zTile_to_Lapack
+  subroutine CHAMELEON_zplgsy_Tile_Async(bump,uplo,A,seed,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    complex(kind=c_double_complex), intent(in) :: bump
+    integer(kind=c_int), intent(in) :: uplo
+    integer(kind=c_long_long), intent(in) :: seed
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zplgsy_Tile_Async_c(bump,A,seed,sequence,request)
+  end subroutine CHAMELEON_zplgsy_Tile_Async
+
+  subroutine CHAMELEON_zplrnt_Tile_Async(A,seed,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_long_long), intent(in) :: seed
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zplrnt_Tile_Async_c(A,seed,sequence,request)
+  end subroutine CHAMELEON_zplrnt_Tile_Async
+
+  subroutine CHAMELEON_zposv_Tile_Async(uplo,A,B,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: uplo
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zposv_Tile_Async_c(uplo,A,B,sequence,request)
+  end subroutine CHAMELEON_zposv_Tile_Async
+
+  subroutine CHAMELEON_zpotrf_Tile_Async(uplo,A,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: uplo
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zpotrf_Tile_Async_c(uplo,A,sequence,request)
+  end subroutine CHAMELEON_zpotrf_Tile_Async
+
+  subroutine CHAMELEON_zsytrf_Tile_Async(uplo,A,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: uplo
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zsytrf_Tile_Async_c(uplo,A,sequence,request)
+  end subroutine CHAMELEON_zsytrf_Tile_Async
+
+  subroutine CHAMELEON_zpotri_Tile_Async(uplo,A,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: uplo
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zpotri_Tile_Async_c(uplo,A,sequence,request)
+  end subroutine CHAMELEON_zpotri_Tile_Async
+
+  subroutine CHAMELEON_zpotrs_Tile_Async(uplo,A,B,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: uplo
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zpotrs_Tile_Async_c(uplo,A,B,sequence,request)
+  end subroutine CHAMELEON_zpotrs_Tile_Async
+
+  subroutine CHAMELEON_zsytrs_Tile_Async(uplo,A,B,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: uplo
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zsytrs_Tile_Async_c(uplo,A,B,sequence,request)
+  end subroutine CHAMELEON_zsytrs_Tile_Async
+
+  subroutine CHAMELEON_zsymm_Tile_Async(side,uplo,alpha,A,B,beta,C,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: side
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in) :: alpha
+    complex(kind=c_double_complex), intent(in) :: beta
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: C ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zsymm_Tile_Async_c(side,uplo,alpha,A,B,beta,C,sequence,request)
+  end subroutine CHAMELEON_zsymm_Tile_Async
+
+  subroutine CHAMELEON_zsyrk_Tile_Async(uplo,trans,alpha,A,beta,C,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: trans
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in) :: alpha
+    complex(kind=c_double_complex), intent(in) :: beta
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: C ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zsyrk_Tile_Async_c(uplo,trans,alpha,A,beta,C,sequence,request)
+  end subroutine CHAMELEON_zsyrk_Tile_Async
+
+  subroutine CHAMELEON_zsyr2k_Tile_Async(uplo,trans,alpha,A,B,beta,C,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: trans
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in) :: alpha
+    complex(kind=c_double_complex), intent(in) :: beta
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: C ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zsyr2k_Tile_Async_c(uplo,trans,alpha,A,B,beta,C,sequence,request)
+  end subroutine CHAMELEON_zsyr2k_Tile_Async
+
+  subroutine CHAMELEON_ztrmm_Tile_Async(side,uplo,transA,diag,alpha,A,B,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: diag
+    integer(kind=c_int), intent(in) :: side
+    integer(kind=c_int), intent(in) :: transA
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in) :: alpha
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_ztrmm_Tile_Async_c(side,uplo,transA,diag,alpha,A,B,sequence,request)
+  end subroutine CHAMELEON_ztrmm_Tile_Async
+
+  subroutine CHAMELEON_ztrsm_Tile_Async(side,uplo,transA,diag,alpha,A,B,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: diag
+    integer(kind=c_int), intent(in) :: side
+    integer(kind=c_int), intent(in) :: transA
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in) :: alpha
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_ztrsm_Tile_Async_c(side,uplo,transA,diag,alpha,A,B,sequence,request)
+  end subroutine CHAMELEON_ztrsm_Tile_Async
+
+  subroutine CHAMELEON_ztrsmpl_Tile_Async(A,L,IPIV,B,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: L ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: IPIV ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_ztrsmpl_Tile_Async_c(A,L,IPIV,B,sequence,request)
+  end subroutine CHAMELEON_ztrsmpl_Tile_Async
+
+  subroutine CHAMELEON_ztrtri_Tile_Async(uplo,diag,A,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: diag
+    integer(kind=c_int), intent(in) :: uplo
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_ztrtri_Tile_Async_c(uplo,diag,A,sequence,request)
+  end subroutine CHAMELEON_ztrtri_Tile_Async
+
+  subroutine CHAMELEON_zunglq_Tile_Async(A,T,B,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zunglq_Tile_Async_c(A,T,B,sequence,request)
+  end subroutine CHAMELEON_zunglq_Tile_Async
+
+  subroutine CHAMELEON_zungqr_Tile_Async(A,T,B,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zungqr_Tile_Async_c(A,T,B,sequence,request)
+  end subroutine CHAMELEON_zungqr_Tile_Async
+
+  subroutine CHAMELEON_zunmlq_Tile_Async(side,trans,A,T,B,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: side
+    integer(kind=c_int), intent(in) :: trans
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zunmlq_Tile_Async_c(side,trans,A,T,B,sequence,request)
+  end subroutine CHAMELEON_zunmlq_Tile_Async
+
+  subroutine CHAMELEON_zunmqr_Tile_Async(side,trans,A,T,B,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: side
+    integer(kind=c_int), intent(in) :: trans
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: T ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zunmqr_Tile_Async_c(side,trans,A,T,B,sequence,request)
+  end subroutine CHAMELEON_zunmqr_Tile_Async
+
+  subroutine CHAMELEON_zlacpy_Tile_Async(uplo,A,B,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: uplo
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zlacpy_Tile_Async_c(uplo,A,B,sequence,request)
+  end subroutine CHAMELEON_zlacpy_Tile_Async
+
+  subroutine CHAMELEON_zlaset_Tile_Async(uplo,alpha,beta,A,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in) :: alpha
+    complex(kind=c_double_complex), intent(in) :: beta
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zlaset_Tile_Async_c(uplo,alpha,beta,A,sequence,request)
+  end subroutine CHAMELEON_zlaset_Tile_Async
+
+  subroutine CHAMELEON_zlaswpc_Tile_Async(A,K1,K2,IPIV,INCX,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in), target :: IPIV(*)
+    integer(kind=c_int), intent(in) :: INCX
+    integer(kind=c_int), intent(in) :: K1
+    integer(kind=c_int), intent(in) :: K2
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zlaswpc_Tile_Async_c(A,K1,K2,c_loc(IPIV),INCX,sequence,request)
+  end subroutine CHAMELEON_zlaswpc_Tile_Async
+
+  subroutine CHAMELEON_ztrsmrv_Tile_Async(side,uplo,transA,diag,alpha,A,B,sequence,request,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: diag
+    integer(kind=c_int), intent(in) :: side
+    integer(kind=c_int), intent(in) :: transA
+    integer(kind=c_int), intent(in) :: uplo
+    complex(kind=c_double_complex), intent(in) :: alpha
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: B ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: sequence ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: request ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_ztrsmrv_Tile_Async_c(side,uplo,transA,diag,alpha,A,B,sequence,request)
+  end subroutine CHAMELEON_ztrsmrv_Tile_Async
+
+  subroutine CHAMELEON_Alloc_Workspace_zgelqf(M,N,T,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    type(c_ptr) :: T ! T is **, so pass by reference
+    info = CHAMELEON_Alloc_Workspace_zgelqf_c(M,N,T)
+  end subroutine CHAMELEON_Alloc_Workspace_zgelqf
+
+  subroutine CHAMELEON_Alloc_Workspace_zgels(M,N,T,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    type(c_ptr) :: T ! T is **, so pass by reference
+    info = CHAMELEON_Alloc_Workspace_zgels_c(M,N,T)
+  end subroutine CHAMELEON_Alloc_Workspace_zgels
+
+  subroutine CHAMELEON_Alloc_Workspace_zgeqrf(M,N,T,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    type(c_ptr) :: T ! T is **, so pass by reference
+    info = CHAMELEON_Alloc_Workspace_zgeqrf_c(M,N,T)
+  end subroutine CHAMELEON_Alloc_Workspace_zgeqrf
+
+  subroutine CHAMELEON_Alloc_Workspace_zgesv_incpiv(N,L,IPIV,p,q,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: N
+    type(c_ptr) :: IPIV ! IPIV is **, so pass by reference
+    type(c_ptr) :: L ! L is **, so pass by reference
+    integer(kind=c_int), value :: p
+    integer(kind=c_int), value :: q
+    info = CHAMELEON_Alloc_Workspace_zgesv_incpiv_c(N,L,IPIV,p,q)
+  end subroutine CHAMELEON_Alloc_Workspace_zgesv_incpiv
+
+  subroutine CHAMELEON_Alloc_Workspace_zgetrf_incpiv(M,N,L,IPIV,p,q,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    type(c_ptr) :: IPIV ! IPIV is **, so pass by reference
+    type(c_ptr) :: L ! L is **, so pass by reference
+    integer(kind=c_int), value :: p
+    integer(kind=c_int), value :: q
+    info = CHAMELEON_Alloc_Workspace_zgetrf_incpiv_c(M,N,L,IPIV,p,q)
+  end subroutine CHAMELEON_Alloc_Workspace_zgetrf_incpiv
+
+  subroutine CHAMELEON_Alloc_Workspace_zgeev(N,T,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: N
+    type(c_ptr) :: T ! T is **, so pass by reference
+    info = CHAMELEON_Alloc_Workspace_zgeev_c(N,T)
+  end subroutine CHAMELEON_Alloc_Workspace_zgeev
+
+  subroutine CHAMELEON_Alloc_Workspace_zgebrd(M,N,T,p,q,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    type(c_ptr) :: T ! T is **, so pass by reference
+    integer(kind=c_int), value :: p
+    integer(kind=c_int), value :: q
+    info = CHAMELEON_Alloc_Workspace_zgebrd_c(M,N,T,p,q)
+  end subroutine CHAMELEON_Alloc_Workspace_zgebrd
+
+  subroutine CHAMELEON_Alloc_Workspace_zgehrd(N,T,p,q,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: N
+    type(c_ptr) :: T ! T is **, so pass by reference
+    integer(kind=c_int), value :: p
+    integer(kind=c_int), value :: q
+    info = CHAMELEON_Alloc_Workspace_zgehrd_c(N,T,p,q)
+  end subroutine CHAMELEON_Alloc_Workspace_zgehrd
+
+  subroutine CHAMELEON_Alloc_Workspace_zgesvd(M,N,T,p,q,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    type(c_ptr) :: T ! T is **, so pass by reference
+    integer(kind=c_int), value :: p
+    integer(kind=c_int), value :: q
+    info = CHAMELEON_Alloc_Workspace_zgesvd_c(M,N,T,p,q)
+  end subroutine CHAMELEON_Alloc_Workspace_zgesvd
+
+  subroutine CHAMELEON_Alloc_Workspace_zheev(M,N,T,p,q,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    type(c_ptr) :: T ! T is **, so pass by reference
+    integer(kind=c_int), value :: p
+    integer(kind=c_int), value :: q
+    info = CHAMELEON_Alloc_Workspace_zheev_c(M,N,T,p,q)
+  end subroutine CHAMELEON_Alloc_Workspace_zheev
+
+  subroutine CHAMELEON_Alloc_Workspace_zheevd(M,N,T,p,q,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    type(c_ptr) :: T ! T is **, so pass by reference
+    integer(kind=c_int), value :: p
+    integer(kind=c_int), value :: q
+    info = CHAMELEON_Alloc_Workspace_zheevd_c(M,N,T,p,q)
+  end subroutine CHAMELEON_Alloc_Workspace_zheevd
+
+  subroutine CHAMELEON_Alloc_Workspace_zhegv(M,N,T,p,q,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    type(c_ptr) :: T ! T is **, so pass by reference
+    integer(kind=c_int), value :: p
+    integer(kind=c_int), value :: q
+    info = CHAMELEON_Alloc_Workspace_zhegv_c(M,N,T,p,q)
+  end subroutine CHAMELEON_Alloc_Workspace_zhegv
+
+  subroutine CHAMELEON_Alloc_Workspace_zhegvd(M,N,T,p,q,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    type(c_ptr) :: T ! T is **, so pass by reference
+    integer(kind=c_int), value :: p
+    integer(kind=c_int), value :: q
+    info = CHAMELEON_Alloc_Workspace_zhegvd_c(M,N,T,p,q)
+  end subroutine CHAMELEON_Alloc_Workspace_zhegvd
+
+  subroutine CHAMELEON_Alloc_Workspace_zhetrd(M,N,T,p,q,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    type(c_ptr) :: T ! T is **, so pass by reference
+    integer(kind=c_int), value :: p
+    integer(kind=c_int), value :: q
+    info = CHAMELEON_Alloc_Workspace_zhetrd_c(M,N,T,p,q)
+  end subroutine CHAMELEON_Alloc_Workspace_zhetrd
+
+  subroutine CHAMELEON_Alloc_Workspace_zgelqf_Tile(M,N,descT,p,q,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    type(c_ptr) :: descT ! descT is **, so pass by reference
+    integer(kind=c_int), value :: p
+    integer(kind=c_int), value :: q
+    info = CHAMELEON_Alloc_Workspace_zgelqf_Tile_c(M,N,descT,p,q)
+  end subroutine CHAMELEON_Alloc_Workspace_zgelqf_Tile
+
+  subroutine CHAMELEON_Alloc_Workspace_zgels_Tile(M,N,descT,p,q,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    type(c_ptr) :: descT ! descT is **, so pass by reference
+    integer(kind=c_int), value :: p
+    integer(kind=c_int), value :: q
+    info = CHAMELEON_Alloc_Workspace_zgels_Tile_c(M,N,descT,p,q)
+  end subroutine CHAMELEON_Alloc_Workspace_zgels_Tile
+
+  subroutine CHAMELEON_Alloc_Workspace_zgeqrf_Tile(M,N,descT,p,q,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: M
+    integer(kind=c_int), intent(in) :: N
+    type(c_ptr) :: descT ! descT is **, so pass by reference
+    integer(kind=c_int), value :: p
+    integer(kind=c_int), value :: q
+    info = CHAMELEON_Alloc_Workspace_zgeqrf_Tile_c(M,N,descT,p,q)
+  end subroutine CHAMELEON_Alloc_Workspace_zgeqrf_Tile
+
+  subroutine CHAMELEON_Alloc_Workspace_zgesv_incpiv_Tile(N,descL,IPIV,p,q,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: N
+    type(c_ptr) :: IPIV ! IPIV is **, so pass by reference
+    type(c_ptr) :: descL ! descL is **, so pass by reference
+    integer(kind=c_int), value :: p
+    integer(kind=c_int), value :: q
+    info = CHAMELEON_Alloc_Workspace_zgesv_incpiv_Tile_c(N,descL,IPIV,p,q)
+  end subroutine CHAMELEON_Alloc_Workspace_zgesv_incpiv_Tile
+
+  subroutine CHAMELEON_Alloc_Workspace_zgetrf_incpiv_Tile(N,descL,IPIV,p,q,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: N
+    type(c_ptr) :: IPIV ! IPIV is **, so pass by reference
+    type(c_ptr) :: descL ! descL is **, so pass by reference
+    integer(kind=c_int), value :: p
+    integer(kind=c_int), value :: q
+    info = CHAMELEON_Alloc_Workspace_zgetrf_incpiv_Tile_c(N,descL,IPIV,p,q)
+  end subroutine CHAMELEON_Alloc_Workspace_zgetrf_incpiv_Tile
+
+  subroutine CHAMELEON_Alloc_Workspace_zgetri_Tile_Async(A,W,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    type(c_ptr), value :: W ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_Alloc_Workspace_zgetri_Tile_Async_c(A,W)
+  end subroutine CHAMELEON_Alloc_Workspace_zgetri_Tile_Async
+
+  subroutine CHAMELEON_zLapack_to_Tile(Af77,LDA,A,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    complex(kind=c_double_complex), intent(in), target :: Af77(LDA,*)
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zLapack_to_Tile_c(c_loc(Af77),LDA,A)
+  end subroutine CHAMELEON_zLapack_to_Tile
+
+  subroutine CHAMELEON_zTile_to_Lapack(A,Af77,LDA,info)
+    use iso_c_binding
+    implicit none
+    integer(kind=c_int), intent(out) :: info
+    integer(kind=c_int), intent(in) :: LDA
+    complex(kind=c_double_complex), intent(out), target :: Af77(LDA,*)
+    type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran
+    info = CHAMELEON_zTile_to_Lapack_c(A,c_loc(Af77),LDA)
+  end subroutine CHAMELEON_zTile_to_Lapack
 
 end module chameleon_z
diff --git a/control/chameleon_zf90_wrappers.F90 b/control/chameleon_zf90_wrappers.F90
index b1a957ddb9cc8640f802437704465fd44dbceb65..bb99becc1622d50a741fe78350685d5ae0bebe74 100644
--- a/control/chameleon_zf90_wrappers.F90
+++ b/control/chameleon_zf90_wrappers.F90
@@ -1,24 +1,42 @@
 !!!
 !
+! @file chameleon_zf90_wrappers.F90
+!
+!  CHAMELEON fortran wrapper for BLAS and LAPACK subroutines.
+!  CHAMELEON is a software package provided by Univ. of Tennessee,
+!  Univ. of California Berkeley and Univ. of Colorado Denver
+!
+! @copyright 2012-2018 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
+!                      Univ. Bordeaux. All rights reserved.
+!
+! @version 1.0.0
+! @author Numerical Algorithm Group
+! @author Mathieu Faverge
+! @author Emmanuel Agullo
+! @author Cedric Castagnede
+! @date 2011-09-15
+! @precisions normal z -> c d s
+!
+!
 ! -- Inria
 ! -- (C) Copyright 2012
 !
 ! This software is a computer program whose purpose is to process
 ! Matrices Over Runtime Systems @ Exascale (MORSE). More information
 ! can be found on the following website: http://www.inria.fr/en/teams/morse.
-! 
+!
 ! This software is governed by the CeCILL-B license under French law and
-! abiding by the rules of distribution of free software.  You can  use, 
+! abiding by the rules of distribution of free software.  You can  use,
 ! modify and/ or redistribute the software under the terms of the CeCILL-B
 ! license as circulated by CEA, CNRS and INRIA at the following URL
-! "http://www.cecill.info". 
-! 
+! "http://www.cecill.info".
+!
 ! As a counterpart to the access to the source code and  rights to copy,
 ! modify and redistribute granted by the license, users are provided only
 ! with a limited warranty  and the software's author,  the holder of the
 ! economic rights,  and the successive licensors  have only  limited
-! liability. 
-! 
+! liability.
+!
 ! In this respect, the user's attention is drawn to the risks associated
 ! with loading,  using,  modifying and/or developing or reproducing the
 ! software by the user in light of its specific status of free software,
@@ -26,18 +44,18 @@
 ! therefore means  that it is reserved for developers  and  experienced
 ! professionals having in-depth computer knowledge. Users are therefore
 ! encouraged to load and test the software's suitability as regards their
-! requirements in conditions enabling the security of their systems and/or 
-! data to be ensured and,  more generally, to use and operate it in the 
-! same conditions as regards security. 
-! 
+! requirements in conditions enabling the security of their systems and/or
+! data to be ensured and,  more generally, to use and operate it in the
+! same conditions as regards security.
+!
 ! The fact that you are presently reading this means that you have had
 ! knowledge of the CeCILL-B license and that you accept its terms.
 !
 !!!
-
+!
 !
 !     Copyright © 2011 The Numerical Algorithms Group Ltd. All rights reserved.
-!   
+!
 !     Redistribution and use in source and binary forms, with or without
 !     modification, are permitted provided that the following conditions are
 !     met:
@@ -50,7 +68,7 @@
 !     - Neither the name of the copyright holders nor the names of its
 !       contributors may be used to endorse or promote products derived from
 !       this software without specific prior written permission.
-!     
+!
 !     This software is provided by the copyright holders and contributors "as
 !     is" and any express or implied warranties, including, but not limited
 !     to, the implied warranties of merchantability and fitness for a
@@ -64,21 +82,6 @@
 !     software, even if advised of the possibility of such damage.
 !
 !
-!
-!
-!  CHAMELEON fortran wrapper for BLAS and LAPACK subroutines.
-!  CHAMELEON is a software package provided by Univ. of Tennessee,
-!  Univ. of California Berkeley and Univ. of Colorado Denver
-!
-! @version 1.0.0
-! @author Numerical Algorithm Group
-! @author Mathieu Faverge
-! @author Emmanuel Agullo
-! @author Cedric Castagnede
-! @date 2011-09-15
-! @precisions normal z -> c d s
-!
-!
 ! Wrappers to CHAMELEON functions are provided for the following BLAS
 ! subroutines since the CHAMELEON and BLAS interfaces match exactly:
 ! ZGEMM  CHAMELEON_zgemm
@@ -111,785 +114,785 @@
 ! ZLASET CHAMELEON_zlaset
 #define PRECISION_z
 
-      subroutine chameleon_wrap_ZGESV(N,NRHS,A,LDA,IPIV,B,LDB,INFO)
-            use iso_c_binding
-            use chameleon
-            implicit none
-            integer, parameter :: wp = kind(0.0d0)
-            integer, intent(in) :: LDA
-            integer, intent(in) :: LDB
-            integer, intent(in) :: N
-            integer, intent(in) :: NRHS
-            integer, intent(out) :: INFO
-            integer, intent(out), target :: IPIV(*)
-            complex(kind=wp), intent(inout), target :: A(LDA,*)
-            complex(kind=wp), intent(inout), target :: B(LDB,*)
-            if (.not. chameleon_initialized) call chameleon_init(24,INFO)
-            ! write(*,*) " Calling CHAMELEON_ZGESV"
-            call CHAMELEON_ZGESV(N,NRHS,A,LDA,IPIV,B,LDB,INFO)
-      end subroutine chameleon_wrap_ZGESV
+subroutine chameleon_wrap_ZGESV(N,NRHS,A,LDA,IPIV,B,LDB,INFO)
+  use iso_c_binding
+  use chameleon
+  implicit none
+  integer, parameter :: wp = kind(0.0d0)
+  integer, intent(in) :: LDA
+  integer, intent(in) :: LDB
+  integer, intent(in) :: N
+  integer, intent(in) :: NRHS
+  integer, intent(out) :: INFO
+  integer, intent(out), target :: IPIV(*)
+  complex(kind=wp), intent(inout), target :: A(LDA,*)
+  complex(kind=wp), intent(inout), target :: B(LDB,*)
+  if (.not. chameleon_initialized) call chameleon_init(24,INFO)
+  ! write(*,*) " Calling CHAMELEON_ZGESV"
+  call CHAMELEON_ZGESV(N,NRHS,A,LDA,IPIV,B,LDB,INFO)
+end subroutine chameleon_wrap_ZGESV
 
-      subroutine chameleon_wrap_ZGETRF(M,N,A,LDA,IPIV,INFO)
-            use iso_c_binding
-            use chameleon
-            implicit none
-            integer, parameter :: wp = kind(0.0d0)
-            integer, intent(in) :: LDA
-            integer, intent(in) :: M
-            integer, intent(in) :: N
-            integer, intent(out) :: INFO
-            integer, intent(out), target :: IPIV(*)
-            complex(kind=wp), intent(inout), target :: A(LDA,*)
-            if (.not. chameleon_initialized) call chameleon_init(24,INFO)
-            ! write(*,*) " Calling CHAMELEON_ZGETRF"
-            call CHAMELEON_ZGETRF(M,N,A,LDA,IPIV,INFO)
-      end subroutine chameleon_wrap_ZGETRF
+subroutine chameleon_wrap_ZGETRF(M,N,A,LDA,IPIV,INFO)
+  use iso_c_binding
+  use chameleon
+  implicit none
+  integer, parameter :: wp = kind(0.0d0)
+  integer, intent(in) :: LDA
+  integer, intent(in) :: M
+  integer, intent(in) :: N
+  integer, intent(out) :: INFO
+  integer, intent(out), target :: IPIV(*)
+  complex(kind=wp), intent(inout), target :: A(LDA,*)
+  if (.not. chameleon_initialized) call chameleon_init(24,INFO)
+  ! write(*,*) " Calling CHAMELEON_ZGETRF"
+  call CHAMELEON_ZGETRF(M,N,A,LDA,IPIV,INFO)
+end subroutine chameleon_wrap_ZGETRF
 
-      subroutine chameleon_wrap_ZGETRS(TRANS,N,NRHS,A,LDA,IPIV,B,LDB,INFO)
-            use iso_c_binding
-            use chameleon
-            implicit none
-            integer, parameter :: wp = kind(0.0d0)
-            integer, intent(in) :: LDA
-            integer, intent(in) :: LDB
-            integer, intent(in) :: N
-            integer, intent(in) :: NRHS
-            integer, intent(in), target :: IPIV(*)
-            integer, intent(out) :: INFO
-            character, intent(in) :: TRANS
-            complex(kind=wp), intent(in), target :: A(LDA,*)
-            complex(kind=wp), intent(inout), target :: B(LDB,*)
-            integer :: local_TRANS
-            if(TRANS=='N' .or. TRANS=='n')then
-               local_TRANS = ChamNoTrans
-            else if(TRANS=='T' .or. TRANS=='t')then
-               local_TRANS = ChamTrans
-            else if(TRANS=='C' .or. TRANS=='c')then
-               local_TRANS = ChamConjTrans
-            else
-               local_TRANS = -1
-            end if
-            if (.not. chameleon_initialized) call chameleon_init(24,INFO)
-            ! write(*,*) " Calling CHAMELEON_ZGETRS"
-            call CHAMELEON_ZGETRS(local_TRANS,N,NRHS,A,LDA,IPIV,B,LDB,INFO)
-      end subroutine chameleon_wrap_ZGETRS
+subroutine chameleon_wrap_ZGETRS(TRANS,N,NRHS,A,LDA,IPIV,B,LDB,INFO)
+  use iso_c_binding
+  use chameleon
+  implicit none
+  integer, parameter :: wp = kind(0.0d0)
+  integer, intent(in) :: LDA
+  integer, intent(in) :: LDB
+  integer, intent(in) :: N
+  integer, intent(in) :: NRHS
+  integer, intent(in), target :: IPIV(*)
+  integer, intent(out) :: INFO
+  character, intent(in) :: TRANS
+  complex(kind=wp), intent(in), target :: A(LDA,*)
+  complex(kind=wp), intent(inout), target :: B(LDB,*)
+  integer :: local_TRANS
+  if(TRANS=='N' .or. TRANS=='n')then
+     local_TRANS = ChamNoTrans
+  else if(TRANS=='T' .or. TRANS=='t')then
+     local_TRANS = ChamTrans
+  else if(TRANS=='C' .or. TRANS=='c')then
+     local_TRANS = ChamConjTrans
+  else
+     local_TRANS = -1
+  end if
+  if (.not. chameleon_initialized) call chameleon_init(24,INFO)
+  ! write(*,*) " Calling CHAMELEON_ZGETRS"
+  call CHAMELEON_ZGETRS(local_TRANS,N,NRHS,A,LDA,IPIV,B,LDB,INFO)
+end subroutine chameleon_wrap_ZGETRS
 
-      subroutine chameleon_wrap_ZHEGST(ITYPE,UPLO,N,A,LDA,B,LDB,INFO)
-            use iso_c_binding
-            use chameleon
-            implicit none
-            integer, parameter :: wp = kind(0.0d0)
-            integer, intent(in) :: ITYPE
-            integer, intent(in) :: LDA
-            integer, intent(in) :: LDB
-            integer, intent(in) :: N
-            integer, intent(out) :: INFO
-            character, intent(in) :: UPLO
-            complex(kind=wp), intent(in), target :: B(LDB,*)
-            complex(kind=wp), intent(inout), target :: A(LDA,*)
-            integer :: local_UPLO
-            if(UPLO=='U' .or. UPLO=='u')then
-               local_UPLO = ChamUpper
-            else if(UPLO=='L' .or. UPLO=='l')then
-               local_UPLO = ChamLower
-            else
-               local_UPLO = -1
-            end if
-            if (.not. chameleon_initialized) call chameleon_init(24,INFO)
-            ! write(*,*) " Calling CHAMELEON_ZHEGST"
-            call CHAMELEON_ZHEGST(ITYPE,local_UPLO,N,A,LDA,B,LDB,INFO)
-      end subroutine chameleon_wrap_ZHEGST
+subroutine chameleon_wrap_ZHEGST(ITYPE,UPLO,N,A,LDA,B,LDB,INFO)
+  use iso_c_binding
+  use chameleon
+  implicit none
+  integer, parameter :: wp = kind(0.0d0)
+  integer, intent(in) :: ITYPE
+  integer, intent(in) :: LDA
+  integer, intent(in) :: LDB
+  integer, intent(in) :: N
+  integer, intent(out) :: INFO
+  character, intent(in) :: UPLO
+  complex(kind=wp), intent(in), target :: B(LDB,*)
+  complex(kind=wp), intent(inout), target :: A(LDA,*)
+  integer :: local_UPLO
+  if(UPLO=='U' .or. UPLO=='u')then
+     local_UPLO = ChamUpper
+  else if(UPLO=='L' .or. UPLO=='l')then
+     local_UPLO = ChamLower
+  else
+     local_UPLO = -1
+  end if
+  if (.not. chameleon_initialized) call chameleon_init(24,INFO)
+  ! write(*,*) " Calling CHAMELEON_ZHEGST"
+  call CHAMELEON_ZHEGST(ITYPE,local_UPLO,N,A,LDA,B,LDB,INFO)
+end subroutine chameleon_wrap_ZHEGST
 
-      subroutine chameleon_wrap_ZLASWP(N,A,LDA,K1,K2,IPIV,INCX)
-            use iso_c_binding
-            use chameleon
-            implicit none
-            integer, parameter :: wp = kind(0.0d0)
-            integer, intent(in) :: INCX
-            integer, intent(in) :: K1
-            integer, intent(in) :: K2
-            integer, intent(in) :: LDA
-            integer, intent(in) :: N
-            integer, intent(in), target :: IPIV(*)
-            complex(kind=wp), intent(inout), target :: A(LDA,*)
-            integer :: local_ret
-            if (.not. chameleon_initialized) call chameleon_init(24,local_ret)
-            ! write(*,*) " Calling CHAMELEON_ZLASWP"
-            call CHAMELEON_ZLASWP(N,A,LDA,K1,K2,IPIV,INCX,local_ret)
-      end subroutine chameleon_wrap_ZLASWP
+subroutine chameleon_wrap_ZLASWP(N,A,LDA,K1,K2,IPIV,INCX)
+  use iso_c_binding
+  use chameleon
+  implicit none
+  integer, parameter :: wp = kind(0.0d0)
+  integer, intent(in) :: INCX
+  integer, intent(in) :: K1
+  integer, intent(in) :: K2
+  integer, intent(in) :: LDA
+  integer, intent(in) :: N
+  integer, intent(in), target :: IPIV(*)
+  complex(kind=wp), intent(inout), target :: A(LDA,*)
+  integer :: local_ret
+  if (.not. chameleon_initialized) call chameleon_init(24,local_ret)
+  ! write(*,*) " Calling CHAMELEON_ZLASWP"
+  call CHAMELEON_ZLASWP(N,A,LDA,K1,K2,IPIV,INCX,local_ret)
+end subroutine chameleon_wrap_ZLASWP
 
-      subroutine chameleon_wrap_ZLAUUM(UPLO,N,A,LDA,INFO)
-            use iso_c_binding
-            use chameleon
-            implicit none
-            integer, parameter :: wp = kind(0.0d0)
-            integer, intent(in) :: LDA
-            integer, intent(in) :: N
-            integer, intent(out) :: INFO
-            character, intent(in) :: UPLO
-            complex(kind=wp), intent(inout), target :: A(LDA,*)
-            integer :: local_UPLO
-            if(UPLO=='U' .or. UPLO=='u')then
-               local_UPLO = ChamUpper
-            else if(UPLO=='L' .or. UPLO=='l')then
-               local_UPLO = ChamLower
-            else
-               local_UPLO = -1
-            end if
-            if (.not. chameleon_initialized) call chameleon_init(24,INFO)
-            ! write(*,*) " Calling CHAMELEON_ZLAUUM"
-            call CHAMELEON_ZLAUUM(local_UPLO,N,A,LDA,INFO)
-      end subroutine chameleon_wrap_ZLAUUM
+subroutine chameleon_wrap_ZLAUUM(UPLO,N,A,LDA,INFO)
+  use iso_c_binding
+  use chameleon
+  implicit none
+  integer, parameter :: wp = kind(0.0d0)
+  integer, intent(in) :: LDA
+  integer, intent(in) :: N
+  integer, intent(out) :: INFO
+  character, intent(in) :: UPLO
+  complex(kind=wp), intent(inout), target :: A(LDA,*)
+  integer :: local_UPLO
+  if(UPLO=='U' .or. UPLO=='u')then
+     local_UPLO = ChamUpper
+  else if(UPLO=='L' .or. UPLO=='l')then
+     local_UPLO = ChamLower
+  else
+     local_UPLO = -1
+  end if
+  if (.not. chameleon_initialized) call chameleon_init(24,INFO)
+  ! write(*,*) " Calling CHAMELEON_ZLAUUM"
+  call CHAMELEON_ZLAUUM(local_UPLO,N,A,LDA,INFO)
+end subroutine chameleon_wrap_ZLAUUM
 
-      subroutine chameleon_wrap_ZPOSV(UPLO,N,NRHS,A,LDA,B,LDB,INFO)
-            use iso_c_binding
-            use chameleon
-            implicit none
-            integer, parameter :: wp = kind(0.0d0)
-            integer, intent(in) :: LDA
-            integer, intent(in) :: LDB
-            integer, intent(in) :: N
-            integer, intent(in) :: NRHS
-            integer, intent(out) :: INFO
-            character, intent(in) :: UPLO
-            complex(kind=wp), intent(inout), target :: A(LDA,*)
-            complex(kind=wp), intent(inout), target :: B(LDB,*)
-            integer :: local_UPLO
-            if(UPLO=='U' .or. UPLO=='u')then
-               local_UPLO = ChamUpper
-            else if(UPLO=='L' .or. UPLO=='l')then
-               local_UPLO = ChamLower
-            else
-               local_UPLO = -1
-            end if
-            if (.not. chameleon_initialized) call chameleon_init(24,INFO)
-            ! write(*,*) " Calling CHAMELEON_ZPOSV"
-            call CHAMELEON_ZPOSV(local_UPLO,N,NRHS,A,LDA,B,LDB,INFO)
-      end subroutine chameleon_wrap_ZPOSV
+subroutine chameleon_wrap_ZPOSV(UPLO,N,NRHS,A,LDA,B,LDB,INFO)
+  use iso_c_binding
+  use chameleon
+  implicit none
+  integer, parameter :: wp = kind(0.0d0)
+  integer, intent(in) :: LDA
+  integer, intent(in) :: LDB
+  integer, intent(in) :: N
+  integer, intent(in) :: NRHS
+  integer, intent(out) :: INFO
+  character, intent(in) :: UPLO
+  complex(kind=wp), intent(inout), target :: A(LDA,*)
+  complex(kind=wp), intent(inout), target :: B(LDB,*)
+  integer :: local_UPLO
+  if(UPLO=='U' .or. UPLO=='u')then
+     local_UPLO = ChamUpper
+  else if(UPLO=='L' .or. UPLO=='l')then
+     local_UPLO = ChamLower
+  else
+     local_UPLO = -1
+  end if
+  if (.not. chameleon_initialized) call chameleon_init(24,INFO)
+  ! write(*,*) " Calling CHAMELEON_ZPOSV"
+  call CHAMELEON_ZPOSV(local_UPLO,N,NRHS,A,LDA,B,LDB,INFO)
+end subroutine chameleon_wrap_ZPOSV
 
-      subroutine chameleon_wrap_ZSYSV(UPLO,N,NRHS,A,LDA,B,LDB,INFO)
-            use iso_c_binding
-            use chameleon
-            implicit none
-            integer, parameter :: wp = kind(0.0d0)
-            integer, intent(in) :: LDA
-            integer, intent(in) :: LDB
-            integer, intent(in) :: N
-            integer, intent(in) :: NRHS
-            integer, intent(out) :: INFO
-            character, intent(in) :: UPLO
-            complex(kind=wp), intent(inout), target :: A(LDA,*)
-            complex(kind=wp), intent(inout), target :: B(LDB,*)
-            integer :: local_UPLO
-            if(UPLO=='U' .or. UPLO=='u')then
-               local_UPLO = ChamUpper
-            else if(UPLO=='L' .or. UPLO=='l')then
-               local_UPLO = ChamLower
-            else
-               local_UPLO = -1
-            end if
-            if (.not. chameleon_initialized) call chameleon_init(24,INFO)
-            ! write(*,*) " Calling CHAMELEON_ZSYSV"
-            call CHAMELEON_ZSYSV(local_UPLO,N,NRHS,A,LDA,B,LDB,INFO)
-      end subroutine chameleon_wrap_ZSYSV
+subroutine chameleon_wrap_ZSYSV(UPLO,N,NRHS,A,LDA,B,LDB,INFO)
+  use iso_c_binding
+  use chameleon
+  implicit none
+  integer, parameter :: wp = kind(0.0d0)
+  integer, intent(in) :: LDA
+  integer, intent(in) :: LDB
+  integer, intent(in) :: N
+  integer, intent(in) :: NRHS
+  integer, intent(out) :: INFO
+  character, intent(in) :: UPLO
+  complex(kind=wp), intent(inout), target :: A(LDA,*)
+  complex(kind=wp), intent(inout), target :: B(LDB,*)
+  integer :: local_UPLO
+  if(UPLO=='U' .or. UPLO=='u')then
+     local_UPLO = ChamUpper
+  else if(UPLO=='L' .or. UPLO=='l')then
+     local_UPLO = ChamLower
+  else
+     local_UPLO = -1
+  end if
+  if (.not. chameleon_initialized) call chameleon_init(24,INFO)
+  ! write(*,*) " Calling CHAMELEON_ZSYSV"
+  call CHAMELEON_ZSYSV(local_UPLO,N,NRHS,A,LDA,B,LDB,INFO)
+end subroutine chameleon_wrap_ZSYSV
 
-      subroutine chameleon_wrap_ZPOTRF(UPLO,N,A,LDA,INFO)
-            use iso_c_binding
-            use chameleon
-            implicit none
-            integer, parameter :: wp = kind(0.0d0)
-            integer, intent(in) :: LDA
-            integer, intent(in) :: N
-            integer, intent(out) :: INFO
-            character, intent(in) :: UPLO
-            complex(kind=wp), intent(inout), target :: A(LDA,*)
-            integer :: local_UPLO
-            if(UPLO=='U' .or. UPLO=='u')then
-               local_UPLO = ChamUpper
-            else if(UPLO=='L' .or. UPLO=='l')then
-               local_UPLO = ChamLower
-            else
-               local_UPLO = -1
-            end if
-            if (.not. chameleon_initialized) call chameleon_init(24,INFO)
-            ! write(*,*) " Calling CHAMELEON_ZPOTRF"
-            call CHAMELEON_ZPOTRF(local_UPLO,N,A,LDA,INFO)
-      end subroutine chameleon_wrap_ZPOTRF
+subroutine chameleon_wrap_ZPOTRF(UPLO,N,A,LDA,INFO)
+  use iso_c_binding
+  use chameleon
+  implicit none
+  integer, parameter :: wp = kind(0.0d0)
+  integer, intent(in) :: LDA
+  integer, intent(in) :: N
+  integer, intent(out) :: INFO
+  character, intent(in) :: UPLO
+  complex(kind=wp), intent(inout), target :: A(LDA,*)
+  integer :: local_UPLO
+  if(UPLO=='U' .or. UPLO=='u')then
+     local_UPLO = ChamUpper
+  else if(UPLO=='L' .or. UPLO=='l')then
+     local_UPLO = ChamLower
+  else
+     local_UPLO = -1
+  end if
+  if (.not. chameleon_initialized) call chameleon_init(24,INFO)
+  ! write(*,*) " Calling CHAMELEON_ZPOTRF"
+  call CHAMELEON_ZPOTRF(local_UPLO,N,A,LDA,INFO)
+end subroutine chameleon_wrap_ZPOTRF
 
-      subroutine chameleon_wrap_ZSYTRF(UPLO,N,A,LDA,INFO)
-            use iso_c_binding
-            use chameleon
-            implicit none
-            integer, parameter :: wp = kind(0.0d0)
-            integer, intent(in) :: LDA
-            integer, intent(in) :: N
-            integer, intent(out) :: INFO
-            character, intent(in) :: UPLO
-            complex(kind=wp), intent(inout), target :: A(LDA,*)
-            integer :: local_UPLO
-            if(UPLO=='U' .or. UPLO=='u')then
-               local_UPLO = ChamUpper
-            else if(UPLO=='L' .or. UPLO=='l')then
-               local_UPLO = ChamLower
-            else
-               local_UPLO = -1
-            end if
-            if (.not. chameleon_initialized) call chameleon_init(24,INFO)
-            ! write(*,*) " Calling CHAMELEON_ZSYTRF"
-            call CHAMELEON_ZSYTRF(local_UPLO,N,A,LDA,INFO)
-      end subroutine chameleon_wrap_ZSYTRF
+subroutine chameleon_wrap_ZSYTRF(UPLO,N,A,LDA,INFO)
+  use iso_c_binding
+  use chameleon
+  implicit none
+  integer, parameter :: wp = kind(0.0d0)
+  integer, intent(in) :: LDA
+  integer, intent(in) :: N
+  integer, intent(out) :: INFO
+  character, intent(in) :: UPLO
+  complex(kind=wp), intent(inout), target :: A(LDA,*)
+  integer :: local_UPLO
+  if(UPLO=='U' .or. UPLO=='u')then
+     local_UPLO = ChamUpper
+  else if(UPLO=='L' .or. UPLO=='l')then
+     local_UPLO = ChamLower
+  else
+     local_UPLO = -1
+  end if
+  if (.not. chameleon_initialized) call chameleon_init(24,INFO)
+  ! write(*,*) " Calling CHAMELEON_ZSYTRF"
+  call CHAMELEON_ZSYTRF(local_UPLO,N,A,LDA,INFO)
+end subroutine chameleon_wrap_ZSYTRF
 
-      subroutine chameleon_wrap_ZPOTRI(UPLO,N,A,LDA,INFO)
-            use iso_c_binding
-            use chameleon
-            implicit none
-            integer, parameter :: wp = kind(0.0d0)
-            integer, intent(in) :: LDA
-            integer, intent(in) :: N
-            integer, intent(out) :: INFO
-            character, intent(in) :: UPLO
-            complex(kind=wp), intent(inout), target :: A(LDA,*)
-            integer :: local_UPLO
-            if(UPLO=='U' .or. UPLO=='u')then
-               local_UPLO = ChamUpper
-            else if(UPLO=='L' .or. UPLO=='l')then
-               local_UPLO = ChamLower
-            else
-               local_UPLO = -1
-            end if
-            if (.not. chameleon_initialized) call chameleon_init(24,INFO)
-            ! write(*,*) " Calling CHAMELEON_ZPOTRI"
-            call CHAMELEON_ZPOTRI(local_UPLO,N,A,LDA,INFO)
-      end subroutine chameleon_wrap_ZPOTRI
+subroutine chameleon_wrap_ZPOTRI(UPLO,N,A,LDA,INFO)
+  use iso_c_binding
+  use chameleon
+  implicit none
+  integer, parameter :: wp = kind(0.0d0)
+  integer, intent(in) :: LDA
+  integer, intent(in) :: N
+  integer, intent(out) :: INFO
+  character, intent(in) :: UPLO
+  complex(kind=wp), intent(inout), target :: A(LDA,*)
+  integer :: local_UPLO
+  if(UPLO=='U' .or. UPLO=='u')then
+     local_UPLO = ChamUpper
+  else if(UPLO=='L' .or. UPLO=='l')then
+     local_UPLO = ChamLower
+  else
+     local_UPLO = -1
+  end if
+  if (.not. chameleon_initialized) call chameleon_init(24,INFO)
+  ! write(*,*) " Calling CHAMELEON_ZPOTRI"
+  call CHAMELEON_ZPOTRI(local_UPLO,N,A,LDA,INFO)
+end subroutine chameleon_wrap_ZPOTRI
 
-      subroutine chameleon_wrap_ZPOTRS(UPLO,N,NRHS,A,LDA,B,LDB,INFO)
-            use iso_c_binding
-            use chameleon
-            implicit none
-            integer, parameter :: wp = kind(0.0d0)
-            integer, intent(in) :: LDA
-            integer, intent(in) :: LDB
-            integer, intent(in) :: N
-            integer, intent(in) :: NRHS
-            integer, intent(out) :: INFO
-            character, intent(in) :: UPLO
-            complex(kind=wp), intent(in), target :: A(LDA,*)
-            complex(kind=wp), intent(inout), target :: B(LDB,*)
-            integer :: local_UPLO
-            if(UPLO=='U' .or. UPLO=='u')then
-               local_UPLO = ChamUpper
-            else if(UPLO=='L' .or. UPLO=='l')then
-               local_UPLO = ChamLower
-            else
-               local_UPLO = -1
-            end if
-            if (.not. chameleon_initialized) call chameleon_init(24,INFO)
-            ! write(*,*) " Calling CHAMELEON_ZPOTRS"
-            call CHAMELEON_ZPOTRS(local_UPLO,N,NRHS,A,LDA,B,LDB,INFO)
-      end subroutine chameleon_wrap_ZPOTRS
+subroutine chameleon_wrap_ZPOTRS(UPLO,N,NRHS,A,LDA,B,LDB,INFO)
+  use iso_c_binding
+  use chameleon
+  implicit none
+  integer, parameter :: wp = kind(0.0d0)
+  integer, intent(in) :: LDA
+  integer, intent(in) :: LDB
+  integer, intent(in) :: N
+  integer, intent(in) :: NRHS
+  integer, intent(out) :: INFO
+  character, intent(in) :: UPLO
+  complex(kind=wp), intent(in), target :: A(LDA,*)
+  complex(kind=wp), intent(inout), target :: B(LDB,*)
+  integer :: local_UPLO
+  if(UPLO=='U' .or. UPLO=='u')then
+     local_UPLO = ChamUpper
+  else if(UPLO=='L' .or. UPLO=='l')then
+     local_UPLO = ChamLower
+  else
+     local_UPLO = -1
+  end if
+  if (.not. chameleon_initialized) call chameleon_init(24,INFO)
+  ! write(*,*) " Calling CHAMELEON_ZPOTRS"
+  call CHAMELEON_ZPOTRS(local_UPLO,N,NRHS,A,LDA,B,LDB,INFO)
+end subroutine chameleon_wrap_ZPOTRS
 
-      subroutine chameleon_wrap_ZSYTRS(UPLO,N,NRHS,A,LDA,B,LDB,INFO)
-            use iso_c_binding
-            use chameleon
-            implicit none
-            integer, parameter :: wp = kind(0.0d0)
-            integer, intent(in) :: LDA
-            integer, intent(in) :: LDB
-            integer, intent(in) :: N
-            integer, intent(in) :: NRHS
-            integer, intent(out) :: INFO
-            character, intent(in) :: UPLO
-            complex(kind=wp), intent(in), target :: A(LDA,*)
-            complex(kind=wp), intent(inout), target :: B(LDB,*)
-            integer :: local_UPLO
-            if(UPLO=='U' .or. UPLO=='u')then
-               local_UPLO = ChamUpper
-            else if(UPLO=='L' .or. UPLO=='l')then
-               local_UPLO = ChamLower
-            else
-               local_UPLO = -1
-            end if
-            if (.not. chameleon_initialized) call chameleon_init(24,INFO)
-            ! write(*,*) " Calling CHAMELEON_ZSYTRS"
-            call CHAMELEON_ZSYTRS(local_UPLO,N,NRHS,A,LDA,B,LDB,INFO)
-      end subroutine chameleon_wrap_ZSYTRS
+subroutine chameleon_wrap_ZSYTRS(UPLO,N,NRHS,A,LDA,B,LDB,INFO)
+  use iso_c_binding
+  use chameleon
+  implicit none
+  integer, parameter :: wp = kind(0.0d0)
+  integer, intent(in) :: LDA
+  integer, intent(in) :: LDB
+  integer, intent(in) :: N
+  integer, intent(in) :: NRHS
+  integer, intent(out) :: INFO
+  character, intent(in) :: UPLO
+  complex(kind=wp), intent(in), target :: A(LDA,*)
+  complex(kind=wp), intent(inout), target :: B(LDB,*)
+  integer :: local_UPLO
+  if(UPLO=='U' .or. UPLO=='u')then
+     local_UPLO = ChamUpper
+  else if(UPLO=='L' .or. UPLO=='l')then
+     local_UPLO = ChamLower
+  else
+     local_UPLO = -1
+  end if
+  if (.not. chameleon_initialized) call chameleon_init(24,INFO)
+  ! write(*,*) " Calling CHAMELEON_ZSYTRS"
+  call CHAMELEON_ZSYTRS(local_UPLO,N,NRHS,A,LDA,B,LDB,INFO)
+end subroutine chameleon_wrap_ZSYTRS
 
-      subroutine chameleon_wrap_ZTRTRI(UPLO,DIAG,N,A,LDA,INFO)
-            use iso_c_binding
-            use chameleon
-            implicit none
-            integer, parameter :: wp = kind(0.0d0)
-            integer, intent(in) :: LDA
-            integer, intent(in) :: N
-            integer, intent(out) :: INFO
-            character, intent(in) :: DIAG
-            character, intent(in) :: UPLO
-            complex(kind=wp), intent(inout), target :: A(LDA,*)
-            integer :: local_DIAG
-            integer :: local_UPLO
-            if(UPLO=='U' .or. UPLO=='u')then
-               local_UPLO = ChamUpper
-            else if(UPLO=='L' .or. UPLO=='l')then
-               local_UPLO = ChamLower
-            else
-               local_UPLO = -1
-            end if
-            if(DIAG=='U' .or. DIAG=='u')then
-               local_DIAG = ChamUnit
-            else if(DIAG=='N' .or. DIAG=='n')then
-               local_DIAG = ChamNonUnit
-            else
-               local_DIAG = -1
-            end if
-            if (.not. chameleon_initialized) call chameleon_init(24,INFO)
-            ! write(*,*) " Calling CHAMELEON_ZTRTRI"
-            call CHAMELEON_ZTRTRI(local_UPLO,local_DIAG,N,A,LDA,INFO)
-      end subroutine chameleon_wrap_ZTRTRI
+subroutine chameleon_wrap_ZTRTRI(UPLO,DIAG,N,A,LDA,INFO)
+  use iso_c_binding
+  use chameleon
+  implicit none
+  integer, parameter :: wp = kind(0.0d0)
+  integer, intent(in) :: LDA
+  integer, intent(in) :: N
+  integer, intent(out) :: INFO
+  character, intent(in) :: DIAG
+  character, intent(in) :: UPLO
+  complex(kind=wp), intent(inout), target :: A(LDA,*)
+  integer :: local_DIAG
+  integer :: local_UPLO
+  if(UPLO=='U' .or. UPLO=='u')then
+     local_UPLO = ChamUpper
+  else if(UPLO=='L' .or. UPLO=='l')then
+     local_UPLO = ChamLower
+  else
+     local_UPLO = -1
+  end if
+  if(DIAG=='U' .or. DIAG=='u')then
+     local_DIAG = ChamUnit
+  else if(DIAG=='N' .or. DIAG=='n')then
+     local_DIAG = ChamNonUnit
+  else
+     local_DIAG = -1
+  end if
+  if (.not. chameleon_initialized) call chameleon_init(24,INFO)
+  ! write(*,*) " Calling CHAMELEON_ZTRTRI"
+  call CHAMELEON_ZTRTRI(local_UPLO,local_DIAG,N,A,LDA,INFO)
+end subroutine chameleon_wrap_ZTRTRI
 
-      subroutine chameleon_wrap_ZGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
-            use iso_c_binding
-            use chameleon
-            implicit none
-            integer, parameter :: wp = kind(0.0d0)
-            integer, intent(in) :: K
-            integer, intent(in) :: LDA
-            integer, intent(in) :: LDB
-            integer, intent(in) :: LDC
-            integer, intent(in) :: M
-            integer, intent(in) :: N
-            character, intent(in) :: TRANSA
-            character, intent(in) :: TRANSB
-            complex(kind=wp), intent(in) :: ALPHA
-            complex(kind=wp), intent(in) :: BETA
-            complex(kind=wp), intent(in), target :: A(LDA,*)
-            complex(kind=wp), intent(in), target :: B(LDB,*)
-            complex(kind=wp), intent(inout), target :: C(LDC,*)
-            integer :: local_TRANSA
-            integer :: local_TRANSB
-            integer :: local_ret
-            if(TRANSA=='N' .or. TRANSA=='n')then
-               local_TRANSA = ChamNoTrans
-            else if(TRANSA=='T' .or. TRANSA=='t')then
-               local_TRANSA = ChamTrans
-            else if(TRANSA=='C' .or. TRANSA=='c')then
-               local_TRANSA = ChamConjTrans
-            else
-               local_TRANSA = -1
-            end if
-            if(TRANSB=='N' .or. TRANSB=='n')then
-               local_TRANSB = ChamNoTrans
-            else if(TRANSB=='T' .or. TRANSB=='t')then
-               local_TRANSB = ChamTrans
-            else if(TRANSB=='C' .or. TRANSB=='c')then
-               local_TRANSB = ChamConjTrans
-            else
-               local_TRANSB = -1
-            end if
-            if (.not. chameleon_initialized) call chameleon_init(24,local_ret)
-            ! write(*,*) " Calling CHAMELEON_ZGEMM"
-            call CHAMELEON_ZGEMM(local_TRANSA,local_TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC,local_ret)
-      end subroutine chameleon_wrap_ZGEMM
+subroutine chameleon_wrap_ZGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
+  use iso_c_binding
+  use chameleon
+  implicit none
+  integer, parameter :: wp = kind(0.0d0)
+  integer, intent(in) :: K
+  integer, intent(in) :: LDA
+  integer, intent(in) :: LDB
+  integer, intent(in) :: LDC
+  integer, intent(in) :: M
+  integer, intent(in) :: N
+  character, intent(in) :: TRANSA
+  character, intent(in) :: TRANSB
+  complex(kind=wp), intent(in) :: ALPHA
+  complex(kind=wp), intent(in) :: BETA
+  complex(kind=wp), intent(in), target :: A(LDA,*)
+  complex(kind=wp), intent(in), target :: B(LDB,*)
+  complex(kind=wp), intent(inout), target :: C(LDC,*)
+  integer :: local_TRANSA
+  integer :: local_TRANSB
+  integer :: local_ret
+  if(TRANSA=='N' .or. TRANSA=='n')then
+     local_TRANSA = ChamNoTrans
+  else if(TRANSA=='T' .or. TRANSA=='t')then
+     local_TRANSA = ChamTrans
+  else if(TRANSA=='C' .or. TRANSA=='c')then
+     local_TRANSA = ChamConjTrans
+  else
+     local_TRANSA = -1
+  end if
+  if(TRANSB=='N' .or. TRANSB=='n')then
+     local_TRANSB = ChamNoTrans
+  else if(TRANSB=='T' .or. TRANSB=='t')then
+     local_TRANSB = ChamTrans
+  else if(TRANSB=='C' .or. TRANSB=='c')then
+     local_TRANSB = ChamConjTrans
+  else
+     local_TRANSB = -1
+  end if
+  if (.not. chameleon_initialized) call chameleon_init(24,local_ret)
+  ! write(*,*) " Calling CHAMELEON_ZGEMM"
+  call CHAMELEON_ZGEMM(local_TRANSA,local_TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC,local_ret)
+end subroutine chameleon_wrap_ZGEMM
 
 #if defined(PRECISION_z) || defined(PRECISION_c)
-      subroutine chameleon_wrap_ZHEMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
-            use iso_c_binding
-            use chameleon
-            implicit none
-            integer, parameter :: wp = kind(0.0d0)
-            integer, intent(in) :: LDA
-            integer, intent(in) :: LDB
-            integer, intent(in) :: LDC
-            integer, intent(in) :: M
-            integer, intent(in) :: N
-            character, intent(in) :: SIDE
-            character, intent(in) :: UPLO
-            complex(kind=wp), intent(in) :: ALPHA
-            complex(kind=wp), intent(in) :: BETA
-            complex(kind=wp), intent(in), target :: A(LDA,*)
-            complex(kind=wp), intent(in), target :: B(LDB,*)
-            complex(kind=wp), intent(inout), target :: C(LDC,*)
-            integer :: local_SIDE
-            integer :: local_UPLO
-            integer :: local_ret
-            if(SIDE=='L' .or. SIDE=='l')then
-               local_SIDE = ChamLeft
-            else if(SIDE=='R' .or. SIDE=='r')then
-               local_SIDE = ChamRight
-            else
-               local_SIDE = -1
-            end if
-            if(UPLO=='U' .or. UPLO=='u')then
-               local_UPLO = ChamUpper
-            else if(UPLO=='L' .or. UPLO=='l')then
-               local_UPLO = ChamLower
-            else
-               local_UPLO = -1
-            end if
-            if (.not. chameleon_initialized) call chameleon_init(24,local_ret)
-            ! write(*,*) " Calling CHAMELEON_ZHEMM"
-            call CHAMELEON_ZHEMM(local_SIDE,local_UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC,local_ret)
-      end subroutine chameleon_wrap_ZHEMM
+subroutine chameleon_wrap_ZHEMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
+  use iso_c_binding
+  use chameleon
+  implicit none
+  integer, parameter :: wp = kind(0.0d0)
+  integer, intent(in) :: LDA
+  integer, intent(in) :: LDB
+  integer, intent(in) :: LDC
+  integer, intent(in) :: M
+  integer, intent(in) :: N
+  character, intent(in) :: SIDE
+  character, intent(in) :: UPLO
+  complex(kind=wp), intent(in) :: ALPHA
+  complex(kind=wp), intent(in) :: BETA
+  complex(kind=wp), intent(in), target :: A(LDA,*)
+  complex(kind=wp), intent(in), target :: B(LDB,*)
+  complex(kind=wp), intent(inout), target :: C(LDC,*)
+  integer :: local_SIDE
+  integer :: local_UPLO
+  integer :: local_ret
+  if(SIDE=='L' .or. SIDE=='l')then
+     local_SIDE = ChamLeft
+  else if(SIDE=='R' .or. SIDE=='r')then
+     local_SIDE = ChamRight
+  else
+     local_SIDE = -1
+  end if
+  if(UPLO=='U' .or. UPLO=='u')then
+     local_UPLO = ChamUpper
+  else if(UPLO=='L' .or. UPLO=='l')then
+     local_UPLO = ChamLower
+  else
+     local_UPLO = -1
+  end if
+  if (.not. chameleon_initialized) call chameleon_init(24,local_ret)
+  ! write(*,*) " Calling CHAMELEON_ZHEMM"
+  call CHAMELEON_ZHEMM(local_SIDE,local_UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC,local_ret)
+end subroutine chameleon_wrap_ZHEMM
 
-      subroutine chameleon_wrap_ZHER2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
-            use iso_c_binding
-            use chameleon
-            implicit none
-            integer, parameter :: wp = kind(0.0d0)
-            integer, intent(in) :: K
-            integer, intent(in) :: LDA
-            integer, intent(in) :: LDB
-            integer, intent(in) :: LDC
-            integer, intent(in) :: N
-            character, intent(in) :: TRANS
-            character, intent(in) :: UPLO
-            complex(kind=wp), intent(in) :: ALPHA
-            complex(kind=wp), intent(in), target :: A(LDA,*)
-            complex(kind=wp), intent(in), target :: B(LDB,*)
-            complex(kind=wp), intent(inout), target :: C(LDC,*)
-            double precision, intent(in) :: BETA
-            integer :: local_TRANS
-            integer :: local_UPLO
-            integer :: local_ret
-            if(UPLO=='U' .or. UPLO=='u')then
-               local_UPLO = ChamUpper
-            else if(UPLO=='L' .or. UPLO=='l')then
-               local_UPLO = ChamLower
-            else
-               local_UPLO = -1
-            end if
-            if(TRANS=='N' .or. TRANS=='n')then
-               local_TRANS = ChamNoTrans
-            else if(TRANS=='T' .or. TRANS=='t')then
-               local_TRANS = ChamTrans
-            else if(TRANS=='C' .or. TRANS=='c')then
-               local_TRANS = ChamConjTrans
-            else
-               local_TRANS = -1
-            end if
-            if (.not. chameleon_initialized) call chameleon_init(24,local_ret)
-            ! write(*,*) " Calling CHAMELEON_ZHER2K"
-            call CHAMELEON_ZHER2K(local_UPLO,local_TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC,local_ret)
-      end subroutine chameleon_wrap_ZHER2K
+subroutine chameleon_wrap_ZHER2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
+  use iso_c_binding
+  use chameleon
+  implicit none
+  integer, parameter :: wp = kind(0.0d0)
+  integer, intent(in) :: K
+  integer, intent(in) :: LDA
+  integer, intent(in) :: LDB
+  integer, intent(in) :: LDC
+  integer, intent(in) :: N
+  character, intent(in) :: TRANS
+  character, intent(in) :: UPLO
+  complex(kind=wp), intent(in) :: ALPHA
+  complex(kind=wp), intent(in), target :: A(LDA,*)
+  complex(kind=wp), intent(in), target :: B(LDB,*)
+  complex(kind=wp), intent(inout), target :: C(LDC,*)
+  double precision, intent(in) :: BETA
+  integer :: local_TRANS
+  integer :: local_UPLO
+  integer :: local_ret
+  if(UPLO=='U' .or. UPLO=='u')then
+     local_UPLO = ChamUpper
+  else if(UPLO=='L' .or. UPLO=='l')then
+     local_UPLO = ChamLower
+  else
+     local_UPLO = -1
+  end if
+  if(TRANS=='N' .or. TRANS=='n')then
+     local_TRANS = ChamNoTrans
+  else if(TRANS=='T' .or. TRANS=='t')then
+     local_TRANS = ChamTrans
+  else if(TRANS=='C' .or. TRANS=='c')then
+     local_TRANS = ChamConjTrans
+  else
+     local_TRANS = -1
+  end if
+  if (.not. chameleon_initialized) call chameleon_init(24,local_ret)
+  ! write(*,*) " Calling CHAMELEON_ZHER2K"
+  call CHAMELEON_ZHER2K(local_UPLO,local_TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC,local_ret)
+end subroutine chameleon_wrap_ZHER2K
 
-      subroutine chameleon_wrap_ZHERK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
-            use iso_c_binding
-            use chameleon
-            implicit none
-            integer, parameter :: wp = kind(0.0d0)
-            integer, intent(in) :: K
-            integer, intent(in) :: LDA
-            integer, intent(in) :: LDC
-            integer, intent(in) :: N
-            character, intent(in) :: TRANS
-            character, intent(in) :: UPLO
-            complex(kind=wp), intent(in), target :: A(LDA,*)
-            complex(kind=wp), intent(inout), target :: C(LDC,*)
-            double precision, intent(in) :: ALPHA
-            double precision, intent(in) :: BETA
-            integer :: local_TRANS
-            integer :: local_UPLO
-            integer :: local_ret
-            if(UPLO=='U' .or. UPLO=='u')then
-               local_UPLO = ChamUpper
-            else if(UPLO=='L' .or. UPLO=='l')then
-               local_UPLO = ChamLower
-            else
-               local_UPLO = -1
-            end if
-            if(TRANS=='N' .or. TRANS=='n')then
-               local_TRANS = ChamNoTrans
-            else if(TRANS=='T' .or. TRANS=='t')then
-               local_TRANS = ChamTrans
-            else if(TRANS=='C' .or. TRANS=='c')then
-               local_TRANS = ChamConjTrans
-            else
-               local_TRANS = -1
-            end if
-            if (.not. chameleon_initialized) call chameleon_init(24,local_ret)
-            ! write(*,*) " Calling CHAMELEON_ZHERK"
-            call CHAMELEON_ZHERK(local_UPLO,local_TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC,local_ret)
-      end subroutine chameleon_wrap_ZHERK
+subroutine chameleon_wrap_ZHERK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
+  use iso_c_binding
+  use chameleon
+  implicit none
+  integer, parameter :: wp = kind(0.0d0)
+  integer, intent(in) :: K
+  integer, intent(in) :: LDA
+  integer, intent(in) :: LDC
+  integer, intent(in) :: N
+  character, intent(in) :: TRANS
+  character, intent(in) :: UPLO
+  complex(kind=wp), intent(in), target :: A(LDA,*)
+  complex(kind=wp), intent(inout), target :: C(LDC,*)
+  double precision, intent(in) :: ALPHA
+  double precision, intent(in) :: BETA
+  integer :: local_TRANS
+  integer :: local_UPLO
+  integer :: local_ret
+  if(UPLO=='U' .or. UPLO=='u')then
+     local_UPLO = ChamUpper
+  else if(UPLO=='L' .or. UPLO=='l')then
+     local_UPLO = ChamLower
+  else
+     local_UPLO = -1
+  end if
+  if(TRANS=='N' .or. TRANS=='n')then
+     local_TRANS = ChamNoTrans
+  else if(TRANS=='T' .or. TRANS=='t')then
+     local_TRANS = ChamTrans
+  else if(TRANS=='C' .or. TRANS=='c')then
+     local_TRANS = ChamConjTrans
+  else
+     local_TRANS = -1
+  end if
+  if (.not. chameleon_initialized) call chameleon_init(24,local_ret)
+  ! write(*,*) " Calling CHAMELEON_ZHERK"
+  call CHAMELEON_ZHERK(local_UPLO,local_TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC,local_ret)
+end subroutine chameleon_wrap_ZHERK
 #endif
 
-      subroutine chameleon_wrap_ZSYMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
-            use iso_c_binding
-            use chameleon
-            implicit none
-            integer, parameter :: wp = kind(0.0d0)
-            integer, intent(in) :: LDA
-            integer, intent(in) :: LDB
-            integer, intent(in) :: LDC
-            integer, intent(in) :: M
-            integer, intent(in) :: N
-            character, intent(in) :: SIDE
-            character, intent(in) :: UPLO
-            complex(kind=wp), intent(in) :: ALPHA
-            complex(kind=wp), intent(in) :: BETA
-            complex(kind=wp), intent(in), target :: A(LDA,*)
-            complex(kind=wp), intent(in), target :: B(LDB,*)
-            complex(kind=wp), intent(inout), target :: C(LDC,*)
-            integer :: local_SIDE
-            integer :: local_UPLO
-            integer :: local_ret
-            if(SIDE=='L' .or. SIDE=='l')then
-               local_SIDE = ChamLeft
-            else if(SIDE=='R' .or. SIDE=='r')then
-               local_SIDE = ChamRight
-            else
-               local_SIDE = -1
-            end if
-            if(UPLO=='U' .or. UPLO=='u')then
-               local_UPLO = ChamUpper
-            else if(UPLO=='L' .or. UPLO=='l')then
-               local_UPLO = ChamLower
-            else
-               local_UPLO = -1
-            end if
-            if (.not. chameleon_initialized) call chameleon_init(24,local_ret)
-            ! write(*,*) " Calling CHAMELEON_ZSYMM"
-            call CHAMELEON_ZSYMM(local_SIDE,local_UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC,local_ret)
-      end subroutine chameleon_wrap_ZSYMM
+subroutine chameleon_wrap_ZSYMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
+  use iso_c_binding
+  use chameleon
+  implicit none
+  integer, parameter :: wp = kind(0.0d0)
+  integer, intent(in) :: LDA
+  integer, intent(in) :: LDB
+  integer, intent(in) :: LDC
+  integer, intent(in) :: M
+  integer, intent(in) :: N
+  character, intent(in) :: SIDE
+  character, intent(in) :: UPLO
+  complex(kind=wp), intent(in) :: ALPHA
+  complex(kind=wp), intent(in) :: BETA
+  complex(kind=wp), intent(in), target :: A(LDA,*)
+  complex(kind=wp), intent(in), target :: B(LDB,*)
+  complex(kind=wp), intent(inout), target :: C(LDC,*)
+  integer :: local_SIDE
+  integer :: local_UPLO
+  integer :: local_ret
+  if(SIDE=='L' .or. SIDE=='l')then
+     local_SIDE = ChamLeft
+  else if(SIDE=='R' .or. SIDE=='r')then
+     local_SIDE = ChamRight
+  else
+     local_SIDE = -1
+  end if
+  if(UPLO=='U' .or. UPLO=='u')then
+     local_UPLO = ChamUpper
+  else if(UPLO=='L' .or. UPLO=='l')then
+     local_UPLO = ChamLower
+  else
+     local_UPLO = -1
+  end if
+  if (.not. chameleon_initialized) call chameleon_init(24,local_ret)
+  ! write(*,*) " Calling CHAMELEON_ZSYMM"
+  call CHAMELEON_ZSYMM(local_SIDE,local_UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC,local_ret)
+end subroutine chameleon_wrap_ZSYMM
 
-      subroutine chameleon_wrap_ZSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
-            use iso_c_binding
-            use chameleon
-            implicit none
-            integer, parameter :: wp = kind(0.0d0)
-            integer, intent(in) :: K
-            integer, intent(in) :: LDA
-            integer, intent(in) :: LDB
-            integer, intent(in) :: LDC
-            integer, intent(in) :: N
-            character, intent(in) :: TRANS
-            character, intent(in) :: UPLO
-            complex(kind=wp), intent(in) :: ALPHA
-            complex(kind=wp), intent(in) :: BETA
-            complex(kind=wp), intent(in), target :: A(LDA,*)
-            complex(kind=wp), intent(in), target :: B(LDB,*)
-            complex(kind=wp), intent(inout), target :: C(LDC,*)
-            integer :: local_TRANS
-            integer :: local_UPLO
-            integer :: local_ret
-            if(UPLO=='U' .or. UPLO=='u')then
-               local_UPLO = ChamUpper
-            else if(UPLO=='L' .or. UPLO=='l')then
-               local_UPLO = ChamLower
-            else
-               local_UPLO = -1
-            end if
-            if(TRANS=='N' .or. TRANS=='n')then
-               local_TRANS = ChamNoTrans
-            else if(TRANS=='T' .or. TRANS=='t')then
-               local_TRANS = ChamTrans
-            else if(TRANS=='C' .or. TRANS=='c')then
-               local_TRANS = ChamConjTrans
-            else
-               local_TRANS = -1
-            end if
-            if (.not. chameleon_initialized) call chameleon_init(24,local_ret)
-            ! write(*,*) " Calling CHAMELEON_ZSYR2K"
-            call CHAMELEON_ZSYR2K(local_UPLO,local_TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC,local_ret)
-      end subroutine chameleon_wrap_ZSYR2K
+subroutine chameleon_wrap_ZSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
+  use iso_c_binding
+  use chameleon
+  implicit none
+  integer, parameter :: wp = kind(0.0d0)
+  integer, intent(in) :: K
+  integer, intent(in) :: LDA
+  integer, intent(in) :: LDB
+  integer, intent(in) :: LDC
+  integer, intent(in) :: N
+  character, intent(in) :: TRANS
+  character, intent(in) :: UPLO
+  complex(kind=wp), intent(in) :: ALPHA
+  complex(kind=wp), intent(in) :: BETA
+  complex(kind=wp), intent(in), target :: A(LDA,*)
+  complex(kind=wp), intent(in), target :: B(LDB,*)
+  complex(kind=wp), intent(inout), target :: C(LDC,*)
+  integer :: local_TRANS
+  integer :: local_UPLO
+  integer :: local_ret
+  if(UPLO=='U' .or. UPLO=='u')then
+     local_UPLO = ChamUpper
+  else if(UPLO=='L' .or. UPLO=='l')then
+     local_UPLO = ChamLower
+  else
+     local_UPLO = -1
+  end if
+  if(TRANS=='N' .or. TRANS=='n')then
+     local_TRANS = ChamNoTrans
+  else if(TRANS=='T' .or. TRANS=='t')then
+     local_TRANS = ChamTrans
+  else if(TRANS=='C' .or. TRANS=='c')then
+     local_TRANS = ChamConjTrans
+  else
+     local_TRANS = -1
+  end if
+  if (.not. chameleon_initialized) call chameleon_init(24,local_ret)
+  ! write(*,*) " Calling CHAMELEON_ZSYR2K"
+  call CHAMELEON_ZSYR2K(local_UPLO,local_TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC,local_ret)
+end subroutine chameleon_wrap_ZSYR2K
 
-      subroutine chameleon_wrap_ZSYRK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
-            use iso_c_binding
-            use chameleon
-            implicit none
-            integer, parameter :: wp = kind(0.0d0)
-            integer, intent(in) :: K
-            integer, intent(in) :: LDA
-            integer, intent(in) :: LDC
-            integer, intent(in) :: N
-            character, intent(in) :: TRANS
-            character, intent(in) :: UPLO
-            complex(kind=wp), intent(in) :: ALPHA
-            complex(kind=wp), intent(in) :: BETA
-            complex(kind=wp), intent(in), target :: A(LDA,*)
-            complex(kind=wp), intent(inout), target :: C(LDC,*)
-            integer :: local_TRANS
-            integer :: local_UPLO
-            integer :: local_ret
-            if(UPLO=='U' .or. UPLO=='u')then
-               local_UPLO = ChamUpper
-            else if(UPLO=='L' .or. UPLO=='l')then
-               local_UPLO = ChamLower
-            else
-               local_UPLO = -1
-            end if
-            if(TRANS=='N' .or. TRANS=='n')then
-               local_TRANS = ChamNoTrans
-            else if(TRANS=='T' .or. TRANS=='t')then
-               local_TRANS = ChamTrans
-            else if(TRANS=='C' .or. TRANS=='c')then
-               local_TRANS = ChamConjTrans
-            else
-               local_TRANS = -1
-            end if
-            if (.not. chameleon_initialized) call chameleon_init(24,local_ret)
-            ! write(*,*) " Calling CHAMELEON_ZSYRK"
-            call CHAMELEON_ZSYRK(local_UPLO,local_TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC,local_ret)
-      end subroutine chameleon_wrap_ZSYRK
+subroutine chameleon_wrap_ZSYRK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
+  use iso_c_binding
+  use chameleon
+  implicit none
+  integer, parameter :: wp = kind(0.0d0)
+  integer, intent(in) :: K
+  integer, intent(in) :: LDA
+  integer, intent(in) :: LDC
+  integer, intent(in) :: N
+  character, intent(in) :: TRANS
+  character, intent(in) :: UPLO
+  complex(kind=wp), intent(in) :: ALPHA
+  complex(kind=wp), intent(in) :: BETA
+  complex(kind=wp), intent(in), target :: A(LDA,*)
+  complex(kind=wp), intent(inout), target :: C(LDC,*)
+  integer :: local_TRANS
+  integer :: local_UPLO
+  integer :: local_ret
+  if(UPLO=='U' .or. UPLO=='u')then
+     local_UPLO = ChamUpper
+  else if(UPLO=='L' .or. UPLO=='l')then
+     local_UPLO = ChamLower
+  else
+     local_UPLO = -1
+  end if
+  if(TRANS=='N' .or. TRANS=='n')then
+     local_TRANS = ChamNoTrans
+  else if(TRANS=='T' .or. TRANS=='t')then
+     local_TRANS = ChamTrans
+  else if(TRANS=='C' .or. TRANS=='c')then
+     local_TRANS = ChamConjTrans
+  else
+     local_TRANS = -1
+  end if
+  if (.not. chameleon_initialized) call chameleon_init(24,local_ret)
+  ! write(*,*) " Calling CHAMELEON_ZSYRK"
+  call CHAMELEON_ZSYRK(local_UPLO,local_TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC,local_ret)
+end subroutine chameleon_wrap_ZSYRK
 
-      subroutine chameleon_wrap_ZTRMM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
-            use iso_c_binding
-            use chameleon
-            implicit none
-            integer, parameter :: wp = kind(0.0d0)
-            integer, intent(in) :: LDA
-            integer, intent(in) :: LDB
-            integer, intent(in) :: M
-            integer, intent(in) :: N
-            character, intent(in) :: DIAG
-            character, intent(in) :: SIDE
-            character, intent(in) :: TRANSA
-            character, intent(in) :: UPLO
-            complex(kind=wp), intent(in) :: ALPHA
-            complex(kind=wp), intent(in), target :: A(LDA,*)
-            complex(kind=wp), intent(inout), target :: B(LDB,*)
-            integer :: local_DIAG
-            integer :: local_SIDE
-            integer :: local_TRANSA
-            integer :: local_UPLO
-            integer :: local_ret
-            if(SIDE=='L' .or. SIDE=='l')then
-               local_SIDE = ChamLeft
-            else if(SIDE=='R' .or. SIDE=='r')then
-               local_SIDE = ChamRight
-            else
-               local_SIDE = -1
-            end if
-            if(UPLO=='U' .or. UPLO=='u')then
-               local_UPLO = ChamUpper
-            else if(UPLO=='L' .or. UPLO=='l')then
-               local_UPLO = ChamLower
-            else
-               local_UPLO = -1
-            end if
-            if(TRANSA=='N' .or. TRANSA=='n')then
-               local_TRANSA = ChamNoTrans
-            else if(TRANSA=='T' .or. TRANSA=='t')then
-               local_TRANSA = ChamTrans
-            else if(TRANSA=='C' .or. TRANSA=='c')then
-               local_TRANSA = ChamConjTrans
-            else
-               local_TRANSA = -1
-            end if
-            if(DIAG=='U' .or. DIAG=='u')then
-               local_DIAG = ChamUnit
-            else if(DIAG=='N' .or. DIAG=='n')then
-               local_DIAG = ChamNonUnit
-            else
-               local_DIAG = -1
-            end if
-            if (.not. chameleon_initialized) call chameleon_init(24,local_ret)
-            ! write(*,*) " Calling CHAMELEON_ZTRMM"
-            call CHAMELEON_ZTRMM(local_SIDE,local_UPLO,local_TRANSA,local_DIAG,M,N,ALPHA,A,LDA,B,LDB,local_ret)
-      end subroutine chameleon_wrap_ZTRMM
+subroutine chameleon_wrap_ZTRMM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
+  use iso_c_binding
+  use chameleon
+  implicit none
+  integer, parameter :: wp = kind(0.0d0)
+  integer, intent(in) :: LDA
+  integer, intent(in) :: LDB
+  integer, intent(in) :: M
+  integer, intent(in) :: N
+  character, intent(in) :: DIAG
+  character, intent(in) :: SIDE
+  character, intent(in) :: TRANSA
+  character, intent(in) :: UPLO
+  complex(kind=wp), intent(in) :: ALPHA
+  complex(kind=wp), intent(in), target :: A(LDA,*)
+  complex(kind=wp), intent(inout), target :: B(LDB,*)
+  integer :: local_DIAG
+  integer :: local_SIDE
+  integer :: local_TRANSA
+  integer :: local_UPLO
+  integer :: local_ret
+  if(SIDE=='L' .or. SIDE=='l')then
+     local_SIDE = ChamLeft
+  else if(SIDE=='R' .or. SIDE=='r')then
+     local_SIDE = ChamRight
+  else
+     local_SIDE = -1
+  end if
+  if(UPLO=='U' .or. UPLO=='u')then
+     local_UPLO = ChamUpper
+  else if(UPLO=='L' .or. UPLO=='l')then
+     local_UPLO = ChamLower
+  else
+     local_UPLO = -1
+  end if
+  if(TRANSA=='N' .or. TRANSA=='n')then
+     local_TRANSA = ChamNoTrans
+  else if(TRANSA=='T' .or. TRANSA=='t')then
+     local_TRANSA = ChamTrans
+  else if(TRANSA=='C' .or. TRANSA=='c')then
+     local_TRANSA = ChamConjTrans
+  else
+     local_TRANSA = -1
+  end if
+  if(DIAG=='U' .or. DIAG=='u')then
+     local_DIAG = ChamUnit
+  else if(DIAG=='N' .or. DIAG=='n')then
+     local_DIAG = ChamNonUnit
+  else
+     local_DIAG = -1
+  end if
+  if (.not. chameleon_initialized) call chameleon_init(24,local_ret)
+  ! write(*,*) " Calling CHAMELEON_ZTRMM"
+  call CHAMELEON_ZTRMM(local_SIDE,local_UPLO,local_TRANSA,local_DIAG,M,N,ALPHA,A,LDA,B,LDB,local_ret)
+end subroutine chameleon_wrap_ZTRMM
 
-      subroutine chameleon_wrap_ZTRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
-            use iso_c_binding
-            use chameleon
-            implicit none
-            integer, parameter :: wp = kind(0.0d0)
-            integer, intent(in) :: LDA
-            integer, intent(in) :: LDB
-            integer, intent(in) :: M
-            integer, intent(in) :: N
-            character, intent(in) :: DIAG
-            character, intent(in) :: SIDE
-            character, intent(in) :: TRANSA
-            character, intent(in) :: UPLO
-            complex(kind=wp), intent(in) :: ALPHA
-            complex(kind=wp), intent(in), target :: A(LDA,*)
-            complex(kind=wp), intent(inout), target :: B(LDB,*)
-            integer :: local_DIAG
-            integer :: local_SIDE
-            integer :: local_TRANSA
-            integer :: local_UPLO
-            integer :: local_ret
-            if(SIDE=='L' .or. SIDE=='l')then
-               local_SIDE = ChamLeft
-            else if(SIDE=='R' .or. SIDE=='r')then
-               local_SIDE = ChamRight
-            else
-               local_SIDE = -1
-            end if
-            if(UPLO=='U' .or. UPLO=='u')then
-               local_UPLO = ChamUpper
-            else if(UPLO=='L' .or. UPLO=='l')then
-               local_UPLO = ChamLower
-            else
-               local_UPLO = -1
-            end if
-            if(TRANSA=='N' .or. TRANSA=='n')then
-               local_TRANSA = ChamNoTrans
-            else if(TRANSA=='T' .or. TRANSA=='t')then
-               local_TRANSA = ChamTrans
-            else if(TRANSA=='C' .or. TRANSA=='c')then
-               local_TRANSA = ChamConjTrans
-            else
-               local_TRANSA = -1
-            end if
-            if(DIAG=='U' .or. DIAG=='u')then
-               local_DIAG = ChamUnit
-            else if(DIAG=='N' .or. DIAG=='n')then
-               local_DIAG = ChamNonUnit
-            else
-               local_DIAG = -1
-            end if
-            if (.not. chameleon_initialized) call chameleon_init(24,local_ret)
-            ! write(*,*) " Calling CHAMELEON_ZTRSM"
-            call CHAMELEON_ZTRSM(local_SIDE,local_UPLO,local_TRANSA,local_DIAG,M,N,ALPHA,A,LDA,B,LDB,local_ret)
-      end subroutine chameleon_wrap_ZTRSM
+subroutine chameleon_wrap_ZTRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
+  use iso_c_binding
+  use chameleon
+  implicit none
+  integer, parameter :: wp = kind(0.0d0)
+  integer, intent(in) :: LDA
+  integer, intent(in) :: LDB
+  integer, intent(in) :: M
+  integer, intent(in) :: N
+  character, intent(in) :: DIAG
+  character, intent(in) :: SIDE
+  character, intent(in) :: TRANSA
+  character, intent(in) :: UPLO
+  complex(kind=wp), intent(in) :: ALPHA
+  complex(kind=wp), intent(in), target :: A(LDA,*)
+  complex(kind=wp), intent(inout), target :: B(LDB,*)
+  integer :: local_DIAG
+  integer :: local_SIDE
+  integer :: local_TRANSA
+  integer :: local_UPLO
+  integer :: local_ret
+  if(SIDE=='L' .or. SIDE=='l')then
+     local_SIDE = ChamLeft
+  else if(SIDE=='R' .or. SIDE=='r')then
+     local_SIDE = ChamRight
+  else
+     local_SIDE = -1
+  end if
+  if(UPLO=='U' .or. UPLO=='u')then
+     local_UPLO = ChamUpper
+  else if(UPLO=='L' .or. UPLO=='l')then
+     local_UPLO = ChamLower
+  else
+     local_UPLO = -1
+  end if
+  if(TRANSA=='N' .or. TRANSA=='n')then
+     local_TRANSA = ChamNoTrans
+  else if(TRANSA=='T' .or. TRANSA=='t')then
+     local_TRANSA = ChamTrans
+  else if(TRANSA=='C' .or. TRANSA=='c')then
+     local_TRANSA = ChamConjTrans
+  else
+     local_TRANSA = -1
+  end if
+  if(DIAG=='U' .or. DIAG=='u')then
+     local_DIAG = ChamUnit
+  else if(DIAG=='N' .or. DIAG=='n')then
+     local_DIAG = ChamNonUnit
+  else
+     local_DIAG = -1
+  end if
+  if (.not. chameleon_initialized) call chameleon_init(24,local_ret)
+  ! write(*,*) " Calling CHAMELEON_ZTRSM"
+  call CHAMELEON_ZTRSM(local_SIDE,local_UPLO,local_TRANSA,local_DIAG,M,N,ALPHA,A,LDA,B,LDB,local_ret)
+end subroutine chameleon_wrap_ZTRSM
 
-      subroutine chameleon_wrap_ZLACPY(UPLO,M,N,A,LDA,B,LDB)
-            use iso_c_binding
-            use chameleon
-            implicit none
-            integer, parameter :: wp = kind(0.0d0)
-            integer, intent(in) :: LDA
-            integer, intent(in) :: LDB
-            integer, intent(in) :: M
-            integer, intent(in) :: N
-            character, intent(in) :: UPLO
-            complex(kind=wp), intent(in), target :: A(LDA,*)
-            complex(kind=wp), intent(out), target :: B(LDB,*)
-            integer :: local_UPLO
-            integer :: local_ret
-            if(UPLO=='U' .or. UPLO=='u')then
-               local_UPLO = ChamUpper
-            else if(UPLO=='L' .or. UPLO=='l')then
-               local_UPLO = ChamLower
-            else
-               local_UPLO = -1
-            end if
-            if (.not. chameleon_initialized) call chameleon_init(24,local_ret)
-            ! write(*,*) " Calling CHAMELEON_ZLACPY"
-            call CHAMELEON_ZLACPY(local_UPLO,M,N,A,LDA,B,LDB,local_ret)
-      end subroutine chameleon_wrap_ZLACPY
+subroutine chameleon_wrap_ZLACPY(UPLO,M,N,A,LDA,B,LDB)
+  use iso_c_binding
+  use chameleon
+  implicit none
+  integer, parameter :: wp = kind(0.0d0)
+  integer, intent(in) :: LDA
+  integer, intent(in) :: LDB
+  integer, intent(in) :: M
+  integer, intent(in) :: N
+  character, intent(in) :: UPLO
+  complex(kind=wp), intent(in), target :: A(LDA,*)
+  complex(kind=wp), intent(out), target :: B(LDB,*)
+  integer :: local_UPLO
+  integer :: local_ret
+  if(UPLO=='U' .or. UPLO=='u')then
+     local_UPLO = ChamUpper
+  else if(UPLO=='L' .or. UPLO=='l')then
+     local_UPLO = ChamLower
+  else
+     local_UPLO = -1
+  end if
+  if (.not. chameleon_initialized) call chameleon_init(24,local_ret)
+  ! write(*,*) " Calling CHAMELEON_ZLACPY"
+  call CHAMELEON_ZLACPY(local_UPLO,M,N,A,LDA,B,LDB,local_ret)
+end subroutine chameleon_wrap_ZLACPY
 
-      subroutine chameleon_wrap_ZLASET(UPLO,M,N,ALPHA,BETA,A,LDA)
-            use iso_c_binding
-            use chameleon
-            implicit none
-            integer, parameter :: wp = kind(0.0d0)
-            integer, intent(in) :: LDA
-            integer, intent(in) :: M
-            integer, intent(in) :: N
-            character, intent(in) :: UPLO
-            complex(kind=wp), intent(in) :: ALPHA
-            complex(kind=wp), intent(in) :: BETA
-            complex(kind=wp), intent(inout), target :: A(LDA,*)
-            integer :: local_UPLO
-            integer :: local_ret
-            if(UPLO=='U' .or. UPLO=='u')then
-               local_UPLO = ChamUpper
-            else if(UPLO=='L' .or. UPLO=='l')then
-               local_UPLO = ChamLower
-            else
-               local_UPLO = -1
-            end if
-            if (.not. chameleon_initialized) call chameleon_init(24,local_ret)
-            ! write(*,*) " Calling CHAMELEON_ZLASET"
-            call CHAMELEON_ZLASET(local_UPLO,M,N,ALPHA,BETA,A,LDA,local_ret)
-      end subroutine chameleon_wrap_ZLASET
+subroutine chameleon_wrap_ZLASET(UPLO,M,N,ALPHA,BETA,A,LDA)
+  use iso_c_binding
+  use chameleon
+  implicit none
+  integer, parameter :: wp = kind(0.0d0)
+  integer, intent(in) :: LDA
+  integer, intent(in) :: M
+  integer, intent(in) :: N
+  character, intent(in) :: UPLO
+  complex(kind=wp), intent(in) :: ALPHA
+  complex(kind=wp), intent(in) :: BETA
+  complex(kind=wp), intent(inout), target :: A(LDA,*)
+  integer :: local_UPLO
+  integer :: local_ret
+  if(UPLO=='U' .or. UPLO=='u')then
+     local_UPLO = ChamUpper
+  else if(UPLO=='L' .or. UPLO=='l')then
+     local_UPLO = ChamLower
+  else
+     local_UPLO = -1
+  end if
+  if (.not. chameleon_initialized) call chameleon_init(24,local_ret)
+  ! write(*,*) " Calling CHAMELEON_ZLASET"
+  call CHAMELEON_ZLASET(local_UPLO,M,N,ALPHA,BETA,A,LDA,local_ret)
+end subroutine chameleon_wrap_ZLASET
diff --git a/control/common.h b/control/common.h
index 83d0b1b75d075b1a72d9f702b7b459c450b35f61..3c5dabf15d0529a852acb682838c0c8195a2e6ec 100644
--- a/control/common.h
+++ b/control/common.h
@@ -21,8 +21,8 @@
  *  CHAMELEON facilities of interest to both CHAMELEON core developer
  *  and also of interest to CHAMELEON community contributor.
  */
-#ifndef _CHAMELEON_COMMON_H_
-#define _CHAMELEON_COMMON_H_
+#ifndef _chameleon_common_h_
+#define _chameleon_common_h_
 
 
 #if defined( _WIN32 ) || defined( _WIN64 )
@@ -128,4 +128,4 @@ void chameleon_pclag2z(CHAM_context_t *chamctxt);
 }
 #endif
 
-#endif
+#endif /* _chameleon_common_h_ */
diff --git a/control/compute_z.h b/control/compute_z.h
index eb84b46fb46718f90ec640c13b61c6f59741bbd0..07e5bdd6f2f00bc82573b191d9e4f9ce655e20cc 100644
--- a/control/compute_z.h
+++ b/control/compute_z.h
@@ -22,6 +22,9 @@
  * @precisions normal z -> c d s
  *
  */
+#ifndef _compute_z_h_
+#define _compute_z_h_
+
 /**
  *  LAPACK/Tile Descriptor accesses
  */
@@ -236,3 +239,5 @@ chameleon_ztile2lap_cleanup( CHAM_context_t *chamctxt, CHAM_desc_t *descAl, CHAM
     RUNTIME_desc_destroy( descAl );
     RUNTIME_desc_destroy( descAt );
 }
+
+#endif  /* _compute_z_h_ */
diff --git a/control/context.h b/control/context.h
index 570d5ab0f72d471ea6ebd4141a196158fa652ef6..8abaa3e9993a85f7aacadb182eb2ef3dba5124e2 100644
--- a/control/context.h
+++ b/control/context.h
@@ -19,8 +19,8 @@
  * @date 2012-09-15
  *
  */
-#ifndef _CHAMELEON_CONTEXT_H_
-#define _CHAMELEON_CONTEXT_H_
+#ifndef _chameleon_context_h_
+#define _chameleon_context_h_
 
 #include "chameleon/struct.h"
 
@@ -33,10 +33,10 @@ extern "C" {
 
 CHAM_context_t* chameleon_context_create  ();
 CHAM_context_t* chameleon_context_self    ();
-int              chameleon_context_destroy ();
+int             chameleon_context_destroy ();
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif
+#endif /* _chameleon_context_h_ */
diff --git a/control/descriptor.h b/control/descriptor.h
index dbca8bab5d2f3615fe46409874ffd9a36d75f280..dcf688df2eb0e85b564ca3bc2b0899ed4cee2f18 100644
--- a/control/descriptor.h
+++ b/control/descriptor.h
@@ -18,8 +18,8 @@
  * @date 2012-09-15
  *
  */
-#ifndef _CHAMELEON_DESCRIPTOR_H_
-#define _CHAMELEON_DESCRIPTOR_H_
+#ifndef _chameleon_descriptor_h_
+#define _chameleon_descriptor_h_
 
 #include <assert.h>
 #include "chameleon/config.h"
@@ -246,4 +246,4 @@ inline static int chameleon_desc_islocal( const CHAM_desc_t *A, int m, int n )
 }
 #endif
 
-#endif
+#endif /* _chameleon_descriptor_h_ */
diff --git a/control/gkkleader.h b/control/gkkleader.h
index fa6da541c502ee450880971c3af9a6f3111e5c90..424315dcc8c29ecf243e2ceb27b2ef471c62725f 100644
--- a/control/gkkleader.h
+++ b/control/gkkleader.h
@@ -19,8 +19,8 @@
  * and its fortran implementation.
  *
  */
-#ifndef GKKLEADERS_H
-#define GKKLEADERS_H
+#ifndef _gkkleaders_h_
+#define _gkkleaders_h_
 
 int  GKK_doublingtable(int x, int m, int emax, int *dt);
 int  GKK_modpow(int *dt, int e, int m);
@@ -39,4 +39,4 @@ void GKK_output_tables(int m, int n, int q, primedec_t *pr_q, int t,
 
 int  GKK_getLeaderNbr(int me, int ne, int *nleaders, int **leaders);
 
-#endif /* GKKLEADERS_H */
+#endif /* _gkkleaders_h_ */
diff --git a/control/global.h b/control/global.h
index 050d14ea26b6b91e7607f9e2a577e03b704ec4df..6cc15c981433e9eb0a10ba5ec983bfe897318399 100644
--- a/control/global.h
+++ b/control/global.h
@@ -22,8 +22,8 @@
  *  CHAMELEON internals of interest to CHAMELEON core developers, but not necessarily
  *  of interest to CHAMELEON community contributors.
  */
-#ifndef _CHAMELEON_GLOBAL_H_
-#define _CHAMELEON_GLOBAL_H_
+#ifndef _chameleon_global_h_
+#define _chameleon_global_h_
 
 /**
  *  Numerical operations
@@ -105,4 +105,4 @@
 #define CHAMELEON_FUNC_ZSYSV  75
 #define CHAMELEON_FUNC_CSYSV  76
 
-#endif
+#endif /* _chameleon_global_h_ */
diff --git a/control/primes.h b/control/primes.h
index aa7ad09c32f44b2d65ee98d40370e9e63c890376..37426628815366794e1f0b35f69b2e9fe4f0496f 100644
--- a/control/primes.h
+++ b/control/primes.h
@@ -20,8 +20,8 @@
  * and its fortran implementation.
  *
  */
-#ifndef PRIMES_H
-#define PRIMES_H
+#ifndef _primes_h_
+#define _primes_h_
 
 #define IMBALANCE_THRESHOLD 10
 #define PWR_MAXSIZE   32
@@ -55,4 +55,4 @@ int     minloc(int n, int *T);
 int64_t maxval(int n, int *T);
 int64_t sum   (int n, int *T);
 
-#endif /* PRIMES_H */
+#endif /* _primes_h_ */
diff --git a/control/workspace.h b/control/workspace.h
index 2489cd94a5854447ddaf0375326428caaafc725b..83b1c69473625a70189fe930475605adc6e1b655 100644
--- a/control/workspace.h
+++ b/control/workspace.h
@@ -17,8 +17,8 @@
  * @date 2010-11-15
  *
  */
-#ifndef _CHAMELEON_WORKSPACE_H_
-#define _CHAMELEON_WORKSPACE_H_
+#ifndef _chameleon_workspace_h_
+#define _chameleon_workspace_h_
 
 #ifdef __cplusplus
 extern "C" {
@@ -34,4 +34,4 @@ int chameleon_alloc_ipiv(int M, int N, cham_tasktype_t func, int type, CHAM_desc
 }
 #endif
 
-#endif
+#endif /* _chameleon_workspace_h_ */
diff --git a/coreblas/include/coreblas.h b/coreblas/include/coreblas.h
index d6ec3e076736bb14798cd2e2d95c892ab512cb48..2779be04bd318a92c8813f5bbc2d4614b569bcae 100644
--- a/coreblas/include/coreblas.h
+++ b/coreblas/include/coreblas.h
@@ -17,8 +17,8 @@
  * @date 2010-11-15
  *
  */
-#ifndef _CORE_BLAS_H_
-#define _CORE_BLAS_H_
+#ifndef _coreblas_h_
+#define _coreblas_h_
 
 #include <stdio.h>
 #include <math.h>
@@ -85,4 +85,4 @@ int  get_coreblas_gemm3m_enabled( void );
 
 END_C_DECLS
 
-#endif
+#endif /* _coreblas_h_ */
diff --git a/coreblas/include/coreblas/cblas.h b/coreblas/include/coreblas/cblas.h
index 40adce71bc27fa5f1cb1012f63ccb12cdff2cb1d..66648c93637b4619cd5804c78cdd58b76ed9cfa6 100644
--- a/coreblas/include/coreblas/cblas.h
+++ b/coreblas/include/coreblas/cblas.h
@@ -16,8 +16,8 @@
  * @date 2012-09-15
  *
  */
-#ifndef CBLAS_H
-#define CBLAS_H
+#ifndef _cblas_h_
+#define _cblas_h_
 #include <stddef.h>
 
 /*
@@ -594,4 +594,4 @@ void cblas_xerbla(int p, const char *rout, const char *form, ...);
 #endif
 
 
-#endif
+#endif /* _cblas_h_ */
diff --git a/coreblas/include/coreblas/coreblas_z.h b/coreblas/include/coreblas/coreblas_z.h
index 870ea8fa240193fb08b2602fc8b0b5969cc0c7d7..126ca973184c2d7ea251d1898a824ba605cee0a5 100644
--- a/coreblas/include/coreblas/coreblas_z.h
+++ b/coreblas/include/coreblas/coreblas_z.h
@@ -24,8 +24,8 @@
  * @precisions normal z -> c d s
  *
  */
-#ifndef _CHAMELEON_CORE_ZBLAS_H_
-#define _CHAMELEON_CORE_ZBLAS_H_
+#ifndef _coreblas_z_h_
+#define _coreblas_z_h_
 
 /**
  *  Declarations of serial kernels - alphabetical order
@@ -399,4 +399,5 @@ int  CORE_zunmqr(cham_side_t side, cham_trans_t trans,
                  const CHAMELEON_Complex64_t *T, int LDT,
                  CHAMELEON_Complex64_t *C, int LDC,
                  CHAMELEON_Complex64_t *WORK, int LDWORK);
-#endif
+
+#endif /* _coreblas_z_h_ */
diff --git a/coreblas/include/coreblas/coreblas_zc.h b/coreblas/include/coreblas/coreblas_zc.h
index ba57937f194515da6001d32edc297be9b8f689d6..32f929a5e657690282fcb59c038fc02000ad50e1 100644
--- a/coreblas/include/coreblas/coreblas_zc.h
+++ b/coreblas/include/coreblas/coreblas_zc.h
@@ -23,8 +23,8 @@
  * @precisions mixed zc -> ds
  *
  */
-#ifndef _CHAMELEON_CORE_ZCBLAS_H_
-#define _CHAMELEON_CORE_ZCBLAS_H_
+#ifndef _coreblas_zc_h_
+#define _coreblas_zc_h_
 
 /**
  *  Declarations of serial kernels - alphabetical order
@@ -36,4 +36,4 @@ void CORE_zlag2c(int m, int n,
                  const CHAMELEON_Complex64_t *A, int lda,
                  CHAMELEON_Complex32_t *B, int ldb, int *info);
 
-#endif
+#endif /* _coreblas_zc_h_ */
diff --git a/coreblas/include/coreblas/lapacke.h b/coreblas/include/coreblas/lapacke.h
index c3df70c8f4bb52e4972a1a4e1fe1221b70896eda..98d7ee693ac553b48dbbadcd931e912b83bd77b5 100644
--- a/coreblas/include/coreblas/lapacke.h
+++ b/coreblas/include/coreblas/lapacke.h
@@ -47,8 +47,8 @@
 * Generated November, 2011
 */
 
-#ifndef _LAPACKE_H_
-#define _LAPACKE_H_
+#ifndef _lapacke_h_
+#define _lapacke_h_
 
 /*
 *  Turn on HAVE_LAPACK_CONFIG_H to redefine C-LAPACK datatypes
@@ -16458,4 +16458,4 @@ void LAPACK_ilaver( const lapack_int* vers_major, const lapack_int* vers_minor,
 }
 #endif /* __cplusplus */
 
-#endif /* _LAPACKE_H_ */
+#endif /* _lapacke_h_ */
diff --git a/coreblas/include/coreblas/lapacke_config.h b/coreblas/include/coreblas/lapacke_config.h
index da6f4d975cb7a6f0fb30590bab7f92dffc2e3580..ccb678939f0175cb45a35d487e1da4aa068b6fa9 100644
--- a/coreblas/include/coreblas/lapacke_config.h
+++ b/coreblas/include/coreblas/lapacke_config.h
@@ -47,8 +47,8 @@
 * Generated May, 2011
 */
 
-#ifndef _LAPACKE_CONFIG_H_
-#define _LAPACKE_CONFIG_H_
+#ifndef _lapacke_config_h_
+#define _lapacke_config_h_
 
 #ifdef __cplusplus
 #if defined(LAPACK_COMPLEX_CPP)
@@ -132,4 +132,4 @@ lapack_complex_double lapack_make_complex_double( double re, double im );
 }
 #endif /* __cplusplus */
 
-#endif /* _LAPACKE_CONFIG_H_ */
+#endif /* _lapacke_config_h_ */
diff --git a/coreblas/include/coreblas/lapacke_mangling.h b/coreblas/include/coreblas/lapacke_mangling.h
index 2ed939c21c19a6b6eeb9741509a20ec8833ddf0e..00e7bf63595da9aa57d55f5a7870e3f13ca56798 100644
--- a/coreblas/include/coreblas/lapacke_mangling.h
+++ b/coreblas/include/coreblas/lapacke_mangling.h
@@ -14,8 +14,8 @@
  * @version 1.0.0
  *
  */
-#ifndef LAPACK_HEADER_INCLUDED
-#define LAPACK_HEADER_INCLUDED
+#ifndef _lapacke_mangling_h_
+#define _lapacke_mangling_h_
 
 /* Mangling for Fortran global symbols without underscores. */
 #define LAPACK_GLOBAL(name,NAME) name##_
@@ -29,4 +29,4 @@
 /* Mangling for Fortran module symbols with underscores. */
 #define LAPACK_MODULE_(mod_name,name, mod_NAME,NAME) __##mod_name##_MOD_##name
 
-#endif
+#endif /* _lapacke_mangling_h_ */