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

@@ -36,6 +36,10 @@
#include "bli_l0_oapi.h"
#include "bli_l0_tapi.h"
#include "bli_l0_ft.h"
// Generate function pointer arrays for tapi functions.
#include "bli_l0_fpa.h"
// copysc
#include "bli_copysc.h"

75
frame/0/bli_l0_fpa.c Normal file
View File

@@ -0,0 +1,75 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2014, The University of Texas at Austin
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of The University of Texas at Austin nor the names
of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "blis.h"
//
// Define function pointer query interfaces.
//
#undef GENFRONT
#define GENFRONT( opname ) \
\
GENARRAY_FPA( void*, opname ); \
\
PASTECH(opname,_vft) PASTEMAC(opname,_qfp)( num_t dt ) \
{ \
return PASTECH(opname,_fpa)[ dt ]; \
}
GENFRONT( absqsc )
GENFRONT( normfsc )
GENFRONT( addsc )
GENFRONT( divsc )
GENFRONT( mulsc )
GENFRONT( subsc )
GENFRONT( invertsc )
GENFRONT( sqrtsc )
GENFRONT( unzipsc )
GENFRONT( zipsc )
#undef GENFRONT
#define GENFRONT( opname ) \
\
GENARRAY_FPA_I( void*, opname ); \
\
PASTECH(opname,_vft) PASTEMAC(opname,_qfp)( num_t dt ) \
{ \
return PASTECH(opname,_fpa)[ dt ]; \
}
GENFRONT( getsc )
GENFRONT( setsc )

58
frame/0/bli_l0_fpa.h Normal file
View File

@@ -0,0 +1,58 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2014, The University of Texas at Austin
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of The University of Texas at Austin nor the names
of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
//
// Prototype function pointer query interface.
//
#undef GENPROT
#define GENPROT( opname ) \
\
PASTECH(opname,_vft) \
PASTEMAC(opname,_qfp)( num_t dt );
GENPROT( absqsc )
GENPROT( normfsc )
GENPROT( addsc )
GENPROT( divsc )
GENPROT( mulsc )
GENPROT( subsc )
GENPROT( invertsc )
GENPROT( sqrtsc )
GENPROT( unzipsc )
GENPROT( zipsc )
GENPROT( getsc )
GENPROT( setsc )

178
frame/0/bli_l0_ft.h Normal file
View File

@@ -0,0 +1,178 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2014, The University of Texas at Austin
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of The University of Texas at Austin nor the names
of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
//
// -- Level-0 function types ---------------------------------------------------
//
// addsc, divsc, subsc
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
( \
conj_t conjchi, \
ctype* chi, \
ctype* psi \
);
INSERT_GENTDEF( addsc )
INSERT_GENTDEF( divsc )
INSERT_GENTDEF( subsc )
// invertsc
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
( \
conj_t conjchi, \
ctype* chi \
);
INSERT_GENTDEF( invertsc )
// mulsc
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
( \
conj_t conjchi, \
ctype* chi, \
ctype* psi \
);
INSERT_GENTDEF( mulsc )
// absqsc
#undef GENTDEFR
#define GENTDEFR( ctype, ctype_r, ch, chr, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
( \
ctype* chi, \
ctype_r* absq \
);
INSERT_GENTDEFR( absqsc )
// normfsc
#undef GENTDEFR
#define GENTDEFR( ctype, ctype_r, ch, chr, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
( \
ctype* chi, \
ctype_r* norm \
);
INSERT_GENTDEFR( normfsc )
// sqrtsc
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
( \
ctype* chi, \
ctype* psi \
);
INSERT_GENTDEF( sqrtsc )
// getsc
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
( \
ctype* chi, \
double* zeta_r, \
double* zeta_i \
);
INSERT_GENTDEF( getsc )
// setsc
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
( \
double zeta_r, \
double zeta_i, \
ctype* chi \
);
INSERT_GENTDEF( setsc )
// unzipsc
#undef GENTDEFR
#define GENTDEFR( ctype, ctype_r, ch, chr, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
( \
ctype* chi, \
ctype_r* zeta_r, \
ctype_r* zeta_i \
);
INSERT_GENTDEFR( unzipsc )
// zipsc
#undef GENTDEFR
#define GENTDEFR( ctype, ctype_r, ch, chr, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
( \
ctype_r* zeta_r, \
ctype_r* zeta_i, \
ctype* chi \
);
INSERT_GENTDEFR( zipsc )

View File

@@ -63,11 +63,12 @@ void PASTEMAC0(opname) \
within the chi object and extract the buffer at the chi offset. */ \
bli_obj_scalar_set_dt_buffer( chi, dt_absq_c, &dt_chi, &buf_chi ); \
\
/* Invoke the typed function. */ \
bli_call_ft_2 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH(opname,_vft) f = PASTEMAC(opname,_qfp)( dt_chi ); \
\
f \
( \
dt_chi, \
opname, \
buf_chi, \
buf_absq \
); \
@@ -98,11 +99,12 @@ void PASTEMAC0(opname) \
if ( bli_error_checking_is_enabled() ) \
PASTEMAC(opname,_check)( chi, psi ); \
\
/* Invoke the typed function. */ \
bli_call_ft_3 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH(opname,_vft) f = PASTEMAC(opname,_qfp)( dt ); \
\
f \
( \
dt, \
opname, \
conjchi, \
buf_chi, \
buf_psi \
@@ -134,11 +136,12 @@ void PASTEMAC0(opname) \
if ( bli_error_checking_is_enabled() ) \
PASTEMAC(opname,_check)( chi ); \
\
/* Invoke the typed function. */ \
bli_call_ft_2 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH(opname,_vft) f = PASTEMAC(opname,_qfp)( dt ); \
\
f \
( \
dt, \
opname, \
conjchi, \
buf_chi \
); \
@@ -166,11 +169,12 @@ void PASTEMAC0(opname) \
if ( bli_error_checking_is_enabled() ) \
PASTEMAC(opname,_check)( chi, psi ); \
\
/* Invoke the typed function. */ \
bli_call_ft_2 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH(opname,_vft) f = PASTEMAC(opname,_qfp)( dt ); \
\
f \
( \
dt, \
opname, \
buf_chi, \
buf_psi \
); \
@@ -208,11 +212,12 @@ void PASTEMAC0(opname) \
if ( bli_is_constant( dt_chi ) ) dt_use = dt_def; \
else dt_use = dt_chi; \
\
/* Invoke the typed function (with integer support). */ \
bli_call_ft_3i \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH(opname,_vft) f = PASTEMAC(opname,_qfp)( dt_use ); \
\
f \
( \
dt_use, \
opname, \
buf_chi, \
zeta_r, \
zeta_i \
@@ -241,11 +246,12 @@ void PASTEMAC0(opname) \
if ( bli_error_checking_is_enabled() ) \
PASTEMAC(opname,_check)( zeta_r, zeta_i, chi ); \
\
/* Invoke the typed function (with integer support). */ \
bli_call_ft_3i \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH(opname,_vft) f = PASTEMAC(opname,_qfp)( dt_chi ); \
\
f \
( \
dt_chi, \
opname, \
zeta_r, \
zeta_i, \
buf_chi \
@@ -283,11 +289,12 @@ void PASTEMAC0(opname) \
within the chi object and extract the buffer at the chi offset. */ \
bli_obj_scalar_set_dt_buffer( chi, dt_zeta_c, &dt_chi, &buf_chi ); \
\
/* Invoke the typed function. */ \
bli_call_ft_3 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH(opname,_vft) f = PASTEMAC(opname,_qfp)( dt_chi ); \
\
f \
( \
dt_chi, \
opname, \
buf_chi, \
buf_zeta_r, \
buf_zeta_i \
@@ -319,11 +326,12 @@ void PASTEMAC0(opname) \
if ( bli_error_checking_is_enabled() ) \
PASTEMAC(opname,_check)( chi, zeta_r, zeta_i ); \
\
/* Invoke the typed function. */ \
bli_call_ft_3 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH(opname,_vft) f = PASTEMAC(opname,_qfp)( dt_chi ); \
\
f \
( \
dt_chi, \
opname, \
buf_zeta_i, \
buf_zeta_r, \
buf_chi \

View File

@@ -34,19 +34,28 @@
#include "bli_l1v_check.h"
#include "bli_l1v_ft.h"
// Define kernel function types.
//#include "bli_l1v_ft_ex.h"
#include "bli_l1v_ft_ker.h"
// Prototype object APIs (expert and non-expert).
#include "bli_oapi_ex.h"
#include "bli_l1v_oapi.h"
#include "bli_oapi_ba.h"
#include "bli_l1v_oapi.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_tapi_ba.h"
#include "bli_l1v_tapi.h"
#include "bli_l1v_ft.h"
// Generate function pointer arrays for tapi functions (expert only).
#include "bli_l1v_fpa.h"
// Pack-related
// NOTE: packv and unpackv are temporarily disabled.
@@ -58,6 +67,3 @@
//#include "bli_scalv_cntl.h"
//#include "bli_scalv_int.h"
// Reference kernel headers
//#include "bli_l1v_ref.h"

68
frame/1/bli_l1v_fpa.c Normal file
View File

@@ -0,0 +1,68 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2014, The University of Texas at Austin
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of The University of Texas at Austin nor the names
of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "blis.h"
//
// Define function pointer query interfaces.
//
#undef GENFRONT
#define GENFRONT( opname ) \
\
GENARRAY_FPA( PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft), \
PASTECH(opname,BLIS_TAPI_EX_SUF) ); \
\
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( num_t dt ) \
{ \
return PASTECH2(opname,BLIS_TAPI_EX_SUF,_fpa)[ dt ]; \
}
GENFRONT( addv )
GENFRONT( copyv )
GENFRONT( subv )
GENFRONT( amaxv )
GENFRONT( axpbyv )
GENFRONT( axpyv )
GENFRONT( scal2v )
GENFRONT( dotv )
GENFRONT( dotxv )
GENFRONT( invertv )
GENFRONT( scalv )
GENFRONT( setv )
GENFRONT( swapv )
GENFRONT( xpbyv )

59
frame/1/bli_l1v_fpa.h Normal file
View File

@@ -0,0 +1,59 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2014, The University of Texas at Austin
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of The University of Texas at Austin nor the names
of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
//
// Prototype function pointer query interface.
//
#undef GENPROT
#define GENPROT( opname ) \
\
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( num_t dt );
GENPROT( addv )
GENPROT( copyv )
GENPROT( subv )
GENPROT( amaxv )
GENPROT( axpbyv )
GENPROT( axpyv )
GENPROT( scal2v )
GENPROT( dotv )
GENPROT( dotxv )
GENPROT( invertv )
GENPROT( scalv )
GENPROT( setv )
GENPROT( swapv )
GENPROT( xpbyv )

View File

@@ -32,9 +32,6 @@
*/
#ifndef BLIS_L1V_FT_H
#define BLIS_L1V_FT_H
//
// -- Level-1v function types --------------------------------------------------
@@ -45,13 +42,13 @@
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
conj_t conjx, \
dim_t n, \
ctype* restrict x, inc_t incx, \
ctype* restrict y, inc_t incy, \
cntx_t* cntx \
conj_t conjx, \
dim_t n, \
ctype* x, inc_t incx, \
ctype* y, inc_t incy \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( addv )
@@ -63,12 +60,12 @@ INSERT_GENTDEF( subv )
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
dim_t n, \
ctype* restrict x, inc_t incx, \
dim_t* restrict index, \
cntx_t* cntx \
dim_t n, \
ctype* x, inc_t incx, \
dim_t* index \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( amaxv )
@@ -78,15 +75,15 @@ INSERT_GENTDEF( amaxv )
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
conj_t conjx, \
dim_t n, \
ctype* restrict alpha, \
ctype* restrict x, inc_t incx, \
ctype* restrict beta, \
ctype* restrict y, inc_t incy, \
cntx_t* cntx \
conj_t conjx, \
dim_t n, \
ctype* alpha, \
ctype* x, inc_t incx, \
ctype* beta, \
ctype* y, inc_t incy \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( axpbyv )
@@ -96,14 +93,14 @@ INSERT_GENTDEF( axpbyv )
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
conj_t conjx, \
dim_t n, \
ctype* restrict alpha, \
ctype* restrict x, inc_t incx, \
ctype* restrict y, inc_t incy, \
cntx_t* cntx \
conj_t conjx, \
dim_t n, \
ctype* alpha, \
ctype* x, inc_t incx, \
ctype* y, inc_t incy \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( axpyv )
@@ -114,15 +111,15 @@ INSERT_GENTDEF( scal2v )
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
conj_t conjx, \
conj_t conjy, \
dim_t n, \
ctype* restrict x, inc_t incx, \
ctype* restrict y, inc_t incy, \
ctype* restrict rho, \
cntx_t* cntx \
conj_t conjx, \
conj_t conjy, \
dim_t n, \
ctype* x, inc_t incx, \
ctype* y, inc_t incy, \
ctype* rho \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( dotv )
@@ -132,17 +129,17 @@ INSERT_GENTDEF( dotv )
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
conj_t conjx, \
conj_t conjy, \
dim_t n, \
ctype* restrict alpha, \
ctype* restrict x, inc_t incx, \
ctype* restrict y, inc_t incy, \
ctype* restrict beta, \
ctype* restrict rho, \
cntx_t* cntx \
conj_t conjx, \
conj_t conjy, \
dim_t n, \
ctype* alpha, \
ctype* x, inc_t incx, \
ctype* y, inc_t incy, \
ctype* beta, \
ctype* rho \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( dotxv )
@@ -152,11 +149,11 @@ INSERT_GENTDEF( dotxv )
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
dim_t n, \
ctype* restrict x, inc_t incx, \
cntx_t* cntx \
dim_t n, \
ctype* x, inc_t incx \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( invertv )
@@ -166,13 +163,13 @@ INSERT_GENTDEF( invertv )
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
conj_t conjalpha, \
dim_t n, \
ctype* restrict alpha, \
ctype* restrict x, inc_t incx, \
cntx_t* cntx \
conj_t conjalpha, \
dim_t n, \
ctype* alpha, \
ctype* x, inc_t incx \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( scalv )
@@ -183,12 +180,12 @@ INSERT_GENTDEF( setv )
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
dim_t n, \
ctype* restrict x, inc_t incx, \
ctype* restrict y, inc_t incy, \
cntx_t* cntx \
dim_t n, \
ctype* x, inc_t incx, \
ctype* y, inc_t incy \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( swapv )
@@ -198,18 +195,16 @@ INSERT_GENTDEF( swapv )
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
conj_t conjx, \
dim_t n, \
ctype* restrict x, inc_t incx, \
ctype* restrict beta, \
ctype* restrict y, inc_t incy, \
cntx_t* cntx \
conj_t conjx, \
dim_t n, \
ctype* x, inc_t incx, \
ctype* beta, \
ctype* y, inc_t incy \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( xpbyv )
#endif

215
frame/1/bli_l1v_ft_ker.h Normal file
View File

@@ -0,0 +1,215 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2014, The University of Texas at Austin
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of The University of Texas at Austin nor the names
of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef BLIS_L1V_FT_KER_H
#define BLIS_L1V_FT_KER_H
//
// -- Level-1v kernel function types -------------------------------------------
//
// addv, copyv, subv
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,_ker,tsuf)) \
( \
conj_t conjx, \
dim_t n, \
ctype* restrict x, inc_t incx, \
ctype* restrict y, inc_t incy, \
cntx_t* cntx \
);
INSERT_GENTDEF( addv )
INSERT_GENTDEF( copyv )
INSERT_GENTDEF( subv )
// amaxv
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,_ker,tsuf)) \
( \
dim_t n, \
ctype* restrict x, inc_t incx, \
dim_t* restrict index, \
cntx_t* cntx \
);
INSERT_GENTDEF( amaxv )
// axpbyv
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,_ker,tsuf)) \
( \
conj_t conjx, \
dim_t n, \
ctype* restrict alpha, \
ctype* restrict x, inc_t incx, \
ctype* restrict beta, \
ctype* restrict y, inc_t incy, \
cntx_t* cntx \
);
INSERT_GENTDEF( axpbyv )
// axpyv, scal2v
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,_ker,tsuf)) \
( \
conj_t conjx, \
dim_t n, \
ctype* restrict alpha, \
ctype* restrict x, inc_t incx, \
ctype* restrict y, inc_t incy, \
cntx_t* cntx \
);
INSERT_GENTDEF( axpyv )
INSERT_GENTDEF( scal2v )
// dotv
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,_ker,tsuf)) \
( \
conj_t conjx, \
conj_t conjy, \
dim_t n, \
ctype* restrict x, inc_t incx, \
ctype* restrict y, inc_t incy, \
ctype* restrict rho, \
cntx_t* cntx \
);
INSERT_GENTDEF( dotv )
// dotxv
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,_ker,tsuf)) \
( \
conj_t conjx, \
conj_t conjy, \
dim_t n, \
ctype* restrict alpha, \
ctype* restrict x, inc_t incx, \
ctype* restrict y, inc_t incy, \
ctype* restrict beta, \
ctype* restrict rho, \
cntx_t* cntx \
);
INSERT_GENTDEF( dotxv )
// invertv
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,_ker,tsuf)) \
( \
dim_t n, \
ctype* restrict x, inc_t incx, \
cntx_t* cntx \
);
INSERT_GENTDEF( invertv )
// scalv, setv
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,_ker,tsuf)) \
( \
conj_t conjalpha, \
dim_t n, \
ctype* restrict alpha, \
ctype* restrict x, inc_t incx, \
cntx_t* cntx \
);
INSERT_GENTDEF( scalv )
INSERT_GENTDEF( setv )
// swapv
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,_ker,tsuf)) \
( \
dim_t n, \
ctype* restrict x, inc_t incx, \
ctype* restrict y, inc_t incy, \
cntx_t* cntx \
);
INSERT_GENTDEF( swapv )
// xpybv
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,_ker,tsuf)) \
( \
conj_t conjx, \
dim_t n, \
ctype* restrict x, inc_t incx, \
ctype* restrict beta, \
ctype* restrict y, inc_t incy, \
cntx_t* cntx \
);
INSERT_GENTDEF( xpbyv )
#endif

