It will be optimized out automatically, empty inline functions and assignments to a locally declared variables will not slow things down.
It's a small detail but I would avoid such #ifdef's, makes the code less easy to read and means implementation details of the random number generator don't stay nicely contained in a single file. On Sat, May 11, 2013 at 9:19 PM, Thomas Dinges <[email protected]> wrote: > Revision: 56691 > > http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56691 > Author: dingto > Date: 2013-05-11 19:19:51 +0000 (Sat, 11 May 2013) > Log Message: > ----------- > Cycles / RNG: > * Avoid call to empty path_rng_end() function when using __SOBOL__. Maybe the > compiler optimizes that out already, but adding a check here does not harm. > > Modified Paths: > -------------- > trunk/blender/intern/cycles/kernel/kernel_path.h > > Modified: trunk/blender/intern/cycles/kernel/kernel_path.h > =================================================================== > --- trunk/blender/intern/cycles/kernel/kernel_path.h 2013-05-11 16:20:29 > UTC (rev 56690) > +++ trunk/blender/intern/cycles/kernel/kernel_path.h 2013-05-11 19:19:51 > UTC (rev 56691) > @@ -1146,7 +1146,9 @@ > /* accumulate result in output buffer */ > kernel_write_pass_float4(buffer, sample, L); > > +#ifndef __SOBOL__ > path_rng_end(kg, rng_state, rng); > +#endif > } > > CCL_NAMESPACE_END > > _______________________________________________ > Bf-blender-cvs mailing list > [email protected] > http://lists.blender.org/mailman/listinfo/bf-blender-cvs _______________________________________________ Bf-committers mailing list [email protected] http://lists.blender.org/mailman/listinfo/bf-committers
