9 #ifndef QXS_VSIMD_COMMON_INCLUDED
10 #define QXS_VSIMD_COMMON_INCLUDED
16 for (
int i = 0; i <
VLEN; ++i) {
23 inline svbool_t set_predicate_false()
26 for (
int i = 0; i <
VLEN; ++i) {
36 for (
int i = 0; i <
VLEN; ++i) {
37 if (pg1.
v[i] ==
true) {
50 for (
int i = 0; i <
VLEN; ++i) {
51 pg3.
v[i] = pg1.
v[i] ^ pg2.
v[i];
59 for (
int k = 0; k <
VLEN; ++k) {
63 for (
int iy = 0; iy <
VLENY; ++iy) {
72 for (
int k = 0; k <
VLEN; ++k) {
76 for (
int iy = 0; iy <
VLENY; ++iy) {
86 for (
int k = 0; k <
VLEN; ++k) {
91 for (
int iy = 0; iy <
VLENY; ++iy) {
93 for (
int ix = 0; ix <
VLENX - 1; ++ix) {
94 pg1.
v[ix +
VLENX * iy] =
true;
98 for (
int ix = 0; ix <
VLENX; ++ix) {
99 pg3.
v[ix +
VLENX * iy] =
true;
109 for (
int k = 0; k <
VLEN; ++k) {
114 for (
int iy = 0; iy <
VLENY; ++iy) {
116 for (
int ix = 0; ix <
VLENX; ++ix) {
117 pg3.
v[ix +
VLENX * iy] =
true;
120 for (
int ix = 1; ix <
VLENX; ++ix) {
121 pg1.
v[ix +
VLENX * iy] =
true;
123 pg2.
v[0 +
VLENX * iy] =
true;
131 for (
int k = 0; k <
VLEN; ++k) {
135 for (
int ix = 0; ix <
VLENX; ++ix) {
144 for (
int k = 0; k <
VLEN; ++k) {
148 for (
int ix = 0; ix <
VLENX; ++ix) {
155 inline void set_index_xp(
svint_t& svindex_xp)
157 for (
int iy = 0; iy <
VLENY; ++iy) {
159 for (
int ix = 0; ix <
VLENX - 1; ++ix) {
160 svindex_xp.
v[ix +
VLENX * iy] = 0;
166 inline void set_index_xm(
svint_t& svindex_xm)
168 for (
int iy = 0; iy <
VLENY; ++iy) {
169 svindex_xm.
v[
VLENX * iy] = iy;
170 for (
int ix = 1; ix <
VLENX; ++ix) {
171 svindex_xm.
v[ix +
VLENX * iy] = 0;
177 inline void set_index_xp_eo(
svint_t& svindex_xp)
179 for (
int iy = 0; iy <
VLENY; ++iy) {
181 for (
int ix = 0; ix <
VLENX - 1; ++ix) {
182 svindex_xp.
v[ix +
VLENX * iy] = 0;
188 inline void set_index_xm_eo(
svint_t& svindex_xm)
190 for (
int iy = 0; iy <
VLENY; ++iy) {
191 svindex_xm.
v[
VLENX * iy] = iy / 2;
192 for (
int ix = 1; ix <
VLENX; ++ix) {
193 svindex_xm.
v[ix +
VLENX * iy] = 0;
199 inline void set_index_xp_eo(
svuint_t& svindex_xp)
201 for (
int iy = 0; iy <
VLENY; ++iy) {
203 for (
int ix = 0; ix <
VLENX - 1; ++ix) {
204 svindex_xp.
v[ix +
VLENX * iy] = 0;
210 inline void set_index_xm_eo(
svuint_t& svindex_xm)
212 for (
int iy = 0; iy <
VLENY; ++iy) {
213 svindex_xm.
v[
VLENX * iy] = iy / 2;
214 for (
int ix = 1; ix <
VLENX; ++ix) {
215 svindex_xm.
v[ix +
VLENX * iy] = 0;
221 inline void set_index_yp(
svint_t& svindex_yp)
223 for (
int ix = 0; ix <
VLENX; ++ix) {
224 for (
int iy = 0; iy <
VLENY - 1; ++iy) {
225 svindex_yp.
v[ix +
VLENX * iy] = 0;
232 inline void set_index_ym(
svint_t& svindex_ym)
234 for (
int ix = 0; ix <
VLENX; ++ix) {
235 svindex_ym.
v[ix] = ix;
236 for (
int iy = 1; iy <
VLENY; ++iy) {
237 svindex_ym.
v[ix +
VLENX * iy] = 0;
244 template<
typename REALTYPE>
245 inline void load_vec(
Vsimd_t *vt, REALTYPE *vp,
int Nin)
247 for (
int in = 0; in < Nin; ++in) {
248 for (
int k = 0; k <
VLEN; ++k) {
249 vt[in].
v[k] = vp[k +
VLEN * in];
255 template<
typename REALTYPE>
258 for (
int k = 0; k <
VLEN; ++k) {
268 template<
typename REALTYPE>
272 for (
int k = 0; k <
VLEN; ++k) {
273 if (pg.
v[k]) v.
v[k] = vp[index.
v[k]];
278 template<
typename REALTYPE>
282 for (
int k = 0; k <
VLEN; ++k) {
283 if (pg.
v[k]) vp[index.
v[k]] = vt.
v[k];
288 template<
typename REALTYPE>
291 for (
int k = 0; k <
VLEN; ++k) {
292 if (pg.
v[k]) vt.
v[k] = vp[k];
297 template<
typename REALTYPE>
301 for (
int k = 0; k <
VLEN; ++k) {
302 if (pg.
v[k]) v.
v[k] = vp[index.
v[k]];
307 template<
typename REALTYPE>
311 for (
int k = 0; k <
VLEN; ++k) {
312 if (pg.
v[k]) vt.
v[k] = vp[index.
v[k]];
317 template<
typename REALTYPE>
318 inline void load_vec1_x(REALTYPE *vt, REALTYPE *v,
int kx,
int Nin)
320 for (
int in = 0; in < Nin; ++in) {
321 for (
int ky = 0; ky <
VLENY; ++ky) {
328 template<
typename REALTYPE>
329 inline void load_vec1_y(REALTYPE *vt, REALTYPE *v,
int ky,
int Nin)
331 for (
int in = 0; in < Nin; ++in) {
332 for (
int kx = 0; kx <
VLENX; ++kx) {
339 template<
typename REALTYPE>
340 inline void save_vec(REALTYPE *x,
Vsimd_t *vt,
int Nin)
342 for (
int in = 0; in < Nin; ++in) {
343 for (
int k = 0; k <
VLEN; ++k) {
344 x[k +
VLEN * in] = vt[in].
v[k];
350 template<
typename REALTYPE>
353 for (
int k = 0; k <
VLEN; ++k) {
354 if (pg.
v[k]) x[k] = vt.
v[k];
359 template<
typename REALTYPE>
360 inline void svst1_scatter_index(
svbool_t pg, REALTYPE *x,
363 for (
int k = 0; k <
VLEN; ++k) {
364 if (pg.
v[k]) x[index.
v[k]] = vt.
v[k];
369 template<
typename REALTYPE>
370 inline void save_vec1_x(REALTYPE *x,
Vsimd_t *vt,
int kx,
int Nin)
372 for (
int in = 0; in < Nin; ++in) {
373 for (
int ky = 0; ky <
VLENY; ++ky) {
380 template<
typename REALTYPE>
381 inline void save_vec1_y(REALTYPE *x,
Vsimd_t *vt,
int ky,
int Nin)
383 for (
int in = 0; in < Nin; ++in) {
384 for (
int kx = 0; kx <
VLENX; ++kx) {
391 template<
typename REALTYPE>
393 svreal_t& v, REALTYPE *xc, REALTYPE *xn)
396 for (
int k = 0; k <
VLEN; ++k) {
403 for (
int k = 0; k <
VLEN; ++k) {
404 v.
v[k] = vt.
v[
idx.v[k]];
409 template<
typename REALTYPE>
411 svreal_t& v, REALTYPE *wx, REALTYPE *wn)
413 load_vec(pg1, v, &wx[1]);
414 load_add(pg2, v, &wn[-
VLENX + 1]);
418 template<
typename REALTYPE>
420 svreal_t& v, REALTYPE *wx, REALTYPE *wn)
422 load_vec(pg3, v, &wx[0]);
423 load_add(pg1, v, &wx[1]);
424 load_add(pg2, v, &wn[-
VLENX + 1]);
428 template<
typename REALTYPE>
430 svreal_t& v, REALTYPE *wx, REALTYPE *wn)
432 load_vec(pg1, v, &wx[-1]);
433 load_add(pg2, v, &wn[
VLENX - 1]);
437 template<
typename REALTYPE>
439 svreal_t& v, REALTYPE *wx, REALTYPE *wn)
441 load_vec(pg3, v, &wx[0]);
442 load_add(pg1, v, &wx[-1]);
443 load_add(pg2, v, &wn[
VLENX - 1]);
447 template<
typename REALTYPE>
449 svreal_t& v, REALTYPE *wx, REALTYPE *wn)
451 load_vec(pg1, v, &wx[
VLENX]);
456 template<
typename REALTYPE>
458 svreal_t& v, REALTYPE *wx, REALTYPE *wn)
460 load_vec(pg1, v, &wx[-
VLENX]);
465 template<
typename REALTYPE>
466 inline void shift_vec_ybw(
svreal_t& v, REALTYPE *wx, REALTYPE *wn)
471 for (
int k = 0; k <
VLENX; ++k) {
477 template<
typename REALTYPE>
478 inline void shift_vec_yfw(
svreal_t& v, REALTYPE *wx, REALTYPE *wn)
480 for (
int k = 0; k <
VLENX; ++k) {
491 for (
int k = 0; k <
VLEN; ++k) {
492 if (pg.
v[k]) vt.
v[k] = 0.0;
498 inline void clear_vec(
Vsimd_t *vt,
int Nin)
500 for (
int in = 0; in < Nin; ++in) {
501 for (
int k = 0; k <
VLEN; ++k) {
509 template<
typename REALTYPE>
510 inline void add_vec(REALTYPE *x,
Vsimd_t *vt,
int Nin)
512 for (
int in = 0; in < Nin; ++in) {
513 for (
int k = 0; k <
VLEN; ++k) {
514 x[k +
VLEN * in] += vt[in].
v[k];
523 for (
int in = 0; in < Nin; ++in) {
524 for (
int k = 0; k <
VLEN; ++k) {
525 x[in].
v[k] += y[in].
v[k];
533 for (
int k = 0; k <
VLEN; ++k) {
534 if (pg.
v[k]) x.
v[k] += y.
v[k];
541 for (
int k = 0; k <
VLEN; ++k) {
542 if (pg.
v[k]) z.
v[k] = x.
v[k] + y.
v[k];
549 for (
int k = 0; k <
VLEN; ++k) {
550 if (pg.
v[k]) x.
v[k] -= y.
v[k];
557 for (
int k = 0; k <
VLEN; ++k) {
558 if (pg.
v[k]) z.
v[k] = x.
v[k] - y.
v[k];
565 for (
int k = 0; k <
VLEN; ++k) {
566 if (pg.
v[k]) w.
v[k] = x.
v[k] * y.
v[k];
573 for (
int in = 0; in < Nin; ++in) {
574 for (
int k = 0; k <
VLEN; ++k) {
575 x[in].
v[k] = y[in].
v[k];
582 template<
typename REALTYPE>
585 for (
int in = 0; in < Nin; ++in) {
586 for (
int k = 0; k <
VLEN; ++k) {
587 x[in].
v[k] = a * y[in].
v[k];
593 template<
typename REALTYPE>
596 for (
int k = 0; k <
VLEN; ++k) {
597 if (pg.
v[k]) x.
v[k] = a;
603 template<
typename REALTYPE>
606 for (
int in = 0; in < Nin; ++in) {
607 for (
int k = 0; k <
VLEN; ++k) {
608 y[in].
v[k] += a * x[in].
v[k];
614 template<
typename REALTYPE>
617 for (
int k = 0; k <
VLEN; ++k) {
618 if (pg.
v[k]) y.
v[k] += a * x.
v[k];
625 for (
int k = 0; k <
VLEN; ++k) {
626 if (pg.
v[k]) y.
v[k] += a.
v[k] * x.
v[k];
633 for (
int k = 0; k <
VLEN; ++k) {
634 if (pg.
v[k]) y.
v[k] -= a.
v[k] * x.
v[k];
640 template<
typename REALTYPE>
643 for (
int in = 0; in < Nin; ++in) {
644 for (
int k = 0; k <
VLEN; ++k) {
645 x[in].
v[k] = a * x[in].
v[k] + y[in].
v[k];
651 template<
typename REALTYPE>
654 for (
int k = 0; k <
VLEN; ++k) {
655 if (pg.
v[k]) x.
v[k] = a * x.
v[k] + y.
v[k];
660 template<
typename REALTYPE>
663 for (
int k = 0; k <
VLEN; ++k) {
664 if (pg.
v[k]) x.
v[k] *= a;
671 for (
int k = 0; k <
VLEN; ++k) {
672 if (pg.
v[k]) x.
v[k] *= a.
v[k];
678 template<
typename REALTYPE>
679 inline void scal_vec(
Vsimd_t *x, REALTYPE a,
int Nin)
681 for (
int in = 0; in < Nin; ++in) {
682 for (
int k = 0; k <
VLEN; ++k) {
689 template<
typename REALTYPE>
693 for (
int in = 0; in < Nin; ++in) {
694 for (
int k = 0; k <
VLEN; ++k) {
695 a += x[in].
v[k] * y[in].
v[k];
701 template<
typename REALTYPE>
702 inline void norm2_vec(REALTYPE& a,
Vsimd_t *x,
int Nin)
705 for (
int in = 0; in < Nin; ++in) {
706 for (
int k = 0; k <
VLEN; ++k) {
707 a += x[in].
v[k] * x[in].
v[k];
714 template<
typename REALTYPE>
715 inline void reduce_vec(REALTYPE& a,
Vsimd_t *x,
int Nin)
718 for (
int in = 0; in < Nin; ++in) {
719 for (
int k = 0; k <
VLEN; ++k) {
726 template<
typename REALTYPE>
730 for (
int k = 0; k <
VLEN; ++k) {
731 if (pg.
v[k]) a += x.
v[k];
739 for (
int in = 0; in < Nin; ++in) {
740 for (
int k = 0; k <
VLEN; ++k) {
741 y[in].
v[k] += x[in].
v[k] * x[in].
v[k];
749 for (
int k = 0; k <
VLEN; ++k) {
750 if (pg.
v[k]) y.
v[k] += x.
v[k] * x.
v[k];
758 for (
int in = 0; in < Nin; ++in) {
759 for (
int k = 0; k <
VLEN; ++k) {
760 y[in].
v[k] += x[in].
v[k] * w[in].
v[k];
768 for (
int k = 0; k <
VLEN; ++k) {
769 if (pg.
v[k]) y.
v[k] += x.
v[k] * w.
v[k];
777 for (
int in = 0; in < Nin; ++in) {
778 for (
int k = 0; k <
VLEN; ++k) {
779 y[in].
v[k] -= x[in].
v[k] * w[in].
v[k];
787 for (
int k = 0; k <
VLEN; ++k) {
788 if (pg.
v[k]) y.
v[k] -= x.
v[k] * w.
v[k];
793 template<
typename REALTYPE>
794 inline void shift_vec0_xbw(REALTYPE *v, REALTYPE *w,
int Nin)
796 for (
int in = 0; in < Nin; ++in) {
797 for (
int kx = 0; kx <
VLENX - 1; ++kx) {
798 for (
int ky = 0; ky <
VLENY; ++ky) {
803 for (
int ky = 0; ky <
VLENY; ++ky) {
810 template<
typename REALTYPE>
811 inline void shift_vec0_xfw(REALTYPE *v, REALTYPE *w,
int Nin)
813 for (
int in = 0; in < Nin; ++in) {
814 for (
int kx = 1; kx <
VLENX; ++kx) {
815 for (
int ky = 0; ky <
VLENY; ++ky) {
819 for (
int ky = 0; ky <
VLENY; ++ky) {
826 template<
typename REALTYPE>
827 inline void shift_vec0_ybw(REALTYPE *v, REALTYPE *w,
int Nin)
829 for (
int in = 0; in < Nin; ++in) {
830 for (
int kx = 0; kx <
VLENX; ++kx) {
831 for (
int ky = 0; ky <
VLENY - 1; ++ky) {
836 for (
int kx = 0; kx <
VLENX; ++kx) {
843 template<
typename REALTYPE>
844 inline void shift_vec0_yfw(REALTYPE *v, REALTYPE *w,
int Nin)
846 for (
int in = 0; in < Nin; ++in) {
847 for (
int kx = 0; kx <
VLENX; ++kx) {
848 for (
int ky = 1; ky <
VLENY; ++ky) {
853 for (
int kx = 0; kx <
VLENX; ++kx) {
860 template<
typename REALTYPE>
861 inline void shift_vec1_xbw(
Vsimd_t *x, REALTYPE *buf,
int Nin)
863 for (
int in = 0; in < Nin; ++in) {
864 for (
int kx = 0; kx <
VLENX - 1; ++kx) {
865 for (
int ky = 0; ky <
VLENY; ++ky) {
866 x[in].
v[kx +
VLENX * ky] = 0.0;
870 for (
int ky = 0; ky <
VLENY; ++ky) {
877 template<
typename REALTYPE>
878 inline void shift_vec1_xfw(
Vsimd_t *x, REALTYPE *buf,
int Nin)
880 for (
int in = 0; in < Nin; ++in) {
881 for (
int kx = 1; kx <
VLENX; ++kx) {
882 for (
int ky = 0; ky <
VLENY; ++ky) {
883 x[in].
v[kx +
VLENX * ky] = 0.0;
886 for (
int ky = 0; ky <
VLENY; ++ky) {
893 template<
typename REALTYPE>
894 inline void shift_vec1_ybw(
Vsimd_t *v, REALTYPE *buf,
int Nin)
896 for (
int in = 0; in < Nin; ++in) {
897 for (
int kx = 0; kx <
VLENX; ++kx) {
898 for (
int ky = 0; ky <
VLENY - 1; ++ky) {
899 v[in].
v[kx +
VLENX * ky] = 0.0;
903 for (
int kx = 0; kx <
VLENX; ++kx) {
910 template<
typename REALTYPE>
911 inline void shift_vec1_yfw(
Vsimd_t *v, REALTYPE *buf,
int Nin)
913 for (
int in = 0; in < Nin; ++in) {
914 for (
int kx = 0; kx <
VLENX; ++kx) {
915 for (
int ky = 1; ky <
VLENY; ++ky) {
916 v[in].
v[kx +
VLENX * ky] = 0.0;
920 for (
int kx = 0; kx <
VLENX; ++kx) {
927 template<
typename REALTYPE>
928 inline void shift_vec2_xbw(REALTYPE *v, REALTYPE *w, REALTYPE *y,
int Nin)
930 for (
int in = 0; in < Nin; ++in) {
931 for (
int kx = 0; kx <
VLENX - 1; ++kx) {
932 for (
int ky = 0; ky <
VLENY; ++ky) {
937 for (
int ky = 0; ky <
VLENY; ++ky) {
944 template<
typename REALTYPE>
945 inline void shift_vec2_xfw(REALTYPE *v, REALTYPE *w, REALTYPE *y,
int Nin)
947 for (
int in = 0; in < Nin; ++in) {
948 for (
int kx = 1; kx <
VLENX; ++kx) {
949 for (
int ky = 0; ky <
VLENY; ++ky) {
953 for (
int ky = 0; ky <
VLENY; ++ky) {
960 template<
typename REALTYPE>
961 inline void shift_vec2_xbw(
Vsimd_t *v, REALTYPE *w, REALTYPE *y,
int Nin)
963 for (
int in = 0; in < Nin; ++in) {
964 for (
int kx = 0; kx <
VLENX - 1; ++kx) {
965 for (
int ky = 0; ky <
VLENY; ++ky) {
970 for (
int ky = 0; ky <
VLENY; ++ky) {
977 template<
typename REALTYPE>
978 inline void shift_vec2_xfw(
Vsimd_t *v, REALTYPE *w, REALTYPE *y,
int Nin)
980 for (
int in = 0; in < Nin; ++in) {
981 for (
int kx = 1; kx <
VLENX; ++kx) {
982 for (
int ky = 0; ky <
VLENY; ++ky) {
986 for (
int ky = 0; ky <
VLENY; ++ky) {
993 template<
typename REALTYPE>
994 inline void shift_vec2_ybw(REALTYPE *v, REALTYPE *w, REALTYPE *y,
int Nin)
996 for (
int in = 0; in < Nin; ++in) {
997 for (
int kx = 0; kx <
VLENX; ++kx) {
998 for (
int ky = 0; ky <
VLENY - 1; ++ky) {
1003 for (
int kx = 0; kx <
VLENX; ++kx) {
1010 template<
typename REALTYPE>
1011 inline void shift_vec2_yfw(REALTYPE *v, REALTYPE *w, REALTYPE *y,
int Nin)
1013 for (
int in = 0; in < Nin; ++in) {
1014 for (
int kx = 0; kx <
VLENX; ++kx) {
1015 for (
int ky = 1; ky <
VLENY; ++ky) {
1020 for (
int kx = 0; kx <
VLENX; ++kx) {
1027 template<
typename REALTYPE>
1028 inline void shift_vec2_ybw(
Vsimd_t *v, REALTYPE *w, REALTYPE *y,
int Nin)
1030 for (
int in = 0; in < Nin; ++in) {
1031 for (
int kx = 0; kx <
VLENX; ++kx) {
1032 for (
int ky = 0; ky <
VLENY - 1; ++ky) {
1037 for (
int kx = 0; kx <
VLENX; ++kx) {
1044 template<
typename REALTYPE>
1045 inline void shift_vec2_yfw(
Vsimd_t *v, REALTYPE *w, REALTYPE *y,
int Nin)
1047 for (
int in = 0; in < Nin; ++in) {
1048 for (
int kx = 0; kx <
VLENX; ++kx) {
1049 for (
int ky = 1; ky <
VLENY; ++ky) {
1054 for (
int kx = 0; kx <
VLENX; ++kx) {
1063 for (
int k = 0; k <
VLEN; ++k) {
1064 if (pg.
v[k]) x.
v[k] = a * y.
v[k];
1072 for (
int k = 0; k <
VLEN; ++k) {
1074 vt.
v[k] = wt1.
v[k] + wt2.
v[k];
1086 for (
int k = 0; k <
VLEN; ++k) {
1088 vt.
v[k] = wt1.
v[k] - wt2.
v[k];
1100 for (
int k = 0; k <
VLEN; ++k) {
1101 if (pg.
v[k]) vt.
v[k] = wt1.
v[k] + wt2.
v[k];
1110 for (
int k = 0; k <
VLEN; ++k) {
1111 if (pg.
v[k]) vt.
v[k] = wt1.
v[k] - wt2.
v[k];
1119 for (
int k = 0; k <
VLEN; ++k) {
1120 if (pg.
v[k]) vt.
v[k] = -vt.
v[k];
1125 template<
typename REALTYPE>
1130 for (
int k = 0; k <
VLEN; ++k) {
1131 if (pg.
v[k]) vt.
v[k] = wt1.
v[k] + a * wt2.
v[k];
1141 for (
int k = 0; k <
VLEN; ++k) {
1147 for (
int k = j; k <
VLEN; ++k) {
1154 inline svbool_t set_predicate_whilelt(
int n)
1157 for (
int k = 0; k < n; ++k) {
1160 for (
int k = n; k <
VLEN; ++k) {
1167 inline void set1_at(
const int i,
svbool_t& pg)
1169 if (pg.
v[i] ==
true) {
1177 inline void rot1_R(
uint_t *u)
1180 for (
int i =
VLENX - 1; i >= 1; --i) {
1187 inline void rot1_L(
uint_t *u)
1190 for (
int i = 0; i <
VLENX - 1; ++i) {
1201 for (
int i = 0; i <
VLEN; ++i) {
1204 pg = set_predicate_false();
1214 for (
int i = 0; i <
VLEN; i += 2 *
VLENX) {
1219 for (
int k = 0; k <
VLEN; ++k) {
1229 for (
int i = 0; i <
VLEN; i++) {
1232 pg = set_predicate_false();
1235 for (
int i = 0; i <
VLEN; i += 2 *
VLENX) {
1236 set1_at(i +
VLENX - 1, pg);
1243 set1_at(i +
VLENX - 1, pg);
1247 for (
int k = 0; k <
VLEN; ++k) {
1255 pg1 = set_predicate_whilelt(
VLENX);
1257 for (
int i = 0; i <
VLENX * (
VLENY - 1); ++i) {
1260 for (
int i = 0; i <
VLENX; ++i) {
1263 for (
int k = 0; k <
VLEN; ++k) {
1272 pg1 = set_predicate_not(pg2);
1274 for (
int i = 0; i <
VLENX; ++i) {
1280 for (
int k = 0; k <
VLEN; ++k) {