View File

@@ -66,17 +66,19 @@ void PASTEMAC(opname,EX_SUF) \
if ( bli_error_checking_is_enabled() ) \
PASTEMAC(opname,_check)( x, y ); \
\
/* Invoke the void pointer-based function. */ \
bli_call_ft_8 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
conjx, \
n, \
buf_x, inc_x, \
buf_y, inc_y, \
cntx, \
rntm \
conjx, \
n, \
buf_x, inc_x, \
buf_y, inc_y, \
cntx, \
rntm \
); \
}
@@ -110,11 +112,13 @@ void PASTEMAC(opname,EX_SUF) \
if ( bli_error_checking_is_enabled() ) \
PASTEMAC(opname,_check)( x, index ); \
\
/* Invoke the typed function. */ \
bli_call_ft_6 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
n, \
buf_x, incx, \
buf_index, \
@@ -169,11 +173,13 @@ void PASTEMAC(opname,EX_SUF) \
buf_alpha = bli_obj_buffer_for_1x1( dt, &alpha_local ); \
buf_beta = bli_obj_buffer_for_1x1( dt, &beta_local ); \
\
/* Invoke the void pointer-based function. */ \
bli_call_ft_10 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
conjx, \
n, \
buf_alpha, \
@@ -225,11 +231,13 @@ void PASTEMAC(opname,EX_SUF) \
alpha, &alpha_local ); \
buf_alpha = bli_obj_buffer_for_1x1( dt, &alpha_local ); \
\
/* Invoke the void pointer-based function. */ \
bli_call_ft_9 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
conjx, \
n, \
buf_alpha, \
@@ -273,11 +281,13 @@ void PASTEMAC(opname,EX_SUF) \
if ( bli_error_checking_is_enabled() ) \
PASTEMAC(opname,_check)( x, y, rho ); \
\
/* Invoke the void pointer-based function. */ \
bli_call_ft_10 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
conjx, \
conjy, \
n, \
@@ -338,11 +348,13 @@ void PASTEMAC(opname,EX_SUF) \
buf_alpha = bli_obj_buffer_for_1x1( dt, &alpha_local ); \
buf_beta = bli_obj_buffer_for_1x1( dt, &beta_local ); \
\
/* Invoke the void pointer-based function. */ \
bli_call_ft_12 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
conjx, \
conjy, \
n, \
@@ -381,11 +393,13 @@ void PASTEMAC(opname,EX_SUF) \
if ( bli_error_checking_is_enabled() ) \
PASTEMAC(opname,_check)( x ); \
\
/* Invoke the void pointer-based function. */ \
bli_call_ft_5 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
n, \
buf_x, inc_x, \
cntx, \
@@ -430,11 +444,13 @@ void PASTEMAC(opname,EX_SUF) \
alpha, &alpha_local ); \
buf_alpha = bli_obj_buffer_for_1x1( dt, &alpha_local ); \
\
/* Invoke the void pointer-based function. */ \
bli_call_ft_7 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
BLIS_NO_CONJUGATE, /* internal conjugation applied during copy-cast. */ \
n, \
buf_alpha, \
@@ -473,11 +489,13 @@ void PASTEMAC(opname,EX_SUF) \
if ( bli_error_checking_is_enabled() ) \
PASTEMAC(opname,_check)( x, y ); \
\
/* Invoke the void pointer-based function. */ \
bli_call_ft_7 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
n, \
buf_x, inc_x, \
buf_y, inc_y, \
@@ -526,11 +544,13 @@ void PASTEMAC(opname,EX_SUF) \
beta, &beta_local ); \
buf_beta = bli_obj_buffer_for_1x1( dt, &beta_local ); \
\
/* Invoke the void pointer-based function. */ \
bli_call_ft_9 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
conjx, \
n, \
buf_x, inc_x, \

View File

