From 8646bc8827bae09602e35715df5c9e57e7caa094 Mon Sep 17 00:00:00 2001 From: Steven Johnson Date: Mon, 9 Dec 2024 09:51:08 -0800 Subject: [PATCH] Fix comment for Buffer::copy() (Fixes #8498) (#8500) --- src/runtime/HalideBuffer.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/runtime/HalideBuffer.h b/src/runtime/HalideBuffer.h index 3f4f93ee34f1..7dca3022cd3e 100644 --- a/src/runtime/HalideBuffer.h +++ b/src/runtime/HalideBuffer.h @@ -1328,9 +1328,12 @@ class Buffer { /** Make a new image which is a deep copy of this image. Use crop * or slice followed by copy to make a copy of only a portion of - * the image. The new image uses the same memory layout as the - * original, with holes compacted away. Note that the returned - * Buffer is always of a non-const type T (ie: + * the image. The new image has the same nesting order of dimensions + * (e.g. channels innermost), but resets the strides to the default + * (each stride is the product of the extents of the inner dimensions). + * Note that this means any strides of zero get broadcast into a non-zero stride. + * + * Note that the returned Buffer is always of a non-const type T (ie: * * Buffer.copy() -> Buffer rather than Buffer *