forked from kostrzewa/tmLQCD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dov_proj.c
66 lines (51 loc) · 1.41 KB
/
Dov_proj.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/**********************************************************
*
* Dov_proj_plus and Dov_proj_minus
* are the projections of Dov onto the
* positive and negative chiral sector, respectively
*
* Both need one work_field!
*
* Author: Carsten Urbach <[email protected]>
* Die Sep 21 15:21:33 CEST 2004
*
**********************************************************/
#include <stdlib.h>
#include "global.h"
#include "su3.h"
#include "linalg_eo.h"
#include "Dov_proj.h"
#include "gamma.h"
#include "Dov_psi.h"
void Dov_proj_plus(spinor * const R, spinor * const S)
{
spinor *aux_ = NULL, *aux;
int N = VOLUMEPLUSRAND;
#if ( defined SSE || defined SSE2 || defined SSE3)
aux_=calloc(VOLUMEPLUSRAND+1, sizeof(spinor));
aux = (spinor *)(((unsigned long int)(aux_)+ALIGN_BASE)&~ALIGN_BASE);
#else
aux_=calloc(VOLUMEPLUSRAND, sizeof(spinor));
aux = aux_;
#endif
Proj(aux, S, N, _PLUS);
Dov_psi(R, aux);
Proj(R, R, N, _PLUS);
free(aux_);
}
void Dov_proj_minus(spinor * const R, spinor * const S)
{
spinor *aux_ = NULL, *aux;
int N = VOLUMEPLUSRAND;
#if ( defined SSE || defined SSE2 || defined SSE3)
aux_=calloc(VOLUMEPLUSRAND+1, sizeof(spinor));
aux = (spinor *)(((unsigned long int)(aux_)+ALIGN_BASE)&~ALIGN_BASE);
#else
aux_=calloc(VOLUMEPLUSRAND, sizeof(spinor));
aux = aux_;
#endif
Proj(aux, S, N, _MINUS);
Dov_psi(R, aux);
Proj(R, R, N, _MINUS);
free(aux_);
}