@@ -61,7 +61,7 @@ void PASTEMAC2(ch,opname,EX_SUF) \
/* Obtain a valid context from the gks if necessary. */ \
if ( cntx == NULL ) cntx = bli_gks_query_cntx(); \
\
PASTECH2(ch,opname,_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
PASTECH2(ch,opname,_ker_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
\
f \
( \
@@ -98,7 +98,7 @@ void PASTEMAC2(ch,opname,EX_SUF) \
/* Obtain a valid context from the gks if necessary. */ \
if ( cntx == NULL ) cntx = bli_gks_query_cntx(); \
\
PASTECH2(ch,opname,_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
PASTECH2(ch,opname,_ker_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
\
f \
( \
@@ -135,7 +135,7 @@ void PASTEMAC2(ch,opname,EX_SUF) \
/* Obtain a valid context from the gks if necessary. */ \
if ( cntx == NULL ) cntx = bli_gks_query_cntx(); \
\
PASTECH2(ch,opname,_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
PASTECH2(ch,opname,_ker_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
\
f \
( \
@@ -175,7 +175,7 @@ void PASTEMAC2(ch,opname,EX_SUF) \
if ( cntx == NULL ) \
cntx = bli_gks_query_cntx(); \
\
PASTECH2(ch,opname,_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
PASTECH2(ch,opname,_ker_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
\
f \
( \
@@ -215,7 +215,7 @@ void PASTEMAC2(ch,opname,EX_SUF) \
/* Obtain a valid context from the gks if necessary. */ \
if ( cntx == NULL ) cntx = bli_gks_query_cntx(); \
\
PASTECH2(ch,opname,_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
PASTECH2(ch,opname,_ker_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
\
f \
( \
@@ -257,7 +257,7 @@ void PASTEMAC2(ch,opname,EX_SUF) \
/* Obtain a valid context from the gks if necessary. */ \
if ( cntx == NULL ) cntx = bli_gks_query_cntx(); \
\
PASTECH2(ch,opname,_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
PASTECH2(ch,opname,_ker_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
\
f \
( \
@@ -295,7 +295,7 @@ void PASTEMAC2(ch,opname,EX_SUF) \
/* Obtain a valid context from the gks if necessary. */ \
if ( cntx == NULL ) cntx = bli_gks_query_cntx(); \
\
PASTECH2(ch,opname,_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
PASTECH2(ch,opname,_ker_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
\
f \
( \
@@ -329,7 +329,7 @@ void PASTEMAC2(ch,opname,EX_SUF) \
/* Obtain a valid context from the gks if necessary. */ \
if ( cntx == NULL ) cntx = bli_gks_query_cntx(); \
\
PASTECH2(ch,opname,_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
PASTECH2(ch,opname,_ker_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
\
f \
( \
@@ -365,7 +365,7 @@ void PASTEMAC2(ch,opname,EX_SUF) \
/* Obtain a valid context from the gks if necessary. */ \
if ( cntx == NULL ) cntx = bli_gks_query_cntx(); \
\
PASTECH2(ch,opname,_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
PASTECH2(ch,opname,_ker_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
\
f \
( \
@@ -400,7 +400,7 @@ void PASTEMAC2(ch,opname,EX_SUF) \
/* Obtain a valid context from the gks if necessary. */ \
if ( cntx == NULL ) cntx = bli_gks_query_cntx(); \
\
PASTECH2(ch,opname,_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
PASTECH2(ch,opname,_ker_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
\
f \
( \

View File

@@ -35,7 +35,7 @@
struct packv_params_s
{
uint64_t size
packv_voft* var_func;
packv_var_oft* var_func;
bszid_t bmid;
pack_t pack_schema;
};

View File

@@ -59,10 +59,10 @@ void bli_packv_int
varnum_t n;
impl_t i;
#endif
packv_voft f;
packv_var_oft f;
// !!!
// DEFINE packv_voft type.
// DEFINE packv_var_oft type.
// !!!
// Check parameters.

View File

@@ -37,13 +37,19 @@
// Prototype object APIs (expert and non-expert).
#include "bli_oapi_ex.h"
#include "bli_l1d_oapi.h"
#include "bli_oapi_ba.h"
#include "bli_l1d_oapi.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_tapi_ba.h"
#include "bli_l1d_tapi.h"
#include "bli_l1d_ft.h"
// Generate function pointer arrays for tapi functions (expert only).
#include "bli_l1d_fpa.h"

View File

@@ -32,46 +32,31 @@
*/
#ifndef BLIS_L3_VAR_OFT_H
#define BLIS_L3_VAR_OFT_H
#include "blis.h"
//
// -- Level-3 variant function types -------------------------------------------
// Define function pointer query interfaces.
//
#undef GENTDEF
#define GENTDEF( opname ) \
#undef GENFRONT
#define GENFRONT( opname ) \
\
typedef void (*PASTECH(opname,_voft)) \
( \
obj_t* a, \
obj_t* b, \
obj_t* c, \
cntx_t* cntx, \
gemm_t* cntl, \
thrinfo_t* thread \
);
GENTDEF( gemm )
#undef GENTDEF
#define GENTDEF( opname ) \
GENARRAY_FPA( PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft), \
PASTECH(opname,BLIS_TAPI_EX_SUF) ); \
\
typedef void (*PASTECH(opname,_voft)) \
( \
obj_t* a, \
obj_t* b, \
obj_t* c, \
cntx_t* cntx, \
trsm_t* cntl, \
thrinfo_t* thread \
);
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( num_t dt ) \
{ \
return PASTECH2(opname,BLIS_TAPI_EX_SUF,_fpa)[ dt ]; \
}
GENTDEF( trsm )
#endif
GENFRONT( addd )
GENFRONT( copyd )
GENFRONT( subd )
GENFRONT( axpyd )
GENFRONT( scal2d )
GENFRONT( invertd )
GENFRONT( scald )
GENFRONT( setd )
GENFRONT( setid )

53
frame/1d/bli_l1d_fpa.h Normal file
View File

@@ -0,0 +1,53 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2014, The University of Texas at Austin
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of The University of Texas at Austin nor the names
of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
//
// Prototype function pointer query interface.
//
#undef GENPROT
#define GENPROT( opname ) \
\
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( num_t dt );
GENPROT( addd )
GENPROT( copyd )
GENPROT( subd )
GENPROT( axpyd )
GENPROT( scal2d )
GENPROT( invertd )
GENPROT( scald )
GENPROT( setd )
GENPROT( setid )

151
frame/1d/bli_l1d_ft.h Normal file
View File

@@ -0,0 +1,151 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2014, The University of Texas at Austin
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of The University of Texas at Austin nor the names
of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
//
// -- Level-1d function types --------------------------------------------------
//
// addd, copyd, subd
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
doff_t diagoffx, \
diag_t diagx, \
trans_t transx, \
dim_t m, \
dim_t n, \
ctype* x, inc_t rs_x, inc_t cs_x, \
ctype* y, inc_t rs_y, inc_t cs_y \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( addd )
INSERT_GENTDEF( copyd )
INSERT_GENTDEF( subd )
// axpyd, scal2d
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
doff_t diagoffx, \
diag_t diagx, \
trans_t transx, \
dim_t m, \
dim_t n, \
ctype* alpha, \
ctype* x, inc_t rs_x, inc_t cs_x, \
ctype* y, inc_t rs_y, inc_t cs_y \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( axpyd )
INSERT_GENTDEF( scal2d )
// axpyv, scal2v
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
conj_t conjx, \
dim_t n, \
ctype* alpha, \
ctype* x, inc_t incx, \
ctype* y, inc_t incy \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( axpyv )
INSERT_GENTDEF( scal2v )
// invertd
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
doff_t diagoffx, \
dim_t m, \
dim_t n, \
ctype* x, inc_t rs_x, inc_t cs_x \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( invertd )
// scald, setd
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
conj_t conjalpha, \
doff_t diagoffx, \
dim_t m, \
dim_t n, \
ctype* alpha, \
ctype* x, inc_t rs_x, inc_t cs_x \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( scald )
INSERT_GENTDEF( setd )
// setid
#undef GENTDEFR
#define GENTDEFR( ctype, ctype_r, ch, chr, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
doff_t diagoffx, \
dim_t m, \
dim_t n, \
ctype_r* alpha, \
ctype* x, inc_t rs_x, inc_t cs_x \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEFR( setid )

View File

@@ -71,11 +71,13 @@ void PASTEMAC(opname,EX_SUF) \
if ( bli_error_checking_is_enabled() ) \
PASTEMAC(opname,_check)( x, y ); \
\
/* Invoke the typed function. */ \
bli_call_ft_13 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
diagoffx, \
diagx, \
transx, \
@@ -135,11 +137,13 @@ void PASTEMAC(opname,EX_SUF) \
alpha, &alpha_local ); \
buf_alpha = bli_obj_buffer_for_1x1( dt, &alpha_local ); \
\
/* Invoke the typed function. */ \
bli_call_ft_14 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
diagoffx, \
diagx, \
transx, \
@@ -182,11 +186,13 @@ void PASTEMAC(opname,EX_SUF) \
if ( bli_error_checking_is_enabled() ) \
PASTEMAC(opname,_check)( x ); \
\
/* Invoke the void pointer-based function. */ \
bli_call_ft_8 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
diagoffx, \
m, \
n, \
@@ -236,11 +242,13 @@ void PASTEMAC(opname,EX_SUF) \
alpha, &alpha_local ); \
buf_alpha = bli_obj_buffer_for_1x1( dt, &alpha_local ); \
\
/* Invoke the typed function. */ \
bli_call_ft_10 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
BLIS_NO_CONJUGATE, /* internal conjugation applied during copy-cast. */ \
diagoffx, \
m, \
@@ -284,11 +292,13 @@ void PASTEMAC(opname,EX_SUF) \
if ( bli_error_checking_is_enabled() ) \
PASTEMAC(opname,_check)( alpha, x ); \
\
/* Invoke the typed function. */ \
bli_call_ft_9 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
diagoffx, \
m, \
n, \

View File

@@ -101,7 +101,7 @@ void PASTEMAC2(ch,opname,EX_SUF) \
if ( cntx == NULL ) cntx = bli_gks_query_cntx(); \
\
/* Query the context for the operation's kernel address. */ \
PASTECH2(ch,kername,_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
PASTECH2(ch,kername,_ker_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
\
/* Invoke the kernel with the appropriate parameters. */ \
f( \
@@ -180,7 +180,7 @@ void PASTEMAC2(ch,opname,EX_SUF) \
if ( cntx == NULL ) cntx = bli_gks_query_cntx(); \
\
/* Query the context for the operation's kernel address. */ \
PASTECH2(ch,kername,_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
PASTECH2(ch,kername,_ker_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
\
/* Invoke the kernel with the appropriate parameters. */ \
f( \
@@ -239,7 +239,7 @@ void PASTEMAC2(ch,opname,EX_SUF) \
if ( cntx == NULL ) cntx = bli_gks_query_cntx(); \
\
/* Query the context for the operation's kernel address. */ \
PASTECH2(ch,kername,_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
PASTECH2(ch,kername,_ker_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
\
/* Invoke the kernel with the appropriate parameters. */ \
f( \
@@ -296,7 +296,7 @@ void PASTEMAC2(ch,opname,EX_SUF) \
if ( cntx == NULL ) cntx = bli_gks_query_cntx(); \
\
/* Query the context for the operation's kernel address. */ \
PASTECH2(ch,kername,_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
PASTECH2(ch,kername,_ker_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
\
/* Invoke the kernel with the appropriate parameters. */ \
f( \
@@ -372,7 +372,7 @@ void PASTEMAC2(ch,opname,EX_SUF) \
if ( cntx == NULL ) cntx = bli_gks_query_cntx(); \
\
/* Query the context for the operation's kernel address. */ \
PASTECH2(chr,kername,_ft) f = bli_cntx_get_l1v_ker_dt( dt_r, kerid, cntx ); \
PASTECH2(chr,kername,_ker_ft) f = bli_cntx_get_l1v_ker_dt( dt_r, kerid, cntx ); \
\
/* Invoke the kernel with the appropriate parameters. */ \
f( \

View File

@@ -34,20 +34,25 @@
#include "bli_l1f_check.h"
#include "bli_l1f_ft.h"
// Define kernel function types.
#include "bli_l1f_ft_ker.h"
// Prototype object APIs (expert and non-expert).
#include "bli_oapi_ex.h"
#include "bli_l1f_oapi.h"
#include "bli_oapi_ba.h"
#include "bli_l1f_oapi.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_tapi_ba.h"
#include "bli_l1f_tapi.h"
#include "bli_l1f_ft.h"
// Reference kernel headers
//#include "bli_l1f_ref.h"
// Generate function pointer arrays for tapi functions (expert only).
#include "bli_l1f_fpa.h"

58
frame/1f/bli_l1f_fpa.c Normal file
View File

@@ -0,0 +1,58 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2014, The University of Texas at Austin
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of The University of Texas at Austin nor the names
of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "blis.h"
//
// Define function pointer query interfaces.
//
#undef GENFRONT
#define GENFRONT( opname ) \
\
GENARRAY_FPA( PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft), \
PASTECH(opname,BLIS_TAPI_EX_SUF) ); \
\
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( num_t dt ) \
{ \
return PASTECH2(opname,BLIS_TAPI_EX_SUF,_fpa)[ dt ]; \
}
GENFRONT( axpy2v )
GENFRONT( axpyf )
GENFRONT( dotaxpyv )
GENFRONT( dotxaxpyf )
GENFRONT( dotxf )

50
frame/1f/bli_l1f_fpa.h Normal file
View File

@@ -0,0 +1,50 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2014, The University of Texas at Austin
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of The University of Texas at Austin nor the names
of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
//
// Prototype function pointer query interface.
//
#undef GENPROT
#define GENPROT( opname ) \
\
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( num_t dt );
GENPROT( axpy2v )
GENPROT( axpyf )
GENPROT( dotaxpyv )
GENPROT( dotxaxpyf )
GENPROT( dotxf )

View File

@@ -32,9 +32,6 @@
*/
#ifndef BLIS_L1F_FT_H
#define BLIS_L1F_FT_H
//
// -- Level-1f function types --------------------------------------------------
@@ -45,17 +42,17 @@
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
conj_t conjx, \
conj_t conjy, \
dim_t n, \
ctype* restrict alpha1, \
ctype* restrict alpha2, \
ctype* restrict x, inc_t incx, \
ctype* restrict y, inc_t incy, \
ctype* restrict z, inc_t incz, \
cntx_t* cntx \
conj_t conjx, \
conj_t conjy, \
dim_t n, \
ctype* alpha1, \
ctype* alpha2, \
ctype* x, inc_t incx, \
ctype* y, inc_t incy, \
ctype* z, inc_t incz \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( axpy2v )
@@ -65,17 +62,17 @@ INSERT_GENTDEF( axpy2v )
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
conj_t conja, \
conj_t conjx, \
dim_t m, \
dim_t b_n, \
ctype* restrict alpha, \
ctype* restrict a, inc_t inca, inc_t lda, \
ctype* restrict x, inc_t incx, \
ctype* restrict y, inc_t incy, \
cntx_t* cntx \
conj_t conja, \
conj_t conjx, \
dim_t m, \
dim_t b_n, \
ctype* alpha, \
ctype* a, inc_t inca, inc_t lda, \
ctype* x, inc_t incx, \
ctype* y, inc_t incy \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( axpyf )
@@ -85,18 +82,18 @@ INSERT_GENTDEF( axpyf )
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
conj_t conjxt, \
conj_t conjx, \
conj_t conjy, \
dim_t m, \
ctype* restrict alpha, \
ctype* restrict x, inc_t incx, \
ctype* restrict y, inc_t incy, \
ctype* restrict rho, \
ctype* restrict z, inc_t incz, \
cntx_t* cntx \
conj_t conjxt, \
conj_t conjx, \
conj_t conjy, \
dim_t m, \
ctype* alpha, \
ctype* x, inc_t incx, \
ctype* y, inc_t incy, \
ctype* rho, \
ctype* z, inc_t incz \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( dotaxpyv )
@@ -106,18 +103,18 @@ INSERT_GENTDEF( dotaxpyv )
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
conj_t conjat, \
conj_t conjx, \
dim_t m, \
dim_t b_n, \
ctype* restrict alpha, \
ctype* restrict a, inc_t inca, inc_t lda, \
ctype* restrict x, inc_t incx, \
ctype* restrict beta, \
ctype* restrict y, inc_t incy, \
cntx_t* cntx \
conj_t conjat, \
conj_t conjx, \
dim_t m, \
dim_t b_n, \
ctype* alpha, \
ctype* a, inc_t inca, inc_t lda, \
ctype* x, inc_t incx, \
ctype* beta, \
ctype* y, inc_t incy \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( dotxf )
@@ -127,27 +124,24 @@ INSERT_GENTDEF( dotxf )
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
conj_t conjat, \
conj_t conja, \
conj_t conjw, \
conj_t conjx, \
dim_t m, \
dim_t b_n, \
ctype* restrict alpha, \
ctype* restrict a, inc_t inca, inc_t lda, \
ctype* restrict w, inc_t incw, \
ctype* restrict x, inc_t incx, \
ctype* restrict beta, \
ctype* restrict y, inc_t incy, \
ctype* restrict z, inc_t incz, \
cntx_t* cntx \
conj_t conjat, \
conj_t conja, \
conj_t conjw, \
conj_t conjx, \
dim_t m, \
dim_t b_n, \
ctype* alpha, \
ctype* a, inc_t inca, inc_t lda, \
ctype* w, inc_t incw, \
ctype* x, inc_t incx, \
ctype* beta, \
ctype* y, inc_t incy, \
ctype* z, inc_t incz \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( dotxaxpyf )
#endif

153
frame/1f/bli_l1f_ft_ker.h Normal file
View File

@@ -0,0 +1,153 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2014, The University of Texas at Austin
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of The University of Texas at Austin nor the names
of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef BLIS_L1F_FT_KER_H
#define BLIS_L1F_FT_KER_H
//
// -- Level-1f kernel function types -------------------------------------------
//
// axpy2v
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,_ker,tsuf)) \
( \
conj_t conjx, \
conj_t conjy, \
dim_t n, \
ctype* restrict alpha1, \
ctype* restrict alpha2, \
ctype* restrict x, inc_t incx, \
ctype* restrict y, inc_t incy, \
ctype* restrict z, inc_t incz, \
cntx_t* cntx \
);
INSERT_GENTDEF( axpy2v )
// axpyf
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,_ker,tsuf)) \
( \
conj_t conja, \
conj_t conjx, \
dim_t m, \
dim_t b_n, \
ctype* restrict alpha, \
ctype* restrict a, inc_t inca, inc_t lda, \
ctype* restrict x, inc_t incx, \
ctype* restrict y, inc_t incy, \
cntx_t* cntx \
);
INSERT_GENTDEF( axpyf )
// dotaxpyv
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,_ker,tsuf)) \
( \
conj_t conjxt, \
conj_t conjx, \
conj_t conjy, \
dim_t m, \
ctype* restrict alpha, \
ctype* restrict x, inc_t incx, \
ctype* restrict y, inc_t incy, \
ctype* restrict rho, \
ctype* restrict z, inc_t incz, \
cntx_t* cntx \
);
INSERT_GENTDEF( dotaxpyv )
// dotxf
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,_ker,tsuf)) \
( \
conj_t conjat, \
conj_t conjx, \
dim_t m, \
dim_t b_n, \
ctype* restrict alpha, \
ctype* restrict a, inc_t inca, inc_t lda, \
ctype* restrict x, inc_t incx, \
ctype* restrict beta, \
ctype* restrict y, inc_t incy, \
cntx_t* cntx \
);
INSERT_GENTDEF( dotxf )
// dotxaxpyf
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,_ker,tsuf)) \
( \
conj_t conjat, \
conj_t conja, \
conj_t conjw, \
conj_t conjx, \
dim_t m, \
dim_t b_n, \
ctype* restrict alpha, \
ctype* restrict a, inc_t inca, inc_t lda, \
ctype* restrict w, inc_t incw, \
ctype* restrict x, inc_t incx, \
ctype* restrict beta, \
ctype* restrict y, inc_t incy, \
ctype* restrict z, inc_t incz, \
cntx_t* cntx \
);
INSERT_GENTDEF( dotxaxpyf )
#endif

View File

@@ -87,11 +87,13 @@ void PASTEMAC(opname,EX_SUF) \
buf_alphax = bli_obj_buffer_for_1x1( dt, &alphax_local ); \
buf_alphay = bli_obj_buffer_for_1x1( dt, &alphay_local ); \
\
/* Invoke the void pointer-based function. */ \
bli_call_ft_13 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
conjx, \
conjy, \
n, \
@@ -154,11 +156,13 @@ void PASTEMAC(opname,EX_SUF) \
/* Support cases where matrix A requires a transposition. */ \
if ( bli_obj_has_trans( a ) ) { bli_swap_incs( &rs_a, &cs_a ); } \
\
/* Invoke the void pointer-based function. */ \
bli_call_ft_14 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
conja, \
conjx, \
m, \
@@ -220,11 +224,13 @@ void PASTEMAC(opname,EX_SUF) \
alpha, &alpha_local ); \
buf_alpha = bli_obj_buffer_for_1x1( dt, &alpha_local ); \
\
/* Invoke the void pointer-based function. */ \
bli_call_ft_14 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
conjxt, \
conjx, \
conjy, \
@@ -303,11 +309,13 @@ void PASTEMAC(opname,EX_SUF) \
/* Support cases where matrix A requires a transposition. */ \
if ( bli_obj_has_trans( a ) ) { bli_swap_incs( &rs_a, &cs_a ); } \
\
/* Invoke the void pointer-based function. */ \
bli_call_ft_21 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
conjat, \
conja, \
conjw, \
@@ -381,11 +389,13 @@ void PASTEMAC(opname,EX_SUF) \
/* Support cases where matrix A requires a transposition. */ \
if ( bli_obj_has_trans( a ) ) { bli_swap_incs( &rs_a, &cs_a ); } \
\
/* Invoke the void pointer-based function. */ \
bli_call_ft_15 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
conjat, \
conjx, \
m, \

View File

@@ -65,7 +65,7 @@ void PASTEMAC2(ch,opname,EX_SUF) \
/* Obtain a valid context from the gks if necessary. */ \
if ( cntx == NULL ) cntx = bli_gks_query_cntx(); \
\
PASTECH2(ch,opname,_ft) f = bli_cntx_get_l1f_ker_dt( dt, kerid, cntx ); \
PASTECH2(ch,opname,_ker_ft) f = bli_cntx_get_l1f_ker_dt( dt, kerid, cntx ); \
\
f \
( \
@@ -109,7 +109,7 @@ void PASTEMAC2(ch,opname,EX_SUF) \
/* Obtain a valid context from the gks if necessary. */ \
if ( cntx == NULL ) cntx = bli_gks_query_cntx(); \
\
PASTECH2(ch,opname,_ft) f = bli_cntx_get_l1f_ker_dt( dt, kerid, cntx ); \
PASTECH2(ch,opname,_ker_ft) f = bli_cntx_get_l1f_ker_dt( dt, kerid, cntx ); \
\
f \
( \
@@ -154,7 +154,7 @@ void PASTEMAC2(ch,opname,EX_SUF) \
/* Obtain a valid context from the gks if necessary. */ \
if ( cntx == NULL ) cntx = bli_gks_query_cntx(); \
\
PASTECH2(ch,opname,_ft) f = bli_cntx_get_l1f_ker_dt( dt, kerid, cntx ); \
PASTECH2(ch,opname,_ker_ft) f = bli_cntx_get_l1f_ker_dt( dt, kerid, cntx ); \
\
f \
( \
@@ -204,7 +204,7 @@ void PASTEMAC2(ch,opname,EX_SUF) \
/* Obtain a valid context from the gks if necessary. */ \
if ( cntx == NULL ) cntx = bli_gks_query_cntx(); \
\
PASTECH2(ch,opname,_ft) f = bli_cntx_get_l1f_ker_dt( dt, kerid, cntx ); \
PASTECH2(ch,opname,_ker_ft) f = bli_cntx_get_l1f_ker_dt( dt, kerid, cntx ); \
\
f \
( \
@@ -254,7 +254,7 @@ void PASTEMAC2(ch,opname,EX_SUF) \
/* Obtain a valid context from the gks if necessary. */ \
if ( cntx == NULL ) cntx = bli_gks_query_cntx(); \
\
PASTECH2(ch,opname,_ft) f = bli_cntx_get_l1f_ker_dt( dt, kerid, cntx ); \
PASTECH2(ch,opname,_ker_ft) f = bli_cntx_get_l1f_ker_dt( dt, kerid, cntx ); \
\
f \
( \

View File

@@ -34,21 +34,32 @@
#include "bli_l1m_check.h"
#include "bli_l1m_ft.h"
#include "bli_l1m_voft.h"
// Define kernel function types.
#include "bli_l1m_ft_ker.h"
// Define object function types for variants.
#include "bli_l1m_oft_var.h"
// Prototype object APIs (expert and non-expert).
#include "bli_oapi_ex.h"
#include "bli_l1m_oapi.h"
#include "bli_oapi_ba.h"
#include "bli_l1m_oapi.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_tapi_ba.h"
#include "bli_l1m_tapi.h"
#include "bli_l1m_ft.h"
// Generate function pointer arrays for tapi functions (expert only).
#include "bli_l1m_fpa.h"
// Prototype level-1m implementations.
#include "bli_l1m_unb_var1.h"
// Pack-related

60
frame/1m/bli_l1m_fpa.c Normal file
View File

@@ -0,0 +1,60 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2014, The University of Texas at Austin
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of The University of Texas at Austin nor the names
of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "blis.h"
//
// Define function pointer query interfaces.
//
#undef GENFRONT
#define GENFRONT( opname ) \
\
GENARRAY_FPA( PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft), \
PASTECH(opname,BLIS_TAPI_EX_SUF) ); \
\
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( num_t dt ) \
{ \
return PASTECH2(opname,BLIS_TAPI_EX_SUF,_fpa)[ dt ]; \
}
GENFRONT( addm )
GENFRONT( copym )
GENFRONT( subm )
GENFRONT( axpym )
GENFRONT( scal2m )
GENFRONT( scalm )
GENFRONT( setm )

52
frame/1m/bli_l1m_fpa.h Normal file
View File

@@ -0,0 +1,52 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2014, The University of Texas at Austin
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of The University of Texas at Austin nor the names
of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
//
// Prototype function pointer query interface.
//
#undef GENPROT
#define GENPROT( opname ) \
\
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( num_t dt );
GENPROT( addm )
GENPROT( copym )
GENPROT( subm )
GENPROT( axpym )
GENPROT( scal2m )
GENPROT( scalm )
GENPROT( setm )

View File

@@ -32,129 +32,112 @@
*/
#ifndef BLIS_L1M_FT_H
#define BLIS_L1M_FT_H
//
// -- Level-1m function types --------------------------------------------------
// -- Level-1v function types --------------------------------------------------
//
// packm
// NOTE: This is the function type for the structure-aware "kernel".
// addm, subm
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
struc_t strucc, \
doff_t diagoffc, \
diag_t diagc, \
uplo_t uploc, \
conj_t conjc, \
pack_t schema, \
bool_t invdiag, \
dim_t m_panel, \
dim_t n_panel, \
dim_t m_panel_max, \
dim_t n_panel_max, \
ctype* restrict kappa, \
ctype* restrict c, inc_t rs_c, inc_t cs_c, \
ctype* restrict p, inc_t rs_p, inc_t cs_p, \
inc_t is_p, \
cntx_t* cntx \
doff_t diagoffx, \
diag_t diagx, \
uplo_t uplox, \
trans_t transx, \
dim_t m, \
dim_t n, \
ctype* x, inc_t rs_x, inc_t cs_x, \
ctype* y, inc_t rs_y, inc_t cs_y \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( packm )
INSERT_GENTDEF( addm )
INSERT_GENTDEF( subm )
// NOTE: the following macros generate packm kernel function type definitions
// that are "ctyped" and void-typed, for each of the floating-point datatypes.
// However, we will only make use of the void-typed definitions because the
// functions such as bli_?packm_cxk() (currently) use arrays of function
// pointers to store and access the function pointers for various unrolling
// (register blocksize) values, and therefore they must all be of the same
// type (hence the use of void* for kappa, a, and p).
// packm_ker
// copym
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
conj_t conja, \
dim_t n, \
ctype* restrict kappa, \
ctype* restrict a, inc_t inca, inc_t lda, \
ctype* restrict p, inc_t ldp, \
cntx_t* restrict cntx \
doff_t diagoffx, \
diag_t diagx, \
uplo_t uplox, \
trans_t transx, \
dim_t m, \
dim_t n, \
ctype* x, inc_t rs_x, inc_t cs_x, \
ctype* y, inc_t rs_y, inc_t cs_y \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( packm_cxk_ker )
INSERT_GENTDEF( copym )
// unpackm_ker
// axpym
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
conj_t conjp, \
dim_t n, \
ctype* restrict kappa, \
ctype* restrict p, inc_t ldp, \
ctype* restrict a, inc_t inca, inc_t lda, \
cntx_t* restrict cntx \
doff_t diagoffx, \
diag_t diagx, \
uplo_t uplox, \
trans_t transx, \
dim_t m, \
dim_t n, \
ctype* alpha, \
ctype* x, inc_t rs_x, inc_t cs_x, \
ctype* y, inc_t rs_y, inc_t cs_y \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( unpackm_cxk_ker )
INSERT_GENTDEF( axpym )
// packm_3mis_ker
// packm_4mi_ker
// scal2m
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
conj_t conja, \
dim_t n, \
ctype* restrict kappa, \
ctype* restrict a, inc_t inca, inc_t lda, \
ctype* restrict p, inc_t is_p, inc_t ldp, \
cntx_t* restrict cntx \
doff_t diagoffx, \
diag_t diagx, \
uplo_t uplox, \
trans_t transx, \
dim_t m, \
dim_t n, \
ctype* alpha, \
ctype* x, inc_t rs_x, inc_t cs_x, \
ctype* y, inc_t rs_y, inc_t cs_y \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( packm_cxk_3mis_ker )
INSERT_GENTDEF( packm_cxk_4mi_ker )
INSERT_GENTDEF( scal2m )
// packm_rih_ker
// packm_1er_ker
// scalm, setm
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
conj_t conja, \
pack_t schema, \
dim_t n, \
ctype* restrict kappa, \
ctype* restrict a, inc_t inca, inc_t lda, \
ctype* restrict p, inc_t ldp, \
cntx_t* restrict cntx \
conj_t conjalpha, \
doff_t diagoffx, \
diag_t diagx, \
uplo_t uplox, \
dim_t m, \
dim_t n, \
ctype* alpha, \
ctype* x, inc_t rs_x, inc_t cs_x \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( packm_cxk_rih_ker )
INSERT_GENTDEF( packm_cxk_1er_ker )
#endif
INSERT_GENTDEF( scalm )
INSERT_GENTDEF( setm )

160
frame/1m/bli_l1m_ft_ker.h Normal file
View File

@@ -0,0 +1,160 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2014, The University of Texas at Austin
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of The University of Texas at Austin nor the names
of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef BLIS_L1M_FT_KER_H
#define BLIS_L1M_FT_KER_H
//
// -- Level-1m kernel function types -------------------------------------------
//
// packm
// NOTE: This is the function type for the structure-aware "kernel".
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,_ker,tsuf)) \
( \
struc_t strucc, \
doff_t diagoffc, \
diag_t diagc, \
uplo_t uploc, \
conj_t conjc, \
pack_t schema, \
bool_t invdiag, \
dim_t m_panel, \
dim_t n_panel, \
dim_t m_panel_max, \
dim_t n_panel_max, \
ctype* restrict kappa, \
ctype* restrict c, inc_t rs_c, inc_t cs_c, \
ctype* restrict p, inc_t rs_p, inc_t cs_p, \
inc_t is_p, \
cntx_t* cntx \
);
INSERT_GENTDEF( packm )
// NOTE: the following macros generate packm kernel function type definitions
// that are "ctyped" and void-typed, for each of the floating-point datatypes.
// However, we will only make use of the void-typed definitions because the
// functions such as bli_?packm_cxk() (currently) use arrays of function
// pointers to store and access the function pointers for various unrolling
// (register blocksize) values, and therefore they must all be of the same
// type (hence the use of void* for kappa, a, and p).
// packm_ker
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,_ker,tsuf)) \
( \
conj_t conja, \
dim_t n, \
ctype* restrict kappa, \
ctype* restrict a, inc_t inca, inc_t lda, \
ctype* restrict p, inc_t ldp, \
cntx_t* restrict cntx \
);
INSERT_GENTDEF( packm_cxk )
// unpackm_ker
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,_ker,tsuf)) \
( \
conj_t conjp, \
dim_t n, \
ctype* restrict kappa, \
ctype* restrict p, inc_t ldp, \
ctype* restrict a, inc_t inca, inc_t lda, \
cntx_t* restrict cntx \
);
INSERT_GENTDEF( unpackm_cxk )
// packm_3mis_ker
// packm_4mi_ker
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,_ker,tsuf)) \
( \
conj_t conja, \
dim_t n, \
ctype* restrict kappa, \
ctype* restrict a, inc_t inca, inc_t lda, \
ctype* restrict p, inc_t is_p, inc_t ldp, \
cntx_t* restrict cntx \
);
INSERT_GENTDEF( packm_cxk_3mis )
INSERT_GENTDEF( packm_cxk_4mi )
// packm_rih_ker
// packm_1er_ker
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,_ker,tsuf)) \
( \
conj_t conja, \
pack_t schema, \
dim_t n, \
ctype* restrict kappa, \
ctype* restrict a, inc_t inca, inc_t lda, \
ctype* restrict p, inc_t ldp, \
cntx_t* restrict cntx \
);
INSERT_GENTDEF( packm_cxk_rih )
INSERT_GENTDEF( packm_cxk_1er )
#endif

View File

@@ -72,11 +72,13 @@ void PASTEMAC(opname,EX_SUF) \
if ( bli_error_checking_is_enabled() ) \
PASTEMAC(opname,_check)( x, y ); \
\
/* Invoke the typed function. */ \
bli_call_ft_14 \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
diagoffx, \
diagx, \
uplox, \
@@ -138,11 +140,13 @@ void PASTEMAC(opname,EX_SUF) \
alpha, &alpha_local ); \
buf_alpha = bli_obj_buffer_for_1x1( dt, &alpha_local ); \
\
/* Invoke the typed function. */ \
bli_call_ft_15 \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
diagoffx, \
diagx, \
uplox, \
@@ -213,11 +217,13 @@ void PASTEMAC(opname,EX_SUF) \
attached to x. */ \
buf_alpha = bli_obj_internal_scalar_buffer( &x_local ); \
\
/* Invoke the typed function. */ \
bli_call_ft_12 \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
BLIS_NO_CONJUGATE, /* internal conjugation applied during copy-cast. */ \
diagoffx, \
diagx, \
@@ -273,11 +279,13 @@ void PASTEMAC(opname,EX_SUF) \
alpha, &alpha_local ); \
buf_alpha = bli_obj_buffer_for_1x1( dt, &alpha_local ); \
\
/* Invoke the typed function. */ \
bli_call_ft_12 \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
BLIS_NO_CONJUGATE, /* internal conjugation applied during copy-cast. */ \
diagoffx, \
diagx, \

View File

@@ -32,8 +32,8 @@
*/
#ifndef BLIS_L1M_VAR_OFT_H
#define BLIS_L1M_VAR_OFT_H
#ifndef BLIS_L1M_OFT_VAR_H
#define BLIS_L1M_OFT_VAR_H
//
@@ -43,7 +43,7 @@
#undef GENTDEF
#define GENTDEF( opname ) \
\
typedef void (*PASTECH(opname,_voft)) \
typedef void (*PASTECH(opname,_var_oft)) \
( \
obj_t* a, \
obj_t* p, \
@@ -58,7 +58,7 @@ GENTDEF( packm )
#undef GENTDEF
#define GENTDEF( opname ) \
\
typedef void (*PASTECH(opname,_voft)) \
typedef void (*PASTECH(opname,_var_oft)) \
( \
obj_t* p, \
obj_t* a, \

View File

@@ -83,7 +83,7 @@ void PASTEMAC(ch,opname) \
conjx = bli_extract_conj( transx ); \
\
/* Query the kernel needed for this operation. */ \
PASTECH2(ch,kername,_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
PASTECH2(ch,kername,_ker_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
\
/* Handle dense and upper/lower storage cases separately. */ \
if ( bli_is_dense( uplox_eff ) ) \
@@ -200,7 +200,7 @@ void PASTEMAC(ch,opname) \
conjx = bli_extract_conj( transx ); \
\
/* Query the kernel needed for this operation. */ \
PASTECH2(ch,kername,_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
PASTECH2(ch,kername,_ker_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
\
/* Handle dense and upper/lower storage cases separately. */ \
if ( bli_is_dense( uplox_eff ) ) \
@@ -312,7 +312,7 @@ void PASTEMAC(ch,opname) \
if ( bli_is_zeros( uplox_eff ) ) return; \
\
/* Query the kernel needed for this operation. */ \
PASTECH2(ch,kername,_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
PASTECH2(ch,kername,_ker_ft) f = bli_cntx_get_l1v_ker_dt( dt, kerid, cntx ); \
\
/* Handle dense and upper/lower storage cases separately. */ \
if ( bli_is_dense( uplox_eff ) ) \

View File

@@ -289,7 +289,7 @@ void PASTEMAC(ch,varname) \
thrinfo_t* thread \
) \
{ \
PASTECH2(ch,opname,_ft) packm_ker_cast = packm_ker; \
PASTECH2(ch,opname,_ker_ft) packm_ker_cast = packm_ker; \
\
ctype* restrict kappa_cast = kappa; \
ctype* restrict c_cast = c; \

View File

@@ -34,19 +34,19 @@
struct packm_params_s
{
uint64_t size; // size field must be present and come first.
packm_voft var_func;
bszid_t bmid_m;
bszid_t bmid_n;
bool_t does_invert_diag;
bool_t rev_iter_if_upper;
bool_t rev_iter_if_lower;
pack_t pack_schema;
packbuf_t pack_buf_type;
uint64_t size; // size field must be present and come first.
packm_var_oft var_func;
bszid_t bmid_m;
bszid_t bmid_n;
bool_t does_invert_diag;
bool_t rev_iter_if_upper;
bool_t rev_iter_if_lower;
pack_t pack_schema;
packbuf_t pack_buf_type;
};
typedef struct packm_params_s packm_params_t;
static packm_voft bli_cntl_packm_params_var_func( cntl_t* cntl )
static packm_var_oft bli_cntl_packm_params_var_func( cntl_t* cntl )
{
packm_params_t* ppp = ( packm_params_t* )cntl->params; return ppp->var_func;
}

View File

@@ -45,7 +45,7 @@ void bli_packm_int
{
bli_init_once();
packm_voft f;
packm_var_oft f;
// Check parameters.
if ( bli_error_checking_is_enabled() )

View File

@@ -34,8 +34,8 @@
struct unpackm_params_s
{
uint64_t size; // size field must be present and come first.
unpackm_voft var_func;
uint64_t size; // size field must be present and come first.
unpackm_var_oft var_func;
};
typedef struct unpackm_params_s unpackm_params_t;

View File

@@ -45,7 +45,7 @@ void bli_unpackm_int
{
bli_init_once();
unpackm_voft f;
unpackm_var_oft f;
// Check parameters.
if ( bli_error_checking_is_enabled() )

View File

@@ -34,19 +34,27 @@
#include "bli_l2_check.h"
#include "bli_l2_ft.h"
// Define function types.
#include "bli_l2_ft_unb.h"
// Prototype object APIs (expert and non-expert).
#include "bli_oapi_ex.h"
#include "bli_l2_oapi.h"
#include "bli_oapi_ba.h"
#include "bli_l2_oapi.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_tapi_ba.h"
#include "bli_l2_tapi.h"
#include "bli_l2_ft.h"
// Generate function pointer arrays for tapi functions (expert only).
#include "bli_l2_fpa.h"
// Operation-specific headers
#include "bli_gemv.h"
@@ -59,3 +67,4 @@
#include "bli_syr2.h"
#include "bli_trmv.h"
#include "bli_trsv.h"

116
frame/2/bli_l2_fpa.c Normal file
View File

@@ -0,0 +1,116 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2014, The University of Texas at Austin
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of The University of Texas at Austin nor the names
of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "blis.h"
//
// Define function pointer query interfaces.
//
#undef GENFRONT
#define GENFRONT( opname ) \
\
GENARRAY_FPA( PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft), \
PASTECH(opname,BLIS_TAPI_EX_SUF) ); \
\
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( num_t dt ) \
{ \
return PASTECH2(opname,BLIS_TAPI_EX_SUF,_fpa)[ dt ]; \
}
GENFRONT( gemv )
GENFRONT( ger )
GENFRONT( hemv )
GENFRONT( symv )
GENFRONT( her )
GENFRONT( syr )
GENFRONT( her2 )
GENFRONT( syr2 )
GENFRONT( trmv )
GENFRONT( trsv )
//
// Define function pointer query interfaces for level-2 implementations.
//
#undef GENFRONT
#define GENFRONT( opname, varname ) \
\
GENARRAY_FPA( PASTECH2(opname,_unb,_vft), \
varname ); \
\
PASTECH2(opname,_unb,_vft) \
PASTEMAC(varname,_qfp)( num_t dt ) \
{ \
return PASTECH(varname,_fpa)[ dt ]; \
}
GENFRONT( gemv, gemv_unb_var1 )
GENFRONT( gemv, gemv_unb_var2 )
GENFRONT( gemv, gemv_unf_var1 )
GENFRONT( gemv, gemv_unf_var2 )
GENFRONT( ger, ger_unb_var1 )
GENFRONT( ger, ger_unb_var2 )
GENFRONT( hemv, hemv_unb_var1 )
GENFRONT( hemv, hemv_unb_var2 )
GENFRONT( hemv, hemv_unb_var3 )
GENFRONT( hemv, hemv_unb_var4 )
GENFRONT( hemv, hemv_unf_var1 )
GENFRONT( hemv, hemv_unf_var3 )
GENFRONT( hemv, hemv_unf_var1a )
GENFRONT( hemv, hemv_unf_var3a )
GENFRONT( her, her_unb_var1 )
GENFRONT( her, her_unb_var2 )
GENFRONT( her2, her2_unb_var1 )
GENFRONT( her2, her2_unb_var2 )
GENFRONT( her2, her2_unb_var3 )
GENFRONT( her2, her2_unb_var4 )
GENFRONT( her2, her2_unf_var1 )
GENFRONT( her2, her2_unf_var4 )
GENFRONT( trmv, trmv_unb_var1 )
GENFRONT( trmv, trmv_unb_var2 )
GENFRONT( trmv, trmv_unf_var1 )
GENFRONT( trmv, trmv_unf_var2 )
GENFRONT( trsv, trsv_unb_var1 )
GENFRONT( trsv, trsv_unb_var2 )
GENFRONT( trsv, trsv_unf_var1 )
GENFRONT( trsv, trsv_unf_var2 )

102
frame/2/bli_l2_fpa.h Normal file
View File

@@ -0,0 +1,102 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2014, The University of Texas at Austin
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of The University of Texas at Austin nor the names
of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
//
// Prototype function pointer query interface.
//
#undef GENPROT
#define GENPROT( opname ) \
\
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( num_t dt );
GENPROT( gemv )
GENPROT( ger )
GENPROT( hemv )
GENPROT( symv )
GENPROT( her )
GENPROT( syr )
GENPROT( her2 )
GENPROT( syr2 )
GENPROT( trmv )
GENPROT( trsv )
//
// Prototype function pointer query interfaces for level-2 implementations.
//
#undef GENPROT
#define GENPROT( opname, varname ) \
\
PASTECH2(opname,_unb,_vft) \
PASTEMAC(varname,_qfp)( num_t dt );
GENPROT( gemv, gemv_unb_var1 )
GENPROT( gemv, gemv_unb_var2 )
GENPROT( gemv, gemv_unf_var1 )
GENPROT( gemv, gemv_unf_var2 )
GENPROT( ger, ger_unb_var1 )
GENPROT( ger, ger_unb_var2 )
GENPROT( hemv, hemv_unb_var1 )
GENPROT( hemv, hemv_unb_var2 )
GENPROT( hemv, hemv_unb_var3 )
GENPROT( hemv, hemv_unb_var4 )
GENPROT( hemv, hemv_unf_var1 )
GENPROT( hemv, hemv_unf_var3 )
GENPROT( hemv, hemv_unf_var1a )
GENPROT( hemv, hemv_unf_var3a )
GENPROT( her, her_unb_var1 )
GENPROT( her, her_unb_var2 )
GENPROT( her2, her2_unb_var1 )
GENPROT( her2, her2_unb_var2 )
GENPROT( her2, her2_unb_var3 )
GENPROT( her2, her2_unb_var4 )
GENPROT( her2, her2_unf_var1 )
GENPROT( her2, her2_unf_var4 )
GENPROT( trmv, trmv_unb_var1 )
GENPROT( trmv, trmv_unb_var2 )
GENPROT( trmv, trmv_unf_var1 )
GENPROT( trmv, trmv_unf_var2 )
GENPROT( trsv, trsv_unb_var1 )
GENPROT( trsv, trsv_unb_var2 )
GENPROT( trsv, trsv_unf_var1 )
GENPROT( trsv, trsv_unf_var2 )

View File

@@ -32,9 +32,6 @@
*/
#ifndef BLIS_L2_FT_H
#define BLIS_L2_FT_H
//
// -- Level-2 function types ---------------------------------------------------
@@ -45,7 +42,7 @@
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
trans_t transa, \
conj_t conjx, \
@@ -55,8 +52,8 @@ typedef void (*PASTECH2(ch,opname,tsuf)) \
ctype* a, inc_t rs_a, inc_t cs_a, \
ctype* x, inc_t incx, \
ctype* beta, \
ctype* y, inc_t incy, \
cntx_t* cntx \
ctype* y, inc_t incy \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( gemv )
@@ -66,7 +63,7 @@ INSERT_GENTDEF( gemv )
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
conj_t conjx, \
conj_t conjy, \
@@ -75,80 +72,97 @@ typedef void (*PASTECH2(ch,opname,tsuf)) \
ctype* alpha, \
ctype* x, inc_t incx, \
ctype* y, inc_t incy, \
ctype* a, inc_t rs_a, inc_t cs_a, \
cntx_t* cntx \
ctype* a, inc_t rs_a, inc_t cs_a \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( ger )
// hemv (and symv)
// hemv, symv
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
uplo_t uploa, \
conj_t conja, \
conj_t conjx, \
conj_t conjh, \
dim_t m, \
ctype* alpha, \
ctype* a, inc_t rs_a, inc_t cs_a, \
ctype* x, inc_t incx, \
ctype* beta, \
ctype* y, inc_t incy, \
cntx_t* cntx \
ctype* y, inc_t incy \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( hemv )
INSERT_GENTDEF( symv )
// her (and syr)
// her
#undef GENTDEFR
#define GENTDEFR( ctype, ctype_r, ch, chr, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
uplo_t uploa, \
conj_t conjx, \
conj_t conjh, \
dim_t m, \
ctype* alpha, /* complex alpha allows her variants to also perform syr. */ \
ctype_r* alpha, \
ctype* x, inc_t incx, \
ctype* a, inc_t rs_a, inc_t cs_a, \
cntx_t* cntx \
ctype* a, inc_t rs_a, inc_t cs_a \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEFR( her )
// her2 (and syr2)
// syr
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
uplo_t uploa, \
conj_t conjx, \
dim_t m, \
ctype* alpha, \
ctype* x, inc_t incx, \
ctype* a, inc_t rs_a, inc_t cs_a \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( syr )
// her2, syr2
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
uplo_t uploa, \
conj_t conjx, \
conj_t conjy, \
conj_t conjh, \
dim_t m, \
ctype* alpha, \
ctype* x, inc_t incx, \
ctype* y, inc_t incy, \
ctype* a, inc_t rs_a, inc_t cs_a, \
cntx_t* cntx \
ctype* a, inc_t rs_a, inc_t cs_a \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( her2 )
INSERT_GENTDEF( syr2 )
// trmv (and trsv)
// trmv, trsv
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
typedef void (*PASTECH3(ch,opname,EX_SUF,tsuf)) \
( \
uplo_t uploa, \
trans_t transa, \
@@ -156,11 +170,10 @@ typedef void (*PASTECH2(ch,opname,tsuf)) \
dim_t m, \
ctype* alpha, \
ctype* a, inc_t rs_a, inc_t cs_a, \
ctype* x, inc_t incx, \
cntx_t* cntx \
ctype* x, inc_t incx \
BLIS_TAPI_EX_PARAMS \
);
INSERT_GENTDEF( trmv )
INSERT_GENTDEF( trsv )
#endif

167
frame/2/bli_l2_ft_unb.h Normal file
View File

@@ -0,0 +1,167 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2014, The University of Texas at Austin
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of The University of Texas at Austin nor the names
of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef BLIS_L2_FT_UNB_H
#define BLIS_L2_FT_UNB_H
//
// -- Level-2 function types ---------------------------------------------------
//
// gemv
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,_unb,tsuf)) \
( \
trans_t transa, \
conj_t conjx, \
dim_t m, \
dim_t n, \
ctype* alpha, \
ctype* a, inc_t rs_a, inc_t cs_a, \
ctype* x, inc_t incx, \
ctype* beta, \
ctype* y, inc_t incy, \
cntx_t* cntx \
);
INSERT_GENTDEF( gemv )
// ger
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,_unb,tsuf)) \
( \
conj_t conjx, \
conj_t conjy, \
dim_t m, \
dim_t n, \
ctype* alpha, \
ctype* x, inc_t incx, \
ctype* y, inc_t incy, \
ctype* a, inc_t rs_a, inc_t cs_a, \
cntx_t* cntx \
);
INSERT_GENTDEF( ger )
// hemv (and symv)
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,_unb,tsuf)) \
( \
uplo_t uploa, \
conj_t conja, \
conj_t conjx, \
conj_t conjh, \
dim_t m, \
ctype* alpha, \
ctype* a, inc_t rs_a, inc_t cs_a, \
ctype* x, inc_t incx, \
ctype* beta, \
ctype* y, inc_t incy, \
cntx_t* cntx \
);
INSERT_GENTDEF( hemv )
// her (and syr)
#undef GENTDEFR
#define GENTDEFR( ctype, ctype_r, ch, chr, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,_unb,tsuf)) \
( \
uplo_t uploa, \
conj_t conjx, \
conj_t conjh, \
dim_t m, \
ctype* alpha, /* complex alpha allows her variants to also perform syr. */ \
ctype* x, inc_t incx, \
ctype* a, inc_t rs_a, inc_t cs_a, \
cntx_t* cntx \
);
INSERT_GENTDEFR( her )
// her2 (and syr2)
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,_unb,tsuf)) \
( \
uplo_t uploa, \
conj_t conjx, \
conj_t conjy, \
conj_t conjh, \
dim_t m, \
ctype* alpha, \
ctype* x, inc_t incx, \
ctype* y, inc_t incy, \
ctype* a, inc_t rs_a, inc_t cs_a, \
cntx_t* cntx \
);
INSERT_GENTDEF( her2 )
// trmv (and trsv)
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,_unb,tsuf)) \
( \
uplo_t uploa, \
trans_t transa, \
diag_t diaga, \
dim_t m, \
ctype* alpha, \
ctype* a, inc_t rs_a, inc_t cs_a, \
ctype* x, inc_t incx, \
cntx_t* cntx \
);
INSERT_GENTDEF( trmv )
INSERT_GENTDEF( trsv )
#endif

View File

@@ -89,11 +89,13 @@ void PASTEMAC(opname,EX_SUF) \
buf_alpha = bli_obj_buffer_for_1x1( dt, &alpha_local ); \
buf_beta = bli_obj_buffer_for_1x1( dt, &beta_local ); \
\
/* Invoke the typed function. */ \
bli_call_ft_15 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
transa, \
conjx, \
m, \
@@ -154,11 +156,13 @@ void PASTEMAC(opname,EX_SUF) \
alpha, &alpha_local ); \
buf_alpha = bli_obj_buffer_for_1x1( dt, &alpha_local ); \
\
/* Invoke the typed function. */ \
bli_call_ft_14 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
conjx, \
conjy, \
m, \
@@ -224,11 +228,13 @@ void PASTEMAC(opname,EX_SUF) \
buf_alpha = bli_obj_buffer_for_1x1( dt, &alpha_local ); \
buf_beta = bli_obj_buffer_for_1x1( dt, &beta_local ); \
\
/* Invoke the typed function. */ \
bli_call_ft_15 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
uploa, \
conja, \
conjx, \
@@ -286,11 +292,13 @@ void PASTEMAC(opname,EX_SUF) \
alpha, &alpha_local ); \
buf_alpha = bli_obj_buffer_for_1x1( dt, &alpha_local ); \
\
/* Invoke the typed function. */ \
bli_call_ft_11 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
uploa, \
conjx, \
m, \
@@ -349,11 +357,13 @@ void PASTEMAC(opname,EX_SUF) \
alpha, &alpha_local ); \
buf_alpha = bli_obj_buffer_for_1x1( dt, &alpha_local ); \
\
/* Invoke the typed function. */ \
bli_call_ft_14 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
uploa, \
conjx, \
conjy, \
@@ -411,11 +421,13 @@ void PASTEMAC(opname,EX_SUF) \
alpha, &alpha_local ); \
buf_alpha = bli_obj_buffer_for_1x1( dt, &alpha_local ); \
\
/* Invoke the typed function. */ \
bli_call_ft_12 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,BLIS_TAPI_EX_SUF,_vft) f = \
PASTEMAC2(opname,BLIS_TAPI_EX_SUF,_qfp)( dt ); \
\
f \
( \
dt, \
PASTECH(opname,BLIS_TAPI_EX_SUF), \
uploa, \
transa, \
diaga, \

View File

@@ -89,7 +89,7 @@ void PASTEMAC2(ch,opname,EX_SUF) \
} \
\
/* Declare a void function pointer for the current operation. */ \
PASTECH2(ch,ftname,_ft) f; \
PASTECH2(ch,ftname,_unb_ft) f; \
\
/* Choose the underlying implementation. */ \
if ( bli_does_notrans( transa ) ) \
@@ -105,18 +105,19 @@ void PASTEMAC2(ch,opname,EX_SUF) \
\
/* Invoke the variant chosen above, which loops over a level-1v or
level-1f kernel to implement the current operation. */ \
f( \
transa, \
conjx, \
m, \
n, \
alpha, \
a, rs_a, cs_a, \
x, incx, \
beta, \
y, incy, \
cntx \
); \
f \
( \
transa, \
conjx, \
m, \
n, \
alpha, \
a, rs_a, cs_a, \
x, incx, \
beta, \
y, incy, \
cntx \
); \
}
INSERT_GENTFUNC_BASIC3( gemv, gemv, gemv_unf_var1, gemv_unf_var2 )
@@ -149,7 +150,7 @@ void PASTEMAC2(ch,opname,EX_SUF) \
if ( cntx == NULL ) cntx = bli_gks_query_cntx(); \
\
/* Declare a void function pointer for the current operation. */ \
PASTECH2(ch,ftname,_ft) f; \
PASTECH2(ch,ftname,_unb_ft) f; \
\
/* Choose the underlying implementation. */ \
if ( bli_is_row_stored( rs_a, cs_a ) ) f = PASTEMAC(ch,rvarname); \
@@ -157,17 +158,18 @@ void PASTEMAC2(ch,opname,EX_SUF) \
\
/* Invoke the variant chosen above, which loops over a level-1v or
level-1f kernel to implement the current operation. */ \
f( \
conjx, \
conjy, \
m, \
n, \
alpha, \
x, incx, \
y, incy, \
a, rs_a, cs_a, \
cntx \
); \
f \
( \
conjx, \
conjy, \
m, \
n, \
alpha, \
x, incx, \
y, incy, \
a, rs_a, cs_a, \
cntx \
); \
}
INSERT_GENTFUNC_BASIC3( ger, ger, ger_unb_var1, ger_unb_var2 )
@@ -214,7 +216,7 @@ void PASTEMAC2(ch,opname,EX_SUF) \
} \
\
/* Declare a void function pointer for the current operation. */ \
PASTECH2(ch,ftname,_ft) f; \
PASTECH2(ch,ftname,_unb_ft) f; \
\
/* Choose the underlying implementation. */ \
if ( bli_is_lower( uploa ) ) \
@@ -230,19 +232,20 @@ void PASTEMAC2(ch,opname,EX_SUF) \
\
/* Invoke the variant chosen above, which loops over a level-1v or
level-1f kernel to implement the current operation. */ \
f( \
uploa, \
conja, \
conjx, \
conjh, /* used by variants to distinguish hemv from symv */ \
m, \
alpha, \
a, rs_a, cs_a, \
x, incx, \
beta, \
y, incy, \
cntx \
); \
f \
( \
uploa, \
conja, \
conjx, \
conjh, /* used by variants to distinguish hemv from symv */ \
m, \
alpha, \
a, rs_a, cs_a, \
x, incx, \
beta, \
y, incy, \
cntx \
); \
}
INSERT_GENTFUNC_BASIC4( hemv, hemv, BLIS_CONJUGATE, hemv_unf_var1, hemv_unf_var3 )
@@ -281,7 +284,7 @@ void PASTEMAC2(ch,opname,EX_SUF) \
if ( cntx == NULL ) cntx = bli_gks_query_cntx(); \
\
/* Declare a void function pointer for the current operation. */ \
PASTECH2(ch,ftname,_ft) f; \
PASTECH2(ch,ftname,_unb_ft) f; \
\
/* Choose the underlying implementation. */ \
if ( bli_is_lower( uploa ) ) \
@@ -297,16 +300,17 @@ void PASTEMAC2(ch,opname,EX_SUF) \
\
/* Invoke the variant chosen above, which loops over a level-1v or
level-1f kernel to implement the current operation. */ \
f( \
uploa, \
conjx, \
conjh, /* used by variants to distinguish her from syr */ \
m, \
&alpha_local, \
x, incx, \
a, rs_a, cs_a, \
cntx \
); \
f \
( \
uploa, \
conjx, \
conjh, /* used by variants to distinguish her from syr */ \
m, \
&alpha_local, \
x, incx, \
a, rs_a, cs_a, \
cntx \
); \
}
INSERT_GENTFUNCR_BASIC4( her, her, BLIS_CONJUGATE, her_unb_var1, her_unb_var2 )
@@ -337,7 +341,7 @@ void PASTEMAC2(ch,opname,EX_SUF) \
if ( cntx == NULL ) cntx = bli_gks_query_cntx(); \
\
/* Declare a void function pointer for the current operation. */ \
PASTECH2(ch,ftname,_ft) f; \
PASTECH2(ch,ftname,_unb_ft) f; \
\
/* Choose the underlying implementation. */ \
if ( bli_is_lower( uploa ) ) \
@@ -353,16 +357,17 @@ void PASTEMAC2(ch,opname,EX_SUF) \
\
/* Invoke the variant chosen above, which loops over a level-1v or
level-1f kernel to implement the current operation. */ \
f( \
uploa, \
conjx, \
conjh, /* used by variants to distinguish her2 from syr2 */ \
m, \
alpha, \
x, incx, \
a, rs_a, cs_a, \
cntx \
); \
f \
( \
uploa, \
conjx, \
conjh, /* used by variants to distinguish her2 from syr2 */ \
m, \
alpha, \
x, incx, \
a, rs_a, cs_a, \
cntx \
); \
}
INSERT_GENTFUNC_BASIC4( syr, her, BLIS_NO_CONJUGATE, her_unb_var1, her_unb_var2 )
@@ -395,7 +400,7 @@ void PASTEMAC2(ch,opname,EX_SUF) \
if ( cntx == NULL ) cntx = bli_gks_query_cntx(); \
\
/* Declare a void function pointer for the current operation. */ \
PASTECH2(ch,ftname,_ft) f; \
PASTECH2(ch,ftname,_unb_ft) f; \
\
/* Choose the underlying implementation. */ \
if ( bli_is_lower( uploa ) ) \
@@ -411,18 +416,19 @@ void PASTEMAC2(ch,opname,EX_SUF) \
\
/* Invoke the variant chosen above, which loops over a level-1v or
level-1f kernel to implement the current operation. */ \
f( \
uploa, \
conjx, \
conjy, \
conjh, \
m, \
alpha, \
x, incx, \
y, incy, \
a, rs_a, cs_a, \
cntx \
); \
f \
( \
uploa, \
conjx, \
conjy, \
conjh, \
m, \
alpha, \
x, incx, \
y, incy, \
a, rs_a, cs_a, \
cntx \
); \
}
INSERT_GENTFUNC_BASIC4( her2, her2, BLIS_CONJUGATE, her2_unf_var1, her2_unf_var4 )
@@ -470,7 +476,7 @@ void PASTEMAC2(ch,opname,EX_SUF) \
} \
\
/* Declare a void function pointer for the current operation. */ \
PASTECH2(ch,ftname,_ft) f; \
PASTECH2(ch,ftname,_unb_ft) f; \
\
/* Choose the underlying implementation. */ \
if ( bli_does_notrans( transa ) ) \
@@ -486,16 +492,17 @@ void PASTEMAC2(ch,opname,EX_SUF) \
\
/* Invoke the variant chosen above, which loops over a level-1v or
level-1f kernel to implement the current operation. */ \
f( \
uploa, \
transa, \
diaga, \
m, \
alpha, \
a, rs_a, cs_a, \
x, incx, \
cntx \
); \
f \
( \
uploa, \
transa, \
diaga, \
m, \
alpha, \
a, rs_a, cs_a, \
x, incx, \
cntx \
); \
}
INSERT_GENTFUNC_BASIC3( trmv, trmv, trmv_unf_var1, trmv_unf_var2 )

View File

@@ -67,7 +67,7 @@ void PASTEMAC(ch,varname) \
\
conja = bli_extract_conj( transa ); \
\
PASTECH(ch,dotxv_ft) kfp_dv; \
PASTECH(ch,dotxv_ker_ft) kfp_dv; \
\
/* Query the context for the kernel function pointer. */ \
kfp_dv = bli_cntx_get_l1v_ker_dt( dt, BLIS_DOTXV_KER, cntx ); \

View File

@@ -97,7 +97,7 @@ void PASTEMAC(ch,varname) \
); \
} \
\
PASTECH(ch,axpyv_ft) kfp_av; \
PASTECH(ch,axpyv_ker_ft) kfp_av; \
\
/* Query the context for the kernel function pointer. */ \
kfp_av = bli_cntx_get_l1v_ker_dt( dt, BLIS_AXPYV_KER, cntx ); \

View File

@@ -68,7 +68,7 @@ void PASTEMAC(ch,varname) \
\
conja = bli_extract_conj( transa ); \
\
PASTECH(ch,dotxf_ft) kfp_df; \
PASTECH(ch,dotxf_ker_ft) kfp_df; \
\
/* Query the context for the kernel function pointer and fusing factor. */ \
kfp_df = bli_cntx_get_l1f_ker_dt( dt, BLIS_DOTXF_KER, cntx ); \

View File

@@ -97,7 +97,7 @@ void PASTEMAC(ch,varname) \
); \
} \
\
PASTECH(ch,axpyf_ft) kfp_af; \
PASTECH(ch,axpyf_ker_ft) kfp_af; \
\
/* Query the context for the kernel function pointer and fusing factor. */ \
kfp_af = bli_cntx_get_l1f_ker_dt( dt, BLIS_AXPYF_KER, cntx ); \

