Files
opencv--opencv/cmake/checks/cpu_sve.cpp
T
2026-07-13 12:06:04 +08:00

25 lines
377 B
C++

#include <stdio.h>
#if defined(__ARM_FEATURE_SVE)
# include <arm_sve.h>
# define CV_SVE 1
#endif
#if defined(CV_SVE)
int test()
{
const float src[1024] = {0.0};
svbool_t pg = svptrue_b32();
svfloat32_t val = svld1(pg, src);
return (int)svlastb_f32(pg, val);
}
#else
#error "SVE is not supported"
#endif
int main()
{
printf("%d\n", test());
return 0;
}