[ARM][SVE] change vector size at runtime (dynamically)

Yes it is possible to change the size of the vector of ARM SVE (like A64FX) using the following code:

#define PR_SVE_SET_VL 50 #define PR_SVE_GET_VL 51 #include #include int main(int argc, char** argv){ if(getenv(“VECBITS”)){ int svebitstoset=atoi(getenv(“VECBITS”)); std::cout << "svebitstoset " << svebitstoset << std::endl; int info = prctl(PR_SVE_SET_VL, svebitstoset/8); std::cout << "info " << info << std::endl; } std::cout << "Vec size = " << svcntb()*8 << "bits" << std::endl; [/cpp]