conflicts merge for bli_kernel.h

Change-Id: I15d846bd34e11f86ebfd7ed091ff671a1f3366a0
This commit is contained in:
praveeng
2016-10-06 12:35:30 +05:30
371 changed files with 8355 additions and 8283 deletions

View File

@@ -38,21 +38,6 @@
// Define object-based check functions.
//
#undef GENFRONT
#define GENFRONT( opname ) \
\
void PASTEMAC(opname,_check) \
( \
obj_t* x, \
obj_t* index \
) \
{ \
bli_utilv_xi_check( x, index ); \
}
GENFRONT( amaxv )
#undef GENFRONT
#define GENFRONT( opname ) \
\
@@ -172,42 +157,6 @@ GENFRONT( sumsqv )
// -----------------------------------------------------------------------------
void bli_utilv_xi_check
(
obj_t* x,
obj_t* index
)
{
err_t e_val;
// Check object datatypes.
e_val = bli_check_floating_object( x );
bli_check_error_code( e_val );
e_val = bli_check_integer_object( index );
bli_check_error_code( e_val );
e_val = bli_check_nonconstant_object( index );
bli_check_error_code( e_val );
// Check object dimensions.
e_val = bli_check_vector_object( x );
bli_check_error_code( e_val );
e_val = bli_check_scalar_object( index );
bli_check_error_code( e_val );
// Check object buffers (for non-NULLness).
e_val = bli_check_object_buffer( x );
bli_check_error_code( e_val );
e_val = bli_check_object_buffer( index );
bli_check_error_code( e_val );
}
void bli_utilv_xa_check
(
obj_t* x,

View File

@@ -37,18 +37,6 @@
// Prototype object-based check functions.
//
#undef GENPROT
#define GENPROT( opname ) \
\
void PASTEMAC(opname,_check) \
( \
obj_t* x, \
obj_t* index \
);
GENPROT( amaxv )
#undef GENPROT
#define GENPROT( opname ) \
\

View File

@@ -40,44 +40,6 @@
// Define object-based interfaces.
//
#undef GENFRONT
#define GENFRONT( opname ) \
\
void PASTEMAC(opname,EX_SUF) \
( \
obj_t* x, \
obj_t* index \
BLIS_OAPI_CNTX_PARAM \
) \
{ \
BLIS_OAPI_CNTX_DECL \
\
num_t dt = bli_obj_datatype( *x ); \
\
dim_t n = bli_obj_vector_dim( *x ); \
void* buf_x = bli_obj_buffer_at_off( *x ); \
inc_t incx = bli_obj_vector_inc( *x ); \
\
void* buf_index = bli_obj_buffer_at_off( *index ); \
\
if ( bli_error_checking_is_enabled() ) \
PASTEMAC(opname,_check)( x, index ); \
\
/* Invoke the typed function. */ \
bli_call_ft_5 \
( \
dt, \
opname, \
n, \
buf_x, incx, \
buf_index, \
cntx \
); \
}
GENFRONT( amaxv )
#undef GENFRONT
#define GENFRONT( opname ) \
\

View File

@@ -37,19 +37,6 @@
// Prototype object-based interfaces.
//
#undef GENPROT
#define GENPROT( opname ) \
\
void PASTEMAC(opname,EX_SUF) \
( \
obj_t* x, \
obj_t* index \
BLIS_OAPI_CNTX_PARAM \
);
GENPROT( amaxv )
#undef GENPROT
#define GENPROT( opname ) \
\

View File

@@ -38,50 +38,6 @@
// Define BLAS-like interfaces with typed operands.
//
#undef GENTFUNCI
#define GENTFUNCI( ctype, ctype_i, ch, chi, opname ) \
\
void PASTEMAC(ch,opname) \
( \
dim_t n, \
ctype* x, inc_t incx, \
ctype_i* index, \
cntx_t* cntx \
) \
{ \
cntx_t* cntx_p = cntx; \
\
/* If the vector length is zero, set the index to zero and return
early. This directly emulatess the behavior of netlib LAPACK's
i?amax() routines. */ \
if ( bli_zero_dim1( n ) ) \
{ \
ctype_i* zero_i = PASTEMAC(chi,0); \
\
PASTEMAC(chi,copys)( *zero_i, *index ); \
return; \
} \
\
/* Initialize a local context if the given context is NULL. */ \
/*bli_cntx_init_local_if( opname, cntx, cntx_p );*/ \
\
/* Invoke the helper variant, which loops over the appropriate kernel
to implement the current operation. */ \
PASTEMAC2(ch,opname,_unb_var1) \
( \
n, \
x, incx, \
index, \
cntx_p \
); \
\
/* Finalize the context if it was initialized locally. */ \
/*bli_cntx_finalize_local_if( opname, cntx );*/ \
}
INSERT_GENTFUNCI_BASIC0( amaxv )
#undef GENTFUNCR
#define GENTFUNCR( ctype, ctype_r, ch, chr, opname ) \
\

View File

@@ -37,20 +37,6 @@
// Prototype BLAS-like interfaces with typed operands.
//
#undef GENTPROTI
#define GENTPROTI( ctype, ctype_i, ch, chi, opname ) \
\
void PASTEMAC(ch,opname) \
( \
dim_t n, \
ctype* x, inc_t incx, \
ctype_i* index, \
cntx_t* cntx \
);
INSERT_GENTPROTI_BASIC( amaxv )
#undef GENTPROTR
#define GENTPROTR( ctype, ctype_r, ch, chr, opname ) \
\

View File

@@ -39,71 +39,6 @@
// Define BLAS-like interfaces with typed operands.
//
#undef GENTFUNCRI
#define GENTFUNCRI( ctype, ctype_r, ctype_i, ch, chr, chi, varname ) \
\
void PASTEMAC(ch,varname) \
( \
dim_t n, \
ctype* x, inc_t incx, \
ctype_i* abmax_i, \
cntx_t* cntx \
) \
{ \
ctype_r* minus_one = PASTEMAC(chr,m1); \
ctype_i* zero_i = PASTEMAC(chi,0); \
\
ctype* chi1; \
ctype_r chi1_r; \
ctype_r chi1_i; \
ctype_r abs_chi1; \
ctype_r abs_chi1_max; \
ctype_i i_max; \
dim_t i; \
\
/* Initialize the index of the maximum absolute value to zero. */ \
PASTEMAC(chi,copys)( *zero_i, i_max ); \
\
/* Initialize the maximum absolute value search candidate with
-1, which is guaranteed to be less than all values we will
compute. */ \
PASTEMAC(chr,copys)( *minus_one, abs_chi1_max ); \
\
for ( i = 0; i < n; ++i ) \
{ \
chi1 = x + (i )*incx; \
\
/* Get the real and imaginary components of chi1. */ \
PASTEMAC2(ch,chr,gets)( *chi1, chi1_r, chi1_i ); \
\
/* Replace chi1_r and chi1_i with their absolute values. */ \
PASTEMAC(chr,abval2s)( chi1_r, chi1_r ); \
PASTEMAC(chr,abval2s)( chi1_i, chi1_i ); \
\
/* Add the real and imaginary absolute values together. */ \
PASTEMAC(chr,set0s)( abs_chi1 ); \
PASTEMAC(chr,adds)( chi1_r, abs_chi1 ); \
PASTEMAC(chr,adds)( chi1_i, abs_chi1 ); \
\
/* If the absolute value of the current element exceeds that of
the previous largest, save it and its index. If NaN is
encountered, then treat it the same as if it were a valid
value that was smaller than any previously seen. This
behavior mimics that of LAPACK's ?lange(). */ \
if ( abs_chi1_max < abs_chi1 || bli_isnan( abs_chi1 ) ) \
{ \
PASTEMAC(chr,copys)( abs_chi1, abs_chi1_max ); \
PASTEMAC(chi,copys)( i, i_max ); \
} \
} \
\
/* Store final index to output variable. */ \
PASTEMAC(chi,copys)( i_max, *abmax_i ); \
}
INSERT_GENTFUNCRI_BASIC0( amaxv_unb_var1 )
#undef GENTFUNCR
#define GENTFUNCR( ctype, ctype_r, ch, chr, varname ) \
\

View File

@@ -37,20 +37,6 @@
// Prototype BLAS-like interfaces with typed operands.
//
#undef GENTPROTRI
#define GENTPROTRI( ctype, ctype_r, ctype_i, ch, chr, chi, varname ) \
\
void PASTEMAC(ch,varname) \
( \
dim_t n, \
ctype* x, inc_t incx, \
ctype_i* abmax_i, \
cntx_t* cntx \
);
INSERT_GENTPROTRI_BASIC( amaxv_unb_var1 )
#undef GENTPROTR
#define GENTPROTR( ctype, ctype_r, ch, chr, varname ) \
\