su2hmc
Loading...
Searching...
No Matches
congrad.c File Reference

Conjugate gradients. Congradq for the solver and Congradp for the inversion. More...

#include <matrices.h>
#include <clover.h>
#include <float.h>
Include dependency graph for congrad.c:

Go to the source code of this file.

Functions

void Q_allocate_f (Complex_f **p_f, Complex_f **x1_f, Complex_f **x2_f, Complex_f **r_f, Complex_f **X1_f)
 Allocates memory needed for Congradq. Just to improve readability Note that since C does not modify it's arguments, you need to pass a pointer to the pointer you want to assign the memory to. This is similar behaviour to cudaMalloc.
void Q_allocate (Complex **p, Complex **x1, Complex **x2, Complex *clover[2])
 Allocates double precision memory needed for Congradq. Just to improve readability Note that since C does not modify it's arguments, you need to pass a pointer to the pointer you want to assign the memory to. This is similar behaviour to cudaMalloc.
void P_allocate_f (Complex_f **p_f, Complex_f **r_f, Complex_f **x1_f, Complex_f **x2_f, Complex_f **xi_f)
 Allocates memory needed for Congradp. Just to improve readability Note that since C does not modify it's arguments, you need to pass a pointer to the pointer you want to assign the memory to. This is similar behaviour to cudaMalloc.
void P_allocate (Complex **p, Complex **r, Complex **x1, Complex **x2, Complex *clover[2])
 Allocates double precision memory needed for Congradp. Just to improve readability Note that since C does not modify it's arguments, you need to pass a pointer to the pointer you want to assign the memory to. This is similar behaviour to cudaMalloc.
void Q_free_f (Complex_f **p_f, Complex_f **x1_f, Complex_f **x2_f, Complex_f **r_f, Complex_f **X1_f)
 Frees memory needed for Congradq. Just to improve readability Note that since C does not modify it's arguments, you need to pass a pointer to the pointer you want to assign the memory to. This is similar behaviour to cudaMalloc.
void Q_free (Complex **p, Complex **x1, Complex **x2, Complex *clover[2])
 Frees double precision memory needed for Congradq. Just to improve readability Note that since C does not modify it's arguments, you need to pass a pointer to the pointer you want to assign the memory to. This is similar behaviour to cudaMalloc.
void P_free_f (Complex_f **p_f, Complex_f **r_f, Complex_f **x1_f, Complex_f **x2_f, Complex_f **xi_f)
 Frees memory needed for Congradp. Just to improve readability Note that since C does not modify it's arguments, you need to pass a pointer to the pointer you want to assign the memory to. This is similar behaviour to cudaMalloc.
void P_free (Complex **p, Complex **r, Complex **x1, Complex **x2, Complex *clover[2])
 Frees memory needed for Congradp. Just to improve readability Note that since C does not modify it's arguments, you need to pass a pointer to the pointer you want to assign the memory to. This is similar behaviour to cudaMalloc.
int Congradq (int na, double res, Complex *X1, Complex *r, Complex *ud[2], Complex_f *ut[2], Complex_f *clover_f[nc], unsigned int *iu, unsigned int *id, Complex gamval[20], Complex_f gamval_f[20], const unsigned short gamin[16], Complex *sigval, Complex_f *sigval_f, unsigned short *sigin, double *dk[2], float *dk_f[2], Complex_f jqq, float akappa, float c_sw, int *itercg)
 Matrix Inversion via Conjugate Gradient (up/down flavour partitioning). Solves \((M^\dagger)Mx=\Phi\) Implements up/down partitioning The matrix multiplication step is done at mixed precision, while the update is done at double.
int Congradp (int na, double res, Complex *Phi, Complex *xi, Complex *ud[2], Complex_f *ut[2], Complex_f *clover_f[nc], unsigned int *iu, unsigned int *id, Complex gamval[20], Complex_f gamval_f[20], const unsigned short gamin[16], Complex *sigval, Complex_f *sigval_f, unsigned short *sigin, double *dk[2], float *dk_f[2], Complex_f jqq, float akappa, float c_sw, int *itercg)
 Matrix Inversion via Conjugate Gradient (no up/down flavour partitioning). Solves \((M^\dagger)Mx=\Phi\) The matrix multiplication step is done at single precision, while the update is done at double.

Detailed Description

Conjugate gradients. Congradq for the solver and Congradp for the inversion.

Definition in file congrad.c.