dnl ************************************************************************* dnl * Generates alpha, T, x, and y, where T is a triangular Banded matrix; * dnl * and computes r_true. * dnl ************************************************************************* dnl dnl include(cblas.m4)dnl include(test-common.m4)dnl dnl dnl define(`TBSV_TESTGEN_COMMENT', ` /* * Purpose * ======= * * Generates alpha, x and T, where T is a triangular Banded matrix; * and computes r_true. * * Arguments * ========= * * norm (input) blas_norm_type * * order (input) blas_order_type * Order of T; row or column major * * uplo (input) blas_uplo_type * Whether T is upper or lower * * trans (input) blas_trans_type * No trans, trans, conj trans * * diag (input) blas_diag_type * non unit, unit * * n (input) int * Dimension of T and the length of vector x * * k (input) int * Number of super(sub)diagonals of T * * alpha (input/output) $1_array * If alpha_flag = 1, alpha is input. * If alpha_flag = 0, alpha is output. * * alpha_flag (input) int * = 0 : alpha is free, and is output. * = 1 : alpha is fixed on input. * * T (output) $2_array * * x (input/output) $1_array * * seed (input/output) int * * HEAD(r_true) (output) double* * The leading part of the truth in double-double. * * TAIL(r_true) (output) double* * The trailing part of the truth in double-double. * * row (input) int * The true row being generated * * prec (input) blas_prec_type * single, double, or extra precision * */')dnl dnl dnl dnl define(`TBSV_TESTGEN_NAME', `ifelse(`$1&&$2', `$1&&$1', `BLAS_$1tbsv_testgen', `BLAS_$1tbsv_$2_testgen')')dnl dnl dnl define(`TBSV_TESTGEN_HEAD', `void TBSV_TESTGEN_NAME($1, $2)(int norm, enum blas_order_type order, dnl enum blas_uplo_type uplo, enum blas_trans_type trans, dnl enum blas_diag_type diag, int n, int k, int randomize, dnl $1_array alpha, int alpha_flag, $2_array T, int ldt, dnl $1_array x,int *seed, double *HEAD(r_true), double *TAIL(r_true), dnl int row, enum blas_prec_type prec)')dnl dnl dnl dnl --------------------------------------------------------------------- dnl Usage: TBSV_TESTGEN(ax_typeltr, T_typeltr) dnl produce tbsv_prepare signature dnl --------------------------------------------------------------------- define(`TBSV_TESTGEN', `dnl TBSV_TESTGEN_HEAD($1, $2) TBSV_TESTGEN_COMMENT($1, $2) IF_REAL($1_type, `TBSV_TESTGEN_BODY($1, $2)', `IF_REAL($2_type, `TBSV_TESTGEN_MIX_COMPLEX_BODY($1, $2)', `TBSV_TESTGEN_PURE_COMPLEX_BODY($1, $2)')') ')dnl dnl dnl dnl --------------------------------------------------------------------- dnl Usage: TBSV_TESTGEN_BODY(ax_typeltr, T_typeltr) dnl dnl --------------------------------------------------------------------- define(`TBSV_TESTGEN_BODY', `{ int start; int length; int i, j; int tempi, inc_tempi; DECLARE(alpha_i, real_S) DECLARE(minus_one, $1_type) DECLARE(Tii, $2_type) DECLARE_VECTOR(temp, $2_type) DECLARE_VECTOR(xtemp2, $1_type) MALLOC_VECTOR(temp, $2_type, n*2) /* always allocate, not always needed */ MALLOC_VECTOR(xtemp2, $1_type, n*2) minus_one = -1.0; /* if alpha_flag=0, gives a random value to alpha */ if (alpha_flag == 0){ alpha_i = xrand(seed); *alpha = alpha_i; alpha_flag = 1; } for(i=0; i<4*n*ldt; i++){ ZERO(T[i], $1_type) } inc_tempi = 1; INC_ADJUST(inc_tempi, $2_type) for(i=0; i