-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add halide_debug_assert()
macro (#6384)
#6385
Conversation
Do we really need to litter the code long all caps names? We should use lots of asserts and checks and this approach is just horrible from a readability point of view. It draws massive attention to the name of the macro, which is just not at all interesting. It's like if every if statement was written "HEY_IM_AN_IF_STATEMENT_PAY_ATTENTION_TO_ME". |
For HALIDE_CHECK I think that SCREAMING_SNAKE_CASE is appropriate because it really should jump out at you. For debug-assert, though, probably not. would |
HALIDE_DEBUG_ASSERT()
macro (#6384)halide_debug_assert()
macro (#6384)
(This needs #6382 to land first) |
Also convert usage of halide_assert()/HALIDE_CHECK() in hashmap.h and gpu_context_common.h to halide_debug_assert(), as all the usages looked to be appropriate for debug-mode only. (Rebased version of #6385, which this replaces)
Closing in favor of identical-but-rebased #6390 |
* Add halide_debug_assert() macro Also convert usage of halide_assert()/HALIDE_CHECK() in hashmap.h and gpu_context_common.h to halide_debug_assert(), as all the usages looked to be appropriate for debug-mode only. (Rebased version of #6385, which this replaces) * appease clang-format
Also convert usage of
halide_assert()
/HALIDE_CHECK()
in hashmap.h and gpu_context_common.h tohalide_debug_assert()
, as all the usages looked to be appropriate for debug-mode only.