diff options
author | tnn <tnn@pkgsrc.org> | 2020-08-01 04:35:09 +0000 |
---|---|---|
committer | tnn <tnn@pkgsrc.org> | 2020-08-01 04:35:09 +0000 |
commit | 8c1603b76c32e418abbc0c8989101128e43aba27 (patch) | |
tree | 9c77d8cd90d706b5df453bf7a05eeac855c29b95 /math | |
parent | 8822b3e4150c63969295bea54f559d089c72ca87 (diff) | |
download | pkgsrc-8c1603b76c32e418abbc0c8989101128e43aba27.tar.gz |
math/volk: import volk-2.3.0
The Vector-Optimized Library of Kernel is a library that contains kernels of
hand-written SIMD code for different mathematical operations. Since each SIMD
architecture can be very different and no compiler has yet come along to
handle vectorization properly or highly efficiently, VOLK approaches the
problem differently.
VOLK is a sub-project of GNU Radio.
Diffstat (limited to 'math')
-rw-r--r-- | math/volk/DESCR | 7 | ||||
-rw-r--r-- | math/volk/Makefile | 31 | ||||
-rw-r--r-- | math/volk/PLIST | 173 | ||||
-rw-r--r-- | math/volk/buildlink3.mk | 14 | ||||
-rw-r--r-- | math/volk/distinfo | 8 | ||||
-rw-r--r-- | math/volk/patches/patch-include_volk_volk__common.h | 18 | ||||
-rw-r--r-- | math/volk/patches/patch-include_volk_volk__complex.h | 19 |
7 files changed, 270 insertions, 0 deletions
diff --git a/math/volk/DESCR b/math/volk/DESCR new file mode 100644 index 00000000000..e63261f6713 --- /dev/null +++ b/math/volk/DESCR @@ -0,0 +1,7 @@ +The Vector-Optimized Library of Kernel is a library that contains kernels of +hand-written SIMD code for different mathematical operations. Since each SIMD +architecture can be very different and no compiler has yet come along to +handle vectorization properly or highly efficiently, VOLK approaches the +problem differently. + +VOLK is a sub-project of GNU Radio. diff --git a/math/volk/Makefile b/math/volk/Makefile new file mode 100644 index 00000000000..bf89b22e6e1 --- /dev/null +++ b/math/volk/Makefile @@ -0,0 +1,31 @@ +# $NetBSD: Makefile,v 1.1 2020/08/01 04:35:09 tnn Exp $ + +DISTNAME= volk-2.3.0 +CATEGORIES= math ham +MASTER_SITES= ${MASTER_SITE_GITHUB:=gnuradio/} +GITHUB_TAG= v${PKGVERSION_NOREV} + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= https://www.libvolk.org/ +COMMENT= The Vector Optimized Library of Kernels +LICENSE= gnu-gpl-v3 + +BUILD_DEPENDS+= ${PYPKGPREFIX}-mako-[0-9]*:../../devel/py-mako + +USE_CMAKE= yes +USE_LANGUAGES= c c++ +USE_TOOLS+= pkg-config + +# XXX this doesn't work because VolkPython.cmake doesn't conform +# to PEP 3147 (doesn't place files in __pycache__ when using python 3) +# +# PY_PATCHPLIST= yes +#.include "../../lang/python/extension.mk" +# +# So do it manually instead: +.include "../../lang/python/application.mk" +PLIST_SUBST+= PYSITELIB=${PYSITELIB} + +.include "../../devel/orc/buildlink3.mk" +.include "../../devel/boost-libs/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/math/volk/PLIST b/math/volk/PLIST new file mode 100644 index 00000000000..4e2b778cdc9 --- /dev/null +++ b/math/volk/PLIST @@ -0,0 +1,173 @@ +@comment $NetBSD: PLIST,v 1.1 2020/08/01 04:35:09 tnn Exp $ +bin/volk-config-info +bin/volk_modtool +bin/volk_profile +include/volk/constants.h +include/volk/saturation_arithmetic.h +include/volk/volk.h +include/volk/volk_16i_32fc_dot_prod_32fc.h +include/volk/volk_16i_branch_4_state_8.h +include/volk/volk_16i_convert_8i.h +include/volk/volk_16i_max_star_16i.h +include/volk/volk_16i_max_star_horizontal_16i.h +include/volk/volk_16i_permute_and_scalar_add.h +include/volk/volk_16i_s32f_convert_32f.h +include/volk/volk_16i_x4_quad_max_star_16i.h +include/volk/volk_16i_x5_add_quad_16i_x4.h +include/volk/volk_16ic_convert_32fc.h +include/volk/volk_16ic_deinterleave_16i_x2.h +include/volk/volk_16ic_deinterleave_real_16i.h +include/volk/volk_16ic_deinterleave_real_8i.h +include/volk/volk_16ic_magnitude_16i.h +include/volk/volk_16ic_s32f_deinterleave_32f_x2.h +include/volk/volk_16ic_s32f_deinterleave_real_32f.h +include/volk/volk_16ic_s32f_magnitude_32f.h +include/volk/volk_16ic_x2_dot_prod_16ic.h +include/volk/volk_16ic_x2_multiply_16ic.h +include/volk/volk_16u_byteswap.h +include/volk/volk_16u_byteswappuppet_16u.h +include/volk/volk_32f_64f_add_64f.h +include/volk/volk_32f_64f_multiply_64f.h +include/volk/volk_32f_8u_polarbutterfly_32f.h +include/volk/volk_32f_8u_polarbutterflypuppet_32f.h +include/volk/volk_32f_accumulator_s32f.h +include/volk/volk_32f_acos_32f.h +include/volk/volk_32f_asin_32f.h +include/volk/volk_32f_atan_32f.h +include/volk/volk_32f_binary_slicer_32i.h +include/volk/volk_32f_binary_slicer_8i.h +include/volk/volk_32f_convert_64f.h +include/volk/volk_32f_cos_32f.h +include/volk/volk_32f_exp_32f.h +include/volk/volk_32f_expfast_32f.h +include/volk/volk_32f_index_max_16u.h +include/volk/volk_32f_index_max_32u.h +include/volk/volk_32f_invsqrt_32f.h +include/volk/volk_32f_log2_32f.h +include/volk/volk_32f_null_32f.h +include/volk/volk_32f_s32f_32f_fm_detect_32f.h +include/volk/volk_32f_s32f_add_32f.h +include/volk/volk_32f_s32f_calc_spectral_noise_floor_32f.h +include/volk/volk_32f_s32f_convert_16i.h +include/volk/volk_32f_s32f_convert_32i.h +include/volk/volk_32f_s32f_convert_8i.h +include/volk/volk_32f_s32f_mod_rangepuppet_32f.h +include/volk/volk_32f_s32f_multiply_32f.h +include/volk/volk_32f_s32f_normalize.h +include/volk/volk_32f_s32f_power_32f.h +include/volk/volk_32f_s32f_s32f_mod_range_32f.h +include/volk/volk_32f_s32f_stddev_32f.h +include/volk/volk_32f_sin_32f.h +include/volk/volk_32f_sqrt_32f.h +include/volk/volk_32f_stddev_and_mean_32f_x2.h +include/volk/volk_32f_tan_32f.h +include/volk/volk_32f_tanh_32f.h +include/volk/volk_32f_x2_add_32f.h +include/volk/volk_32f_x2_divide_32f.h +include/volk/volk_32f_x2_dot_prod_16i.h +include/volk/volk_32f_x2_dot_prod_32f.h +include/volk/volk_32f_x2_fm_detectpuppet_32f.h +include/volk/volk_32f_x2_interleave_32fc.h +include/volk/volk_32f_x2_max_32f.h +include/volk/volk_32f_x2_min_32f.h +include/volk/volk_32f_x2_multiply_32f.h +include/volk/volk_32f_x2_pow_32f.h +include/volk/volk_32f_x2_s32f_interleave_16ic.h +include/volk/volk_32f_x2_subtract_32f.h +include/volk/volk_32f_x3_sum_of_poly_32f.h +include/volk/volk_32fc_32f_add_32fc.h +include/volk/volk_32fc_32f_dot_prod_32fc.h +include/volk/volk_32fc_32f_multiply_32fc.h +include/volk/volk_32fc_conjugate_32fc.h +include/volk/volk_32fc_convert_16ic.h +include/volk/volk_32fc_deinterleave_32f_x2.h +include/volk/volk_32fc_deinterleave_64f_x2.h +include/volk/volk_32fc_deinterleave_imag_32f.h +include/volk/volk_32fc_deinterleave_real_32f.h +include/volk/volk_32fc_deinterleave_real_64f.h +include/volk/volk_32fc_index_max_16u.h +include/volk/volk_32fc_index_max_32u.h +include/volk/volk_32fc_magnitude_32f.h +include/volk/volk_32fc_magnitude_squared_32f.h +include/volk/volk_32fc_s32f_atan2_32f.h +include/volk/volk_32fc_s32f_deinterleave_real_16i.h +include/volk/volk_32fc_s32f_magnitude_16i.h +include/volk/volk_32fc_s32f_power_32fc.h +include/volk/volk_32fc_s32f_power_spectral_densitypuppet_32f.h +include/volk/volk_32fc_s32f_power_spectrum_32f.h +include/volk/volk_32fc_s32f_x2_power_spectral_density_32f.h +include/volk/volk_32fc_s32fc_multiply_32fc.h +include/volk/volk_32fc_s32fc_rotatorpuppet_32fc.h +include/volk/volk_32fc_s32fc_x2_rotator_32fc.h +include/volk/volk_32fc_x2_add_32fc.h +include/volk/volk_32fc_x2_conjugate_dot_prod_32fc.h +include/volk/volk_32fc_x2_divide_32fc.h +include/volk/volk_32fc_x2_dot_prod_32fc.h +include/volk/volk_32fc_x2_multiply_32fc.h +include/volk/volk_32fc_x2_multiply_conjugate_32fc.h +include/volk/volk_32fc_x2_s32f_square_dist_scalar_mult_32f.h +include/volk/volk_32fc_x2_s32fc_multiply_conjugate_add_32fc.h +include/volk/volk_32fc_x2_square_dist_32f.h +include/volk/volk_32i_s32f_convert_32f.h +include/volk/volk_32i_x2_and_32i.h +include/volk/volk_32i_x2_or_32i.h +include/volk/volk_32u_byteswap.h +include/volk/volk_32u_byteswappuppet_32u.h +include/volk/volk_32u_popcnt.h +include/volk/volk_32u_popcntpuppet_32u.h +include/volk/volk_32u_reverse_32u.h +include/volk/volk_64f_convert_32f.h +include/volk/volk_64f_x2_add_64f.h +include/volk/volk_64f_x2_max_64f.h +include/volk/volk_64f_x2_min_64f.h +include/volk/volk_64f_x2_multiply_64f.h +include/volk/volk_64u_byteswap.h +include/volk/volk_64u_byteswappuppet_64u.h +include/volk/volk_64u_popcnt.h +include/volk/volk_64u_popcntpuppet_64u.h +include/volk/volk_8i_convert_16i.h +include/volk/volk_8i_s32f_convert_32f.h +include/volk/volk_8ic_deinterleave_16i_x2.h +include/volk/volk_8ic_deinterleave_real_16i.h +include/volk/volk_8ic_deinterleave_real_8i.h +include/volk/volk_8ic_s32f_deinterleave_32f_x2.h +include/volk/volk_8ic_s32f_deinterleave_real_32f.h +include/volk/volk_8ic_x2_multiply_conjugate_16ic.h +include/volk/volk_8ic_x2_s32f_multiply_conjugate_32fc.h +include/volk/volk_8u_conv_k7_r2puppet_8u.h +include/volk/volk_8u_x2_encodeframepolar_8u.h +include/volk/volk_8u_x3_encodepolar_8u_x2.h +include/volk/volk_8u_x3_encodepolarpuppet_8u.h +include/volk/volk_8u_x4_conv_k7_r2_8u.h +include/volk/volk_alloc.hh +include/volk/volk_avx2_intrinsics.h +include/volk/volk_avx_intrinsics.h +include/volk/volk_common.h +include/volk/volk_complex.h +include/volk/volk_config_fixed.h +include/volk/volk_cpu.h +include/volk/volk_malloc.h +include/volk/volk_neon_intrinsics.h +include/volk/volk_prefs.h +include/volk/volk_sse3_intrinsics.h +include/volk/volk_sse_intrinsics.h +include/volk/volk_typedefs.h +include/volk/volk_version.h +lib/cmake/volk/VolkConfig.cmake +lib/cmake/volk/VolkConfigVersion.cmake +lib/cmake/volk/VolkTargets-release.cmake +lib/cmake/volk/VolkTargets.cmake +lib/libvolk.so +lib/libvolk.so.2.3 +lib/pkgconfig/volk.pc +${PYSITELIB}/volk_modtool/__init__.py +${PYSITELIB}/volk_modtool/__init__.pyc +${PYSITELIB}/volk_modtool/__init__.pyo +${PYSITELIB}/volk_modtool/cfg.py +${PYSITELIB}/volk_modtool/cfg.pyc +${PYSITELIB}/volk_modtool/cfg.pyo +${PYSITELIB}/volk_modtool/volk_modtool_generate.py +${PYSITELIB}/volk_modtool/volk_modtool_generate.pyc +${PYSITELIB}/volk_modtool/volk_modtool_generate.pyo +@pkgdir include/volk/asm/orc +@pkgdir include/volk/asm/neon diff --git a/math/volk/buildlink3.mk b/math/volk/buildlink3.mk new file mode 100644 index 00000000000..802d3a23acd --- /dev/null +++ b/math/volk/buildlink3.mk @@ -0,0 +1,14 @@ +# $NetBSD: buildlink3.mk,v 1.1 2020/08/01 04:35:09 tnn Exp $ + +BUILDLINK_TREE+= volk + +.if !defined(VOLK_BUILDLINK3_MK) +VOLK_BUILDLINK3_MK:= + +BUILDLINK_API_DEPENDS.volk+= volk>=2.3.0 +BUILDLINK_PKGSRCDIR.volk?= ../../math/volk + +.include "../../devel/orc/buildlink3.mk" +.endif # VOLK_BUILDLINK3_MK + +BUILDLINK_TREE+= -volk diff --git a/math/volk/distinfo b/math/volk/distinfo new file mode 100644 index 00000000000..14ab9ad9083 --- /dev/null +++ b/math/volk/distinfo @@ -0,0 +1,8 @@ +$NetBSD: distinfo,v 1.1 2020/08/01 04:35:09 tnn Exp $ + +SHA1 (volk-2.3.0.tar.gz) = c9824143bc8835ca2e9ebb2204dcb8a4836e8958 +RMD160 (volk-2.3.0.tar.gz) = 9cf2d79cdf98ac8b9e935694601f3b33a5852b8d +SHA512 (volk-2.3.0.tar.gz) = 9e3b405b7be46b4f5ff61a4d42fa9013fc55169bc18c9cf9253e446fe23fd12dc0356adb9aa176e33dfa4cc478e4b9226bee906a2d89ef83bac3b28f52816382 +Size (volk-2.3.0.tar.gz) = 344763 bytes +SHA1 (patch-include_volk_volk__common.h) = 53e7aa38deaa9cdf68ca12fff6c176be471cf162 +SHA1 (patch-include_volk_volk__complex.h) = 248bf10c03364f7338f03cbaa4ddc8047da9c775 diff --git a/math/volk/patches/patch-include_volk_volk__common.h b/math/volk/patches/patch-include_volk_volk__common.h new file mode 100644 index 00000000000..4b6893eddce --- /dev/null +++ b/math/volk/patches/patch-include_volk_volk__common.h @@ -0,0 +1,18 @@ +$NetBSD: patch-include_volk_volk__common.h,v 1.1 2020/08/01 04:35:09 tnn Exp $ + +Something is wrong with NetBSD's headers; GCC says isinf is out of scope. + +--- include/volk/volk_common.h.orig 2020-05-09 10:58:32.000000000 +0000 ++++ include/volk/volk_common.h +@@ -150,7 +150,11 @@ union bit256 { + static inline float log2f_non_ieee(float f) + { + float const result = log2f(f); ++#ifdef __NetBSD__ ++ return __builtin_isinf(result) ? copysignf(127.0f, result) : result; ++#else + return isinf(result) ? copysignf(127.0f, result) : result; ++#endif + } + + //////////////////////////////////////////////////////////////////////// diff --git a/math/volk/patches/patch-include_volk_volk__complex.h b/math/volk/patches/patch-include_volk_volk__complex.h new file mode 100644 index 00000000000..a03d6aa8fcd --- /dev/null +++ b/math/volk/patches/patch-include_volk_volk__complex.h @@ -0,0 +1,19 @@ +$NetBSD: patch-include_volk_volk__complex.h,v 1.1 2020/08/01 04:35:09 tnn Exp $ + +For some reason <tgmath.h> is only available in C++ mode ... + +--- include/volk/volk_complex.h.orig 2020-05-09 10:58:32.000000000 +0000 ++++ include/volk/volk_complex.h +@@ -58,7 +58,12 @@ inline T lv_conj(const T& x) + #if __STDC_VERSION__ >= 199901L /* C99 check */ + /* this allows us to conj in lv_conj without the double detour for single-precision floats + */ ++#if defined(__NetBSD__) && !defined(__cplusplus) ++#include <math.h> ++#include <complex.h> ++#else + #include <tgmath.h> ++#endif + #endif /* C99 check */ + + #include <complex.h> |