/*****************************************************************************1* intel_dispatcher.h: intel compiler cpu dispatcher override2*****************************************************************************3* Copyright (C) 2014-2016 x264 project4*5* Authors: Anton Mitrofanov <[email protected]>6*7* This program is free software; you can redistribute it and/or modify8* it under the terms of the GNU General Public License as published by9* the Free Software Foundation; either version 2 of the License, or10* (at your option) any later version.11*12* This program is distributed in the hope that it will be useful,13* but WITHOUT ANY WARRANTY; without even the implied warranty of14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15* GNU General Public License for more details.16*17* You should have received a copy of the GNU General Public License18* along with this program; if not, write to the Free Software19* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.20*21* This program is also available under a commercial proprietary license.22* For more information, contact us at [email protected].23*****************************************************************************/2425#ifndef X264_INTEL_DISPATCHER_H26#define X264_INTEL_DISPATCHER_H2728/* Feature flags using _FEATURE_* defines from immintrin.h */29extern unsigned long long __intel_cpu_feature_indicator;30extern unsigned long long __intel_cpu_feature_indicator_x;3132/* CPU vendor independent version of dispatcher */33void __intel_cpu_features_init_x( void );3435static void x264_intel_dispatcher_override( void )36{37if( __intel_cpu_feature_indicator & ~1ULL )38return;39__intel_cpu_feature_indicator = 0;40__intel_cpu_feature_indicator_x = 0;41__intel_cpu_features_init_x();42__intel_cpu_feature_indicator = __intel_cpu_feature_indicator_x;43}4445#endif464748