mirror of
https://github.com/OpenMathLib/OpenBLAS
synced 2026-05-31 00:45:48 +08:00
Added MSVC defines to cpuid.h and getarch.c.
This commit is contained in:
6
cpuid.h
6
cpuid.h
@@ -39,6 +39,10 @@
|
||||
#ifndef CPUID_H
|
||||
#define CPUID_H
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_X64)
|
||||
#define INTEL_AMD
|
||||
#endif
|
||||
|
||||
#define VENDOR_INTEL 1
|
||||
#define VENDOR_UMC 2
|
||||
#define VENDOR_AMD 3
|
||||
@@ -59,7 +63,7 @@
|
||||
#define FAMILY_PM 7
|
||||
#define FAMILY_IA64 8
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
#ifdef INTEL_AMD
|
||||
#define GET_EXFAMILY 1
|
||||
#define GET_EXMODEL 2
|
||||
#define GET_TYPE 3
|
||||
|
||||
14
getarch.c
14
getarch.c
@@ -69,10 +69,14 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
/* or implied, of The University of Texas at Austin. */
|
||||
/*********************************************************************/
|
||||
|
||||
#if defined(__WIN32__) || defined(__WIN64__) || defined(__CYGWIN32__) || defined(__CYGWIN64__)
|
||||
#if defined(__WIN32__) || defined(__WIN64__) || defined(__CYGWIN32__) || defined(__CYGWIN64__) || defined(_WIN32) || defined(_WIN64)
|
||||
#define OS_WINDOWS
|
||||
#endif
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_X64)
|
||||
#define INTEL_AMD
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifdef OS_WINDOWS
|
||||
@@ -783,7 +787,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define OPENBLAS_SUPPORTED
|
||||
#endif
|
||||
|
||||
#if defined(__i386__) || (__x86_64__)
|
||||
#ifdef INTEL_AMD
|
||||
#include "cpuid_x86.c"
|
||||
#define OPENBLAS_SUPPORTED
|
||||
#endif
|
||||
@@ -878,7 +882,7 @@ int main(int argc, char *argv[]){
|
||||
#ifdef FORCE
|
||||
printf("CORE=%s\n", CORENAME);
|
||||
#else
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(POWER) || defined(__mips__) || defined(__arm__) || defined(__aarch64__)
|
||||
#if defined(INTEL_AMD) || defined(POWER) || defined(__mips__) || defined(__arm__) || defined(__aarch64__)
|
||||
printf("CORE=%s\n", get_corename());
|
||||
#endif
|
||||
#endif
|
||||
@@ -898,7 +902,7 @@ int main(int argc, char *argv[]){
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
#ifdef INTEL_AMD
|
||||
#ifndef FORCE
|
||||
get_sse();
|
||||
#else
|
||||
@@ -978,7 +982,7 @@ int main(int argc, char *argv[]){
|
||||
#ifdef FORCE
|
||||
printf("#define CHAR_CORENAME \"%s\"\n", CORENAME);
|
||||
#else
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(POWER) || defined(__mips__) || defined(__arm__) || defined(__aarch64__)
|
||||
#if defined(INTEL_AMD) || defined(POWER) || defined(__mips__) || defined(__arm__) || defined(__aarch64__)
|
||||
printf("#define CHAR_CORENAME \"%s\"\n", get_corename());
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user