View File

@@ -35,9 +35,9 @@
#include "blis.h"
#undef GENFRONT
#define GENFRONT( opname ) \
#define GENFRONT( opname, varname ) \
\
void PASTEMAC0(opname) \
void PASTEMAC0(varname) \
( \
obj_t* alpha, \
obj_t* a, \
@@ -71,11 +71,13 @@ void PASTEMAC0(opname) \
void* buf_alpha = bli_obj_buffer_for_1x1( dt, alpha ); \
void* buf_beta = bli_obj_buffer_for_1x1( dt, beta ); \
\
/* Invoke the void pointer-based function for the given datatype. */ \
bli_call_ft_14 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,_unb,_vft) f = \
PASTEMAC(varname,_qfp)( dt ); \
\
f \
( \
dt, \
opname, \
transa, \
conjx, \
m, \
@@ -89,9 +91,9 @@ void PASTEMAC0(opname) \
); \
} \
GENFRONT( gemv_unb_var1 )
GENFRONT( gemv_unb_var2 )
GENFRONT( gemv, gemv_unb_var1 )
GENFRONT( gemv, gemv_unb_var2 )
GENFRONT( gemv_unf_var1 )
GENFRONT( gemv_unf_var2 )
GENFRONT( gemv, gemv_unf_var1 )
GENFRONT( gemv, gemv_unf_var2 )

