Cleanup and small improvements for ciecam02

This commit is contained in:
heckflosse
2016-05-16 18:20:42 +02:00
parent b23778eebc
commit 20aec5b129
4 changed files with 152 additions and 171 deletions

View File

@@ -261,6 +261,22 @@ public:
return *this;
}
// divide all elements of LUT<float> by a constant float value
template<typename U = T, typename = typename std::enable_if<std::is_same<U, float>::value>::type>
LUT<float> & operator/=(float divisor)
{
#ifdef _OPENMP
#pragma omp simd
#endif
for(unsigned int i = 0; i < this->size; i++) {
data[i] /= divisor;
}
return *this;
}
// use with integer indices
T& operator[](int index) const
{