#/*
#===============================================================================
#
# dsf.h
#
#-------------------------------------------------------------------------------
#
# Copyright (C) 2008-2010 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/>.
#
#-------------------------------------------------------------------------------
#*/

#define acb1(i) aa(1)*conjg(b(1,cb,i))
#define acb2(i) aa(2)*conjg(b(2,cb,i))
#define acb3(i) aa(3)*conjg(b(3,cb,i))
#define acb4(i) aa(4)*conjg(b(4,cb,i))

#define wab(j) w(ca,cb,i)=acb1(j)+acb2(j)+acb3(j)+acb4(j)

#define _spin_spin(dcmp, i,j)\
  do ca = 1, NCOL;\\
  dcmp(aa,a,ca,i);\\
  do cb = 1, NCOL;\\
  wab(j);\\
  enddo;\\
  enddo
