blob: 4231c33a24aeb1f0b9082357be166b55f43dc59c [file] [log] [blame]
#ifndef SOFTRVV_VMFLT_H
#define SOFTRVV_VMFLT_H
#include <stddef.h>
namespace softrvv {
// The type of dest is defined as int32_t instead of float
// to use "set_bit_in_dest_mask", which has bitwise operations in it.
void vmflt_vf(int32_t *dest, float *src2, const float *src1, int32_t avl) {
for (int32_t idx = 0; idx < avl; idx++) {
set_bit_in_dest_mask<int32_t>(idx, dest, src2[idx] < *src1);
}
}
// The type of dest is defined as int32_t instead of float
// to use "set_bit_in_dest_mask", which has bitwise operations in it.
void vmflt_vv(int32_t *dest, float *src2, float *src1, int32_t avl) {
for (int32_t idx = 0; idx < avl; idx++) {
set_bit_in_dest_mask<int32_t>(idx, dest, src2[idx] < src1[idx]);
}
}
} // namespace softrvv
#endif // SOFTRVV_VMFLT_H