ImProcCoordinator::updateVectorscope(): parallelize loops

This commit is contained in:
Ingo Weyrich
2020-08-16 11:46:17 +02:00
parent 3af822b6f7
commit 9e040b3bc2
2 changed files with 67 additions and 19 deletions

View File

@@ -211,6 +211,24 @@ public:
}
}
array2D<T>& operator+=(const array2D<T>& rhs)
{
if (rhs.getWidth() == this->getWidth() && rhs.getHeight() == this->getHeight()) {
for (int i = 0; i < getHeight(); ++i) {
#ifdef _OPENMP
#pragma omp simd
#endif
for (int j = 0; j < getWidth(); ++j) {
rows[i][j] += rhs[i][j];
}
}
}
return *this;
}
int getWidth() const
{
return width;