Skip to content

usm_ndarray should provide const versions of member functions #852

Closed
@diptorupd

Description

@diptorupd

Const getter functions of usm_ndarray should be marked const so that the functions may be used on a const usm_ndarray reference.

E.g.,

    int get_flags() const
    {
        PyObject *raw_o = this->ptr();
        PyUSMArrayObject *raw_ar = reinterpret_cast<PyUSMArrayObject *>(raw_o);

        return UsmNDArray_GetFlags(raw_ar);
    }

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions