tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

simd_detect.h (1589B)


      1 /* vim: set shiftwidth=2 tabstop=8 autoindent cindent expandtab: */
      2 /* This Source Code Form is subject to the terms of the Mozilla Public
      3 * License, v. 2.0. If a copy of the MPL was not distributed with this
      4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      5 
      6 #ifndef simd_detect_h
      7 #define simd_detect_h
      8 
      9 #include "speex_resampler.h"
     10 #include "arch.h"
     11 
     12 #ifdef __cplusplus
     13 extern "C" {
     14 #endif
     15 
     16 int moz_speex_have_single_simd();
     17 int moz_speex_have_double_simd();
     18 
     19 #if defined(USE_SSE) || defined(USE_NEON)
     20 #define OVERRIDE_INNER_PRODUCT_SINGLE
     21 #define inner_product_single CAT_PREFIX(RANDOM_PREFIX,_inner_product_single)
     22 spx_word32_t inner_product_single(const spx_word16_t *a, const spx_word16_t *b, unsigned int len);
     23 #endif
     24 #if defined(USE_SSE)
     25 #define OVERRIDE_INTERPOLATE_PRODUCT_SINGLE
     26 #define interpolate_product_single CAT_PREFIX(RANDOM_PREFIX,_interpolate_product_single)
     27 spx_word32_t interpolate_product_single(const spx_word16_t *a, const spx_word16_t *b, unsigned int len, const spx_uint32_t oversample, float *frac);
     28 #endif
     29 
     30 #if defined(USE_SSE2)
     31 #define OVERRIDE_INNER_PRODUCT_DOUBLE
     32 #define inner_product_double CAT_PREFIX(RANDOM_PREFIX,_inner_product_double)
     33 double inner_product_double(const float *a, const float *b, unsigned int len);
     34 #define OVERRIDE_INTERPOLATE_PRODUCT_DOUBLE
     35 #define interpolate_product_double CAT_PREFIX(RANDOM_PREFIX,_interpolate_product_double)
     36 double interpolate_product_double(const float *a, const float *b, unsigned int len, const spx_uint32_t oversample, float *frac);
     37 #endif
     38 
     39 #ifdef __cplusplus
     40 }
     41 #endif
     42 
     43 #endif // simd_detect_h