Commit 582fe51f authored by Andreas Marek's avatar Andreas Marek
Browse files

Use correct complex kind-type for Fortran/C interoperability

parent 98b9e152
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
#include "config-f90.h" #include "config-f90.h"
!> \brief Fortran module which provides the routines to the ELPA solver (1 and 2 stage) !> \brief Fortran module which provides the routines to the ELPA solver (1 and 2 stage)
module ELPA module ELPA
use, intrinsic :: iso_c_binding, only : c_double, c_int use, intrinsic :: iso_c_binding, only : c_double, c_int, c_float, c_float_complex, c_double_complex
use elpa1 use elpa1
use elpa2 use elpa2
...@@ -426,9 +426,9 @@ module ELPA ...@@ -426,9 +426,9 @@ module ELPA
integer(kind=c_int), intent(in) :: nblk integer(kind=c_int), intent(in) :: nblk
real(kind=c_double), intent(inout) :: ev(na) real(kind=c_double), intent(inout) :: ev(na)
#ifdef USE_ASSUMED_SIZE #ifdef USE_ASSUMED_SIZE
complex(kind=c_double), intent(inout) :: a(lda,*), q(ldq,*) complex(kind=c_double_complex), intent(inout) :: a(lda,*), q(ldq,*)
#else #else
complex(kind=c_double), intent(inout) :: a(lda,matrixCols), q(ldq,matrixCols) complex(kind=c_double_complex), intent(inout) :: a(lda,matrixCols), q(ldq,matrixCols)
#endif #endif
integer(kind=c_int), intent(in), optional :: THIS_COMPLEX_ELPA_KERNEL_API integer(kind=c_int), intent(in), optional :: THIS_COMPLEX_ELPA_KERNEL_API
logical, intent(in), optional :: useGPU logical, intent(in), optional :: useGPU
...@@ -523,9 +523,9 @@ module ELPA ...@@ -523,9 +523,9 @@ module ELPA
integer(kind=c_int), intent(in) :: nblk integer(kind=c_int), intent(in) :: nblk
real(kind=c_float), intent(inout) :: ev(na) real(kind=c_float), intent(inout) :: ev(na)
#ifdef USE_ASSUMED_SIZE #ifdef USE_ASSUMED_SIZE
complex(kind=c_float), intent(inout) :: a(lda,*), q(ldq,*) complex(kind=c_float_complex), intent(inout) :: a(lda,*), q(ldq,*)
#else #else
complex(kind=c_float), intent(inout) :: a(lda,matrixCols), q(ldq,matrixCols) complex(kind=c_float_complex), intent(inout) :: a(lda,matrixCols), q(ldq,matrixCols)
#endif #endif
integer(kind=c_int), intent(in), optional :: THIS_COMPLEX_ELPA_KERNEL_API integer(kind=c_int), intent(in), optional :: THIS_COMPLEX_ELPA_KERNEL_API
logical, intent(in), optional :: useGPU logical, intent(in), optional :: useGPU
......
...@@ -389,7 +389,7 @@ ...@@ -389,7 +389,7 @@
#!f> use, intrinsic :: iso_c_binding #!f> use, intrinsic :: iso_c_binding
#!f> integer(kind=c_int) :: nb, nq, ldq, ldh #!f> integer(kind=c_int) :: nb, nq, ldq, ldh
#!f> type(c_ptr), value :: q #!f> type(c_ptr), value :: q
#!f> real(kind=c_double) :: hh(nb,6) #!f> real(kind=c_double_complex) :: hh(nb,6)
#!f> end subroutine #!f> end subroutine
#!f> end interface #!f> end interface
#!f>#endif #!f>#endif
...@@ -714,8 +714,8 @@ return1: ...@@ -714,8 +714,8 @@ return1:
#!f> subroutine single_hh_trafo_complex_double(q, hh, nb, nq, ldq) bind(C,name="single_hh_trafo_complex_double") #!f> subroutine single_hh_trafo_complex_double(q, hh, nb, nq, ldq) bind(C,name="single_hh_trafo_complex_double")
#!f> use, intrinsic :: iso_c_binding #!f> use, intrinsic :: iso_c_binding
#!f> integer(kind=c_int) :: nb, nq, ldq #!f> integer(kind=c_int) :: nb, nq, ldq
#!f> complex(kind=c_double) :: q(*) #!f> complex(kind=c_double_complex) :: q(*)
#!f> complex(kind=c_double) :: hh(nb,2) #!f> complex(kind=c_double_complex) :: hh(nb,2)
#!f> end subroutine #!f> end subroutine
#!f> end interface #!f> end interface
#!f>#endif #!f>#endif
......
...@@ -717,8 +717,8 @@ return1: ...@@ -717,8 +717,8 @@ return1:
# subroutine single_hh_trafo_complex_single(q, hh, nb, nq, ldq) # subroutine single_hh_trafo_complex_single(q, hh, nb, nq, ldq)
# #
# integer, intent(in) :: nb, nq, ldq # integer, intent(in) :: nb, nq, ldq
# complex*8, intent(inout) :: q(ldq,*) # complex(kind=c_float_complex), intent(inout) :: q(ldq,*)
# complex*8, intent(in) :: hh(*) # complex(kind=c_float_complex), intent(in) :: hh(*)
# #
# Parameter mapping to registers # Parameter mapping to registers
# parameter 1: %rdi : q # parameter 1: %rdi : q
...@@ -734,8 +734,8 @@ return1: ...@@ -734,8 +734,8 @@ return1:
#!f> subroutine single_hh_trafo_complex_single(q, hh, nb, nq, ldq) bind(C,name="single_hh_trafo_complex_single") #!f> subroutine single_hh_trafo_complex_single(q, hh, nb, nq, ldq) bind(C,name="single_hh_trafo_complex_single")
#!f> use, intrinsic :: iso_c_binding #!f> use, intrinsic :: iso_c_binding
#!f> integer(kind=c_int) :: nb, nq, ldq #!f> integer(kind=c_int) :: nb, nq, ldq
#!f> complex(kind=c_float) :: q(*) #!f> complex(kind=c_float_complex) :: q(*)
#!f> complex(kind=c_float) :: hh(nb,2) #!f> complex(kind=c_float_complex) :: hh(nb,2)
#!f> end subroutine #!f> end subroutine
#!f> end interface #!f> end interface
#!f>#endif #!f>#endif
......
...@@ -94,8 +94,8 @@ static __forceinline void hh_trafo_complex_kernel_4_AVX_1hv_double(double compl ...@@ -94,8 +94,8 @@ static __forceinline void hh_trafo_complex_kernel_4_AVX_1hv_double(double compl
!f> bind(C, name="single_hh_trafo_complex_avx_avx2_1hv_double") !f> bind(C, name="single_hh_trafo_complex_avx_avx2_1hv_double")
!f> use, intrinsic :: iso_c_binding !f> use, intrinsic :: iso_c_binding
!f> integer(kind=c_int) :: pnb, pnq, pldq !f> integer(kind=c_int) :: pnb, pnq, pldq
!f> complex(kind=c_double) :: q(*) !f> complex(kind=c_double_complex) :: q(*)
!f> complex(kind=c_double) :: hh(pnb,2) !f> complex(kind=c_double_complex) :: hh(pnb,2)
!f> end subroutine !f> end subroutine
!f> end interface !f> end interface
!f>#endif !f>#endif
......
...@@ -79,8 +79,8 @@ static __forceinline void hh_trafo_complex_kernel_4_AVX_1hv_single(float comple ...@@ -79,8 +79,8 @@ static __forceinline void hh_trafo_complex_kernel_4_AVX_1hv_single(float comple
!f> bind(C, name="single_hh_trafo_complex_avx_avx2_1hv_single") !f> bind(C, name="single_hh_trafo_complex_avx_avx2_1hv_single")
!f> use, intrinsic :: iso_c_binding !f> use, intrinsic :: iso_c_binding
!f> integer(kind=c_int) :: pnb, pnq, pldq !f> integer(kind=c_int) :: pnb, pnq, pldq
!f> complex(kind=c_float) :: q(*) !f> complex(kind=c_float_complex) :: q(*)
!f> complex(kind=c_float) :: hh(pnb,2) !f> complex(kind=c_float_complex) :: hh(pnb,2)
!f> end subroutine !f> end subroutine
!f> end interface !f> end interface
!f>#endif !f>#endif
......
...@@ -95,8 +95,8 @@ static __forceinline void hh_trafo_complex_kernel_2_AVX_2hv_double(double comple ...@@ -95,8 +95,8 @@ static __forceinline void hh_trafo_complex_kernel_2_AVX_2hv_double(double comple
!f> bind(C, name="double_hh_trafo_complex_avx_avx2_2hv_double") !f> bind(C, name="double_hh_trafo_complex_avx_avx2_2hv_double")
!f> use, intrinsic :: iso_c_binding !f> use, intrinsic :: iso_c_binding
!f> integer(kind=c_int) :: pnb, pnq, pldq, pldh !f> integer(kind=c_int) :: pnb, pnq, pldq, pldh
!f> complex(kind=c_double) :: q(*) !f> complex(kind=c_double_complex) :: q(*)
!f> complex(kind=c_double) :: hh(pnb,2) !f> complex(kind=c_double_complex) :: hh(pnb,2)
!f> end subroutine !f> end subroutine
!f> end interface !f> end interface
!f>#endif !f>#endif
......
...@@ -80,8 +80,8 @@ static __forceinline void hh_trafo_complex_kernel_4_AVX_2hv_single(float complex ...@@ -80,8 +80,8 @@ static __forceinline void hh_trafo_complex_kernel_4_AVX_2hv_single(float complex
!f> bind(C, name="double_hh_trafo_complex_avx_avx2_2hv_single") !f> bind(C, name="double_hh_trafo_complex_avx_avx2_2hv_single")
!f> use, intrinsic :: iso_c_binding !f> use, intrinsic :: iso_c_binding
!f> integer(kind=c_int) :: pnb, pnq, pldq, pldh !f> integer(kind=c_int) :: pnb, pnq, pldq, pldh
!f> complex(kind=c_float) :: q(*) !f> complex(kind=c_float_complex) :: q(*)
!f> complex(kind=c_float) :: hh(pnb,2) !f> complex(kind=c_float_complex) :: hh(pnb,2)
!f> end subroutine !f> end subroutine
!f> end interface !f> end interface
!f>#endif !f>#endif
......
...@@ -73,8 +73,8 @@ static __forceinline void hh_trafo_complex_kernel_8_AVX512_1hv_double(double co ...@@ -73,8 +73,8 @@ static __forceinline void hh_trafo_complex_kernel_8_AVX512_1hv_double(double co
!f> bind(C, name="single_hh_trafo_complex_avx512_1hv_double") !f> bind(C, name="single_hh_trafo_complex_avx512_1hv_double")
!f> use, intrinsic :: iso_c_binding !f> use, intrinsic :: iso_c_binding
!f> integer(kind=c_int) :: pnb, pnq, pldq !f> integer(kind=c_int) :: pnb, pnq, pldq
!f> complex(kind=c_double) :: q(*) !f> complex(kind=c_double_complex) :: q(*)
!f> complex(kind=c_double) :: hh(pnb,2) !f> complex(kind=c_double_complex) :: hh(pnb,2)
!f> end subroutine !f> end subroutine
!f> end interface !f> end interface
!f>#endif !f>#endif
......
...@@ -71,8 +71,8 @@ static __forceinline void hh_trafo_complex_kernel_16_AVX512_1hv_single(float co ...@@ -71,8 +71,8 @@ static __forceinline void hh_trafo_complex_kernel_16_AVX512_1hv_single(float co
!f> bind(C, name="single_hh_trafo_complex_avx512_1hv_single") !f> bind(C, name="single_hh_trafo_complex_avx512_1hv_single")
!f> use, intrinsic :: iso_c_binding !f> use, intrinsic :: iso_c_binding
!f> integer(kind=c_int) :: pnb, pnq, pldq !f> integer(kind=c_int) :: pnb, pnq, pldq
!f> complex(kind=c_float) :: q(*) !f> complex(kind=c_float_complex) :: q(*)
!f> complex(kind=c_float) :: hh(pnb,2) !f> complex(kind=c_float_complex) :: hh(pnb,2)
!f> end subroutine !f> end subroutine
!f> end interface !f> end interface
!f>#endif !f>#endif
......
...@@ -74,8 +74,8 @@ static __forceinline void hh_trafo_complex_kernel_8_AVX512_2hv_double(double com ...@@ -74,8 +74,8 @@ static __forceinline void hh_trafo_complex_kernel_8_AVX512_2hv_double(double com
!f> bind(C, name="double_hh_trafo_complex_avx512_2hv_double") !f> bind(C, name="double_hh_trafo_complex_avx512_2hv_double")
!f> use, intrinsic :: iso_c_binding !f> use, intrinsic :: iso_c_binding
!f> integer(kind=c_int) :: pnb, pnq, pldq, pldh !f> integer(kind=c_int) :: pnb, pnq, pldq, pldh
!f> complex(kind=c_double) :: q(*) !f> complex(kind=c_double_complex) :: q(*)
!f> complex(kind=c_double) :: hh(pnb,2) !f> complex(kind=c_double_complex) :: hh(pnb,2)
!f> end subroutine !f> end subroutine
!f> end interface !f> end interface
!f>#endif !f>#endif
......
...@@ -73,8 +73,8 @@ static __forceinline void hh_trafo_complex_kernel_16_AVX512_2hv_single(float com ...@@ -73,8 +73,8 @@ static __forceinline void hh_trafo_complex_kernel_16_AVX512_2hv_single(float com
!f> bind(C, name="double_hh_trafo_complex_avx512_2hv_single") !f> bind(C, name="double_hh_trafo_complex_avx512_2hv_single")
!f> use, intrinsic :: iso_c_binding !f> use, intrinsic :: iso_c_binding
!f> integer(kind=c_int) :: pnb, pnq, pldq, pldh !f> integer(kind=c_int) :: pnb, pnq, pldq, pldh
!f> complex(kind=c_float) :: q(*) !f> complex(kind=c_float_complex) :: q(*)
!f> complex(kind=c_float) :: hh(pnb,2) !f> complex(kind=c_float_complex) :: hh(pnb,2)
!f> end subroutine !f> end subroutine
!f> end interface !f> end interface
!f>#endif !f>#endif
......
...@@ -84,8 +84,8 @@ static __forceinline void hh_trafo_complex_kernel_2_SSE_1hv_double(double comple ...@@ -84,8 +84,8 @@ static __forceinline void hh_trafo_complex_kernel_2_SSE_1hv_double(double comple
!f> bind(C, name="single_hh_trafo_complex_sse_1hv_double") !f> bind(C, name="single_hh_trafo_complex_sse_1hv_double")
!f> use, intrinsic :: iso_c_binding !f> use, intrinsic :: iso_c_binding
!f> integer(kind=c_int) :: pnb, pnq, pldq !f> integer(kind=c_int) :: pnb, pnq, pldq
!f> complex(kind=c_double) :: q(*) !f> complex(kind=c_double_complex) :: q(*)
!f> complex(kind=c_double) :: hh(pnb,2) !f> complex(kind=c_double_complex) :: hh(pnb,2)
!f> end subroutine !f> end subroutine
!f> end interface !f> end interface
!f>#endif !f>#endif
......
...@@ -68,8 +68,8 @@ static __forceinline void hh_trafo_complex_kernel_2_SSE_1hv_single(float complex ...@@ -68,8 +68,8 @@ static __forceinline void hh_trafo_complex_kernel_2_SSE_1hv_single(float complex
!f> bind(C, name="single_hh_trafo_complex_sse_1hv_single") !f> bind(C, name="single_hh_trafo_complex_sse_1hv_single")
!f> use, intrinsic :: iso_c_binding !f> use, intrinsic :: iso_c_binding
!f> integer(kind=c_int) :: pnb, pnq, pldq !f> integer(kind=c_int) :: pnb, pnq, pldq
!f> complex(kind=c_float) :: q(*) !f> complex(kind=c_float_complex) :: q(*)
!f> complex(kind=c_float) :: hh(pnb,2) !f> complex(kind=c_float_complex) :: hh(pnb,2)
!f> end subroutine !f> end subroutine
!f> end interface !f> end interface
!f>#endif !f>#endif
......
...@@ -84,8 +84,8 @@ static __forceinline void hh_trafo_complex_kernel_1_SSE_2hv_double(double comple ...@@ -84,8 +84,8 @@ static __forceinline void hh_trafo_complex_kernel_1_SSE_2hv_double(double comple
!f> bind(C, name="double_hh_trafo_complex_sse_2hv_double") !f> bind(C, name="double_hh_trafo_complex_sse_2hv_double")
!f> use, intrinsic :: iso_c_binding !f> use, intrinsic :: iso_c_binding
!f> integer(kind=c_int) :: pnb, pnq, pldq, pldh !f> integer(kind=c_int) :: pnb, pnq, pldq, pldh
!f> complex(kind=c_double) :: q(*) !f> complex(kind=c_double_complex) :: q(*)
!f> complex(kind=c_double) :: hh(pnb,2) !f> complex(kind=c_double_complex) :: hh(pnb,2)
!f> end subroutine !f> end subroutine
!f> end interface !f> end interface
!f>#endif !f>#endif
......
...@@ -65,8 +65,8 @@ static __forceinline void hh_trafo_complex_kernel_4_SSE_2hv_single(float complex ...@@ -65,8 +65,8 @@ static __forceinline void hh_trafo_complex_kernel_4_SSE_2hv_single(float complex
!f> bind(C, name="double_hh_trafo_complex_sse_2hv_single") !f> bind(C, name="double_hh_trafo_complex_sse_2hv_single")
!f> use, intrinsic :: iso_c_binding !f> use, intrinsic :: iso_c_binding
!f> integer(kind=c_int) :: pnb, pnq, pldq, pldh !f> integer(kind=c_int) :: pnb, pnq, pldq, pldh
!f> complex(kind=c_float) :: q(*) !f> complex(kind=c_float_complex) :: q(*)
!f> complex(kind=c_float) :: hh(pnb,2) !f> complex(kind=c_float_complex) :: hh(pnb,2)
!f> end subroutine !f> end subroutine
!f> end interface !f> end interface
!f>#endif !f>#endif
......
...@@ -115,10 +115,10 @@ ...@@ -115,10 +115,10 @@
integer(kind=ik), intent(in) :: nb, ldq, ldh integer(kind=ik), intent(in) :: nb, ldq, ldh
complex(kind=ck), intent(inout) :: q(ldq/2,*) complex(kind=ck8), intent(inout) :: q(ldq/2,*)
real(kind=rk8), intent(in) :: hh(ldh,*), s real(kind=rk8), intent(in) :: hh(ldh,*), s
complex(kind=ck) :: x1, x2, x3, x4, x5, y1, y2, y3, y4, y5, q1, q2, q3, q4, q5, p1, p2, p3, p4, p5 complex(kind=ck8) :: x1, x2, x3, x4, x5, y1, y2, y3, y4, y5, q1, q2, q3, q4, q5, p1, p2, p3, p4, p5
real(kind=rk8) :: h1, h2 real(kind=rk8) :: h1, h2
integer(kind=ik) :: i integer(kind=ik) :: i
...@@ -392,10 +392,10 @@ ...@@ -392,10 +392,10 @@
integer(kind=ik), intent(in) :: nb, ldq, ldh integer(kind=ik), intent(in) :: nb, ldq, ldh
complex(kind=ck), intent(inout) :: q(ldq/2,*) complex(kind=ck8), intent(inout) :: q(ldq/2,*)
real(kind=rk8), intent(in) :: hh(ldh,*), s real(kind=rk8), intent(in) :: hh(ldh,*), s
complex(kind=ck) :: x1, x2, x3, x4, y1, y2, y3, y4, q1, q2, q3, q4, p1, p2, p3, p4 complex(kind=ck8) :: x1, x2, x3, x4, y1, y2, y3, y4, q1, q2, q3, q4, p1, p2, p3, p4
real(kind=rk8) :: h1, h2 real(kind=rk8) :: h1, h2
integer(kind=ik) :: i integer(kind=ik) :: i
...@@ -634,10 +634,10 @@ ...@@ -634,10 +634,10 @@
integer(kind=ik), intent(in) :: nb, ldq, ldh integer(kind=ik), intent(in) :: nb, ldq, ldh
complex(kind=ck), intent(inout) :: q(ldq/2,*) complex(kind=ck8), intent(inout) :: q(ldq/2,*)
real(kind=rk8), intent(in) :: hh(ldh,*), s real(kind=rk8), intent(in) :: hh(ldh,*), s
complex(kind=ck) :: x1, x2, y1, y2, q1, q2, p1, p2 complex(kind=ck8) :: x1, x2, y1, y2, q1, q2, p1, p2
real(kind=rk8) :: h1, h2 real(kind=rk8) :: h1, h2
integer(kind=ik) :: i integer(kind=ik) :: i
......
...@@ -339,7 +339,7 @@ module cuda_routines ...@@ -339,7 +339,7 @@ module cuda_routines
! character(1,C_CHAR),value :: cta, ctb ! character(1,C_CHAR),value :: cta, ctb
! integer(C_INT),value :: m,n,k ! integer(C_INT),value :: m,n,k
! integer(C_INT), intent(in), value :: lda,ldb,ldc ! integer(C_INT), intent(in), value :: lda,ldb,ldc
! complex(C_DOUBLE),value :: alpha,beta ! complex(C_DOUBLE_COMPLEX),value :: alpha,beta
! integer(C_SIZE_T), value :: a, b, c ! integer(C_SIZE_T), value :: a, b, c
! !
! end subroutine cublas_zgemm ! end subroutine cublas_zgemm
...@@ -376,7 +376,7 @@ module cuda_routines ...@@ -376,7 +376,7 @@ module cuda_routines
! character(1,C_CHAR),value :: side, uplo, trans, diag ! character(1,C_CHAR),value :: side, uplo, trans, diag
! integer(C_INT),value :: m,n ! integer(C_INT),value :: m,n
! integer(C_INT), intent(in), value :: lda,ldb ! integer(C_INT), intent(in), value :: lda,ldb
! complex(C_DOUBLE), value :: alpha ! complex(C_DOUBLE_complex), value :: alpha
! integer(C_SIZE_T), value :: a, b ! integer(C_SIZE_T), value :: a, b
! !
! end subroutine cublas_ztrmm ! end subroutine cublas_ztrmm
...@@ -389,7 +389,7 @@ module cuda_routines ...@@ -389,7 +389,7 @@ module cuda_routines
! character(1,C_CHAR),value :: uplo, trans ! character(1,C_CHAR),value :: uplo, trans
! integer(C_INT),value :: n, k ! integer(C_INT),value :: n, k
! integer(C_INT), intent(in), value :: lda,ldb ! integer(C_INT), intent(in), value :: lda,ldb
! complex(C_DOUBLE), value :: alpha, beta ! complex(C_DOUBLE_COMPLEX), value :: alpha, beta
! integer(c_size_t),value :: a,b ! integer(c_size_t),value :: a,b
! !
! end subroutine cublas_zherk ! end subroutine cublas_zherk
......
...@@ -303,7 +303,7 @@ module cuda_functions ...@@ -303,7 +303,7 @@ module cuda_functions
character(1,C_CHAR),value :: cta, ctb character(1,C_CHAR),value :: cta, ctb
integer(kind=C_INT),value :: m,n,k integer(kind=C_INT),value :: m,n,k
integer(kind=C_INT), intent(in), value :: lda,ldb,ldc integer(kind=C_INT), intent(in), value :: lda,ldb,ldc
complex(kind=C_DOUBLE),value :: alpha,beta complex(kind=C_DOUBLE_COMPLEX),value :: alpha,beta
integer(kind=C_intptr_T), value :: a, b, c integer(kind=C_intptr_T), value :: a, b, c
end subroutine cublas_zgemm_c end subroutine cublas_zgemm_c
...@@ -318,7 +318,7 @@ module cuda_functions ...@@ -318,7 +318,7 @@ module cuda_functions
character(1,C_CHAR),value :: cta, ctb character(1,C_CHAR),value :: cta, ctb
integer(kind=C_INT),value :: m,n,k integer(kind=C_INT),value :: m,n,k
integer(kind=C_INT), intent(in), value :: lda,ldb,ldc integer(kind=C_INT), intent(in), value :: lda,ldb,ldc
complex(kind=C_FLOAT),value :: alpha,beta complex(kind=C_FLOAT_COMPLEX),value :: alpha,beta
integer(kind=C_intptr_T), value :: a, b, c integer(kind=C_intptr_T), value :: a, b, c
end subroutine cublas_cgemm_c end subroutine cublas_cgemm_c
...@@ -333,7 +333,7 @@ module cuda_functions ...@@ -333,7 +333,7 @@ module cuda_functions
character(1,C_CHAR),value :: side, uplo, trans, diag character(1,C_CHAR),value :: side, uplo, trans, diag
integer(kind=C_INT),value :: m,n integer(kind=C_INT),value :: m,n
integer(kind=C_INT), intent(in), value :: lda,ldb integer(kind=C_INT), intent(in), value :: lda,ldb
complex(kind=C_DOUBLE), value :: alpha complex(kind=C_DOUBLE_COMPLEX), value :: alpha
integer(kind=C_intptr_T), value :: a, b integer(kind=C_intptr_T), value :: a, b
end subroutine cublas_ztrmm_c end subroutine cublas_ztrmm_c
...@@ -348,7 +348,7 @@ module cuda_functions ...@@ -348,7 +348,7 @@ module cuda_functions
character(1,C_CHAR),value :: side, uplo, trans, diag character(1,C_CHAR),value :: side, uplo, trans, diag
integer(kind=C_INT),value :: m,n integer(kind=C_INT),value :: m,n
integer(kind=C_INT), intent(in), value :: lda,ldb integer(kind=C_INT), intent(in), value :: lda,ldb
complex(kind=C_FLOAT), value :: alpha complex(kind=C_FLOAT_COMPLEX), value :: alpha
integer(kind=C_intptr_T), value :: a, b integer(kind=C_intptr_T), value :: a, b
end subroutine cublas_ctrmm_c end subroutine cublas_ctrmm_c
...@@ -391,7 +391,7 @@ module cuda_functions ...@@ -391,7 +391,7 @@ module cuda_functions
character(1,C_CHAR),value :: cta character(1,C_CHAR),value :: cta
integer(kind=C_INT),value :: m,n integer(kind=C_INT),value :: m,n
integer(kind=C_INT), intent(in), value :: lda,incx,incy integer(kind=C_INT), intent(in), value :: lda,incx,incy
complex(kind=C_DOUBLE),value :: alpha,beta complex(kind=C_DOUBLE_COMPLEX),value :: alpha,beta
integer(kind=C_intptr_T), value :: a, x, y integer(kind=C_intptr_T), value :: a, x, y
end subroutine cublas_zgemv_c end subroutine cublas_zgemv_c
end interface end interface
...@@ -405,7 +405,7 @@ module cuda_functions ...@@ -405,7 +405,7 @@ module cuda_functions
character(1,C_CHAR),value :: cta character(1,C_CHAR),value :: cta
integer(kind=C_INT),value :: m,n integer(kind=C_INT),value :: m,n
integer(kind=C_INT), intent(in), value :: lda,incx,incy integer(kind=C_INT), intent(in), value :: lda,incx,incy
complex(kind=C_FLOAT),value :: alpha,beta complex(kind=C_FLOAT_COMPLEX),value :: alpha,beta
integer(kind=C_intptr_T), value :: a, x, y integer(kind=C_intptr_T), value :: a, x, y
end subroutine cublas_cgemv_c end subroutine cublas_cgemv_c
end interface end interface
...@@ -448,7 +448,7 @@ module cuda_functions ...@@ -448,7 +448,7 @@ module cuda_functions
! character(1,C_CHAR),value :: cta ! character(1,C_CHAR),value :: cta
! integer(kind=C_INT),value :: n ! integer(kind=C_INT),value :: n
! integer(kind=C_INT), intent(in), value :: lda,incx,incy ! integer(kind=C_INT), intent(in), value :: lda,incx,incy
! complex(kind=C_DOUBLE),value :: alpha,beta ! complex(kind=C_DOUBLE_COMPLEX),value :: alpha,beta
! integer(kind=C_intptr_T), value :: a, x, y ! integer(kind=C_intptr_T), value :: a, x, y
! end subroutine cublas_zsymv_c ! end subroutine cublas_zsymv_c
! end interface ! end interface
...@@ -462,7 +462,7 @@ module cuda_functions ...@@ -462,7 +462,7 @@ module cuda_functions
! character(1,C_CHAR),value :: cta ! character(1,C_CHAR),value :: cta
! integer(kind=C_INT),value :: n ! integer(kind=C_INT),value :: n
! integer(kind=C_INT), intent(in), value :: lda,incx,incy ! integer(kind=C_INT), intent(in), value :: lda,incx,incy
! complex(kind=C_FLOAT),value :: alpha,beta ! complex(kind=C_FLOAT_COMPLEX),value :: alpha,beta
! integer(kind=C_intptr_T), value :: a, x, y ! integer(kind=C_intptr_T), value :: a, x, y
! end subroutine cublas_csymv_c ! end subroutine cublas_csymv_c
! end interface ! end interface
...@@ -744,7 +744,7 @@ module cuda_functions ...@@ -744,7 +744,7 @@ module cuda_functions
character(1,C_CHAR),value :: cta, ctb character(1,C_CHAR),value :: cta, ctb
integer(kind=C_INT) :: m,n,k integer(kind=C_INT) :: m,n,k
integer(kind=C_INT), intent(in) :: lda,ldb,ldc integer(kind=C_INT), intent(in) :: lda,ldb,ldc
complex(kind=C_DOUBLE) :: alpha,beta complex(kind=C_DOUBLE_COMPLEX) :: alpha,beta
integer(kind=C_intptr_T) :: a, b, c integer(kind=C_intptr_T) :: a, b, c
#ifdef WITH_GPU_VERSION #ifdef WITH_GPU_VERSION
call cublas_zgemm_c(cta, ctb, m, n, k, alpha, a, lda, b, ldb, beta, c,ldc) call cublas_zgemm_c(cta, ctb, m, n, k, alpha, a, lda, b, ldb, beta, c,ldc)
...@@ -759,7 +759,7 @@ module cuda_functions ...@@ -759,7 +759,7 @@ module cuda_functions
character(1,C_CHAR),value :: cta, ctb character(1,C_CHAR),value :: cta, ctb
integer(kind=C_INT) :: m,n,k integer(kind=C_INT) :: m,n,k
integer(kind=C_INT), intent(in) :: lda,ldb,ldc integer(kind=C_INT), intent(in) :: lda,ldb,ldc
complex(kind=C_FLOAT) :: alpha,beta complex(kind=C_FLOAT_COMPLEX) :: alpha,beta
integer(kind=C_intptr_T) :: a, b, c integer(kind=C_intptr_T) :: a, b, c
#ifdef WITH_GPU_VERSION #ifdef WITH_GPU_VERSION
call cublas_cgemm_c(cta, ctb, m, n, k, alpha, a, lda, b, ldb, beta, c,ldc) call cublas_cgemm_c(cta, ctb, m, n, k, alpha, a, lda, b, ldb, beta, c,ldc)
...@@ -774,7 +774,7 @@ module cuda_functions ...@@ -774,7 +774,7 @@ module cuda_functions
character(1,C_CHAR),value :: side, uplo, trans, diag character(1,C_CHAR),value :: side, uplo, trans, diag
integer(kind=C_INT) :: m,n integer(kind=C_INT) :: m,n
integer(kind=C_INT), intent(in) :: lda,ldb integer(kind=C_INT), intent(in) :: lda,ldb
complex(kind=C_DOUBLE) :: alpha complex(kind=C_DOUBLE_COMPLEX) :: alpha
integer(kind=C_intptr_T) :: a, b integer(kind=C_intptr_T) :: a, b
#ifdef WITH_GPU_VERSION #ifdef WITH_GPU_VERSION
call cublas_ztrmm_c(side, uplo, trans, diag, m, n, alpha, a, lda, b, ldb) call cublas_ztrmm_c(side, uplo, trans, diag, m, n, alpha, a, lda, b, ldb)
...@@ -789,7 +789,7 @@ module cuda_functions ...@@ -789,7 +789,7 @@ module cuda_functions
character(1,C_CHAR),value :: side, uplo, trans, diag character(1,C_CHAR),value :: side, uplo, trans, diag
integer(kind=C_INT) :: m,n integer(kind=C_INT) :: m,n
integer(kind=C_INT), intent(in) :: lda,ldb integer(kind=C_INT), intent(in) :: lda,ldb
complex(kind=C_FLOAT) :: alpha complex(kind=C_FLOAT_COMPLEX) :: alpha
integer(kind=C_intptr_T) :: a, b integer(kind=C_intptr_T) :: a, b
#ifdef WITH_GPU_VERSION #ifdef WITH_GPU_VERSION
call cublas_ctrmm_c(side, uplo, trans, diag, m, n, alpha, a, lda, b, ldb) call cublas_ctrmm_c(side, uplo, trans, diag, m, n, alpha, a