OpenCV_4.2.0/opencv-4.2.0/cmake/checks/cpu_vsx.cpp

17 lines
349 B
C++
Raw Normal View History

2024-07-25 16:47:56 +08:00
#if defined(__VSX__)
#if defined(__PPC64__) && defined(__LITTLE_ENDIAN__)
#include <altivec.h>
#else
#error "OpenCV only supports little-endian mode"
#endif
#else
#error "VSX is not supported"
#endif
int main()
{
__vector float testF = vec_splats(0.f);
testF = vec_madd(testF, testF, testF);
return 0;
}