View File

@@ -58,7 +58,7 @@ void PASTEMAC(ch,varname) \
ctype alpha_chi1; \
dim_t i; \
\
PASTECH(ch,axpyv_ft) kfp_av; \
PASTECH(ch,axpyv_ker_ft) kfp_av; \
\
/* Query the context for the kernel function pointer. */ \
kfp_av = bli_cntx_get_l1v_ker_dt( dt, BLIS_AXPYV_KER, cntx ); \

View File

@@ -58,7 +58,7 @@ void PASTEMAC(ch,varname) \
ctype alpha_psi1; \
dim_t j; \
\
PASTECH(ch,axpyv_ft) kfp_av; \
PASTECH(ch,axpyv_ker_ft) kfp_av; \
\
/* Query the context for the kernel function pointer. */ \
kfp_av = bli_cntx_get_l1v_ker_dt( dt, BLIS_AXPYV_KER, cntx ); \

View File

@@ -35,9 +35,9 @@
#include "blis.h"
#undef GENFRONT
#define GENFRONT( opname ) \
#define GENFRONT( opname, varname ) \
\
void PASTEMAC0(opname) \
void PASTEMAC0(varname) \
( \
obj_t* alpha, \
obj_t* x, \
@@ -69,11 +69,13 @@ void PASTEMAC0(opname) \
\
void* buf_alpha = bli_obj_buffer_for_1x1( dt, alpha ); \
\
/* Invoke the void pointer-based function for the given datatype. */ \
bli_call_ft_13 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,_unb,_vft) f = \
PASTEMAC(varname,_qfp)( dt ); \
\
f \
( \
dt, \
opname, \
conjx, \
conjy, \
m, \
@@ -86,6 +88,6 @@ void PASTEMAC0(opname) \
); \
} \
GENFRONT( ger_unb_var1 )
GENFRONT( ger_unb_var2 )
GENFRONT( ger, ger_unb_var1 )
GENFRONT( ger, ger_unb_var2 )

View File

