simd_detect.cpp (660B)
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 #include "simd_detect.h" 7 8 #include "mozilla/SSE.h" 9 #include "mozilla/arm.h" 10 11 #ifdef USE_SSE2 12 int moz_speex_have_double_simd() { 13 return mozilla::supports_sse2() ? 1 : 0; 14 } 15 #endif 16 17 #ifdef USE_SSE 18 int moz_speex_have_single_simd() { 19 return mozilla::supports_sse() ? 1 : 0; 20 } 21 #endif 22 23 #ifdef USE_NEON 24 int moz_speex_have_single_simd() { 25 return mozilla::supports_neon() ? 1 : 0; 26 } 27 #endif