Skip to content

GpuMatND construction requires step.size() == size().size-1 #26471

@chacha21

Description

@chacha21

Describe the feature and motivation

In the case of multidimensional array, in order to ensure that the last step will be equal to elemSize(), wrapping data in a GpuMatND::GpuMatND(data, SizeArray, StepArray) requires StepArray.size() == SizeArray.size()-1. The last step is added internally by setFields()

In my use cases, I often have to create a temporary StepArray from an existing one, remove the last step, and feed it to GpuMatND().

It would be more convenient to also support StepArray.size() == SizeArray.size() as long as the last step is valid.

I will submit a PR

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions