#include <neatogen/matrix_ops.h>
#include <neatogen/conjgrad.h>
/* #include <math.h> */
+#include <stdbool.h>
#include <stdlib.h>
int conjugate_gradient_f
(float **A, double *x, double *b, int n, double tol,
- int max_iterations, boolean ortho1) {
+ int max_iterations, bool ortho1) {
/* Solves Ax=b using Conjugate-Gradients method */
/* 'x' and 'b' are orthogonalized against 1 if 'ortho1=true' */
#endif
#include <neatogen/defs.h>
+#include <stdbool.h>
/*************************
* C.G. method - SPARSE *
************************/
extern int conjugate_gradient_f(float **, double *, double *, int,
- double, int, boolean);
+ double, int, bool);
extern int conjugate_gradient_mkernel(float *, float *, float *, int,
double, int);
#include <neatogen/kkutils.h>
#include <neatogen/matrix_ops.h>
#include <neatogen/conjgrad.h>
+#include <stdbool.h>
static void
standardize(double* orthog, int nvtxs)
}
for (converged=FALSE,iterations2=0; iterations2<200 && !converged; iterations2++) {
- if (conjugate_gradient_f(lap, y, balance, n, conj_tol, n, TRUE) < 0) {
+ if (conjugate_gradient_f(lap, y, balance, n, conj_tol, n, true) < 0) {
rv = 1;
goto cleanup;
}
b_restricted);
if (conjugate_gradient_f(matrix, directions[k], b_restricted,
subspace_dim, conj_tol, subspace_dim,
- FALSE)) {
+ false)) {
iterations = -1;
goto finish0;
}