Commit 1d9439c6 authored by Andreas Marek's avatar Andreas Marek

Pointer for matrix in complex case

parent 7f7dcff2
......@@ -103,10 +103,10 @@
#if COMPLEXCASE == 1
#if defined(WITH_COMPLEX_GENERIC_SIMPLE_KERNEL)
#if defined(WITH_COMPLEX_GENERIC_SIMPLE_KERNEL) && !(defined(USE_ASSUMED_SIZE))
use complex_generic_simple_kernel !, only : single_hh_trafo_complex_generic_simple
#endif
#if defined(WITH_COMPLEX_GENERIC_KERNEL)
#if defined(WITH_COMPLEX_GENERIC_KERNEL) && !(defined(USE_ASSUMED_SIZE))
use complex_generic_kernel !, only : single_hh_trafo_complex_generic
#endif
......@@ -147,7 +147,8 @@
real(kind=C_DATATYPE_KIND), pointer:: a(:,:,:)
#endif
#if COMPLEXCASE == 1
complex(kind=C_DATATYPE_KIND) :: a(stripe_width,a_dim2,stripe_count)
! complex(kind=C_DATATYPE_KIND) :: a(stripe_width,a_dim2,stripe_count)
complex(kind=C_DATATYPE_KIND),pointer :: a(:,:,:)
#endif
#else /* WITH_OPENMP */
......@@ -157,7 +158,8 @@
real(kind=C_DATATYPE_KIND), pointer:: a(:,:,:,:)
#endif
#if COMPLEXCASE == 1
complex(kind=C_DATATYPE_KIND) :: a(stripe_width,a_dim2,stripe_count,max_threads)
! complex(kind=C_DATATYPE_KIND) :: a(stripe_width,a_dim2,stripe_count,max_threads)
complex(kind=C_DATATYPE_KIND),pointer :: a(:,:,:,:)
#endif
#endif /* WITH_OPENMP */
......@@ -536,14 +538,14 @@
&_&
&PRECISION&
&_sse_assembly&
& (a(1,j+off+a_off,istripe,my_thread), bcast_buffer(1,j+off),nbw,nl,stripe_width)
& (c_loc(a(1,j+off+a_off,istripe,my_thread)), bcast_buffer(1,j+off),nbw,nl,stripe_width)
#else
call single_hh_trafo_&
&MATH_DATATYPE&
&_&
&PRECISION&
&_sse_assembly&
& (a(1,j+off+a_off,istripe), bcast_buffer(1,j+off),nbw,nl,stripe_width)
& (c_loc(a(1,j+off+a_off,istripe)), bcast_buffer(1,j+off),nbw,nl,stripe_width)
#endif
enddo
#if defined(WITH_NO_SPECIFIC_COMPLEX_KERNEL)
......@@ -571,13 +573,13 @@
&MATH_DATATYPE&
&_sse_1hv_&
&PRECISION&
& (a(1,j+off+a_off,istripe,my_thread), bcast_buffer(1,j+off),nbw,nl,stripe_width)
& (c_loc(a(1,j+off+a_off,istripe,my_thread)), bcast_buffer(1,j+off),nbw,nl,stripe_width)
#else
call single_hh_trafo_&
&MATH_DATATYPE&
&_sse_1hv_&
&PRECISION&
& (a(1,j+off+a_off,istripe), bcast_buffer(1,j+off),nbw,nl,stripe_width)
& (c_loc(a(1,j+off+a_off,istripe)), bcast_buffer(1,j+off),nbw,nl,stripe_width)
#endif
enddo
#endif /* defined(WITH_NO_SPECIFIC_COMPLEX_KERNEL) || (defined(WITH_ONE_SPECIFIC_COMPLEX_KERNEL) && !defined(WITH_COMPLEX_SSE_BLOCK2_KERNEL)) */
......@@ -609,13 +611,13 @@
&MATH_DATATYPE&
&_avx_avx2_1hv_&
&PRECISION&
& (a(1,j+off+a_off,istripe,my_thread), bcast_buffer(1,j+off),nbw,nl,stripe_width)
& (c_loc(a(1,j+off+a_off,istripe,my_thread)), bcast_buffer(1,j+off),nbw,nl,stripe_width)
#else
call single_hh_trafo_&
&MATH_DATATYPE&
&_avx_avx2_1hv_&
&PRECISION&
& (a(1,j+off+a_off,istripe), bcast_buffer(1,j+off),nbw,nl,stripe_width)
& (c_loc(a(1,j+off+a_off,istripe)), bcast_buffer(1,j+off),nbw,nl,stripe_width)
#endif
enddo
#endif /* defined(WITH_NO_SPECIFIC_COMPLEX_KERNEL) || (defined(WITH_ONE_SPECIFIC_COMPLEX_KERNEL) && !defined(WITH_COMPLEX_AVX_BLOCK2_KERNEL) && !defined(WITH_COMPLEX_AVX2_BLOCK2_KERNEL)) */
......@@ -646,13 +648,13 @@
&MATH_DATATYPE&
&_avx512_1hv_&
&PRECISION&
& (a(1,j+off+a_off,istripe,my_thread), bcast_buffer(1,j+off),nbw,nl,stripe_width)
& (c_loc(a(1,j+off+a_off,istripe,my_thread)), bcast_buffer(1,j+off),nbw,nl,stripe_width)
#else
call single_hh_trafo_&
&MATH_DATATYPE&
&_avx512_1hv_&
&PRECISION&
& (a(1,j+off+a_off,istripe), bcast_buffer(1,j+off),nbw,nl,stripe_width)
& (c_loc(a(1,j+off+a_off,istripe)), bcast_buffer(1,j+off),nbw,nl,stripe_width)
#endif
enddo
#endif /* defined(WITH_NO_SPECIFIC_COMPLEX_KERNEL) || (defined(WITH_ONE_SPECIFIC_COMPLEX_KERNEL) && !defined(WITH_COMPLEX_AVX512_BLOCK2_KERNEL) ) */
......@@ -715,13 +717,13 @@
&MATH_DATATYPE&
&_sse_2hv_&
&PRECISION&
& (a(1,j+off+a_off-1,istripe,my_thread), w, nbw, nl, stripe_width, nbw)
& (c_loc(a(1,j+off+a_off-1,istripe,my_thread)), w, nbw, nl, stripe_width, nbw)
#else
call double_hh_trafo_&
&MATH_DATATYPE&
&_sse_2hv_&
&PRECISION&
& (a(1,j+off+a_off-1,istripe), w, nbw, nl, stripe_width, nbw)
& (c_loc(a(1,j+off+a_off-1,istripe)), w, nbw, nl, stripe_width, nbw)
#endif
enddo
#ifdef WITH_OPENMP
......@@ -729,13 +731,13 @@
&MATH_DATATYPE&
&_sse_1hv_&
&PRECISION&
& (a(1,1+off+a_off,istripe,my_thread), bcast_buffer(1,off+1), nbw, nl, stripe_width)
& (c_loc(a(1,1+off+a_off,istripe,my_thread)), bcast_buffer(1,off+1), nbw, nl, stripe_width)
#else
if (j==1) call single_hh_trafo_&
&MATH_DATATYPE&
&_sse_1hv_&
&PRECISION&
& (a(1,1+off+a_off,istripe), bcast_buffer(1,off+1), nbw, nl, stripe_width)
& (c_loc(a(1,1+off+a_off,istripe)), bcast_buffer(1,off+1), nbw, nl, stripe_width)
#endif
#if defined(WITH_NO_SPECIFIC_COMPLEX_KERNEL)
......@@ -799,13 +801,13 @@
&MATH_DATATYPE&
&_avx_avx2_2hv_&
&PRECISION&
& (a(1,j+off+a_off-1,istripe,my_thread), w, nbw, nl, stripe_width, nbw)
& (c_loc(a(1,j+off+a_off-1,istripe,my_thread)), w, nbw, nl, stripe_width, nbw)
#else
call double_hh_trafo_&
&MATH_DATATYPE&
&_avx_avx2_2hv_&
&PRECISION&
& (a(1,j+off+a_off-1,istripe), w, nbw, nl, stripe_width, nbw)
& (c_loc(a(1,j+off+a_off-1,istripe)), w, nbw, nl, stripe_width, nbw)
#endif
enddo
#ifdef WITH_OPENMP
......@@ -813,13 +815,13 @@
&MATH_DATATYPE&
&_avx_avx2_1hv_&
&PRECISION&
& (a(1,1+off+a_off,istripe,my_thread), bcast_buffer(1,off+1), nbw, nl, stripe_width)
& (c_loc(a(1,1+off+a_off,istripe,my_thread)), bcast_buffer(1,off+1), nbw, nl, stripe_width)
#else
if (j==1) call single_hh_trafo_&
&MATH_DATATYPE&
&_avx_avx2_1hv_&
&PRECISION&
& (a(1,1+off+a_off,istripe), bcast_buffer(1,off+1), nbw, nl, stripe_width)
& (c_loc(a(1,1+off+a_off,istripe)), bcast_buffer(1,off+1), nbw, nl, stripe_width)
#endif
#if defined(WITH_NO_SPECIFIC_COMPLEX_KERNEL)
......@@ -882,13 +884,13 @@
&MATH_DATATYPE&
&_avx512_2hv_&
&PRECISION&
& (a(1,j+off+a_off-1,istripe,my_thread), w, nbw, nl, stripe_width, nbw)
& (c_loc(a(1,j+off+a_off-1,istripe,my_thread)), w, nbw, nl, stripe_width, nbw)
#else
call double_hh_trafo_&
&MATH_DATATYPE&
&_avx512_2hv_&
&PRECISION&
& (a(1,j+off+a_off-1,istripe), w, nbw, nl, stripe_width, nbw)
& (c_loc(a(1,j+off+a_off-1,istripe)), w, nbw, nl, stripe_width, nbw)
#endif
enddo
#ifdef WITH_OPENMP
......@@ -896,13 +898,13 @@
&MATH_DATATYPE&
&_avx512_1hv_&
&PRECISION&
& (a(1,1+off+a_off,istripe,my_thread), bcast_buffer(1,off+1), nbw, nl, stripe_width)
& (c_loc(a(1,1+off+a_off,istripe,my_thread)), bcast_buffer(1,off+1), nbw, nl, stripe_width)
#else
if (j==1) call single_hh_trafo_&
&MATH_DATATYPE&
&_avx512_1hv_&
&PRECISION&
& (a(1,1+off+a_off,istripe), bcast_buffer(1,off+1), nbw, nl, stripe_width)
& (c_loc(a(1,1+off+a_off,istripe)), bcast_buffer(1,off+1), nbw, nl, stripe_width)
#endif
#if defined(WITH_NO_SPECIFIC_COMPLEX_KERNEL)
......
......@@ -715,9 +715,10 @@ return1:
#!f> subroutine single_hh_trafo_complex_double_sse_assembly(q, hh, nb, nq, ldq) &
#!f> bind(C,name="single_hh_trafo_complex_double_sse_assembly")
#!f> use, intrinsic :: iso_c_binding
#!f> integer(kind=c_int) :: nb, nq, ldq
#!f> complex(kind=c_double_complex) :: q(*)
#!f> complex(kind=c_double_complex) :: hh(nb,2)
#!f> integer(kind=c_int) :: nb, nq, ldq
#!f> !complex(kind=c_double_complex) :: q(*)
#!f> type(c_ptr), value :: q
#!f> complex(kind=c_double_complex) :: hh(nb,2)
#!f> end subroutine
#!f> end interface
#!f>#endif
......
......@@ -735,9 +735,10 @@ return1:
#!f> subroutine single_hh_trafo_complex_single_sse_assembly(q, hh, nb, nq, ldq) &
#!f> bind(C,name="single_hh_trafo_complex_single_sse_assembly")
#!f> use, intrinsic :: iso_c_binding
#!f> integer(kind=c_int) :: nb, nq, ldq
#!f> complex(kind=c_float_complex) :: q(*)
#!f> complex(kind=c_float_complex) :: hh(nb,2)
#!f> integer(kind=c_int) :: nb, nq, ldq
#!f> !complex(kind=c_float_complex) :: q(*)
#!f> type(c_ptr), value :: q
#!f> complex(kind=c_float_complex) :: hh(nb,2)
#!f> end subroutine
#!f> end interface
#!f>#endif
......
......@@ -56,6 +56,7 @@
#include "config-f90.h"
#ifndef USE_ASSUMED_SIZE
module complex_generic_kernel
private
......@@ -65,6 +66,7 @@ module complex_generic_kernel
#endif
contains
#endif
#define DOUBLE_PRECISION_COMPLEX 1
#define COMPLEX_DATATYPE ck8
......@@ -80,5 +82,8 @@ module complex_generic_kernel
#undef COMPLEX_DATATYPE
#endif
#ifndef USE_ASSUMED_SIZE
end module complex_generic_kernel
#endif
! --------------------------------------------------------------------------------------------------
......@@ -94,8 +94,9 @@ 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> use, intrinsic :: iso_c_binding
!f> integer(kind=c_int) :: pnb, pnq, pldq
!f> complex(kind=c_double_complex) :: q(*)
!f> complex(kind=c_double_complex) :: hh(pnb,2)
!f> ! complex(kind=c_double_complex) :: q(*)
!f> type(c_ptr), value :: q
!f> complex(kind=c_double_complex) :: hh(pnb,2)
!f> end subroutine
!f> end interface
!f>#endif
......
......@@ -79,7 +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> use, intrinsic :: iso_c_binding
!f> integer(kind=c_int) :: pnb, pnq, pldq
!f> complex(kind=c_float_complex) :: q(*)
!f> ! complex(kind=c_float_complex) :: q(*)
!f> type(c_ptr), value :: q
!f> complex(kind=c_float_complex) :: hh(pnb,2)
!f> end subroutine
!f> end interface
......
......@@ -95,7 +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> use, intrinsic :: iso_c_binding
!f> integer(kind=c_int) :: pnb, pnq, pldq, pldh
!f> complex(kind=c_double_complex) :: q(*)
!f> ! complex(kind=c_double_complex) :: q(*)
!f> type(c_ptr), value :: q
!f> complex(kind=c_double_complex) :: hh(pnb,2)
!f> end subroutine
!f> end interface
......
......@@ -80,7 +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> use, intrinsic :: iso_c_binding
!f> integer(kind=c_int) :: pnb, pnq, pldq, pldh
!f> complex(kind=c_float_complex) :: q(*)
!f> ! complex(kind=c_float_complex) :: q(*)
!f> type(c_ptr), value :: q
!f> complex(kind=c_float_complex) :: hh(pnb,2)
!f> end subroutine
!f> end interface
......
......@@ -73,7 +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> use, intrinsic :: iso_c_binding
!f> integer(kind=c_int) :: pnb, pnq, pldq
!f> complex(kind=c_double_complex) :: q(*)
!f> ! complex(kind=c_double_complex) :: q(*)
!f> type(c_ptr), value :: q
!f> complex(kind=c_double_complex) :: hh(pnb,2)
!f> end subroutine
!f> end interface
......
......@@ -71,7 +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> use, intrinsic :: iso_c_binding
!f> integer(kind=c_int) :: pnb, pnq, pldq
!f> complex(kind=c_float_complex) :: q(*)
!f> ! complex(kind=c_float_complex) :: q(*)
!f> type(c_ptr), value :: q
!f> complex(kind=c_float_complex) :: hh(pnb,2)
!f> end subroutine
!f> end interface
......
......@@ -74,7 +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> use, intrinsic :: iso_c_binding
!f> integer(kind=c_int) :: pnb, pnq, pldq, pldh
!f> complex(kind=c_double_complex) :: q(*)
!f> ! complex(kind=c_double_complex) :: q(*)
!f> type(c_ptr), value :: q
!f> complex(kind=c_double_complex) :: hh(pnb,2)
!f> end subroutine
!f> end interface
......
......@@ -73,7 +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> use, intrinsic :: iso_c_binding
!f> integer(kind=c_int) :: pnb, pnq, pldq, pldh
!f> complex(kind=c_float_complex) :: q(*)
!f> ! complex(kind=c_float_complex) :: q(*)
!f> type(c_ptr), value :: q
!f> complex(kind=c_float_complex) :: hh(pnb,2)
!f> end subroutine
!f> end interface
......
......@@ -58,6 +58,7 @@
#include "config-f90.h"
#ifndef USE_ASSUMED_SIZE
module complex_generic_simple_kernel
private
......@@ -67,7 +68,7 @@ module complex_generic_simple_kernel
#endif
contains
#endif
#define COMPLEXCASE 1
#define DOUBLE_PRECISION 1
......@@ -85,5 +86,7 @@ module complex_generic_simple_kernel
#undef SINGLE_PRECISION
#endif
#ifndef USE_ASSUMED_SIZE
end module complex_generic_simple_kernel
#endif
! --------------------------------------------------------------------------------------------------
......@@ -84,7 +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> use, intrinsic :: iso_c_binding
!f> integer(kind=c_int) :: pnb, pnq, pldq
!f> complex(kind=c_double_complex) :: q(*)
!f> ! complex(kind=c_double_complex) :: q(*)
!f> type(c_ptr), value :: q
!f> complex(kind=c_double_complex) :: hh(pnb,2)
!f> end subroutine
!f> end interface
......
......@@ -68,7 +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> use, intrinsic :: iso_c_binding
!f> integer(kind=c_int) :: pnb, pnq, pldq
!f> complex(kind=c_float_complex) :: q(*)
!f> ! complex(kind=c_float_complex) :: q(*)
!f> type(c_ptr), value :: q
!f> complex(kind=c_float_complex) :: hh(pnb,2)
!f> end subroutine
!f> end interface
......
......@@ -84,7 +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> use, intrinsic :: iso_c_binding
!f> integer(kind=c_int) :: pnb, pnq, pldq, pldh
!f> complex(kind=c_double_complex) :: q(*)
!f> ! complex(kind=c_double_complex) :: q(*)
!f> type(c_ptr), value :: q
!f> complex(kind=c_double_complex) :: hh(pnb,2)
!f> end subroutine
!f> end interface
......
......@@ -65,7 +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> use, intrinsic :: iso_c_binding
!f> integer(kind=c_int) :: pnb, pnq, pldq, pldh
!f> complex(kind=c_float_complex) :: q(*)
!f> ! complex(kind=c_float_complex) :: q(*)
!f> type(c_ptr), value :: q
!f> complex(kind=c_float_complex) :: hh(pnb,2)
!f> end subroutine
!f> end interface
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment