2 // { dg-options "-fopenmp" }
3 // { dg-require-effective-target fopenmp }
7 class vector_mismatch {
9 vector_mismatch(int size1, int size2);
14 GVector& operator+=(const GVector& v);
18 inline GVector& GVector::operator+= (const GVector& v)
21 throw GException::vector_mismatch(m_num, v.m_num);
22 for (int i = 0; i < m_num; ++i) m_data[i] += v.m_data[i];
24 void eval(GVector* m_gradient, GVector* vect_cpy_grad, int n)
28 for (int i = 0; i < n; ++i)
29 *m_gradient += vect_cpy_grad[i];