root/src/simh/dispatch.c

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. agner_compiler_patch
  2. agner_cpu_patch
  3. mkl_serv_intel_cpu
  4. mkl_serv_intel_cpu_true
  5. mkl_serv_cpuhaspnr_true
  6. mkl_serv_cpuhaspnr
  7. mkl_serv_cpuhasnhm
  8. mkl_serv_cpuisbulldozer
  9. mkl_serv_cpuiszen
  10. mkl_serv_cpuisatomsse4_2
  11. mkl_serv_cpuisatomssse3
  12. mkl_serv_cpuisitbarcelona
  13. mkl_serv_cpuisskl
  14. mkl_serv_cpuisknm
  15. mkl_serv_cpuisclx
  16. mkl_serv_get_microarchitecture
  17. agner_mkl_patch

   1 /*
   2  * vim: filetype=c:tabstop=4:ai:expandtab
   3  * SPDX-License-Identifier: BSD-2-Clause
   4  * scspell-id: a36eadc5-f629-11ec-9353-80ee73e9b8e7
   5  *
   6  * -------------------------------------------------------------------------
   7  *
   8  * Copyright (c) 2009-2019 Agner Fog
   9  * Copyright (c) 2021-2023 The DPS8M Development Team
  10  *
  11  * Redistribution and use in source and binary forms, with or without
  12  * modification, are permitted provided that the following conditions
  13  * are met:
  14  *
  15  * 1. Redistributions of source code must retain the above copyright
  16  *    notice, this list of conditions and the following disclaimer.
  17  *
  18  * 2. Redistributions in binary form must reproduce the above copyright
  19  *    notice, this list of conditions and the following disclaimer in the
  20  *    documentation and/or other materials provided with the distribution.
  21  *
  22  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  23  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  25  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  26  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  27  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  28  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  29  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  31  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  32  * SUCH DAMAGE.
  33  *
  34  * -------------------------------------------------------------------------
  35  */
  36 
  37 #include "dispatch.h"
  38 #ifdef __DISPATCH_H_
  39 
  40 # if defined( __INTEL_COMPILER )       || \
  41      defined( __INTEL_CLANG_COMPILER ) || \
  42      defined( __INTEL_LLVM_COMPILER )  || \
  43      defined( INTEL_MKL_VERSION )      || \
  44      defined( __INTEL_MKL__ )
  45 
  46 void
  47 agner_compiler_patch()
     /* [previous][next][first][last][top][bottom][index][help] */
  48 {
  49 #  if defined( __INTEL_COMPILER )       || \
  50       defined( __INTEL_CLANG_COMPILER ) || \
  51       defined( __INTEL_LLVM_COMPILER )
  52   (void)agner_cpu_patch();
  53 #  endif
  54          /* if defined( __INTEL_COMPILER )       ||
  55                defined( __INTEL_CLANG_COMPILER ) ||
  56                defined( __INTEL_LLVM_COMPILER ) */
  57 #  if defined( INTEL_MKL_VERSION ) || \
  58       defined( __INTEL_MKL__ )
  59   (void)agner_mkl_patch();
  60 #  endif
  61          /* if defined( INTEL_MKL_VERSION ) ||
  62                defined( __INTEL_MKL__ ) */
  63 }
  64 
  65 void
  66 agner_cpu_patch()
     /* [previous][next][first][last][top][bottom][index][help] */
  67 {
  68   __intel_cpu_feature_indicator   = 0;
  69   __intel_cpu_feature_indicator_x = 0;
  70   __intel_cpu_features_init_x();
  71   __intel_cpu_feature_indicator   = __intel_cpu_feature_indicator_x;
  72 }
  73 
  74 int
  75 mkl_serv_intel_cpu()
     /* [previous][next][first][last][top][bottom][index][help] */
  76 {
  77   return ( 1 );
  78 }
  79 
  80 int
  81 mkl_serv_intel_cpu_true()
     /* [previous][next][first][last][top][bottom][index][help] */
  82 {
  83   return ( 1 );
  84 }
  85 
  86 int
  87 mkl_serv_cpuhaspnr_true()
     /* [previous][next][first][last][top][bottom][index][help] */
  88 {
  89   return ( 1 );
  90 }
  91 
  92 int
  93 mkl_serv_cpuhaspnr()
     /* [previous][next][first][last][top][bottom][index][help] */
  94 {
  95   return ( 1 );
  96 }
  97 
  98 int
  99 mkl_serv_cpuhasnhm()
     /* [previous][next][first][last][top][bottom][index][help] */
 100 {
 101   return ( 1 );
 102 }
 103 
 104 #  ifndef INTEL_MKL_DETECT_AMD
 105 int
 106 mkl_serv_cpuisbulldozer()
     /* [previous][next][first][last][top][bottom][index][help] */
 107 {
 108   return ( 0 );
 109 }
 110 
 111 int
 112 mkl_serv_cpuiszen()
     /* [previous][next][first][last][top][bottom][index][help] */
 113 {
 114   return ( 0 );
 115 }
 116 #  endif /* ifndef INTEL_MKL_DETECT_AMD */
 117 
 118 int
 119 mkl_serv_cpuisatomsse4_2()
     /* [previous][next][first][last][top][bottom][index][help] */
 120 {
 121   return ( 0 );
 122 }
 123 
 124 int
 125 mkl_serv_cpuisatomssse3()
     /* [previous][next][first][last][top][bottom][index][help] */
 126 {
 127   return ( 0 );
 128 }
 129 
 130 int
 131 mkl_serv_cpuisitbarcelona()
     /* [previous][next][first][last][top][bottom][index][help] */
 132 {
 133   return ( 0 );
 134 }
 135 
 136 int
 137 mkl_serv_cpuisskl()
     /* [previous][next][first][last][top][bottom][index][help] */
 138 {
 139   return ( 0 );
 140 }
 141 
 142 int
 143 mkl_serv_cpuisknm()
     /* [previous][next][first][last][top][bottom][index][help] */
 144 {
 145   return ( 0 );
 146 }
 147 
 148 int
 149 mkl_serv_cpuisclx()
     /* [previous][next][first][last][top][bottom][index][help] */
 150 {
 151   return ( 0 );
 152 }
 153 
 154 int
 155 mkl_serv_get_microarchitecture()
     /* [previous][next][first][last][top][bottom][index][help] */
 156 {
 157   return ( 33 );
 158 }
 159 
 160 #  if defined( INTEL_MKL_VERSION ) || \
 161       defined( __INTEL_MKL__ )
 162 void
 163 agner_mkl_patch()
     /* [previous][next][first][last][top][bottom][index][help] */
 164 {
 165   __intel_mkl_feature_indicator   = 0;
 166   __intel_mkl_feature_indicator_x = 0;
 167   __intel_mkl_features_init_x();
 168   __intel_mkl_feature_indicator   = __intel_mkl_feature_indicator_x;
 169 }
 170 #  endif
 171          /* if defined( INTEL_MKL_VERSION ) ||
 172                defined( __INTEL_MKL__ ) */
 173 # endif
 174         /* if defined( __INTEL_COMPILER )       ||
 175               defined( __INTEL_CLANG_COMPILER ) ||
 176               defined( __INTEL_LLVM_COMPILER )  ||
 177               defined( INTEL_MKL_VERSION )      ||
 178               defined( __INTEL_MKL__ ) */
 179 
 180 #endif /* ifdef __DISPATCH_H_ */

/* [previous][next][first][last][top][bottom][index][help] */