@@ -118,8 +118,8 @@ void PASTEMAC(ch,varname) \
); \
} \
\
PASTECH(ch,axpyv_ft) kfp_av; \
PASTECH(ch,dotxv_ft) kfp_dv; \
PASTECH(ch,axpyv_ker_ft) kfp_av; \
PASTECH(ch,dotxv_ker_ft) kfp_dv; \
\
/* Query the context for the kernel function pointers. */ \
kfp_av = bli_cntx_get_l1v_ker_dt( dt, BLIS_AXPYV_KER, cntx ); \

View File

@@ -120,7 +120,7 @@ void PASTEMAC(ch,varname) \
); \
} \
\
PASTECH(ch,dotxv_ft) kfp_dv; \
PASTECH(ch,dotxv_ker_ft) kfp_dv; \
\
/* Query the context for the kernel function pointer. */ \
kfp_dv = bli_cntx_get_l1v_ker_dt( dt, BLIS_DOTXV_KER, cntx ); \

View File

@@ -118,8 +118,8 @@ void PASTEMAC(ch,varname) \
); \
} \
\
PASTECH(ch,axpyv_ft) kfp_av; \
PASTECH(ch,dotxv_ft) kfp_dv; \
PASTECH(ch,axpyv_ker_ft) kfp_av; \
PASTECH(ch,dotxv_ker_ft) kfp_dv; \
\
/* Query the context for the kernel function pointers. */ \
kfp_av = bli_cntx_get_l1v_ker_dt( dt, BLIS_AXPYV_KER, cntx ); \

View File

@@ -119,7 +119,7 @@ void PASTEMAC(ch,varname) \
); \
} \
\
PASTECH(ch,axpyv_ft) kfp_av; \
PASTECH(ch,axpyv_ker_ft) kfp_av; \
\
/* Query the context for the kernel function pointers. */ \
kfp_av = bli_cntx_get_l1v_ker_dt( dt, BLIS_AXPYV_KER, cntx ); \

View File

@@ -127,7 +127,7 @@ void PASTEMAC(ch,varname) \
); \
} \
\
PASTECH(ch,dotxaxpyf_ft) kfp_xf; \
PASTECH(ch,dotxaxpyf_ker_ft) kfp_xf; \
\
/* Query the context for the kernel function pointer and fusing factor. */ \
kfp_xf = bli_cntx_get_l1f_ker_dt( dt, BLIS_DOTXAXPYF_KER, cntx ); \

View File

@@ -118,7 +118,7 @@ void PASTEMAC(ch,varname) \
); \
} \
\
PASTECH(ch,dotaxpyv_ft) kfp_vf; \
PASTECH(ch,dotaxpyv_ker_ft) kfp_vf; \
\
/* Query the context for the kernel function pointer. */ \
kfp_vf = bli_cntx_get_l1f_ker_dt( dt, BLIS_DOTAXPYV_KER, cntx ); \

View File

@@ -127,7 +127,7 @@ void PASTEMAC(ch,varname) \
); \
} \
\
PASTECH(ch,dotxaxpyf_ft) kfp_xf; \
PASTECH(ch,dotxaxpyf_ker_ft) kfp_xf; \
\
/* Query the context for the kernel function pointer and fusing factor. */ \
kfp_xf = bli_cntx_get_l1f_ker_dt( dt, BLIS_DOTXAXPYF_KER, cntx ); \

View File

@@ -118,7 +118,7 @@ void PASTEMAC(ch,varname) \
); \
} \
\
PASTECH(ch,dotaxpyv_ft) kfp_vf; \
PASTECH(ch,dotaxpyv_ker_ft) kfp_vf; \
\
/* Query the context for the kernel function pointer. */ \
kfp_vf = bli_cntx_get_l1f_ker_dt( dt, BLIS_DOTAXPYV_KER, cntx ); \

View File

@@ -35,9 +35,9 @@
#include "blis.h"
#undef GENFRONT
#define GENFRONT( opname ) \
#define GENFRONT( opname, varname ) \
\
void PASTEMAC0(opname) \
void PASTEMAC0(varname) \
( \
conj_t conjh, \
obj_t* alpha, \
@@ -72,11 +72,13 @@ void PASTEMAC0(opname) \
void* buf_alpha = bli_obj_buffer_for_1x1( dt, alpha ); \
void* buf_beta = bli_obj_buffer_for_1x1( dt, beta ); \
\
/* Invoke the void pointer-based function for the given datatype. */ \
bli_call_ft_15 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,_unb,_vft) f = \
PASTEMAC(varname,_qfp)( dt ); \
\
f \
( \
dt, \
opname, \
uplo, \
conja, \
conjx, \
@@ -91,13 +93,13 @@ void PASTEMAC0(opname) \
); \
} \
GENFRONT( hemv_unb_var1 )
GENFRONT( hemv_unb_var2 )
GENFRONT( hemv_unb_var3 )
GENFRONT( hemv_unb_var4 )
GENFRONT( hemv, hemv_unb_var1 )
GENFRONT( hemv, hemv_unb_var2 )
GENFRONT( hemv, hemv_unb_var3 )
GENFRONT( hemv, hemv_unb_var4 )
GENFRONT( hemv_unf_var1 )
GENFRONT( hemv_unf_var3 )
GENFRONT( hemv_unf_var1a )
GENFRONT( hemv_unf_var3a )
GENFRONT( hemv, hemv_unf_var1 )
GENFRONT( hemv, hemv_unf_var3 )
GENFRONT( hemv, hemv_unf_var1a )
GENFRONT( hemv, hemv_unf_var3a )

View File

@@ -100,7 +100,7 @@ void PASTEMAC(ch,varname) \
conj0 = conjx; \
conj1 = bli_apply_conj( conjh, conjx ); \
\
PASTECH(ch,axpyv_ft) kfp_av; \
PASTECH(ch,axpyv_ker_ft) kfp_av; \
\
/* Query the context for the kernel function pointer. */ \
kfp_av = bli_cntx_get_l1v_ker_dt( dt, BLIS_AXPYV_KER, cntx ); \

View File

@@ -100,7 +100,7 @@ void PASTEMAC(ch,varname) \
conj0 = bli_apply_conj( conjh, conjx ); \
conj1 = conjx; \
\
PASTECH(ch,axpyv_ft) kfp_av; \
PASTECH(ch,axpyv_ker_ft) kfp_av; \
\
/* Query the context for the kernel function pointer. */ \
kfp_av = bli_cntx_get_l1v_ker_dt( dt, BLIS_AXPYV_KER, cntx ); \

View File

@@ -35,9 +35,9 @@
#include "blis.h"
#undef GENFRONT
#define GENFRONT( opname ) \
#define GENFRONT( opname, varname ) \
\
void PASTEMAC0(opname) \
void PASTEMAC0(varname) \
( \
conj_t conjh, \
obj_t* alpha, \
@@ -65,11 +65,13 @@ void PASTEMAC0(opname) \
\
void* buf_alpha = bli_obj_buffer_for_1x1( dt, alpha ); \
\
/* Invoke the void pointer-based function for the given datatype. */ \
bli_call_ft_11 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,_unb,_vft) f = \
PASTEMAC(varname,_qfp)( dt ); \
\
f \
( \
dt, \
opname, \
uplo, \
conjx, \
conjh, \
@@ -81,6 +83,6 @@ void PASTEMAC0(opname) \
); \
} \
GENFRONT( her_unb_var1 )
GENFRONT( her_unb_var2 )
GENFRONT( her, her_unb_var1 )
GENFRONT( her, her_unb_var2 )

View File

@@ -103,7 +103,7 @@ void PASTEMAC(ch,varname) \
conj0 = bli_apply_conj( conjh, conjy ); \
conj1 = bli_apply_conj( conjh, conjx ); \
\
PASTECH(ch,axpyv_ft) kfp_av; \
PASTECH(ch,axpyv_ker_ft) kfp_av; \
\
/* Query the context for the kernel function pointer. */ \
kfp_av = bli_cntx_get_l1v_ker_dt( dt, BLIS_AXPYV_KER, cntx ); \

View File

@@ -110,7 +110,7 @@ void PASTEMAC(ch,varname) \
conj1 = bli_apply_conj( conjh, conjx ); \
conjh_conjy = bli_apply_conj( conjh, conjy ); \
\
PASTECH(ch,axpyv_ft) kfp_av; \
PASTECH(ch,axpyv_ker_ft) kfp_av; \
\
/* Query the context for the kernel function pointer. */ \
kfp_av = bli_cntx_get_l1v_ker_dt( dt, BLIS_AXPYV_KER, cntx ); \

View File

@@ -110,7 +110,7 @@ void PASTEMAC(ch,varname) \
conj1 = conjy; \
conjh_conjx = bli_apply_conj( conjh, conjx ); \
\
PASTECH(ch,axpyv_ft) kfp_av; \
PASTECH(ch,axpyv_ker_ft) kfp_av; \
\
/* Query the context for the kernel function pointer. */ \
kfp_av = bli_cntx_get_l1v_ker_dt( dt, BLIS_AXPYV_KER, cntx ); \

View File

@@ -111,7 +111,7 @@ void PASTEMAC(ch,varname) \
conjh_conjx = bli_apply_conj( conjh, conjx ); \
conjh_conjy = bli_apply_conj( conjh, conjy ); \
\
PASTECH(ch,axpyv_ft) kfp_av; \
PASTECH(ch,axpyv_ker_ft) kfp_av; \
\
/* Query the context for the kernel function pointer. */ \
kfp_av = bli_cntx_get_l1v_ker_dt( dt, BLIS_AXPYV_KER, cntx ); \

View File

@@ -103,7 +103,7 @@ void PASTEMAC(ch,varname) \
conj0 = bli_apply_conj( conjh, conjy ); \
conj1 = bli_apply_conj( conjh, conjx ); \
\
PASTECH(ch,axpy2v_ft) kfp_2v; \
PASTECH(ch,axpy2v_ker_ft) kfp_2v; \
\
/* Query the context for the kernel function pointer. */ \
kfp_2v = bli_cntx_get_l1f_ker_dt( dt, BLIS_AXPY2V_KER, cntx ); \

View File

@@ -111,7 +111,7 @@ void PASTEMAC(ch,varname) \
conjh_conjx = bli_apply_conj( conjh, conjx ); \
conjh_conjy = bli_apply_conj( conjh, conjy ); \
\
PASTECH(ch,axpy2v_ft) kfp_2v; \
PASTECH(ch,axpy2v_ker_ft) kfp_2v; \
\
/* Query the context for the kernel function pointer. */ \
kfp_2v = bli_cntx_get_l1f_ker_dt( dt, BLIS_AXPY2V_KER, cntx ); \

View File

@@ -35,9 +35,9 @@
#include "blis.h"
#undef GENFRONT
#define GENFRONT( opname ) \
#define GENFRONT( opname, varname ) \
\
void PASTEMAC0(opname) \
void PASTEMAC0(varname) \
( \
conj_t conjh, \
obj_t* alpha, \
@@ -71,11 +71,13 @@ void PASTEMAC0(opname) \
\
void* buf_alpha = bli_obj_buffer_for_1x1( dt, alpha ); \
\
/* Invoke the void pointer-based function for the given datatype. */ \
bli_call_ft_14 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,_unb,_vft) f = \
PASTEMAC(varname,_qfp)( dt ); \
\
f \
( \
dt, \
opname, \
uplo, \
conjx, \
conjy, \
@@ -89,11 +91,11 @@ void PASTEMAC0(opname) \
); \
} \
GENFRONT( her2_unb_var1 )
GENFRONT( her2_unb_var2 )
GENFRONT( her2_unb_var3 )
GENFRONT( her2_unb_var4 )
GENFRONT( her2, her2_unb_var1 )
GENFRONT( her2, her2_unb_var2 )
GENFRONT( her2, her2_unb_var3 )
GENFRONT( her2, her2_unb_var4 )
GENFRONT( her2_unf_var1 )
GENFRONT( her2_unf_var4 )
GENFRONT( her2, her2_unf_var1 )
GENFRONT( her2, her2_unf_var4 )

View File

@@ -80,7 +80,7 @@ void PASTEMAC(ch,varname) \
\
conja = bli_extract_conj( transa ); \
\
PASTECH(ch,dotv_ft) kfp_dv; \
PASTECH(ch,dotv_ker_ft) kfp_dv; \
\
/* Query the context for the kernel function pointer. */ \
kfp_dv = bli_cntx_get_l1v_ker_dt( dt, BLIS_DOTV_KER, cntx ); \

View File

@@ -80,7 +80,7 @@ void PASTEMAC(ch,varname) \
\
conja = bli_extract_conj( transa ); \
\
PASTECH(ch,axpyv_ft) kfp_av; \
PASTECH(ch,axpyv_ker_ft) kfp_av; \
\
/* Query the context for the kernel function pointer. */ \
kfp_av = bli_cntx_get_l1v_ker_dt( dt, BLIS_AXPYV_KER, cntx ); \

View File

@@ -88,7 +88,7 @@ void PASTEMAC(ch,varname) \
\
conja = bli_extract_conj( transa ); \
\
PASTECH(ch,dotxf_ft) kfp_df; \
PASTECH(ch,dotxf_ker_ft) kfp_df; \
\
/* Query the context for the kernel function pointer and fusing factor. */ \
kfp_df = bli_cntx_get_l1f_ker_dt( dt, BLIS_DOTXF_KER, cntx ); \

View File

@@ -87,7 +87,7 @@ void PASTEMAC(ch,varname) \
\
conja = bli_extract_conj( transa ); \
\
PASTECH(ch,axpyf_ft) kfp_af; \
PASTECH(ch,axpyf_ker_ft) kfp_af; \
\
/* Query the context for the kernel function pointer and fusing factor. */ \
kfp_af = bli_cntx_get_l1f_ker_dt( dt, BLIS_AXPYF_KER, cntx ); \

View File

@@ -35,9 +35,9 @@
#include "blis.h"
#undef GENFRONT
#define GENFRONT( opname ) \
#define GENFRONT( opname, varname ) \
\
void PASTEMAC0(opname) \
void PASTEMAC0(varname) \
( \
obj_t* alpha, \
obj_t* a, \
@@ -65,11 +65,13 @@ void PASTEMAC0(opname) \
\
void* buf_alpha = bli_obj_buffer_for_1x1( dt, alpha ); \
\
/* Invoke the void pointer-based function for the given datatype. */ \
bli_call_ft_11 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,_unb,_vft) f = \
PASTEMAC(varname,_qfp)( dt ); \
\
f \
( \
dt, \
opname, \
uploa, \
transa, \
diaga, \
@@ -81,9 +83,9 @@ void PASTEMAC0(opname) \
); \
} \
GENFRONT( trmv_unb_var1 )
GENFRONT( trmv_unb_var2 )
GENFRONT( trmv, trmv_unb_var1 )
GENFRONT( trmv, trmv_unb_var2 )
GENFRONT( trmv_unf_var1 )
GENFRONT( trmv_unf_var2 )
GENFRONT( trmv, trmv_unf_var1 )
GENFRONT( trmv, trmv_unf_var2 )

View File

@@ -91,7 +91,7 @@ void PASTEMAC(ch,varname) \
NULL \
); \
\
PASTECH(ch,dotv_ft) kfp_tv; \
PASTECH(ch,dotv_ker_ft) kfp_tv; \
\
/* Query the context for the kernel function pointer. */ \
kfp_tv = bli_cntx_get_l1v_ker_dt( dt, BLIS_DOTV_KER, cntx ); \

View File

@@ -91,7 +91,7 @@ void PASTEMAC(ch,varname) \
NULL \
); \
\
PASTECH(ch,axpyv_ft) kfp_av; \
PASTECH(ch,axpyv_ker_ft) kfp_av; \
\
/* Query the context for the kernel function pointer. */ \
kfp_av = bli_cntx_get_l1v_ker_dt( dt, BLIS_AXPYV_KER, cntx ); \

View File

@@ -100,7 +100,7 @@ void PASTEMAC(ch,varname) \
\
conja = bli_extract_conj( transa ); \
\
PASTECH(ch,dotxf_ft) kfp_df; \
PASTECH(ch,dotxf_ker_ft) kfp_df; \
\
/* Query the context for the kernel function pointer and fusing factor. */ \
kfp_df = bli_cntx_get_l1f_ker_dt( dt, BLIS_DOTXF_KER, cntx ); \

View File

@@ -99,7 +99,7 @@ void PASTEMAC(ch,varname) \
\
conja = bli_extract_conj( transa ); \
\
PASTECH(ch,axpyf_ft) kfp_af; \
PASTECH(ch,axpyf_ker_ft) kfp_af; \
\
/* Query the context for the kernel function pointer and fusing factor. */ \
kfp_af = bli_cntx_get_l1f_ker_dt( dt, BLIS_AXPYF_KER, cntx ); \

View File

@@ -35,9 +35,9 @@
#include "blis.h"
#undef GENFRONT
#define GENFRONT( opname ) \
#define GENFRONT( opname, varname ) \
\
void PASTEMAC0(opname) \
void PASTEMAC0(varname) \
( \
obj_t* alpha, \
obj_t* a, \
@@ -65,11 +65,13 @@ void PASTEMAC0(opname) \
\
void* buf_alpha = bli_obj_buffer_for_1x1( dt, alpha ); \
\
/* Invoke the void pointer-based function for the given datatype. */ \
bli_call_ft_11 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(opname,_unb,_vft) f = \
PASTEMAC(varname,_qfp)( dt ); \
\
f \
( \
dt, \
opname, \
uploa, \
transa, \
diaga, \
@@ -81,9 +83,9 @@ void PASTEMAC0(opname) \
); \
} \
GENFRONT( trsv_unb_var1 )
GENFRONT( trsv_unb_var2 )
GENFRONT( trsv, trsv_unb_var1 )
GENFRONT( trsv, trsv_unb_var2 )
GENFRONT( trsv_unf_var1 )
GENFRONT( trsv_unf_var2 )
GENFRONT( trsv, trsv_unf_var1 )
GENFRONT( trsv, trsv_unf_var2 )

