Use extra #undef when including ba/ex API headers.

Details:
- Inserted a "#include bli_xapi_undef.h" after each usage of the basic
  and expert API macro setup headers: bli_oapi_ba.h, bli_oapi_ex.h,
  bli_tapi_ba.h, and bli_tapi_ex.h. This is functionally equivalent to
  the previous status quo, in which each header made minimal #undef
  prior to its own definitions and then a single instance of
  "#include bli_xapi_undef.h" cleaned up any remaining macro defs after
  all other headers were used. This commit will guarantee that macro
  defs from the setup of one header (say, bli_oapi_ex.h) don't "infect"
  the definitions made in a subsequent header. As with this previous
  commit, this change does not fix any issue but rather attempts to
  avoid creating orphaned macro definitions that are only needed within
  a very limited scope.
- Removed minimal #undef from bli_?api_[ba|ex].h.
- Removed old commented-out lines from bli_?api_[ba|ex].h.
This commit is contained in:
Field G. Van Zee
2021-05-13 15:23:22 -05:00
parent d4427a5b2f
commit b683d01b9c
11 changed files with 21 additions and 34 deletions

View File

@@ -41,20 +41,21 @@
// Prototype object APIs (expert and non-expert).
#include "bli_oapi_ex.h"
#include "bli_l1v_oapi.h"
#include "bli_xapi_undef.h"
#include "bli_oapi_ba.h"
#include "bli_l1v_oapi.h"
#include "bli_xapi_undef.h"
// Prototype typed APIs (expert and non-expert).
#include "bli_tapi_ex.h"
#include "bli_l1v_tapi.h"
#include "bli_l1v_ft.h"
#include "bli_xapi_undef.h"
#include "bli_tapi_ba.h"
#include "bli_l1v_tapi.h"
#include "bli_l1v_ft.h"
// Clean up temporary macro defs from bli_?api_[ba|ex].h.
#include "bli_xapi_undef.h"
// Generate function pointer arrays for tapi functions (expert only).

View File

@@ -37,20 +37,21 @@
// Prototype object APIs (expert and non-expert).
#include "bli_oapi_ex.h"
#include "bli_l1d_oapi.h"
#include "bli_xapi_undef.h"
#include "bli_oapi_ba.h"
#include "bli_l1d_oapi.h"
#include "bli_xapi_undef.h"
// Prototype typed APIs (expert and non-expert).
#include "bli_tapi_ex.h"
#include "bli_l1d_tapi.h"
#include "bli_l1d_ft.h"
#include "bli_xapi_undef.h"
#include "bli_tapi_ba.h"
#include "bli_l1d_tapi.h"
#include "bli_l1d_ft.h"
// Clean up temporary macro defs from bli_?api_[ba|ex].h.
#include "bli_xapi_undef.h"
// Generate function pointer arrays for tapi functions (expert only).

View File

@@ -40,20 +40,21 @@
// Prototype object APIs (expert and non-expert).
#include "bli_oapi_ex.h"
#include "bli_l1f_oapi.h"
#include "bli_xapi_undef.h"
#include "bli_oapi_ba.h"
#include "bli_l1f_oapi.h"
#include "bli_xapi_undef.h"
// Prototype typed APIs (expert and non-expert).
#include "bli_tapi_ex.h"
#include "bli_l1f_tapi.h"
#include "bli_l1f_ft.h"
#include "bli_xapi_undef.h"
#include "bli_tapi_ba.h"
#include "bli_l1f_tapi.h"
#include "bli_l1f_ft.h"
// Clean up temporary macro defs from bli_?api_[ba|ex].h.
#include "bli_xapi_undef.h"
// Generate function pointer arrays for tapi functions (expert only).

View File

@@ -43,20 +43,21 @@
// Prototype object APIs (expert and non-expert).
#include "bli_oapi_ex.h"
#include "bli_l1m_oapi.h"
#include "bli_xapi_undef.h"
#include "bli_oapi_ba.h"
#include "bli_l1m_oapi.h"
#include "bli_xapi_undef.h"
// Prototype typed APIs (expert and non-expert).
#include "bli_tapi_ex.h"
#include "bli_l1m_tapi.h"
#include "bli_l1m_ft.h"
#include "bli_xapi_undef.h"
#include "bli_tapi_ba.h"
#include "bli_l1m_tapi.h"
#include "bli_l1m_ft.h"
// Clean up temporary macro defs from bli_?api_[ba|ex].h.
#include "bli_xapi_undef.h"
// Generate function pointer arrays for tapi functions (expert only).

View File

