[all-commits] [llvm/llvm-project] cd116e: Add examples for reinterpret_cast and subview oper...

ivangarcia44 via All-commits all-commits at lists.llvm.org
Mon Apr 28 12:59:08 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cd116ee29e3f9e449f544de73769c0d8b8c0da94
      https://github.com/llvm/llvm-project/commit/cd116ee29e3f9e449f544de73769c0d8b8c0da94
  Author: ivangarcia44 <36650061+ivangarcia44 at users.noreply.github.com>
  Date:   2025-04-28 (Mon, 28 Apr 2025)

  Changed paths:
    M mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td

  Log Message:
  -----------
  Add examples for reinterpret_cast and subview operators to show their behavior in relation to their input memref underlying memory and view (#135244)

While working on #134845 I was trying to understand the difference of
how the reinterpret_cast and subview operators see the input memref, but
it was not clear to me.

I did a couple of experiments in which I learned that the subview takes
into account the view of the input memref to create the view of the
output memref, while the reinterpret_cast just uses the underlying
memory of the input memref.

I thought it would help future readers to see these two experiements as
examples in the documentation to quickly figure out the difference
between these two operators.

@matthias-springer
@joker-eph
@sahas3
@Hanumanth04
@dixinzhou
@rafaelubalmw

---------

Co-authored-by: Ivan Garcia <igarcia at vdi-ah2ddp-178.dhcp.mathworks.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list