View File

@@ -35,9 +35,11 @@
#include "bli_l3_cntl.h"
#include "bli_l3_check.h"
#include "bli_l3_ft.h"
// Define function types.
#include "bli_l3_ft_ex.h"
#include "bli_l3_ft_ukr.h"
#include "bli_l3_oft.h"
#include "bli_l3_voft.h"
#include "bli_l3_oft_var.h"
#include "bli_l3_blocksize.h"
#include "bli_l3_direct.h"
@@ -47,20 +49,23 @@
// Prototype object APIs (expert and non-expert).
#include "bli_oapi_ex.h"
#include "bli_l3_oapi.h"
#include "bli_oapi_ba.h"
#include "bli_l3_oapi.h"
// Prototype typed APIs (expert and non-expert).
#include "bli_tapi_ex.h"
#include "bli_l3_tapi.h"
#include "bli_tapi_ba.h"
#include "bli_l3_tapi.h"
// Prototype microkernel wrapper APIs
#include "bli_l3_ukr_oapi.h"
#include "bli_l3_ukr_tapi.h"
// Prototype reference micro-kernels.
//#include "bli_l3_ref.h"
// Generate function pointer arrays for tapi microkernel functions.
#include "bli_l3_ukr_fpa.h"
// Operation-specific headers
#include "bli_gemm.h"

236
frame/3/bli_l3_ft_ex.h Normal file
View File

@@ -0,0 +1,236 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2014, The University of Texas at Austin
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of The University of Texas at Austin nor the names
of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef BLIS_L3_FT_EX_H
#define BLIS_L3_FT_EX_H
//
// -- Level-3 expert function types --------------------------------------------
//
// gemm
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,BLIS_TAPI_EX_SUF,tsuf)) \
( \
trans_t transa, \
trans_t transb, \
dim_t m, \
dim_t n, \
dim_t k, \
ctype* alpha, \
ctype* a, inc_t rs_a, inc_t cs_a, \
ctype* b, inc_t rs_b, inc_t cs_b, \
ctype* beta, \
ctype* c, inc_t rs_c, inc_t cs_c, \
cntx_t* cntx, \
rntm_t* rntm \
);
INSERT_GENTDEF( gemm )
// hemm, symm
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,BLIS_TAPI_EX_SUF,tsuf)) \
( \
side_t side, \
uplo_t uploa, \
conj_t conja, \
trans_t transb, \
dim_t m, \
dim_t n, \
ctype* alpha, \
ctype* a, inc_t rs_a, inc_t cs_a, \
ctype* b, inc_t rs_b, inc_t cs_b, \
ctype* beta, \
ctype* c, inc_t rs_c, inc_t cs_c, \
cntx_t* cntx, \
rntm_t* rntm \
);
INSERT_GENTDEF( hemm )
INSERT_GENTDEF( symm )
// herk
#undef GENTDEFR
#define GENTDEFR( ctype, ctype_r, ch, chr, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,BLIS_TAPI_EX_SUF,tsuf)) \
( \
uplo_t uploc, \
trans_t transa, \
dim_t m, \
dim_t k, \
ctype_r* alpha, \
ctype* a, inc_t rs_a, inc_t cs_a, \
ctype_r* beta, \
ctype* c, inc_t rs_c, inc_t cs_c, \
cntx_t* cntx, \
rntm_t* rntm \
);
INSERT_GENTDEFR( herk )
// her2k
#undef GENTDEFR
#define GENTDEFR( ctype, ctype_r, ch, chr, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,BLIS_TAPI_EX_SUF,tsuf)) \
( \
uplo_t uploc, \
trans_t transa, \
trans_t transb, \
dim_t m, \
dim_t k, \
ctype* alpha, \
ctype* a, inc_t rs_a, inc_t cs_a, \
ctype* b, inc_t rs_b, inc_t cs_b, \
ctype_r* beta, \
ctype* c, inc_t rs_c, inc_t cs_c, \
cntx_t* cntx, \
rntm_t* rntm \
);
INSERT_GENTDEFR( her2k )
// syrk
#undef GENTDEFR
#define GENTDEFR( ctype, ctype_r, ch, chr, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,BLIS_TAPI_EX_SUF,tsuf)) \
( \
uplo_t uploc, \
trans_t transa, \
dim_t m, \
dim_t k, \
ctype* alpha, \
ctype* a, inc_t rs_a, inc_t cs_a, \
ctype* beta, \
ctype* c, inc_t rs_c, inc_t cs_c, \
cntx_t* cntx, \
rntm_t* rntm \
);
INSERT_GENTDEFR( syrk )
// syr2k
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,BLIS_TAPI_EX_SUF,tsuf)) \
( \
uplo_t uploc, \
trans_t transa, \
trans_t transb, \
dim_t m, \
dim_t k, \
ctype* alpha, \
ctype* a, inc_t rs_a, inc_t cs_a, \
ctype* b, inc_t rs_b, inc_t cs_b, \
ctype* beta, \
ctype* c, inc_t rs_c, inc_t cs_c, \
cntx_t* cntx, \
rntm_t* rntm \
);
INSERT_GENTDEF( syr2k )
// trmm3
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,BLIS_TAPI_EX_SUF,tsuf)) \
( \
side_t side, \
uplo_t uploa, \
trans_t transa, \
diag_t diaga, \
trans_t transb, \
dim_t m, \
dim_t n, \
ctype* alpha, \
ctype* a, inc_t rs_a, inc_t cs_a, \
ctype* b, inc_t rs_b, inc_t cs_b, \
ctype* beta, \
ctype* c, inc_t rs_c, inc_t cs_c, \
cntx_t* cntx, \
rntm_t* rntm \
);
INSERT_GENTDEF( trmm3 )
// trmm
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,BLIS_TAPI_EX_SUF,tsuf)) \
( \
side_t side, \
uplo_t uploa, \
trans_t transa, \
diag_t diaga, \
dim_t m, \
dim_t n, \
ctype* alpha, \
ctype* a, inc_t rs_a, inc_t cs_a, \
ctype* b, inc_t rs_b, inc_t cs_b, \
cntx_t* cntx, \
rntm_t* rntm \
);
INSERT_GENTDEF( trmm )
INSERT_GENTDEF( trsm )
#endif

View File

@@ -32,12 +32,12 @@
*/
#ifndef BLIS_L3_FT_H
#define BLIS_L3_FT_H
#ifndef BLIS_L3_FT_UKR_H
#define BLIS_L3_FT_UKR_H
//
// -- Level-3 micro-kernel types -----------------------------------------------
// -- Level-3 micro-kernel function types --------------------------------------
//
// gemm
@@ -45,7 +45,7 @@
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
typedef void (*PASTECH3(ch,opname,_ukr,tsuf)) \
( \
dim_t k, \
ctype* restrict alpha, \
@@ -57,24 +57,7 @@ typedef void (*PASTECH2(ch,opname,tsuf)) \
cntx_t* restrict cntx \
);
INSERT_GENTDEF( gemm_ukr )
// trsm_[lu]
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
( \
ctype* restrict a, \
ctype* restrict b, \
ctype* restrict c, inc_t rs_c, inc_t cs_c, \
auxinfo_t* restrict data, \
cntx_t* restrict cntx \
);
INSERT_GENTDEF( trsm_ukr )
INSERT_GENTDEF( gemm )
// gemmtrsm_[lu]
@@ -82,7 +65,7 @@ INSERT_GENTDEF( trsm_ukr )
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH2(ch,opname,tsuf)) \
typedef void (*PASTECH3(ch,opname,_ukr,tsuf)) \
( \
dim_t k, \
ctype* restrict alpha, \
@@ -95,11 +78,24 @@ typedef void (*PASTECH2(ch,opname,tsuf)) \
cntx_t* restrict cntx \
);
INSERT_GENTDEF( gemmtrsm_ukr )
INSERT_GENTDEF( gemmtrsm )
// trsm_[lu]
#undef GENTDEF
#define GENTDEF( ctype, ch, opname, tsuf ) \
\
typedef void (*PASTECH3(ch,opname,_ukr,tsuf)) \
( \
ctype* restrict a, \
ctype* restrict b, \
ctype* restrict c, inc_t rs_c, inc_t cs_c, \
auxinfo_t* restrict data, \
cntx_t* restrict cntx \
);
INSERT_GENTDEF( trsm )
#endif

View File

