MCPcopy Create free account
hub / github.com/RenderKit/ospray / getAvgError

Method getAvgError

modules/cpu/fb/frame_ops/Variance.cpp:32–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32float LiveVarianceFrameOp::getAvgError(const float errorThreshold) const
33{
34 float maxErr = 0.f;
35 float sumActErr = 0.f;
36 int activeTasks = 0;
37 std::for_each(
38 taskVariance.cbegin(), taskVariance.cend(), [&](const float &err) {
39 maxErr = std::max(maxErr, err);
40 if (err >= errorThreshold) {
41 sumActErr += err;
42 activeTasks++;
43 }
44 });
45 return activeTasks ? sumActErr / activeTasks : maxErr;
46}
47
48} // namespace ospray

Callers 1

getVarianceMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected