
/*******************************************************************************
*
* File dirac.h
*
* Copyright (C) 2005 Martin Luescher
*
* This software is distributed under the terms of the GNU General Public
* License (GPL)
*
*******************************************************************************/

#ifndef DIRAC_H
#define DIRAC_H

#ifndef SU3_H
#include "su3.h"
#endif

#ifndef BLOCK_H
#include "block.h"
#endif

#ifndef PBND_C
extern void (*assign_s2w[])(int imb[],int vol,spinor *pk,weyl *pl);
extern void (*add_assign_w2s[])(int imb[],int vol,weyl *pk,spinor *pl);
extern void (*sub_assign_w2s[])(int imb[],int vol,weyl *pk,spinor *pl);
extern void (*mulg5_sub_assign_w2s[])(int imb[],int vol,weyl *pk,spinor *pl);
#endif

#ifndef PBND_DBLE_C
extern void (*assign_sd2wd[])(int imb[],int vol,spinor_dble *pk,
                              weyl_dble *pl);
extern void (*add_assign_wd2sd[])(int imb[],int vol,weyl_dble *pk,
                                  spinor_dble *pl);
extern void (*sub_assign_wd2sd[])(int imb[],int vol,weyl_dble *pk,
                                  spinor_dble *pl);
extern void (*mulg5_sub_assign_wd2sd[])(int imb[],int vol,weyl_dble *pk,
                                        spinor_dble *pl);
#endif

#ifndef QHAT_C
extern void Qhat(int k,int l);
extern void Qhat_blk(block_t *b,int k,int l);
extern void Qnohat(int k,int l);
extern void Qnohat_blk(block_t *b,int k,int l);
extern void Qoe(int k,int l);
extern void Qoe_blk(block_t *b,int k,int l);
extern void Qeo(int k,int l);
extern void Qeo_blk(block_t *b,int k,int l);
void gs_blk(block_t *b,int k,int l);
#endif

#ifndef QHAT_DBLE_C
extern void Qhat_dble(int k,int l);
extern void Qhat_blk_dble(block_t *b,int k,int l);
extern void Qnohat_dble(int k,int l);
extern void Qnohat_blk_dble(block_t *b,int k,int l);
extern void Qoe_dble(int k,int l);
extern void Qoe_blk_dble(block_t *b,int k,int l);
extern void Qeo_dble(int k,int l);
extern void Qeo_blk_dble(block_t *b,int k,int l);
void Qnohat_dble_ptr(spinor_dble *psdk, spinor_dble *psdl);
#endif

#ifndef QBND_C
extern void Qbnd(block_t *b,int k,int l);
extern void Qbnds(block_t *b,int k,int l);
extern void assign_s2sbb(block_t *b,int k,int l);
extern void sub_assign_sbb2s(block_t *b,int k,int l);
extern void mulg5_sub_assign_sbb2s(block_t *b,int k,int l);
#endif

#ifndef QBND_DBLE_C
extern void Qbnd_dble(block_t *b,int k,int l);
extern void Qbnds_dble(block_t *b,int k,int l);
extern void assign_sd2sdbb(block_t *b,int k,int l);
extern void sub_assign_sdbb2sd(block_t *b,int k,int l);
extern void mulg5_sub_assign_sdbb2sd(block_t *b,int k,int l);
#endif

#ifndef SCOM_C
extern void cps_int_bnd(int k);
extern void cps_ext_bnd(int k);
extern void free_sbufs(void);
#endif

#ifndef SDCOM_C
extern void cpsd_int_bnd(int k);
extern void cpsd_ext_bnd(int k);
extern void free_sdbufs(void);
#endif

#ifdef QUAD_PRECISION
void assignsq2sd(spinor_quad *src, spinor_dble *dst);
void assignsd2sq(spinor_dble *src, spinor_quad *dst);
void Qnohat_quad(spinor_quad *src, spinor_quad *dst);
#endif

#endif
