#ifndef SOFTRVV_VADD_H
#define SOFTRVV_VADD_H

#include <stddef.h>

namespace softrvv {

template <typename T>
void vadd_vi(T *dest, T *src1, T src2, int32_t avl) {
  for (int32_t idx = 0; idx < avl; idx++) {
    dest[idx] = src1[idx] + src2;
  }
}

template <typename T>
void vadd_vx(T *dest, T *src1, const T *src2, int32_t avl) {
  for (int32_t idx = 0; idx < avl; idx++) {
    dest[idx] = src1[idx] + *src2;
  }
}

template <typename T>
void vadd_vv(T *dest, T *src1, T *src2, int32_t avl) {
  for (int32_t idx = 0; idx < avl; idx++) {
    dest[idx] = src1[idx] + src2[idx];
  }
}

}  // namespace softrvv

#endif  // SOFTRVV_VADD_H
