From 35143d206f32be4ace05749f893ee5f5be079e53 Mon Sep 17 00:00:00 2001 From: Martijn Courteaux Date: Sun, 2 Jun 2024 23:19:04 +0200 Subject: [PATCH] Mark host_dirty() and device_dirty() with no_discard. (#8248) Co-authored-by: Steven Johnson --- src/runtime/HalideRuntime.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/HalideRuntime.h b/src/runtime/HalideRuntime.h index 3a70babf1e7d..4ddb52cd89bf 100644 --- a/src/runtime/HalideRuntime.h +++ b/src/runtime/HalideRuntime.h @@ -1574,11 +1574,11 @@ typedef struct halide_buffer_t { } } - HALIDE_ALWAYS_INLINE bool host_dirty() const { + HALIDE_MUST_USE_RESULT HALIDE_ALWAYS_INLINE bool host_dirty() const { return get_flag(halide_buffer_flag_host_dirty); } - HALIDE_ALWAYS_INLINE bool device_dirty() const { + HALIDE_MUST_USE_RESULT HALIDE_ALWAYS_INLINE bool device_dirty() const { return get_flag(halide_buffer_flag_device_dirty); }