Skip to content

What is the right way to create an empty Halide::Buffer? #8920

Description

@mhdadk

Suppose that I wanted to create an empty M x N Halide float buffer called arr that consists of M rows and N columns. Also, suppose that I want to index this arr as arr(row, col), where row and col are the row and column indices respectively.

Do I write Halide::Buffer<float> arr(M, N) or Halide::Buffer<float> arr(N, M)? I believe the former is correct because it matches how I want to index arr.

More generally, would how the buffer be defined be affected by how it is indexed? For example, if I instead wanted to index arr as arr(col, row), would I then write Halide::Buffer<float> arr(N, M)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions