allows assigning to mask_view elements
This commit is contained in:
@@ -53,10 +53,20 @@ struct vtype_t {
|
||||
bool vma();
|
||||
bool vta();
|
||||
};
|
||||
class mask_bit_reference {
|
||||
uint8_t* start;
|
||||
uint8_t pos;
|
||||
|
||||
public:
|
||||
mask_bit_reference& operator=(const bool new_value);
|
||||
mask_bit_reference(uint8_t* start, uint8_t pos);
|
||||
operator bool() const;
|
||||
};
|
||||
|
||||
struct vmask_view {
|
||||
uint8_t* start;
|
||||
size_t elem_count;
|
||||
bool operator[](size_t) const;
|
||||
mask_bit_reference operator[](size_t) const;
|
||||
};
|
||||
enum class carry_t { NO_CARRY = 0, ADD_CARRY = 1, SUB_CARRY = 2 };
|
||||
vmask_view read_vmask(uint8_t* V, uint16_t VLEN, uint16_t elem_count, uint8_t reg_idx = 0);
|
||||
|
Reference in New Issue
Block a user