mirror of
https://github.com/opencv/opencv.git
synced 2024-12-15 09:49:13 +08:00
474a0dac49
- add infrastructure support for Power9/VSX3 - fix missing VSX flags on GCC4.9 and CLANG4(#13210, #13222) - fix disable VSX optimzation on GCC by using flag ENABLE_VSX - flag ENABLE_VSX is deprecated now, use CPU_BASELINE, CPU_DISPATCH instead - add VSX3 to arithmetic dispatchable flags
18 lines
432 B
C++
18 lines
432 B
C++
#if defined(__VSX__)
|
|
#if defined(__PPC64__) && defined(__LITTLE_ENDIAN__)
|
|
#include <altivec.h>
|
|
#else
|
|
#error "OpenCV only supports little-endian mode"
|
|
#endif
|
|
#else
|
|
#error "VSX3 is not supported"
|
|
#endif
|
|
|
|
int main()
|
|
{
|
|
__vector unsigned char a = vec_splats((unsigned char)1);
|
|
__vector unsigned char b = vec_splats((unsigned char)2);
|
|
__vector unsigned char r = vec_absd(a, b);
|
|
return 0;
|
|
}
|