@@ -32,8 +32,8 @@
*/
#ifndef BLIS_L3_VAR_OFT_H
#define BLIS_L3_VAR_OFT_H
#ifndef BLIS_L3_OFT_VAR_H
#define BLIS_L3_OFT_VAR_H
//
@@ -43,7 +43,7 @@
#undef GENTDEF
#define GENTDEF( opname ) \
\
typedef void (*PASTECH(opname,_voft)) \
typedef void (*PASTECH(opname,_var_oft)) \
( \
obj_t* a, \
obj_t* b, \
@@ -57,9 +57,10 @@ typedef void (*PASTECH(opname,_voft)) \
GENTDEF( gemm )
#undef GENTDEF
#define GENTDEF( opname ) \
\
typedef void (*PASTECH(opname,_voft)) \
typedef void (*PASTECH(opname,_var_oft)) \
( \
obj_t* a, \
obj_t* b, \

58
frame/3/bli_l3_ukr_fpa.c Normal file
View File

@@ -0,0 +1,58 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2014, The University of Texas at Austin
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of The University of Texas at Austin nor the names
of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "blis.h"
//
// Define function pointer query interfaces.
//
#undef GENFRONT
#define GENFRONT( tname, opname ) \
\
GENARRAY_FPA( PASTECH2(tname,_ukr,_vft), \
opname ); \
\
PASTECH2(tname,_ukr,_vft) \
PASTEMAC(opname,_qfp)( num_t dt ) \
{ \
return PASTECH(opname,_fpa)[ dt ]; \
}
GENFRONT( gemm, gemm_ukernel )
GENFRONT( gemmtrsm, gemmtrsm_l_ukernel )
GENFRONT( gemmtrsm, gemmtrsm_u_ukernel )
GENFRONT( trsm, trsm_l_ukernel )
GENFRONT( trsm, trsm_u_ukernel )

50
frame/3/bli_l3_ukr_fpa.h Normal file
View File

@@ -0,0 +1,50 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2014, The University of Texas at Austin
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of The University of Texas at Austin nor the names
of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
//
// Prototype function pointer query interface.
//
#undef GENPROT
#define GENPROT( tname, opname ) \
\
PASTECH2(tname,_ukr,_vft) \
PASTEMAC(opname,_qfp)( num_t dt );
GENPROT( gemm, gemm_ukernel )
GENPROT( gemmtrsm, gemmtrsm_l_ukernel )
GENPROT( gemmtrsm, gemmtrsm_u_ukernel )
GENPROT( trsm, trsm_l_ukernel )
GENPROT( trsm, trsm_u_ukernel )

View File

@@ -35,7 +35,7 @@
#include "blis.h"
#undef GENFRONT
#define GENFRONT( opname ) \
#define GENFRONT( tname, opname ) \
\
void PASTEMAC0(opname) \
( \
@@ -68,11 +68,13 @@ void PASTEMAC0(opname) \
bli_auxinfo_set_is_a( 1, &data ); \
bli_auxinfo_set_is_b( 1, &data ); \
\
/* Invoke the void pointer-based function for the given datatype. */ \
bli_call_ft_10 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(tname,_ukr,_vft) f = \
PASTEMAC(opname,_qfp)( dt ); \
\
f \
( \
dt, \
opname, \
k, \
buf_alpha, \
buf_a, \
@@ -84,72 +86,11 @@ void PASTEMAC0(opname) \
); \
} \
GENFRONT( gemm_ukernel )
GENFRONT( gemm, gemm_ukernel )
#undef GENFRONT
#define GENFRONT( opname, opnamel, opnameu ) \
\
void PASTEMAC0(opname) \
( \
obj_t* a, \
obj_t* b, \
obj_t* c, \
cntx_t* cntx \
) \
{ \
bli_init_once(); \
\
num_t dt = bli_obj_dt( c ); \
\
void* buf_a = bli_obj_buffer_at_off( a ); \
void* buf_b = bli_obj_buffer_at_off( b ); \
void* buf_c = bli_obj_buffer_at_off( c ); \
inc_t rs_c = bli_obj_row_stride( c ); \
inc_t cs_c = bli_obj_col_stride( c ); \
\
auxinfo_t data; \
\
/* Fill the auxinfo_t struct in case the micro-kernel uses it. */ \
bli_auxinfo_set_next_a( buf_a, &data ); \
bli_auxinfo_set_next_b( buf_b, &data ); \
bli_auxinfo_set_is_a( 1, &data ); \
bli_auxinfo_set_is_b( 1, &data ); \
\
/* Invoke the void pointer-based function for the given datatype. */ \
if ( bli_obj_is_lower( a ) ) \
{ \
bli_call_ft_7 \
( \
dt, \
opnamel, \
buf_a, \
buf_b, \
buf_c, rs_c, cs_c, \
&data, \
cntx \
); \
} \
else /* if ( bli_obj_is_upper( a ) ) */ \
{ \
bli_call_ft_7 \
( \
dt, \
opnameu, \
buf_a, \
buf_b, \
buf_c, rs_c, cs_c, \
&data, \
cntx \
); \
} \
} \
GENFRONT( trsm_ukernel, trsm_l_ukernel, trsm_u_ukernel )
#undef GENFRONT
#define GENFRONT( opname, opnamel, opnameu ) \
#define GENFRONT( tname, opname, opnamel, opnameu ) \
\
void PASTEMAC0(opname) \
( \
@@ -188,10 +129,13 @@ void PASTEMAC0(opname) \
/* Invoke the void pointer-based function for the given datatype. */ \
if ( bli_obj_is_lower( a11 ) ) \
{ \
bli_call_ft_11 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(tname,_ukr,_vft) f = \
PASTEMAC(opnamel,_qfp)( dt ); \
\
f \
( \
dt, \
opnamel, \
k, \
buf_alpha, \
buf_a1x, \
@@ -205,10 +149,13 @@ void PASTEMAC0(opname) \
} \
else /* if ( bli_obj_is_upper( a11 ) ) */ \
{ \
bli_call_ft_11 \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(tname,_ukr,_vft) f = \
PASTEMAC(opnameu,_qfp)( dt ); \
\
f \
( \
dt, \
opnameu, \
k, \
buf_alpha, \
buf_a1x, \
@@ -222,5 +169,72 @@ void PASTEMAC0(opname) \
} \
} \
GENFRONT( gemmtrsm_ukernel, gemmtrsm_l_ukernel, gemmtrsm_u_ukernel )
GENFRONT( gemmtrsm, gemmtrsm_ukernel, gemmtrsm_l_ukernel, gemmtrsm_u_ukernel )
#undef GENFRONT
#define GENFRONT( tname, opname, opnamel, opnameu ) \
\
void PASTEMAC0(opname) \
( \
obj_t* a, \
obj_t* b, \
obj_t* c, \
cntx_t* cntx \
) \
{ \
bli_init_once(); \
\
num_t dt = bli_obj_dt( c ); \
\
void* buf_a = bli_obj_buffer_at_off( a ); \
void* buf_b = bli_obj_buffer_at_off( b ); \
void* buf_c = bli_obj_buffer_at_off( c ); \
inc_t rs_c = bli_obj_row_stride( c ); \
inc_t cs_c = bli_obj_col_stride( c ); \
\
auxinfo_t data; \
\
/* Fill the auxinfo_t struct in case the micro-kernel uses it. */ \
bli_auxinfo_set_next_a( buf_a, &data ); \
bli_auxinfo_set_next_b( buf_b, &data ); \
bli_auxinfo_set_is_a( 1, &data ); \
bli_auxinfo_set_is_b( 1, &data ); \
\
/* Invoke the void pointer-based function for the given datatype. */ \
if ( bli_obj_is_lower( a ) ) \
{ \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(tname,_ukr,_vft) f = \
PASTEMAC(opnamel,_qfp)( dt ); \
\
f \
( \
buf_a, \
buf_b, \
buf_c, rs_c, cs_c, \
&data, \
cntx \
); \
} \
else /* if ( bli_obj_is_upper( a ) ) */ \
{ \
/* Query a type-specific function pointer, except one that uses
void* instead of typed pointers. */ \
PASTECH2(tname,_ukr,_vft) f = \
PASTEMAC(opnameu,_qfp)( dt ); \
\
f \
( \
buf_a, \
buf_b, \
buf_c, rs_c, cs_c, \
&data, \
cntx \
); \
} \
} \
GENFRONT( trsm, trsm_ukernel, trsm_l_ukernel, trsm_u_ukernel )

View File

@@ -53,20 +53,6 @@ void PASTEMAC0(opname) \
GENPROT( gemm_ukernel )
#undef GENPROT
#define GENPROT( opname ) \
\
void PASTEMAC0(opname) \
( \
obj_t* a, \
obj_t* b, \
obj_t* c, \
cntx_t* cntx \
);
GENPROT( trsm_ukernel )
#undef GENPROT
#define GENPROT( opname ) \
\
@@ -83,3 +69,17 @@ void PASTEMAC0(opname) \
GENPROT( gemmtrsm_ukernel )
#undef GENPROT
#define GENPROT( opname ) \
\
void PASTEMAC0(opname) \
( \
obj_t* a, \
obj_t* b, \
obj_t* c, \
cntx_t* cntx \
);
GENPROT( trsm_ukernel )

View File

@@ -55,7 +55,7 @@ void PASTEMAC(ch,opname) \
\
/* Query the context for the function address of the current
datatype's micro-kernel. */ \
PASTECH2(ch,tname,_ft) f = bli_cntx_get_l3_vir_ukr_dt( dt, kerid, cntx ); \
PASTECH2(ch,tname,_ukr_ft) f = bli_cntx_get_l3_vir_ukr_dt( dt, kerid, cntx ); \
\
/* Invoke the typed function for the given datatype. */ \
f( \
@@ -70,41 +70,7 @@ void PASTEMAC(ch,opname) \
); \
} \
INSERT_GENTFUNC_BASIC2( gemm_ukernel, gemm_ukr, BLIS_GEMM_UKR )
#undef GENTFUNC
#define GENTFUNC( ctype, ch, opname, tname, kerid ) \
\
void PASTEMAC(ch,opname) \
( \
ctype* restrict a, \
ctype* restrict b, \
ctype* restrict c, inc_t rs_c, inc_t cs_c, \
auxinfo_t* restrict data, \
cntx_t* restrict cntx \
) \
{ \
bli_init_once(); \
\
const num_t dt = PASTEMAC(ch,type); \
\
/* Query the context for the function address of the current
datatype's micro-kernel. */ \
PASTECH2(ch,tname,_ft) f = bli_cntx_get_l3_vir_ukr_dt( dt, kerid, cntx ); \
\
/* Invoke the typed function for the given datatype. */ \
f( \
a, \
b, \
c, rs_c, cs_c, \
data, \
cntx \
); \
} \
INSERT_GENTFUNC_BASIC2( trsm_l_ukernel, trsm_ukr, BLIS_TRSM_L_UKR )
INSERT_GENTFUNC_BASIC2( trsm_u_ukernel, trsm_ukr, BLIS_TRSM_U_UKR )
INSERT_GENTFUNC_BASIC2( gemm_ukernel, gemm, BLIS_GEMM_UKR )
#undef GENTFUNC
@@ -129,7 +95,7 @@ void PASTEMAC(ch,opname) \
\
/* Query the context for the function address of the current
datatype's micro-kernel. */ \
PASTECH2(ch,tname,_ft) f = bli_cntx_get_l3_vir_ukr_dt( dt, kerid, cntx ); \
PASTECH2(ch,tname,_ukr_ft) f = bli_cntx_get_l3_vir_ukr_dt( dt, kerid, cntx ); \
\
/* Invoke the typed function for the given datatype. */ \
f( \
@@ -145,6 +111,40 @@ void PASTEMAC(ch,opname) \
); \
} \
INSERT_GENTFUNC_BASIC2( gemmtrsm_l_ukernel, gemmtrsm_ukr, BLIS_GEMMTRSM_L_UKR )
INSERT_GENTFUNC_BASIC2( gemmtrsm_u_ukernel, gemmtrsm_ukr, BLIS_GEMMTRSM_U_UKR )
INSERT_GENTFUNC_BASIC2( gemmtrsm_l_ukernel, gemmtrsm, BLIS_GEMMTRSM_L_UKR )
INSERT_GENTFUNC_BASIC2( gemmtrsm_u_ukernel, gemmtrsm, BLIS_GEMMTRSM_U_UKR )
#undef GENTFUNC
#define GENTFUNC( ctype, ch, opname, tname, kerid ) \
\
void PASTEMAC(ch,opname) \
( \
ctype* restrict a, \
ctype* restrict b, \
ctype* restrict c, inc_t rs_c, inc_t cs_c, \
auxinfo_t* restrict data, \
cntx_t* restrict cntx \
) \
{ \
bli_init_once(); \
\
const num_t dt = PASTEMAC(ch,type); \
\
/* Query the context for the function address of the current
datatype's micro-kernel. */ \
PASTECH2(ch,tname,_ukr_ft) f = bli_cntx_get_l3_vir_ukr_dt( dt, kerid, cntx ); \
\
/* Invoke the typed function for the given datatype. */ \
f( \
a, \
b, \
c, rs_c, cs_c, \
data, \
cntx \
); \
} \
INSERT_GENTFUNC_BASIC2( trsm_l_ukernel, trsm, BLIS_TRSM_L_UKR )
INSERT_GENTFUNC_BASIC2( trsm_u_ukernel, trsm, BLIS_TRSM_U_UKR )

View File

@@ -47,10 +47,10 @@ void bli_gemm_int
thrinfo_t* thread
)
{
obj_t a_local;
obj_t b_local;
obj_t c_local;
gemm_voft f;
obj_t a_local;
obj_t b_local;
obj_t c_local;
gemm_var_oft f;
// Check parameters.
if ( bli_error_checking_is_enabled() )

View File

@@ -34,7 +34,7 @@
#include "blis.h"
static gemm_voft vars[2] =
static gemm_var_oft vars[2] =
{
bli_herk_l_ker_var2, bli_herk_u_ker_var2,
};
@@ -50,8 +50,8 @@ void bli_herk_x_ker_var2
thrinfo_t* thread
)
{
bool_t uplo;
gemm_voft f;
bool_t uplo;
gemm_var_oft f;
// Set a bool based on the uplo field of C's root object.
if ( bli_obj_root_is_lower( c ) ) uplo = 0;

View File

@@ -34,7 +34,7 @@
#include "blis.h"
static gemm_voft vars[2][2] =
static gemm_var_oft vars[2][2] =
{
{ bli_trmm_ll_ker_var2, bli_trmm_lu_ker_var2 },
{ bli_trmm_rl_ker_var2, bli_trmm_ru_ker_var2 }
@@ -51,9 +51,9 @@ void bli_trmm_xx_ker_var2
thrinfo_t* thread
)
{
bool_t side;
bool_t uplo;
gemm_voft f;
bool_t side;
bool_t uplo;
gemm_var_oft f;
// Set two bools: one based on the implied side parameter (the structure
// of the root object) and one based on the uplo field of the triangular

View File

@@ -47,10 +47,10 @@ void bli_trsm_int
thrinfo_t* thread
)
{
obj_t a_local;
obj_t b_local;
obj_t c_local;
trsm_voft f;
obj_t a_local;
obj_t b_local;
obj_t c_local;
trsm_var_oft f;
// Check parameters.
if ( bli_error_checking_is_enabled() )

View File

@@ -34,7 +34,7 @@
#include "blis.h"
static trsm_voft vars[2][2] =
static trsm_var_oft vars[2][2] =
{
{ bli_trsm_ll_ker_var2, bli_trsm_lu_ker_var2 },
{ bli_trsm_rl_ker_var2, bli_trsm_ru_ker_var2 }
@@ -51,9 +51,9 @@ void bli_trsm_xx_ker_var2
thrinfo_t* thread
)
{
bool_t side;
bool_t uplo;
trsm_voft f;
bool_t side;
bool_t uplo;
trsm_var_oft f;
// Set two bools: one based on the implied side parameter (the structure
// of the root object) and one based on the uplo field of the triangular

View File

@@ -40,15 +40,27 @@
// -- "Smart" one-operand macro --
#define GENARRAY_VFP(ftname,opname) \
#define GENARRAY_FPA(tname,opname) \
\
PASTECH(ftname,_vft) \
PASTECH(opname,_vfp)[BLIS_NUM_FP_TYPES] = \
static tname PASTECH(opname,_fpa)[BLIS_NUM_FP_TYPES] = \
{ \
PASTEMAC(s,opname), \
PASTEMAC(c,opname), \
PASTEMAC(d,opname), \
PASTEMAC(z,opname) \
( tname )PASTEMAC(s,opname), \
( tname )PASTEMAC(c,opname), \
( tname )PASTEMAC(d,opname), \
( tname )PASTEMAC(z,opname) \
}
// -- "Smart" one-operand macro (with integer support) --
#define GENARRAY_FPA_I(tname,opname) \
\
static tname PASTECH(opname,_fpa)[BLIS_NUM_FP_TYPES+1] = \
{ \
( tname )PASTEMAC(s,opname), \
( tname )PASTEMAC(c,opname), \
( tname )PASTEMAC(d,opname), \
( tname )PASTEMAC(z,opname), \
( tname )PASTEMAC(i,opname) \
}
// -- "Smart" two-operand macro --

View File

@@ -148,130 +148,6 @@ static void bli_toggle_bool( bool_t* b )
#define bli_zformatspec() "%9.2e + %9.2e "
#define bli_iformatspec() "%6d"
// -- Function caller/chooser macros --
#define bli_call_ft_2( dt, fname, o0, o1 ) \
{ \
if ( bli_is_float( dt ) ) PASTEMAC(s,fname)(o0,o1); \
else if ( bli_is_double( dt ) ) PASTEMAC(d,fname)(o0,o1); \
else if ( bli_is_scomplex( dt ) ) PASTEMAC(c,fname)(o0,o1); \
else if ( bli_is_dcomplex( dt ) ) PASTEMAC(z,fname)(o0,o1); \
}
#define bli_call_ft_3( dt, fname, o0, o1, o2 ) \
{ \
if ( bli_is_float( dt ) ) PASTEMAC(s,fname)(o0,o1,o2); \
else if ( bli_is_double( dt ) ) PASTEMAC(d,fname)(o0,o1,o2); \
else if ( bli_is_scomplex( dt ) ) PASTEMAC(c,fname)(o0,o1,o2); \
else if ( bli_is_dcomplex( dt ) ) PASTEMAC(z,fname)(o0,o1,o2); \
}
#define bli_call_ft_3i( dt, fname, o0, o1, o2 ) \
{ \
if ( bli_is_float( dt ) ) PASTEMAC(s,fname)(o0,o1,o2); \
else if ( bli_is_double( dt ) ) PASTEMAC(d,fname)(o0,o1,o2); \
else if ( bli_is_scomplex( dt ) ) PASTEMAC(c,fname)(o0,o1,o2); \
else if ( bli_is_dcomplex( dt ) ) PASTEMAC(z,fname)(o0,o1,o2); \
else if ( bli_is_int( dt ) ) PASTEMAC(i,fname)(o0,o1,o2); \
}
#define bli_call_ft_4( dt, fname, o0, o1, o2, o3 ) \
{ \
if ( bli_is_float( dt ) ) PASTEMAC(s,fname)(o0,o1,o2,o3); \
else if ( bli_is_double( dt ) ) PASTEMAC(d,fname)(o0,o1,o2,o3); \
else if ( bli_is_scomplex( dt ) ) PASTEMAC(c,fname)(o0,o1,o2,o3); \
else if ( bli_is_dcomplex( dt ) ) PASTEMAC(z,fname)(o0,o1,o2,o3); \
}
#define bli_call_ft_5( dt, fname, o0, o1, o2, o3, o4 ) \
{ \
if ( bli_is_float( dt ) ) PASTEMAC(s,fname)(o0,o1,o2,o3,o4); \
else if ( bli_is_double( dt ) ) PASTEMAC(d,fname)(o0,o1,o2,o3,o4); \
else if ( bli_is_scomplex( dt ) ) PASTEMAC(c,fname)(o0,o1,o2,o3,o4); \
else if ( bli_is_dcomplex( dt ) ) PASTEMAC(z,fname)(o0,o1,o2,o3,o4); \
}
#define bli_call_ft_6( dt, fname, o0, o1, o2, o3, o4, o5 ) \
{ \
if ( bli_is_float( dt ) ) PASTEMAC(s,fname)(o0,o1,o2,o3,o4,o5); \
else if ( bli_is_double( dt ) ) PASTEMAC(d,fname)(o0,o1,o2,o3,o4,o5); \
else if ( bli_is_scomplex( dt ) ) PASTEMAC(c,fname)(o0,o1,o2,o3,o4,o5); \
else if ( bli_is_dcomplex( dt ) ) PASTEMAC(z,fname)(o0,o1,o2,o3,o4,o5); \
}
#define bli_call_ft_7( dt, fname, o0, o1, o2, o3, o4, o5, o6 ) \
{ \
if ( bli_is_float( dt ) ) PASTEMAC(s,fname)(o0,o1,o2,o3,o4,o5,o6); \
else if ( bli_is_double( dt ) ) PASTEMAC(d,fname)(o0,o1,o2,o3,o4,o5,o6); \
else if ( bli_is_scomplex( dt ) ) PASTEMAC(c,fname)(o0,o1,o2,o3,o4,o5,o6); \
else if ( bli_is_dcomplex( dt ) ) PASTEMAC(z,fname)(o0,o1,o2,o3,o4,o5,o6); \
}
#define bli_call_ft_8( dt, fname, o0, o1, o2, o3, o4, o5, o6, o7 ) \
{ \
if ( bli_is_float( dt ) ) PASTEMAC(s,fname)(o0,o1,o2,o3,o4,o5,o6,o7); \
else if ( bli_is_double( dt ) ) PASTEMAC(d,fname)(o0,o1,o2,o3,o4,o5,o6,o7); \
else if ( bli_is_scomplex( dt ) ) PASTEMAC(c,fname)(o0,o1,o2,o3,o4,o5,o6,o7); \
else if ( bli_is_dcomplex( dt ) ) PASTEMAC(z,fname)(o0,o1,o2,o3,o4,o5,o6,o7); \
}
#define bli_call_ft_9( dt, fname, o0, o1, o2, o3, o4, o5, o6, o7, o8 ) \
{ \
if ( bli_is_float( dt ) ) PASTEMAC(s,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8); \
else if ( bli_is_double( dt ) ) PASTEMAC(d,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8); \
else if ( bli_is_scomplex( dt ) ) PASTEMAC(c,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8); \
else if ( bli_is_dcomplex( dt ) ) PASTEMAC(z,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8); \
}
#define bli_call_ft_10( dt, fname, o0, o1, o2, o3, o4, o5, o6, o7, o8, o9 ) \
{ \
if ( bli_is_float( dt ) ) PASTEMAC(s,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9); \
else if ( bli_is_double( dt ) ) PASTEMAC(d,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9); \
else if ( bli_is_scomplex( dt ) ) PASTEMAC(c,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9); \
else if ( bli_is_dcomplex( dt ) ) PASTEMAC(z,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9); \
}
#define bli_call_ft_11( dt, fname, o0, o1, o2, o3, o4, o5, o6, o7, o8, o9, o10 ) \
{ \
if ( bli_is_float( dt ) ) PASTEMAC(s,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9,o10); \
else if ( bli_is_double( dt ) ) PASTEMAC(d,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9,o10); \
else if ( bli_is_scomplex( dt ) ) PASTEMAC(c,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9,o10); \
else if ( bli_is_dcomplex( dt ) ) PASTEMAC(z,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9,o10); \
}
#define bli_call_ft_12( dt, fname, o0, o1, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11 ) \
{ \
if ( bli_is_float( dt ) ) PASTEMAC(s,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9,o10,o11); \
else if ( bli_is_double( dt ) ) PASTEMAC(d,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9,o10,o11); \
else if ( bli_is_scomplex( dt ) ) PASTEMAC(c,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9,o10,o11); \
else if ( bli_is_dcomplex( dt ) ) PASTEMAC(z,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9,o10,o11); \
}
#define bli_call_ft_13( dt, fname, o0, o1, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11, o12 ) \
{ \
if ( bli_is_float( dt ) ) PASTEMAC(s,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9,o10,o11,o12); \
else if ( bli_is_double( dt ) ) PASTEMAC(d,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9,o10,o11,o12); \
else if ( bli_is_scomplex( dt ) ) PASTEMAC(c,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9,o10,o11,o12); \
else if ( bli_is_dcomplex( dt ) ) PASTEMAC(z,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9,o10,o11,o12); \
}
#define bli_call_ft_14( dt, fname, o0, o1, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11, o12, o13 ) \
{ \
if ( bli_is_float( dt ) ) PASTEMAC(s,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9,o10,o11,o12,o13); \
else if ( bli_is_double( dt ) ) PASTEMAC(d,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9,o10,o11,o12,o13); \
else if ( bli_is_scomplex( dt ) ) PASTEMAC(c,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9,o10,o11,o12,o13); \
else if ( bli_is_dcomplex( dt ) ) PASTEMAC(z,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9,o10,o11,o12,o13); \
}
#define bli_call_ft_15( dt, fname, o0, o1, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11, o12, o13, o14 ) \
{ \
if ( bli_is_float( dt ) ) PASTEMAC(s,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9,o10,o11,o12,o13,o14); \
else if ( bli_is_double( dt ) ) PASTEMAC(d,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9,o10,o11,o12,o13,o14); \
else if ( bli_is_scomplex( dt ) ) PASTEMAC(c,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9,o10,o11,o12,o13,o14); \
else if ( bli_is_dcomplex( dt ) ) PASTEMAC(z,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9,o10,o11,o12,o13,o14); \
}
#define bli_call_ft_20( dt, fname, o0, o1, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11, o12, o13, o14, o15, o16, o17, o18, o19 ) \
{ \
if ( bli_is_float( dt ) ) PASTEMAC(s,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9,o10,o11,o12,o13,o14,o15,o16,o17,o18,o19); \
else if ( bli_is_double( dt ) ) PASTEMAC(d,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9,o10,o11,o12,o13,o14,o15,o16,o17,o18,o19); \
else if ( bli_is_scomplex( dt ) ) PASTEMAC(c,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9,o10,o11,o12,o13,o14,o15,o16,o17,o18,o19); \
else if ( bli_is_dcomplex( dt ) ) PASTEMAC(z,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9,o10,o11,o12,o13,o14,o15,o16,o17,o18,o19); \
}
#define bli_call_ft_21( dt, fname, o0, o1, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11, o12, o13, o14, o15, o16, o17, o18, o19, o20 ) \
{ \
if ( bli_is_float( dt ) ) PASTEMAC(s,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9,o10,o11,o12,o13,o14,o15,o16,o17,o18,o19,o20); \
else if ( bli_is_double( dt ) ) PASTEMAC(d,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9,o10,o11,o12,o13,o14,o15,o16,o17,o18,o19,o20); \
else if ( bli_is_scomplex( dt ) ) PASTEMAC(c,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9,o10,o11,o12,o13,o14,o15,o16,o17,o18,o19,o20); \
else if ( bli_is_dcomplex( dt ) ) PASTEMAC(z,fname)(o0,o1,o2,o3,o4,o5,o6,o7,o8,o9,o10,o11,o12,o13,o14,o15,o16,o17,o18,o19,o20); \
}
#endif

Some files were not shown because too many files have changed in this diff Show More