ceo 0.1.0

CUDA Engined Optics
Documentation
#ifndef __ITERATIVESOLVERS_H__
#define __ITERATIVESOLVERS_H__

#ifndef __UTILITIES_H__
#include "utilities.h"
#endif

#ifndef __BTBT_H__
#include "BTBT.h"
#endif

//#define MINRES_DEBUG

struct iterativeSolvers {

  float *d__vectors,
    *q, *x, *r, *p, *z,
    *nu_i, *nu_im1, *nu_ip1,
    *w_i, *w_im1, *w_im2;
  float rnorm, rel_rnorm, mean_time_per_iteration, RTOL, ATOL;
  int N, N_ITERATION, cvgce_iteration;
  stopwatch tid;
  cublasHandle_t handle;
  cublasStatus_t status;
  char VERBOSE;

  void cg_setup(int n_vector);
  void pcg_setup(int n_vector);

  void minres_setup(int n_vector);

  void cleanup(void);

  void cg(float *x, BTBT* A, float *b, int max_it, float* x0);
  void pcg(float *x, BTBT* A, float *b, int max_it, float* x0, float ip);

  void sym_ortho(float *c,float *s,float *r,
                 float *a,float *b);

  void lanczos_step(float *alpha, float *beta, float *nu_kp1,
                    BTBT *A, float *nu_k, float *nu_km1, float sigma);


  void minres_vorst(float *x, BTBT* A, float *b, float* x0);
  void minres_vorst(float *x, BTBT* A, float *b, int max_it, float* x0);
  void minres_vorst(float *x, BTBT* A, float *b, float rtol, float* x0);
  void pminres_vorst(float *x, BTBT* A, float *b, int max_it, float* x0, float ip);
  void minres_vorst(float *x, float *res, BTBT* A, float *b, int max_it, float* x0);

  void minres_choi(float *x, BTBT* A, float *b, int max_it, float* x0);

  //  void info(void);
};
#endif // __ITERATIVESOLVERS_H__