!===============================================================================
!
! typedef_cg_clover.F90
!
!-------------------------------------------------------------------------------
!
! Copyright (C) 2012-2015 Hinnerk Stueben
!
! This file is part of BQCD -- Berlin Quantum ChromoDynamics program
!
! BQCD is free software: you can redistribute it and/or modify
! it under the terms of the GNU General Public License as published by
! the Free Software Foundation, either version 3 of the License, or
! (at your option) any later version.
!
! BQCD is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with BQCD.  If not, see <http://www.gnu.org/licenses/>.
!
!-------------------------------------------------------------------------------
# define LANGUAGE_FORTRAN
# include "simd.h"

!-------------------------------------------------------------------------------
module typedef_cg_clover

  use typedef_simd

FOR rkind in 4 8
SET _rr = _r %% rkind
SET _RR = _R %% rkind

  !---------------------------------------------------
  type type_clover_c1 %% _rr
     sequence

     real(rkind)    :: a11
     real(rkind)    :: a22

     complex(rkind) :: a12
     complex(rkind) :: a13
     complex(rkind) :: a14
     complex(rkind) :: a15
     complex(rkind) :: a16

     complex(rkind) :: a23
     complex(rkind) :: a24
     complex(rkind) :: a25
     complex(rkind) :: a26

     real(rkind)    :: a33
     real(rkind)    :: a44

     complex(rkind) :: a34
     complex(rkind) :: a35
     complex(rkind) :: a36

     complex(rkind) :: a45
     complex(rkind) :: a46

     real(rkind)    :: a55
     real(rkind)    :: a66

     complex(rkind) :: a56

  end type type_clover_c1 %% _rr

  !---------------------------------------------------
  type type_clover_c1 %% _rr %% s
     sequence

     type(simd_real %% _rr)    :: a11
     type(simd_real %% _rr)    :: a22

     type(simd_complex %% _rr) :: a12
     type(simd_complex %% _rr) :: a13
     type(simd_complex %% _rr) :: a14
     type(simd_complex %% _rr) :: a15
     type(simd_complex %% _rr) :: a16

     type(simd_complex %% _rr) :: a23
     type(simd_complex %% _rr) :: a24
     type(simd_complex %% _rr) :: a25
     type(simd_complex %% _rr) :: a26

     type(simd_real %% _rr)    :: a33
     type(simd_real %% _rr)    :: a44

     type(simd_complex %% _rr) :: a34
     type(simd_complex %% _rr) :: a35
     type(simd_complex %% _rr) :: a36

     type(simd_complex %% _rr) :: a45
     type(simd_complex %% _rr) :: a46

     type(simd_real %% _rr)    :: a55
     type(simd_real %% _rr)    :: a66

     type(simd_complex %% _rr) :: a56


  end type type_clover_c1 %% _rr %% s

  !---------------------------------------------------
  type type_clover_c2 %% _rr
     sequence
!!j=1
     real(rkind) :: im12
     real(rkind) :: im13
     real(rkind) :: im14
     real(rkind) :: im15
     real(rkind) :: im16

     real(rkind) :: re11
     real(rkind) :: re12
     real(rkind) :: re13
     real(rkind) :: re14
     real(rkind) :: re15
     real(rkind) :: re16
!!j=4
     real(rkind) :: im24
     real(rkind) :: im34
     real(rkind) :: im45
     real(rkind) :: im46

     real(rkind) :: re24
     real(rkind) :: re34
     real(rkind) :: re44
     real(rkind) :: re45
     real(rkind) :: re46
!!j=2
     real(rkind) :: im23
     real(rkind) :: im25
     real(rkind) :: im26

     real(rkind) :: re22
     real(rkind) :: re23
     real(rkind) :: re25
     real(rkind) :: re26
!!j=5
     real(rkind) :: im35
     real(rkind) :: im56

     real(rkind) :: re35
     real(rkind) :: re55
     real(rkind) :: re56
!!j=3
     real(rkind) :: im36

     real(rkind) :: re33
     real(rkind) :: re36
!!j=6
     real(rkind) :: re66

  end type type_clover_c2 %% _rr

  !---------------------------------------------------
  type type_clover_c2 %% _rr %% s
     sequence
!!j=1
     real(rkind) :: im12(SIMD_WIDTH %% _RR)
     real(rkind) :: im13(SIMD_WIDTH %% _RR)
     real(rkind) :: im14(SIMD_WIDTH %% _RR)
     real(rkind) :: im15(SIMD_WIDTH %% _RR)
     real(rkind) :: im16(SIMD_WIDTH %% _RR)

     real(rkind) :: re11(SIMD_WIDTH %% _RR)
     real(rkind) :: re12(SIMD_WIDTH %% _RR)
     real(rkind) :: re13(SIMD_WIDTH %% _RR)
     real(rkind) :: re14(SIMD_WIDTH %% _RR)
     real(rkind) :: re15(SIMD_WIDTH %% _RR)
     real(rkind) :: re16(SIMD_WIDTH %% _RR)
!!j=4
     real(rkind) :: im24(SIMD_WIDTH %% _RR)
     real(rkind) :: im34(SIMD_WIDTH %% _RR)
     real(rkind) :: im45(SIMD_WIDTH %% _RR)
     real(rkind) :: im46(SIMD_WIDTH %% _RR)

     real(rkind) :: re24(SIMD_WIDTH %% _RR)
     real(rkind) :: re34(SIMD_WIDTH %% _RR)
     real(rkind) :: re44(SIMD_WIDTH %% _RR)
     real(rkind) :: re45(SIMD_WIDTH %% _RR)
     real(rkind) :: re46(SIMD_WIDTH %% _RR)
!!j=2
     real(rkind) :: im23(SIMD_WIDTH %% _RR)
     real(rkind) :: im25(SIMD_WIDTH %% _RR)
     real(rkind) :: im26(SIMD_WIDTH %% _RR)

     real(rkind) :: re22(SIMD_WIDTH %% _RR)
     real(rkind) :: re23(SIMD_WIDTH %% _RR)
     real(rkind) :: re25(SIMD_WIDTH %% _RR)
     real(rkind) :: re26(SIMD_WIDTH %% _RR)
!!j=5
     real(rkind) :: im35(SIMD_WIDTH %% _RR)
     real(rkind) :: im56(SIMD_WIDTH %% _RR)

     real(rkind) :: re35(SIMD_WIDTH %% _RR)
     real(rkind) :: re55(SIMD_WIDTH %% _RR)
     real(rkind) :: re56(SIMD_WIDTH %% _RR)
!!j=3
     real(rkind) :: im36(SIMD_WIDTH %% _RR)

     real(rkind) :: re33(SIMD_WIDTH %% _RR)
     real(rkind) :: re36(SIMD_WIDTH %% _RR)
!!j=6
     real(rkind) :: re66(SIMD_WIDTH %% _RR)

  end type type_clover_c2 %% _rr %% s

ENDSET
ENDSET
ENDFOR
end

!===============================================================================
