\hypertarget{adpcg_8h_source}{}\doxysection{adpcg.\+h}
\label{adpcg_8h_source}\index{src/adpcg.h@{src/adpcg.h}}
\mbox{\hyperlink{adpcg_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 }
\DoxyCodeLine{14 \textcolor{preprocessor}{\#ifndef adpcg\_h}}
\DoxyCodeLine{15 \textcolor{preprocessor}{\#define adpcg\_h}}
\DoxyCodeLine{16 }
\DoxyCodeLine{17 }
\DoxyCodeLine{18 \textcolor{preprocessor}{\#include <stddef.h>}}
\DoxyCodeLine{19 }
\DoxyCodeLine{20 \textcolor{preprocessor}{\#ifdef ADPCG\_64}}
\DoxyCodeLine{21 \textcolor{keyword}{typedef} int64\_t cgint;}
\DoxyCodeLine{22 \textcolor{preprocessor}{\#define id "{}\%lld"{}}}
\DoxyCodeLine{23 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{24 \textcolor{keyword}{typedef} int32\_t cgint;}
\DoxyCodeLine{25 \textcolor{preprocessor}{\#define id "{}\%d"{}}}
\DoxyCodeLine{26 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{27 }
\DoxyCodeLine{28 \textcolor{preprocessor}{\#define cgerr(x) printf(x);}}
\DoxyCodeLine{29 }
\DoxyCodeLine{30 \textcolor{comment}{/* Return code */}}
\DoxyCodeLine{31 \textcolor{preprocessor}{\#define CG\_OK                (0)}}
\DoxyCodeLine{32 \textcolor{preprocessor}{\#define CG\_ERR               (1)}}
\DoxyCodeLine{33 }
\DoxyCodeLine{34 \textcolor{comment}{/* Boolean */}}
\DoxyCodeLine{35 \textcolor{preprocessor}{\#define CG\_TRUE              (1)}}
\DoxyCodeLine{36 \textcolor{preprocessor}{\#define CG\_FALSE             (0)}}
\DoxyCodeLine{37 }
\DoxyCodeLine{38 \textcolor{comment}{/* Pre-\/conditioner */}}
\DoxyCodeLine{39 \textcolor{preprocessor}{\#define CG\_PRECOND\_DIAG     (10)  }}
\DoxyCodeLine{40 \textcolor{preprocessor}{\#define CG\_PRECOND\_CHOL     (11)  }}
\DoxyCodeLine{41 \textcolor{preprocessor}{\#define CG\_NO\_PRECOND       (12)  }}
\DoxyCodeLine{42 }
\DoxyCodeLine{43 \textcolor{comment}{/* Solution status */}}
\DoxyCodeLine{44 \textcolor{preprocessor}{\#define CG\_STATUS\_SOLVED    (100) }}
\DoxyCodeLine{45 \textcolor{preprocessor}{\#define CG\_STATUS\_MAXITER   (101) }}
\DoxyCodeLine{46 \textcolor{preprocessor}{\#define CG\_STATUS\_FAILED    (102) }}
\DoxyCodeLine{47 \textcolor{preprocessor}{\#define CG\_STATUS\_UNKNOWN   (104) }}
\DoxyCodeLine{48 \textcolor{preprocessor}{\#define CG\_STATUS\_DIRECT    (105) }}
\DoxyCodeLine{49 }
\DoxyCodeLine{50 \textcolor{comment}{/* Auxiliary macros */}}
\DoxyCodeLine{51 \textcolor{preprocessor}{\#ifndef MIN}}
\DoxyCodeLine{52 \textcolor{preprocessor}{\#define MIN(a, b) (((a)<(b))?(a):(b))}}
\DoxyCodeLine{53 \textcolor{preprocessor}{\#endif }\textcolor{comment}{/* MIN */}\textcolor{preprocessor}{}}
\DoxyCodeLine{54 \textcolor{preprocessor}{\#ifndef MAX}}
\DoxyCodeLine{55 \textcolor{preprocessor}{\#define MAX(a, b) (((a)>(b))?(a):(b))}}
\DoxyCodeLine{56 \textcolor{preprocessor}{\#endif  }\textcolor{comment}{/* MAX */}\textcolor{preprocessor}{}}
\DoxyCodeLine{57 }
\DoxyCodeLine{84 \textcolor{keyword}{typedef} \textcolor{keyword}{struct }\{}
\DoxyCodeLine{85     }
\DoxyCodeLine{86     \textcolor{keywordtype}{void} *\mbox{\hyperlink{structadpcg_a68d798c85a09fca84d53752f3002d81f}{A}};         }
\DoxyCodeLine{87     \textcolor{keywordtype}{void} *\mbox{\hyperlink{structadpcg_a6890dff38b9f6172053da05e3aab78e9}{r}};         }
\DoxyCodeLine{88     \textcolor{keywordtype}{void} *\mbox{\hyperlink{structadpcg_a1fc468e191ab79f005eb16576a8ca86f}{rnew}};      }
\DoxyCodeLine{89     \textcolor{keywordtype}{void} *\mbox{\hyperlink{structadpcg_ac948f13dbf1ed6a8ad17f9b44a1343d1}{d}};         }
\DoxyCodeLine{90     \textcolor{keywordtype}{void} *\mbox{\hyperlink{structadpcg_a2a9458e35ce08a2464f09f1efc5d5456}{pinvr}};     }
\DoxyCodeLine{91     \textcolor{keywordtype}{void} *\mbox{\hyperlink{structadpcg_a781323ff19ed29a6c1d3c6a1d0a048d4}{Ad}};        }
\DoxyCodeLine{92     \textcolor{keywordtype}{void} *\mbox{\hyperlink{structadpcg_a2d1cc6c268f3d858d557c2f0c01f430d}{x}};         }
\DoxyCodeLine{93     \textcolor{keywordtype}{void} *\mbox{\hyperlink{structadpcg_a3257c30f37ea1ae6085f5752f327a3c1}{aux}};       }
\DoxyCodeLine{94     \textcolor{keywordtype}{void} *\mbox{\hyperlink{structadpcg_af71cf3fb8f01f2a35bad47d3a6865796}{btmp}};      }
\DoxyCodeLine{95     }
\DoxyCodeLine{96     cgint \mbox{\hyperlink{structadpcg_ac02cda33bccbc276880c14c29e21d05f}{ptype}};     }
\DoxyCodeLine{97     \textcolor{keywordtype}{void} *\mbox{\hyperlink{structadpcg_ab1bdc30a55736107379808e1d179c2fb}{chol}};      }
\DoxyCodeLine{98     \textcolor{keywordtype}{void} *\mbox{\hyperlink{structadpcg_a3255e9fb604df7c644af244b077d42ad}{diag}};      }
\DoxyCodeLine{99         }
\DoxyCodeLine{100     \textcolor{keywordtype}{double} \mbox{\hyperlink{structadpcg_a2687e4b3cb5da7dbd00e565343f66c6c}{tol}};      }
\DoxyCodeLine{101     \textcolor{keywordtype}{double} \mbox{\hyperlink{structadpcg_a1ca83805524f8dd1ef51b86a4cb6cd63}{rnrm}};     }
\DoxyCodeLine{102     \textcolor{keywordtype}{double} \mbox{\hyperlink{structadpcg_ad3c5af494f8751d0f94c81a5681ea684}{avgsvtime}};  }
\DoxyCodeLine{103     \textcolor{keywordtype}{double} \mbox{\hyperlink{structadpcg_a2cb9b5942923973c2f6f294bdd7aa51b}{avgfctime}};  }
\DoxyCodeLine{104     \textcolor{keywordtype}{double} \mbox{\hyperlink{structadpcg_a2f0be973124dc96a30d46d16bd727955}{currenttime}}; }
\DoxyCodeLine{105     \textcolor{keywordtype}{double} \mbox{\hyperlink{structadpcg_ae4a1a68ba84ae151863ea5ca98a8471d}{latesttime}}; }
\DoxyCodeLine{106     }
\DoxyCodeLine{107     cgint  \mbox{\hyperlink{structadpcg_a4bca38f3dfae9caea99bc8b2950d45fb}{n}};        }
\DoxyCodeLine{108     cgint  \mbox{\hyperlink{structadpcg_a8a5b8c768e6226bd4d37d0fdf8c879aa}{niter}};    }
\DoxyCodeLine{109     cgint  \mbox{\hyperlink{structadpcg_a33d14b5e68cc3e9bf715e488d081b7c5}{maxiter}};  }
\DoxyCodeLine{110     cgint  \mbox{\hyperlink{structadpcg_ae0ff253278dce9e6391c400ce3c9f3f0}{status}};   }
\DoxyCodeLine{111     cgint  \mbox{\hyperlink{structadpcg_af9ecdd5ed4c4d3ea3e46979a189bb39b}{reuse}};    }
\DoxyCodeLine{112     cgint  \mbox{\hyperlink{structadpcg_ac66983383f2baa0113e3a2c0f2de7d89}{nused}};    }
\DoxyCodeLine{113     cgint  \mbox{\hyperlink{structadpcg_ab2a253b4fcf76740654c0979d2587017}{nmaxiter}};  }
\DoxyCodeLine{114     cgint  \mbox{\hyperlink{structadpcg_a783a672a4ef0d86410d99ef7276747cf}{restart}};  }
\DoxyCodeLine{115     cgint  \mbox{\hyperlink{structadpcg_a80a8e50934e3a6f6243d068b831397e4}{nfactors}}; }
\DoxyCodeLine{116     cgint  \mbox{\hyperlink{structadpcg_a3c1573a436a8f184b1b66729e41f81bb}{nrounds}};  }
\DoxyCodeLine{117     cgint  \mbox{\hyperlink{structadpcg_a94e83c500047bc7342e6be4b22c08c8a}{nsolverd}}; }
\DoxyCodeLine{118     cgint  \mbox{\hyperlink{structadpcg_a4526e6a11201c332064f258d470a545a}{nsolves}};  }
\DoxyCodeLine{119     }
\DoxyCodeLine{120     \textcolor{comment}{/* Vector operations */}}
\DoxyCodeLine{121     void  (*v\_init)   (\textcolor{keywordtype}{void} *v); }
\DoxyCodeLine{122     cgint (*v\_alloc)  (\textcolor{keywordtype}{void} *v, cgint n); }
\DoxyCodeLine{123     void  (*v\_free)   (\textcolor{keywordtype}{void} *v);          }
\DoxyCodeLine{124     void  (*v\_copy)   (\textcolor{keywordtype}{void} *s, \textcolor{keywordtype}{void} *t); }
\DoxyCodeLine{125     void  (*v\_reset)  (\textcolor{keywordtype}{void} *v);          }
\DoxyCodeLine{126     void  (*v\_norm)   (\textcolor{keywordtype}{void} *v, \textcolor{keywordtype}{double} *nrm); }
\DoxyCodeLine{127     void  (*v\_axpy)   (\textcolor{keywordtype}{double} a, \textcolor{keywordtype}{void} *x, \textcolor{keywordtype}{void} *y); }
\DoxyCodeLine{128     void  (*v\_axpby)  (\textcolor{keywordtype}{double} a, \textcolor{keywordtype}{void} *x, \textcolor{keywordtype}{double} b, \textcolor{keywordtype}{void} *y); }
\DoxyCodeLine{129     void  (*v\_zaxpby) (\textcolor{keywordtype}{void} *z, \textcolor{keywordtype}{double} a, \textcolor{keywordtype}{void} *x, \textcolor{keywordtype}{double} b, \textcolor{keywordtype}{void} *y); }
\DoxyCodeLine{130     void  (*v\_dot)    (\textcolor{keywordtype}{void} *x, \textcolor{keywordtype}{void} *y, \textcolor{keywordtype}{double} *xTy); }
\DoxyCodeLine{131     }
\DoxyCodeLine{132     \textcolor{comment}{/* Matrix operations */}}
\DoxyCodeLine{133     cgint (*A\_chol) (\textcolor{keywordtype}{void} *A); }
\DoxyCodeLine{134     cgint (*A\_cond) (\textcolor{keywordtype}{void} *A); }
\DoxyCodeLine{135     void  (*A\_getdiag) (\textcolor{keywordtype}{void} *A, \textcolor{keywordtype}{void} *diag); }
\DoxyCodeLine{136     }
\DoxyCodeLine{137     \textcolor{comment}{/* Matrix-\/vector operations */}}
\DoxyCodeLine{138     cgint (*diagpcd)(\textcolor{keywordtype}{void} *diag, \textcolor{keywordtype}{void} *v); }
\DoxyCodeLine{139     cgint (*cholpcd)(\textcolor{keywordtype}{void} *chol, \textcolor{keywordtype}{void} *v, \textcolor{keywordtype}{void} *aux); }
\DoxyCodeLine{140     void  (*Av) (\textcolor{keywordtype}{void} *A, \textcolor{keywordtype}{void} *v, \textcolor{keywordtype}{void} *\mbox{\hyperlink{structadpcg_ab2d28e0dc41b9b86521a6c9f7ea56119}{Av}}); }
\DoxyCodeLine{141     cgint (*Ainv) (\textcolor{keywordtype}{void} *A, \textcolor{keywordtype}{void} *v, \textcolor{keywordtype}{void} *aux); }
\DoxyCodeLine{142     }
\DoxyCodeLine{143 \} \mbox{\hyperlink{structadpcg}{adpcg}};}
\DoxyCodeLine{144 }
\DoxyCodeLine{145 }
\DoxyCodeLine{146 \textcolor{preprocessor}{\#endif }\textcolor{comment}{/* adpcg\_h */}\textcolor{preprocessor}{}}

\end{DoxyCode}
