Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
50bd4801
提交
50bd4801
authored
6月 20, 2013
作者:
Steve Underwood
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed NEON detection and added AVX2 detection to spandsp
上级
dc604fd5
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
26 行增加
和
11 行删除
+26
-11
configure.ac
libs/spandsp/configure.ac
+13
-0
ax_check_arm_neon.m4
libs/spandsp/m4/ax_check_arm_neon.m4
+13
-11
没有找到文件。
libs/spandsp/configure.ac
浏览文件 @
50bd4801
...
@@ -135,6 +135,7 @@ AC_ARG_ENABLE(sse4_2, [ --enable-sse4-2 Enable SSE4.2 support])
...
@@ -135,6 +135,7 @@ AC_ARG_ENABLE(sse4_2, [ --enable-sse4-2 Enable SSE4.2 support])
AC_ARG_ENABLE(sse4a, [ --enable-sse4a Enable SSE4A support])
AC_ARG_ENABLE(sse4a, [ --enable-sse4a Enable SSE4A support])
AC_ARG_ENABLE(sse5, [ --enable-sse5 Enable SSE5 support])
AC_ARG_ENABLE(sse5, [ --enable-sse5 Enable SSE5 support])
AC_ARG_ENABLE(avx, [ --enable-avx Enable AVX support])
AC_ARG_ENABLE(avx, [ --enable-avx Enable AVX support])
AC_ARG_ENABLE(avx2, [ --enable-avx2 Enable AVX2 support])
AC_ARG_ENABLE(neon, [ --enable-neon Enable NEON support])
AC_ARG_ENABLE(neon, [ --enable-neon Enable NEON support])
AC_ARG_ENABLE(fixed_point, [ --enable-fixed-point Enable fixed point support])
AC_ARG_ENABLE(fixed_point, [ --enable-fixed-point Enable fixed point support])
# The following is for MSVC, where we may be using a local copy of libtiff, built alongside spandsp
# The following is for MSVC, where we may be using a local copy of libtiff, built alongside spandsp
...
@@ -162,6 +163,7 @@ fi
...
@@ -162,6 +163,7 @@ fi
AX_C99_FLEXIBLE_ARRAY
AX_C99_FLEXIBLE_ARRAY
AC_CHECK_FUNCS([aligned_alloc])
AC_CHECK_FUNCS([memmove])
AC_CHECK_FUNCS([memmove])
AC_CHECK_FUNCS([memset])
AC_CHECK_FUNCS([memset])
AC_CHECK_FUNCS([select])
AC_CHECK_FUNCS([select])
...
@@ -339,6 +341,9 @@ gnu)
...
@@ -339,6 +341,9 @@ gnu)
if test "$enable_neon" = "yes" ; then
if test "$enable_neon" = "yes" ; then
COMP_VENDOR_CFLAGS="-mfpu=neon $COMP_VENDOR_CFLAGS"
COMP_VENDOR_CFLAGS="-mfpu=neon $COMP_VENDOR_CFLAGS"
fi
fi
if test "$enable_avx2" = "yes" ; then
COMP_VENDOR_CFLAGS="-mavx2 $COMP_VENDOR_CFLAGS"
fi
if test "$enable_avx" = "yes" ; then
if test "$enable_avx" = "yes" ; then
COMP_VENDOR_CFLAGS="-mavx $COMP_VENDOR_CFLAGS"
COMP_VENDOR_CFLAGS="-mavx $COMP_VENDOR_CFLAGS"
fi
fi
...
@@ -403,6 +408,9 @@ intel)
...
@@ -403,6 +408,9 @@ intel)
if test x"$ac_cv_gcc_unused_but_set_variable" = xyes ; then
if test x"$ac_cv_gcc_unused_but_set_variable" = xyes ; then
COMP_VENDOR_CFLAGS="-Wunused-but-set-variable $COMP_VENDOR_CFLAGS"
COMP_VENDOR_CFLAGS="-Wunused-but-set-variable $COMP_VENDOR_CFLAGS"
fi
fi
if test "$enable_avx2" = "yes" ; then
COMP_VENDOR_CFLAGS="-mavx2 $COMP_VENDOR_CFLAGS"
fi
if test "$enable_avx" = "yes" ; then
if test "$enable_avx" = "yes" ; then
COMP_VENDOR_CFLAGS="-mavx $COMP_VENDOR_CFLAGS"
COMP_VENDOR_CFLAGS="-mavx $COMP_VENDOR_CFLAGS"
fi
fi
...
@@ -464,6 +472,10 @@ armv7[bl] | armv7-*)
...
@@ -464,6 +472,10 @@ armv7[bl] | armv7-*)
fi
fi
;;
;;
x86_64-* | i386-* | i686-*)
x86_64-* | i386-* | i686-*)
if test "$enable_avx2" = "yes" ; then
AC_DEFINE([SPANDSP_USE_AVX2], [1], [Use the AVX2 instruction set (i386 and x86_64 only).])
enable_avx="yes"
fi
if test "$enable_avx" = "yes" ; then
if test "$enable_avx" = "yes" ; then
AC_DEFINE([SPANDSP_USE_AVX], [1], [Use the AVX instruction set (i386 and x86_64 only).])
AC_DEFINE([SPANDSP_USE_AVX], [1], [Use the AVX instruction set (i386 and x86_64 only).])
enable_sse5="yes"
enable_sse5="yes"
...
@@ -518,6 +530,7 @@ AM_CONDITIONAL([COND_SSE4_2], [test "$enable_sse4_2" = yes])
...
@@ -518,6 +530,7 @@ AM_CONDITIONAL([COND_SSE4_2], [test "$enable_sse4_2" = yes])
AM_CONDITIONAL([COND_SSE4A], [test "$enable_sse4a" = yes])
AM_CONDITIONAL([COND_SSE4A], [test "$enable_sse4a" = yes])
AM_CONDITIONAL([COND_SSE5], [test "$enable_sse5" = yes])
AM_CONDITIONAL([COND_SSE5], [test "$enable_sse5" = yes])
AM_CONDITIONAL([COND_AVX], [test "$enable_avx" = yes])
AM_CONDITIONAL([COND_AVX], [test "$enable_avx" = yes])
AM_CONDITIONAL([COND_AVX2], [test "$enable_avx2" = yes])
AM_CONDITIONAL([COND_NEON], [test "$enable_neon" = yes])
AM_CONDITIONAL([COND_NEON], [test "$enable_neon" = yes])
if test "$enable_builtin_tiff" = "yes" ; then
if test "$enable_builtin_tiff" = "yes" ; then
...
...
libs/spandsp/m4/ax_check_arm_neon.m4
浏览文件 @
50bd4801
...
@@ -23,19 +23,21 @@ gnu)
...
@@ -23,19 +23,21 @@ gnu)
CFLAGS="${CFLAGS} -mfpu=neon"
CFLAGS="${CFLAGS} -mfpu=neon"
AC_COMPILE_IFELSE(
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[AC_LANG_PROGRAM(
[#include <arm_neon.h>
[
int32x4_t testfunc(int16_t *a, int16_t *b)
#include <inttypes.h>
{
#include <arm_neon.h>
return vmull_s16(vld1_s16(a), vld1_s16(b));
}
int32x4_t testfunc(int16_t *a, int16_t *b)
int main(int argc, char *argv[])
{
{
return vmull_s16(vld1_s16(a), vld1_s16(b));
}
],
[
int32x4_t z;
int32x4_t z;
int16_t x[
8
];
int16_t x[
[8]
];
int16_t y[
8
];
int16_t y[
[8]
];
z = testfunc(x, y);
z = testfunc(x, y);
}],
]
[;]
)],
)],
[AC_MSG_RESULT([yes])
[AC_MSG_RESULT([yes])
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论