Skip to content

Commit

Permalink
cblas.h: Correct order of including other header files
Browse files Browse the repository at this point in the history
Include bli_config.h before bli_system.h in
./frame/compat/cblas/src/cblas.h so that BLIS_ENABLE_SYSTEM is
defined correctly before it is needed. This copies the change
to ./frame/include/blis.h made in 1f527a9 (via merge
c6f3340). Also standardize some comments and formatting
between blis.h and cblas.h

AMD-Internal: [CPUPL-4251]
Change-Id: Ie5cab646367f15003c25fa126344b02640d9106e
(cherry picked from commit 48444d4316f4191a31155443eb95adc962b422c5)
  • Loading branch information
edwsmyth committed Nov 24, 2023
1 parent e3e04f8 commit 8631ca9
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
25 changes: 24 additions & 1 deletion frame/compat/cblas/src/cblas.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,34 @@
// We need to #include "bli_type_defs.h" in order to pull in the
// definition of f77_int. But in order to #include that header, we
// also need to pull in the headers that precede it in blis.h.

// NOTE: PLEASE DON'T CHANGE THE ORDER IN WHICH HEADERS ARE INCLUDED UNLESS
// YOU ARE SURE THAT IT DOESN'T BREAK INTER-HEADER MACRO DEPENDENCIES.
// ALSO REMEMBER TO UPDATE ./frame/include/blis.h APPROPRIATELY

// -- configure definitions --

// NOTE: bli_config.h header must be included before any BLIS header.
// It is bootstrapped by ./configure and does not depend on later
// headers. Moreover, these configuration variables are necessary to change
// some default behaviors (e.g. disable OS-detection in bli_system.h in case
// of --disable-system).
#include "bli_config.h"

// -- System and language-related headers --

// NOTE: bli_system.h header must be included before bli_config_macro_defs.h.
#include "bli_system.h"
#include "bli_lang_defs.h"

#include "bli_config.h"

// -- configure default definitions --

#include "bli_config_macro_defs.h"


// -- Common BLIS definitions --

#include "bli_type_defs.h"

/*
Expand Down
1 change: 1 addition & 0 deletions frame/include/blis.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ extern "C" {

// NOTE: PLEASE DON'T CHANGE THE ORDER IN WHICH HEADERS ARE INCLUDED UNLESS
// YOU ARE SURE THAT IT DOESN'T BREAK INTER-HEADER MACRO DEPENDENCIES.
// ALSO REMEMBER TO UPDATE ./frame/compat/cblas/src/cblas.h APPROPRIATELY

// -- configure definitions --

Expand Down

0 comments on commit 8631ca9

Please sign in to comment.