Fix non-OpenMP build

This commit is contained in:
Flössie
2019-02-06 06:54:31 +01:00
parent 9210a56ca4
commit 37027e46bd
27 changed files with 364 additions and 14 deletions

View File

@@ -64,7 +64,9 @@ void RawImageSource::CLASS cfa_linedn(float noise, bool horizontal, bool vertica
float noisevarm4 = 4.0f * noisevar;
volatile double progress = 0.0;
float* RawDataTmp = (float*)malloc( width * height * sizeof(float));
#ifdef _OPENMP
#pragma omp parallel
#endif
{
// allocate memory and assure the arrays don't have same 64 byte boundary to avoid L1 conflict misses
@@ -76,7 +78,9 @@ void RawImageSource::CLASS cfa_linedn(float noise, bool horizontal, bool vertica
float linehvar[4], linevvar[4], noisefactor[4][8][2], coeffsq;
float dctblock[4][8][8];
#ifdef _OPENMP
#pragma omp for
#endif
for(int i = 0; i < height; i++)
for(int j = 0; j < width; j++) {
@@ -84,7 +88,9 @@ void RawImageSource::CLASS cfa_linedn(float noise, bool horizontal, bool vertica
}
// Main algorithm: Tile loop
#ifdef _OPENMP
#pragma omp for schedule(dynamic) collapse(2)
#endif
for (int top = 0; top < height - 16; top += TS - 32)
for (int left = 0; left < width - 16; left += TS - 32) {
@@ -251,7 +257,9 @@ void RawImageSource::CLASS cfa_linedn(float noise, bool horizontal, bool vertica
free(cfain);
// copy temporary buffer back to image matrix
#ifdef _OPENMP
#pragma omp for schedule(dynamic,16)
#endif
for(int i = 0; i < height; i++) {
float f = rowblender(i);