LUT.h: new += operator to sum up per thread histograms; RawImageSource::getRAWHistogram: very small speedup

This commit is contained in:
heckflosse
2016-04-07 18:34:39 +02:00
parent d629006252
commit 1eb37d7730
2 changed files with 69 additions and 28 deletions

View File

@@ -257,6 +257,17 @@ public:
return *this;
}
// handy to sum up per thread histograms
LUT<T> & operator+=(LUT<T> &rhs)
{
if (rhs.size == this->size) {
for(unsigned int i = 0; i < this->size; i++) {
data[i] += rhs.data[i];
}
}
}
// use with integer indices
T& operator[](int index) const
{