src/seq_mv/vector.c
HYPRE_Complex hypre_SeqVectorSumElts(hypre_Vector *vector) {
  HYPRE_Complex sum = 0;
  HYPRE_Complex *data = hypre_VectorData(vector);
  HYPRE_Int size = hypre_VectorSize(vector);
  HYPRE_Int i;
#ifndef __ve__
#ifdef HYPRE_USING_OPENMP
#pragma omp parallel for private(i) reduction(+ : sum) HYPRE_SMP_SCHEDULE
#endif
#endif
  for (i = 0; i < size; ++i)
    sum += data[i];

  return sum;
}
/*--------------------------------------------------------------------------
 * hypre_VectorSumElts:
 * Returns the sum of all vector elements.
 *--------------------------------------------------------------------------*/
Returns the sum of all vector elements.
Returns the sum of all vector elements .
HYPRE_Complex hypre_SeqVectorSumElts(hypre_Vector *vector) {
  HYPRE_Complex sum = 0;
  HYPRE_Complex *data = hypre_VectorData(vector);
  HYPRE_Int size = hypre_VectorSize(vector);
  HYPRE_Int i;
#ifndef __ve__
#ifdef HYPRE_USING_OPENMP
#pragma omp parallel for private(i) reduction(+ : sum) HYPRE_SMP_SCHEDULE
#endif
#endif
  for (i = 0; i < size; ++i)
    sum += data[i];
  return sum;
}
HYPRE_Complex hypre_SeqVectorSumElts ( hypre_Vector * vector ) { HYPRE_Complex sum = 0 ; HYPRE_Complex * data = hypre_VectorData ( vector ) ; HYPRE_Int size = hypre_VectorSize ( vector ) ; HYPRE_Int i ; #ifndef __ve__ #ifdef HYPRE_USING_OPENMP #pragma  omp parallel for private(i) reduction(+ : sum) HYPRE_SMP_SCHEDULE #endif #endif for ( i = 0 ; i < size ; ++ i ) sum += data [ i ] ; return sum ; }
hypre_VectorSumElts:
 Returns the sum of all vector elements.
hypre_VectorSumElts : Returns the sum of all vector elements .