15 for (i=0;i<rows;i++) {
17 for (j=0;j<cols;j++) {
18 res[i] += mtx[k++] * v[j];
26 if(rows < 10 || cols < 10){
27 mtx_vec_mul_small(mtx,v,res,rows,cols);
35 for (i=0;i<rows;i++) {
37 for (j=0;j<=cols-4;j+=4) {
38 temp += (mtx[k] * v[j] +
45 temp += mtx[k++] * v[j];
58 for (i=0;i<rows;i++) {
59 for (j=0;j<cols;j++) {
70 for(i=0;i<length;i++){
81 for(i=0;i<length;i++){
92 for(i=0;i<length;i++){
93 res[i] = v1[i] - v2[i];
100 for(i=0;i<length;i++){
101 res[i] = v1[i] + v2[i];
109 for(i=0;i<length;i++){
110 val += v1[i] * v2[i];
118 for(i=0;i<length;i++){
119 res[i] = v1[i] * scalar;
126 for(i=0;i<length;i++){
134 for(i=0;i<length;i++){
144 for(i=0;i<length;i++){
152 for(i=0;i<length;i++){
163 for (i=0;i<length;i++)
165 m_sum += v[i] * v[i];
void vector_copy(const real_t *v1, real_t *v2, const uint32_t length)
void mtx_transpose(const real_t *mtx, real_t *mtx_t, const uint32_t rows, const uint32_t cols)
real_t vector_mul(const real_t *v1, const real_t *v2, const uint32_t length)
void mtx_vec_mul(const real_t *mtx, const real_t *v, real_t *res, const uint32_t rows, const uint32_t cols)
real_t obj(const real_t *z, const real_t *H, const real_t *c, real_t *temp)
real_t vector_norm_2(real_t *v, const uint32_t length)
void vector_min(const real_t *v1, const real_t *v2, real_t *res, const uint32_t length)
void vector_max(const real_t *v1, const real_t *v2, real_t *res, const uint32_t length)
void vector_scalar_mul(const real_t *v1, const real_t scalar, real_t *res, const uint32_t length)
void vector_sub(const real_t *v1, const real_t *v2, real_t *res, const uint32_t length)
void vector_elements_to_zero(real_t *v, const uint32_t length)
void vector_add(const real_t *v1, const real_t *v2, real_t *res, const uint32_t length)
real_t abs_2(const real_t a)
void vector_max_with_zero(real_t *v, const uint32_t length)
uint32_t vector_is_equal(const real_t *v1, const real_t *v2, const uint32_t length)