diff --git a/src/algorithm.c b/src/algorithm.c index 0175de9392ea69931a11e09ce230cc544713224a..0a23cb6c4a2e9f68921c31b772d47a987be91545 100644 --- a/src/algorithm.c +++ b/src/algorithm.c @@ -37,7 +37,7 @@ static inline void multiplyMatrixVector(global_t *global, value_t *value, double tans1 = _mm256_setzero_pd(); tvec2 = _mm256_set_pd(v[i], v[i], v[i], v[i]); - for (j = 0; j < limit - (limit % 4); j+=4, c+=4, k+=4) { + for (j = 0; j < limit - (limit % 4); j += 4, c += 4, k += 4) { tmat = _mm256_loadu_pd(value->A + k); tvec1 = _mm256_load_pd(v + c); @@ -197,9 +197,9 @@ void conjugateGradient(global_t *global, value_t *value, iteration_t *iteration) for ( ; i < maxIter && error > tolerancia; ++i) { timeCG = timestamp(); -#ifdef TIMECG - LIKWID_MARKER_START("CG"); -#endif + #ifdef TIMECG + LIKWID_MARKER_START("CG"); + #endif multiplyMatrixVector(global, value, v, z); alfa = curr_iter / dotProduct(n, v, z); @@ -225,9 +225,9 @@ void conjugateGradient(global_t *global, value_t *value, iteration_t *iteration) // Calcula erro relativo aproximado error = fabs(sqrt(curr_iter) - sqrt(past_iter)); -#ifdef TIMECG - LIKWID_MARKER_STOP("CG"); -#endif + #ifdef TIMECG + LIKWID_MARKER_STOP("CG"); + #endif // Armazena tempo de calculo do gradiente conjugado iteration->timeCG[i] = (timestamp() - timeCG);