Page MenuHome

Cycles: use faster powf for CPU where possible
Needs ReviewPublic

Authored by Sv. Lockal (lockal) on Mar 24 2014, 10:49 PM.

Details

Summary

CUDA with fast-math flags already does this, so it should work for CPU.

Diff Detail

Event Timeline

Sv. Lockal (lockal) planned changes to this revision.Mar 24 2014, 11:34 PM

It makes gamma node much faster, but blackbody and sss slower. Investigating...

Sv. Lockal (lockal) updated this revision to Unknown Object (????).Mar 27 2014, 3:42 AM

Remove fast_powf from blackbody and sky
Add own powf function for SSE vectors

i did some benchmarking today... mixed results :/

images

http://ubuntuone.com/2Laq8Hp06leGLgE4JGlqzx

Sv. Lockal (lockal) planned changes to this revision.Mar 28 2014, 6:27 PM

Looks like this patch needs more work... Revoking for now.

@Ronny G (nutel),
approx pow may give a visible bias. All powf function are some kind of approximations, but a good one at least should look like a smooth function (and be precise enough, of course). If you overlay your images in divide mode, you can see this bias. For example, pow vs fastpow, pow vs approxpow.

This revision now requires review to proceed.Sep 22 2020, 1:43 PM