Code changes:

--Fix include paths for openexr on Mac.
--Use static_partitioner in all parallel_for() calls.
This commit is contained in:
Person 2017-08-03 19:56:14 -07:00
parent a81b93d94a
commit a0ed758999
3 changed files with 24 additions and 10 deletions

View File

@ -890,7 +890,7 @@ eRenderStatus Renderer<T, bucketT>::LogScaleDensityFilter(bool forceOutput)
}
}
}
});
}, static_partitioner());
//t.Toc(__FUNCTION__);
return m_Abort ? eRenderStatus::RENDER_ABORT : eRenderStatus::RENDER_OK;
}
@ -1050,7 +1050,7 @@ eRenderStatus Renderer<T, bucketT>::GaussianDensityFilter()
}
}
}
});
}, static_partitioner());
if (m_Callback && !m_Abort)
m_Callback->ProgressFunc(m_Ember, m_ProgressParameter, 100.0, 1, 0);
@ -1109,7 +1109,7 @@ eRenderStatus Renderer<T, bucketT>::AccumulatorToFinalImage(v4F* pixels, size_t
GammaCorrection(*rowStart, background, g, linRange, vibrancy, false, glm::value_ptr(*rowStart));//Write back in place.
rowStart++;
}
});
}, static_partitioner());
}
if (m_Abort)
@ -1155,7 +1155,7 @@ eRenderStatus Renderer<T, bucketT>::AccumulatorToFinalImage(v4F* pixels, size_t
auto pf = reinterpret_cast<float*>(pv4T);
GammaCorrection(*(reinterpret_cast<tvec4<bucketT, glm::defaultp>*>(&newBucket)), background, g, linRange, vibrancy, true, pf);
}
});
}, static_partitioner());
//Insert the palette into the image for debugging purposes. Not implemented on the GPU.
if (m_InsertPalette)
@ -1293,7 +1293,7 @@ EmberStats Renderer<T, bucketT>::Iterate(size_t iterCount, size_t temporalSample
}
}
}
});
}, static_partitioner());
stats.m_Iters = std::accumulate(m_SubBatch.begin(), m_SubBatch.end(), 0ULL);//Sum of iter count of all threads.
stats.m_Badvals = std::accumulate(m_BadVals.begin(), m_BadVals.end(), 0ULL);
stats.m_IterMs = m_IterTimer.Toc();

View File

@ -59,12 +59,18 @@
//Exr
#ifdef _WIN32
#define OPENEXR_DLL 1
#define OPENEXR_DLL 1
#endif
#include <ImfRgbaFile.h>
#include <ImfStringAttribute.h>
#include <half.h>
#ifdef __APPLE__
#include <OpenEXR/ImfRgbaFile.h>
#include <OpenEXR/ImfStringAttribute.h>
#include <OpenEXR/half.h>
#else
#include <ImfRgbaFile.h>
#include <ImfStringAttribute.h>
#include <half.h>
#endif
using namespace Imf;
using namespace Imath;

View File

@ -5,7 +5,15 @@
#include <list>
#include <deque>
#include <ImfRgbaFile.h>
#ifdef __APPLE__
#include <OpenEXR/ImfRgbaFile.h>
#include <OpenEXR/ImfStringAttribute.h>
#include <OpenEXR/half.h>
#else
#include <ImfRgbaFile.h>
#include <ImfStringAttribute.h>
#include <half.h>
#endif
//#include <ImfStringAttribute.h>
//#include <ImfMatrixAttribute.h>
//#include <ImfArray.h>