mitsuba-renderer / drjit

Dr.Jit — A Just-In-Time-Compiler for Differentiable Rendering
BSD 3-Clause "New" or "Revised" License
603 stars 45 forks source link

Fixes to `assert_true`/`assert_false` #260

Closed njroussel closed 3 months ago

njroussel commented 3 months ago

This PR fixes the early exit logic for assert_true and assert_false. It also adds tests for both functions.

:warning: This PR also introduces a small change to dr.print: in a symbolic context, if all lanes are masked, no message will be printed. Previously. it would always print a message, even if all lanes were maked. This change is necessary, as without it the assertion failure message would still have been printed even if all lanes fulfilled the assertion.