blob: 3b70b9a39dc8ef97bb7801a115c6eb9011a04a5f [file] [log] [blame]
#ifndef SOFTRVV_VMAX_H
#define SOFTRVV_VMAX_H
#include <stddef.h>
namespace softrvv {
template <typename T>
void vmax_vx(T *dest, T *src1, const T *src2, int32_t avl) {
for (int32_t idx = 0; idx < avl; idx++) {
dest[idx] = (src1[idx] > *src2) ? src1[idx] : *src2;
}
}
template <typename T>
void vmax_vv(T *dest, T *src1, T *src2, int32_t avl) {
for (int32_t idx = 0; idx < avl; idx++) {
dest[idx] = (src1[idx] > src2[idx]) ? src1[idx] : src2[idx];
}
}
} // namespace softrvv
#endif // SOFTRVV_VMAX_H