@@ -40,20 +40,21 @@
// Prototype object APIs (expert and non-expert).
#include "bli_oapi_ex.h"
#include "bli_l2_oapi.h"
#include "bli_xapi_undef.h"
#include "bli_oapi_ba.h"
#include "bli_l2_oapi.h"
#include "bli_xapi_undef.h"
// Prototype typed APIs (expert and non-expert).
#include "bli_tapi_ex.h"
#include "bli_l2_tapi.h"
#include "bli_l2_ft.h"
#include "bli_xapi_undef.h"
#include "bli_tapi_ba.h"
#include "bli_l2_tapi.h"
#include "bli_l2_ft.h"
// Clean up temporary macro defs from bli_?api_[ba|ex].h.
#include "bli_xapi_undef.h"
// Generate function pointer arrays for tapi functions (expert only).

View File

@@ -50,18 +50,19 @@
// Prototype object APIs (expert and non-expert).
#include "bli_oapi_ex.h"
#include "bli_l3_oapi.h"
#include "bli_xapi_undef.h"
#include "bli_oapi_ba.h"
#include "bli_l3_oapi.h"
#include "bli_xapi_undef.h"
// Prototype typed APIs (expert and non-expert).
#include "bli_tapi_ex.h"
#include "bli_l3_tapi.h"
#include "bli_xapi_undef.h"
#include "bli_tapi_ba.h"
#include "bli_l3_tapi.h"
// Clean up temporary macro defs from bli_?api_[ba|ex].h.
#include "bli_xapi_undef.h"
// Define function types for small/unpacked handlers/kernels.

View File

@@ -37,7 +37,6 @@
// Define a macro that allows the source code to determine which interface
// (basic or expert) we are compiling.
#undef BLIS_OAPI_EXPERT
#undef BLIS_OAPI_BASIC
#define BLIS_OAPI_BASIC
@@ -58,7 +57,3 @@
#define BLIS_OAPI_EX_DECLS cntx_t* cntx = NULL; ( void )cntx; \
rntm_t* rntm = NULL; ( void )rntm;
// Define the macro to pass the local expert variables to another function.
//#undef BLIS_TAPI_EX_VARS
//#define BLIS_TAPI_EX_VARS

View File

@@ -37,7 +37,6 @@
// Define a macro that allows the source code to determine which interface
// (basic or expert) we are compiling.
#undef BLIS_OAPI_BASIC
#undef BLIS_OAPI_EXPERT
#define BLIS_OAPI_EXPERT
@@ -56,7 +55,3 @@
#undef BLIS_OAPI_EX_DECLS
#define BLIS_OAPI_EX_DECLS
// Define the macro to pass the local expert variables to another function.
//#undef BLIS_TAPI_EX_VARS
//#define BLIS_TAPI_EX_VARS ,cntx, rntm

View File

@@ -37,7 +37,6 @@
// Define a macro that allows the source code to determine which interface
// (basic or expert) we are compiling.
#undef BLIS_TAPI_EXPERT
#undef BLIS_TAPI_BASIC
#define BLIS_TAPI_BASIC
@@ -58,7 +57,3 @@
#define BLIS_TAPI_EX_DECLS cntx_t* cntx = NULL; ( void )cntx; \
rntm_t* rntm = NULL; ( void )rntm;
// Define the macro to pass the local expert variables to another function.
//#undef BLIS_TAPI_EX_VARS
//#define BLIS_TAPI_EX_VARS

View File

@@ -37,7 +37,6 @@
// Define a macro that allows the source code to determine which interface
// (basic or expert) we are compiling.
#undef BLIS_TAPI_BASIC
#undef BLIS_TAPI_EXPERT
#define BLIS_TAPI_EXPERT
@@ -56,7 +55,3 @@
#undef BLIS_TAPI_EX_DECLS
#define BLIS_TAPI_EX_DECLS
// Define the macro to pass the local expert variables to another function.
//#undef BLIS_TAPI_EX_VARS
//#define BLIS_TAPI_EX_VARS ,cntx, rntm

View File

@@ -37,20 +37,21 @@
// Prototype object APIs (expert and non-expert).
#include "bli_oapi_ex.h"
#include "bli_util_oapi.h"
#include "bli_xapi_undef.h"
#include "bli_oapi_ba.h"
#include "bli_util_oapi.h"
#include "bli_xapi_undef.h"
// Prototype typed APIs (expert and non-expert).
#include "bli_tapi_ex.h"
#include "bli_util_tapi.h"
#include "bli_util_ft.h"
#include "bli_xapi_undef.h"
#include "bli_tapi_ba.h"
#include "bli_util_tapi.h"
#include "bli_util_ft.h"
// Clean up temporary macro defs from bli_?api_[ba|ex].h.
#include "bli_xapi_undef.h"
// Generate function pointer arrays for tapi functions (expert only).