!===============================================================================
!
! module_reduction.F90
!
!-------------------------------------------------------------------------------
!
! Copyright (C) 2008 Yoshifumi Nakamura
!
! 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/>.
!
!-------------------------------------------------------------------------------
# include "defs.h"

!-------------------------------------------------------------------------------
module module_reduction

  interface global_sum
     real(8) function global_sum(a)
        real(8) :: a
     end
     real(4) function global_sum_r4(a)
        real(4) :: a
     end
  end interface global_sum

  interface global_min
     real(8) function global_min(a)
        real(8) :: a
     end
     real(4) function global_min_r4(a)
        real(4) :: a
     end
  end interface global_min

  interface global_max
     real(8) function global_max(a)
        real(8) :: a
     end
     real(4) function global_max_r4(a)
        real(4) :: a
     end
  end interface global_max

  interface global_sum_vec
     subroutine global_sum_vec(n, a)
        real(8) :: a(n)
        integer :: n
     end
     subroutine global_sum_vec_r4(n, a)
        real(4) :: a(n)
        integer :: n
     end
  end interface global_sum_vec


end

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