!===============================================================================
!
! module_cg_threads.F90
!
!-------------------------------------------------------------------------------
!
! Copyright (C) 2016 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

!-------------------------------------------------------------------------------
module module_cg_threads

  integer, parameter :: cg_max_threads = 64

  FOR _rrs in _r4 _r4s _r8 _r8s
  integer, dimension(0:cg_max_threads - 1), save :: i_start %% _rrs
  integer, dimension(0:cg_max_threads - 1), save :: i_end %% _rrs
  ENDFOR
end

FOR field in _sc _sc22
FOR _rrs in _r4 _r4s _r8 _r8s
!-------------------------------------------------------------------------------
module module_threads %% field %% _rrs
  use module_cg_threads, i_start => i_start %% _rrs, i_end => i_end %% _rrs
end

ENDFOR
ENDFOR

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