mirror of
https://github.com/amd/blis.git
synced 2026-05-11 17:50:00 +00:00
Moved #include "cpuid.h" to bli_cpuid.c.
Details:
- Relocated the #include "cpuid.h" directive from bli_cpuid.h to
bli_cpuid.c. This was done because cpuid.h (which is pulled into
the post-build blis.h developer header) doesn't protect its
definitions with a preprocessor guard of the form:
#ifndef FOOBAR_H
#define FOOBAR_H
// header contents.
#endif
and as a result, applications (previously) could not #include both
blis.h and cpuid.h (since the former was already including the
latter). Thanks to Bhaskar Nallani for raising this issue via #393
and to Devin Matthews for suggesting this fix.
- CREDITS file update.
This commit is contained in:
1
CREDITS
1
CREDITS
@@ -56,6 +56,7 @@ but many others have contributed code and feedback, including
|
||||
Simon Lukas Märtens @ACSimon33 (RWTH Aachen University)
|
||||
Devin Matthews @devinamatthews (The University of Texas at Austin)
|
||||
Stefanos Mavros @smavros
|
||||
Bhaskar Nallani @BhaskarNallani (AMD)
|
||||
Nisanth Padinharepatt (AMD)
|
||||
Ajay Panyala @ajaypanyala
|
||||
Devangi Parikh @dnparikh (The University of Texas at Austin)
|
||||
|
||||
@@ -46,20 +46,22 @@
|
||||
#define __arm__
|
||||
#endif
|
||||
|
||||
#ifndef BLIS_CONFIGURETIME_CPUID
|
||||
#include "blis.h"
|
||||
#else
|
||||
#ifdef BLIS_CONFIGURETIME_CPUID
|
||||
#define BLIS_EXPORT_BLIS
|
||||
#include "bli_system.h"
|
||||
#include "bli_type_defs.h"
|
||||
#include "bli_cpuid.h"
|
||||
#include "bli_arch.h"
|
||||
#else
|
||||
#include "blis.h"
|
||||
#endif
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#if defined(__x86_64__) || defined(_M_X64) || defined(__i386) || defined(_M_IX86)
|
||||
|
||||
#include "cpuid.h"
|
||||
|
||||
arch_t bli_cpuid_query_id( void )
|
||||
{
|
||||
uint32_t vendor, family, model, features;
|
||||
|
||||
@@ -125,7 +125,9 @@ static bool_t bli_cpuid_has_features( uint32_t have, uint32_t want )
|
||||
|
||||
#if defined(__x86_64__) || defined(_M_X64) || defined(__i386) || defined(_M_IX86)
|
||||
|
||||
#include "cpuid.h"
|
||||
// cpuid.h is now #included in bli_cpuid.c instead of here. See issue #393
|
||||
// for more information why this move was made.
|
||||
//#include "cpuid.h"
|
||||
|
||||
void get_cpu_name( char *cpu_name );
|
||||
int vpu_count( void );
|
||||
|
||||
Reference in New Issue
Block a user