Replaced function chooser macros w/ func ptr arrays.

Details:
- Previously, most object API functions (_oapi.c) used a function
  chooser macro that would expand out to an if-elseif-elseif-else
  conditional that used a num_t datatype to call the appropriate
  type-specific API (_tapi.c). This always felt a little hackish, and
  would get in the way somewhat of addig support for new num_t datatypes
  in the future. So, I've replaced that functionality with code that
  queries a function pointer that is then typecast appropriately. This
  model of function calling was already pervasive for kernels queried
  from the cntx_t structure. It was also already in use in various other
  functions, such as macrokernels, and this commit simply extends that
  pattern.
- The above change required many new files, mostly header files, that
  define the function types (mostly _ft.h) for the queriable functions
  as well as some source files to define the function pointer arrays and
  their corresponding query functions (_fpa.c). Various other function
  types, mostly for kernel function types, were renamed to reduce the
  potential for confusion with the function types for expert and basic
  (non-expert) typed API functions.
- Removed definitions for all of the "bli_call_ft_*()" function chooser
  macros from bli_misc_macro_defs.h.
This commit is contained in:
Field G. Van Zee
2018-08-07 14:13:25 -05:00
parent addce08966
commit 017548314f
124 changed files with 3657 additions and 1105 deletions

View File

@@ -57,8 +57,8 @@ void PASTEMAC3(ch,opname,arch,suf) \
if ( PASTEMAC(ch,eq0)( *beta ) ) \
{ \
/* Query the context for the kernel function pointer. */ \
const num_t dt = PASTEMAC(ch,type); \
PASTECH(ch,copyv_ft) copyv_p = bli_cntx_get_l1v_ker_dt( dt, BLIS_COPYV_KER, cntx ); \
const num_t dt = PASTEMAC(ch,type); \
PASTECH(ch,copyv_ker_ft) copyv_p = bli_cntx_get_l1v_ker_dt( dt, BLIS_COPYV_KER, cntx ); \
\
copyv_p \
( \
@@ -74,8 +74,8 @@ void PASTEMAC3(ch,opname,arch,suf) \
else if ( PASTEMAC(ch,eq1)( *beta ) ) \
{ \
/* Query the context for the kernel function pointer. */ \
const num_t dt = PASTEMAC(ch,type); \
PASTECH(ch,addv_ft) addv_p = bli_cntx_get_l1v_ker_dt( dt, BLIS_ADDV_KER, cntx ); \
const num_t dt = PASTEMAC(ch,type); \
PASTECH(ch,addv_ker_ft) addv_p = bli_cntx_get_l1v_ker_dt( dt, BLIS_ADDV_KER, cntx ); \
\
addv_p \
( \