<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Is RVV used correctly in this way? If so, are there any suggestions for code implementation?</div><div><br></div><div>testcase: </div><p style="margin:0;">#include<stdio.h></p><p style="margin:0;">#include<stdlib.h></p><p style="margin:0;">#include<math.h></p><p style="margin:0;">#include<riscv_vector.h></p><p style="margin:0;">int main(){</p><p style="margin:0;"> int input1[5] = {0,1,2,4,6};</p><p style="margin:0;"> int input2[5] = {0,1,2,4,6};</p><p style="margin:0;"> vint32m1_t *a1 = (vint32m1_t *)input1;</p><p style="margin:0;"> vint32m1_t *a2 = (vint32m1_t *)input2;</p><p style="margin:0;"> vint32m1_t bb;</p><p style="margin:0;"> int vl = vsetvl_e32m1(10000);</p><p style="margin:0;"> bb = vadd_vv_i32m1( *a1, *a2, vl);</p><p style="margin:0;"> for (int i=0;i<5;i++)</p><p style="margin:0;">   printf("%d\n",bb[i]);</p><p style="margin:0;"> return 1;</p><p style="margin:0;">}</p><p style="margin:0;"><br></p><p style="margin:0;">error:</p><p style="margin:0;">clang --target=riscv64-unknown-linux-gnu   -march=rv64gcv0p10  -menable-experimental-extensions  --sysroot=xxx  --gcc-toolchain=xxx test.c</p><p style="margin:0;">Error: </p><p style="margin:0;">test.c:14:20: error: subscripted value is not an array, pointer, or vector</p><p style="margin:0;">   printf("%d\n",bb[i]);</p><div><br></div></div><br><br><span title="neteasefooter"><p> </p></span>