Skip to content

Should vcpop.m return type be size_t? #166

Closed
@HanKuanChen

Description

@HanKuanChen

Current interface

unsigned long vcpop_m_b1 (vbool1_t op1, size_t vl);

However, the semantic of vcpop.m is

The vcpop.m instruction counts the number of mask elements of the active elements of the vector source mask register that have the value 1 and writes the result to a scalar x register.

That means the maximum value depends on VL. And VL related interface is

size_t vsetvl_e8mf8 (size_t avl);
size_t vsetvlmax_e8mf8 ();

So, should we change the interface to

size_t vcpop_m_b1 (vbool1_t op1, size_t vl);

Metadata

Metadata

Assignees

No one assigned

    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