dnl ********************************************************************** dnl * Generates alpha, tp, and x, where tp is a triangular packed matrix;* dnl * and computes r_true. * dnl ********************************************************************** dnl dnl include(cblas.m4)dnl include(test-common.m4)dnl dnl dnl define(`TPMV_TESTGEN_COMMENT', ` /* * Purpose * ======= * * Generates alpha, tp and x, where tp is a triangular matrix; and computes r_true. * * Arguments * ========= * * norm (input) blas_norm_type * * order (input) blas_order_type * Order of tp; row or column major * * uplo (input) blas_uplo_type * Whether tp 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 tp and the length of vector x * * 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. * * tp (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. * */') dnl dnl dnl dnl --------------------------------------------------------------------- dnl Usage: TPMV_TESTGEN(ax_typeltr, tp_typeltr) dnl produce tpmv_prepare signature dnl --------------------------------------------------------------------- define(`TPMV_TESTGEN_NAME', `BLAS_$1tpmv`'ifelse(`$1', `$2', `', `_$2')_testgen')dnl dnl dnl define(`TPMV_TESTGEN_HEAD', `void TPMV_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, $1_array alpha, int alpha_flag, dnl $2_array tp, $1_array x, int *seed, dnl double *HEAD(r_true), double *TAIL(r_true))')dnl dnl dnl define(`TPMV_TESTGEN', ` TPMV_TESTGEN_HEAD($1, $2) TPMV_TESTGEN_COMMENT($1, $2) TPMV_TESTGEN_BODY($1, $2)')dnl dnl dnl dnl --------------------------------------------------------------------- dnl Usage: TPMV_TESTGEN_BODY(ax_typeltr, tp_typeltr) dnl dnl --------------------------------------------------------------------- define(`TPMV_TESTGEN_BODY', `{ int n_fix2 = 0; int n_mix = 0; int i; int j; int length; DECLARE_VECTOR(temp, $2_type) DECLARE(beta_zero_fake, $1_type) int beta_flag = 1; DECLARE(r_zero_fake, $1_type) DECLARE(one_this, $2_type) DECLARE(tp_swapTemp1, $2_type) DECLARE(tp_swapTemp2, $2_type) DECLARE(x_swapTemp1, $1_type) DECLARE(x_swapTemp2, $1_type) DECLARE(r_true_swapTemp1, R_TRUE_TYPE($1)) DECLARE(r_true_swapTemp2, R_TRUE_TYPE($1)) PTR_CAST(x, $1_type) PTR_CAST(alpha, $1_type) int inctp = 1; int inc_index = 1; ZERO(beta_zero_fake, $1_type) ZERO(r_zero_fake, $1_type) ONE(one_this, $2_type) INC_ADJUST(inctp, $2_type) INC_ADJUST(inc_index, $1_type) MALLOC_VECTOR(temp, $2_type, n*2*inc_index) for (i=0; i