--User changes

-Always force times of each flame to increase from zero when saving a file.
 -Remove check for times when doing a sequence in EmberGenome because the original times are never used there.

--Bug fixes
 -Multi-GPU synchronization was not actually thread safe and was likely doing less iters than requested. It is now properly synchronized.

--Code changes
 -Optimize Interpolater by making it a non-static class by adding some members used for caching values during interpolation.
 -Cache values in SheepTools as well, which was already a non-static class.
 -General cleanup.
This commit is contained in:
mfeemster
2016-04-23 09:02:09 -07:00
parent 322c630b8f
commit 1f0cc4bb4a
12 changed files with 117 additions and 111 deletions

View File

@ -929,9 +929,7 @@ bool RendererCL<T, bucketT>::BuildIterProgramForEmber(bool doAccum)
func(m_Devices[device].get());
}
for (auto& th : threads)
if (th.joinable())
th.join();
Join(threads);
if (b)
{
@ -992,7 +990,7 @@ bool RendererCL<T, bucketT>::RunIter(size_t iterCount, size_t temporalSample, si
auto& wrapper = m_Devices[dev]->m_Wrapper;
intmax_t itersRemaining = 0;
while (atomLaunchesRan.fetch_add(1), (b && (atomLaunchesRan.load() <= launches) && ((itersRemaining = atomItersRemaining.load()) > 0) && !m_Abort))
while (b && (atomLaunchesRan.fetch_add(1) + 1 <= launches) && ((itersRemaining = atomItersRemaining.load()) > 0) && !m_Abort)
{
cl_uint argIndex = 0;
#ifdef TEST_CL
@ -1102,10 +1100,7 @@ bool RendererCL<T, bucketT>::RunIter(size_t iterCount, size_t temporalSample, si
iterFunc(device, index);
}
for (auto& th : threadVec)
if (th.joinable())
th.join();
Join(threadVec);
itersRan = atomItersRan.load();
if (m_Devices.size() > 1)//Determine whether/when to sum histograms of secondary devices with the primary.