void bli_dsyr2_blas( uplo_t uplo, int m, double* alpha, double* x, int incx, double* y, int incy, double* a, int lda ) { #ifdef BLIS_ENABLE_CBLAS_INTERFACES enum CBLAS_ORDER cblas_order = CblasColMajor; enum CBLAS_UPLO cblas_uplo; bli_param_map_to_netlib_uplo( uplo, &cblas_uplo ); cblas_dsyr2( cblas_order, cblas_uplo, m, *alpha, x, incx, y, incy, a, lda ); #else char blas_uplo; bli_param_map_to_netlib_uplo( uplo, &blas_uplo ); F77_dsyr2( &blas_uplo, &m, alpha, x, &incx, y, &incy, a, &lda ); #endif }
inline void syr2 (CBLAS_ORDER const Order, CBLAS_UPLO const Uplo, int const N, double const alpha, double const* X, int const incX, double const* Y, int const incY, double* A, int const lda) { cblas_dsyr2 (Order, Uplo, N, alpha, X, incX, Y, incY, A, lda); }
JNIEXPORT void JNICALL Java_uncomplicate_neanderthal_CBLAS_dsyr2 (JNIEnv *env, jclass clazz, jint Order, jint Uplo, jint N, jdouble alpha, jobject X, jint offsetX, jint incX, jobject Y, jint offsetY, jint incY, jobject A, jint offsetA, jint lda) { double *cX = (double *) (*env)->GetDirectBufferAddress(env, X); double *cY = (double *) (*env)->GetDirectBufferAddress(env, Y); double *cA = (double *) (*env)->GetDirectBufferAddress(env, A); cblas_dsyr2(Order, Uplo, N, alpha, cX + offsetX, incX, cY + offsetY, incY, cA + offsetA, lda); };
void F77_dsyr2(int *order, char *uplow, int *n, double *alpha, double *x, int *incx, double *y, int *incy, double *a, int *lda) { double *A; int i,j,LDA; enum CBLAS_UPLO uplo; get_uplo_type(uplow,&uplo); if (*order == TEST_ROW_MJR) { LDA = *n+1; A = ( double* )malloc( (*n)*LDA*sizeof( double ) ); for( i=0; i<*n; i++ ) for( j=0; j<*n; j++ ) A[ LDA*i+j ]=a[ (*lda)*j+i ]; cblas_dsyr2(CblasRowMajor, uplo, *n, *alpha, x, *incx, y, *incy, A, LDA); for( i=0; i<*n; i++ ) for( j=0; j<*n; j++ ) a[ (*lda)*j+i ]=A[ LDA*i+j ]; free(A); } else cblas_dsyr2(CblasColMajor, uplo, *n, *alpha, x, *incx, y, *incy, a, *lda); }
/* f77 interface */ void dsyr2_(char *uplo, int *n, double *alpha, double *X, int *incx, double *Y, int *incy, double *A, int *lda) { enum CBLAS_UPLO Uplo; int info = 0; if (F77UploToCBlasUplo(uplo,&Uplo) < 0) info = 1; if (info != 0) { xerbla_(ERROR_NAME, &info); return; } Blasx_Debug_Output("Calling dsymv_ interface\n"); cblas_dsyr2(CblasColMajor, Uplo, *n, *alpha, X, *incx, Y, *incy, A, *lda); }
inline void syr2( const Order order, const UpLo uplo, const int n, const double alpha, const double* x, const int incx, const double* y, const int incy, double* a, const int lda ) { cblas_dsyr2( cblas_option< Order >::value, cblas_option< UpLo >::value, n, alpha, x, incx, y, incy, a, lda ); }
void F77_d2chke(char *rout) { char *sf = ( rout ) ; double A[2] = {0.0,0.0}, X[2] = {0.0,0.0}, Y[2] = {0.0,0.0}, ALPHA=0.0, BETA=0.0; extern int cblas_info, cblas_lerr, cblas_ok; extern int RowMajorStrg; extern char *cblas_rout; if (link_xerbla) /* call these first to link */ { cblas_xerbla(cblas_info,cblas_rout,""); F77_xerbla(cblas_rout,&cblas_info); } cblas_ok = TRUE ; cblas_lerr = PASSED ; if (strncmp( sf,"cblas_dgemv",11)==0) { cblas_rout = "cblas_dgemv"; cblas_info = 1; cblas_dgemv(INVALID, CblasNoTrans, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 2; RowMajorStrg = FALSE; cblas_dgemv(CblasColMajor, INVALID, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 3; RowMajorStrg = FALSE; cblas_dgemv(CblasColMajor, CblasNoTrans, INVALID, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 4; RowMajorStrg = FALSE; cblas_dgemv(CblasColMajor, CblasNoTrans, 0, INVALID, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 7; RowMajorStrg = FALSE; cblas_dgemv(CblasColMajor, CblasNoTrans, 2, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 9; RowMajorStrg = FALSE; cblas_dgemv(CblasColMajor, CblasNoTrans, 0, 0, ALPHA, A, 1, X, 0, BETA, Y, 1 ); chkxer(); cblas_info = 12; RowMajorStrg = FALSE; cblas_dgemv(CblasColMajor, CblasNoTrans, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 0 ); chkxer(); cblas_info = 2; RowMajorStrg = TRUE; RowMajorStrg = TRUE; cblas_dgemv(CblasRowMajor, INVALID, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 3; RowMajorStrg = TRUE; cblas_dgemv(CblasRowMajor, CblasNoTrans, INVALID, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 4; RowMajorStrg = TRUE; cblas_dgemv(CblasRowMajor, CblasNoTrans, 0, INVALID, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 7; RowMajorStrg = TRUE; cblas_dgemv(CblasRowMajor, CblasNoTrans, 0, 2, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 9; RowMajorStrg = TRUE; cblas_dgemv(CblasRowMajor, CblasNoTrans, 0, 0, ALPHA, A, 1, X, 0, BETA, Y, 1 ); chkxer(); cblas_info = 12; RowMajorStrg = TRUE; cblas_dgemv(CblasRowMajor, CblasNoTrans, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 0 ); chkxer(); } else if (strncmp( sf,"cblas_dgbmv",11)==0) { cblas_rout = "cblas_dgbmv"; cblas_info = 1; RowMajorStrg = FALSE; cblas_dgbmv(INVALID, CblasNoTrans, 0, 0, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 2; RowMajorStrg = FALSE; cblas_dgbmv(CblasColMajor, INVALID, 0, 0, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 3; RowMajorStrg = FALSE; cblas_dgbmv(CblasColMajor, CblasNoTrans, INVALID, 0, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 4; RowMajorStrg = FALSE; cblas_dgbmv(CblasColMajor, CblasNoTrans, 0, INVALID, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 5; RowMajorStrg = FALSE; cblas_dgbmv(CblasColMajor, CblasNoTrans, 0, 0, INVALID, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 6; RowMajorStrg = FALSE; cblas_dgbmv(CblasColMajor, CblasNoTrans, 2, 0, 0, INVALID, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 9; RowMajorStrg = FALSE; cblas_dgbmv(CblasColMajor, CblasNoTrans, 0, 0, 1, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 11; RowMajorStrg = FALSE; cblas_dgbmv(CblasColMajor, CblasNoTrans, 0, 0, 0, 0, ALPHA, A, 1, X, 0, BETA, Y, 1 ); chkxer(); cblas_info = 14; RowMajorStrg = FALSE; cblas_dgbmv(CblasColMajor, CblasNoTrans, 0, 0, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 0 ); chkxer(); cblas_info = 2; RowMajorStrg = TRUE; cblas_dgbmv(CblasRowMajor, INVALID, 0, 0, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 3; RowMajorStrg = TRUE; cblas_dgbmv(CblasRowMajor, CblasNoTrans, INVALID, 0, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 4; RowMajorStrg = TRUE; cblas_dgbmv(CblasRowMajor, CblasNoTrans, 0, INVALID, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 5; RowMajorStrg = TRUE; cblas_dgbmv(CblasRowMajor, CblasNoTrans, 0, 0, INVALID, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 6; RowMajorStrg = TRUE; cblas_dgbmv(CblasRowMajor, CblasNoTrans, 2, 0, 0, INVALID, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 9; RowMajorStrg = TRUE; cblas_dgbmv(CblasRowMajor, CblasNoTrans, 0, 0, 1, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 11; RowMajorStrg = TRUE; cblas_dgbmv(CblasRowMajor, CblasNoTrans, 0, 0, 0, 0, ALPHA, A, 1, X, 0, BETA, Y, 1 ); chkxer(); cblas_info = 14; RowMajorStrg = TRUE; cblas_dgbmv(CblasRowMajor, CblasNoTrans, 0, 0, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 0 ); chkxer(); } else if (strncmp( sf,"cblas_dsymv",11)==0) { cblas_rout = "cblas_dsymv"; cblas_info = 1; RowMajorStrg = FALSE; cblas_dsymv(INVALID, CblasUpper, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 2; RowMajorStrg = FALSE; cblas_dsymv(CblasColMajor, INVALID, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 3; RowMajorStrg = FALSE; cblas_dsymv(CblasColMajor, CblasUpper, INVALID, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 6; RowMajorStrg = FALSE; cblas_dsymv(CblasColMajor, CblasUpper, 2, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 8; RowMajorStrg = FALSE; cblas_dsymv(CblasColMajor, CblasUpper, 0, ALPHA, A, 1, X, 0, BETA, Y, 1 ); chkxer(); cblas_info = 11; RowMajorStrg = FALSE; cblas_dsymv(CblasColMajor, CblasUpper, 0, ALPHA, A, 1, X, 1, BETA, Y, 0 ); chkxer(); cblas_info = 2; RowMajorStrg = TRUE; cblas_dsymv(CblasRowMajor, INVALID, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 3; RowMajorStrg = TRUE; cblas_dsymv(CblasRowMajor, CblasUpper, INVALID, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 6; RowMajorStrg = TRUE; cblas_dsymv(CblasRowMajor, CblasUpper, 2, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 8; RowMajorStrg = TRUE; cblas_dsymv(CblasRowMajor, CblasUpper, 0, ALPHA, A, 1, X, 0, BETA, Y, 1 ); chkxer(); cblas_info = 11; RowMajorStrg = TRUE; cblas_dsymv(CblasRowMajor, CblasUpper, 0, ALPHA, A, 1, X, 1, BETA, Y, 0 ); chkxer(); } else if (strncmp( sf,"cblas_dsbmv",11)==0) { cblas_rout = "cblas_dsbmv"; cblas_info = 1; RowMajorStrg = FALSE; cblas_dsbmv(INVALID, CblasUpper, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 2; RowMajorStrg = FALSE; cblas_dsbmv(CblasColMajor, INVALID, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 3; RowMajorStrg = FALSE; cblas_dsbmv(CblasColMajor, CblasUpper, INVALID, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 4; RowMajorStrg = FALSE; cblas_dsbmv(CblasColMajor, CblasUpper, 0, INVALID, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 7; RowMajorStrg = FALSE; cblas_dsbmv(CblasColMajor, CblasUpper, 0, 1, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 9; RowMajorStrg = FALSE; cblas_dsbmv(CblasColMajor, CblasUpper, 0, 0, ALPHA, A, 1, X, 0, BETA, Y, 1 ); chkxer(); cblas_info = 12; RowMajorStrg = FALSE; cblas_dsbmv(CblasColMajor, CblasUpper, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 0 ); chkxer(); cblas_info = 2; RowMajorStrg = TRUE; cblas_dsbmv(CblasRowMajor, INVALID, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 3; RowMajorStrg = TRUE; cblas_dsbmv(CblasRowMajor, CblasUpper, INVALID, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 4; RowMajorStrg = TRUE; cblas_dsbmv(CblasRowMajor, CblasUpper, 0, INVALID, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 7; RowMajorStrg = TRUE; cblas_dsbmv(CblasRowMajor, CblasUpper, 0, 1, ALPHA, A, 1, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 9; RowMajorStrg = TRUE; cblas_dsbmv(CblasRowMajor, CblasUpper, 0, 0, ALPHA, A, 1, X, 0, BETA, Y, 1 ); chkxer(); cblas_info = 12; RowMajorStrg = TRUE; cblas_dsbmv(CblasRowMajor, CblasUpper, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 0 ); chkxer(); } else if (strncmp( sf,"cblas_dspmv",11)==0) { cblas_rout = "cblas_dspmv"; cblas_info = 1; RowMajorStrg = FALSE; cblas_dspmv(INVALID, CblasUpper, 0, ALPHA, A, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 2; RowMajorStrg = FALSE; cblas_dspmv(CblasColMajor, INVALID, 0, ALPHA, A, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 3; RowMajorStrg = FALSE; cblas_dspmv(CblasColMajor, CblasUpper, INVALID, ALPHA, A, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 7; RowMajorStrg = FALSE; cblas_dspmv(CblasColMajor, CblasUpper, 0, ALPHA, A, X, 0, BETA, Y, 1 ); chkxer(); cblas_info = 10; RowMajorStrg = FALSE; cblas_dspmv(CblasColMajor, CblasUpper, 0, ALPHA, A, X, 1, BETA, Y, 0 ); chkxer(); cblas_info = 2; RowMajorStrg = TRUE; cblas_dspmv(CblasRowMajor, INVALID, 0, ALPHA, A, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 3; RowMajorStrg = TRUE; cblas_dspmv(CblasRowMajor, CblasUpper, INVALID, ALPHA, A, X, 1, BETA, Y, 1 ); chkxer(); cblas_info = 7; RowMajorStrg = TRUE; cblas_dspmv(CblasRowMajor, CblasUpper, 0, ALPHA, A, X, 0, BETA, Y, 1 ); chkxer(); cblas_info = 10; RowMajorStrg = TRUE; cblas_dspmv(CblasRowMajor, CblasUpper, 0, ALPHA, A, X, 1, BETA, Y, 0 ); chkxer(); } else if (strncmp( sf,"cblas_dtrmv",11)==0) { cblas_rout = "cblas_dtrmv"; cblas_info = 1; RowMajorStrg = FALSE; cblas_dtrmv(INVALID, CblasUpper, CblasNoTrans, CblasNonUnit, 0, A, 1, X, 1 ); chkxer(); cblas_info = 2; RowMajorStrg = FALSE; cblas_dtrmv(CblasColMajor, INVALID, CblasNoTrans, CblasNonUnit, 0, A, 1, X, 1 ); chkxer(); cblas_info = 3; RowMajorStrg = FALSE; cblas_dtrmv(CblasColMajor, CblasUpper, INVALID, CblasNonUnit, 0, A, 1, X, 1 ); chkxer(); cblas_info = 4; RowMajorStrg = FALSE; cblas_dtrmv(CblasColMajor, CblasUpper, CblasNoTrans, INVALID, 0, A, 1, X, 1 ); chkxer(); cblas_info = 5; RowMajorStrg = FALSE; cblas_dtrmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, INVALID, A, 1, X, 1 ); chkxer(); cblas_info = 7; RowMajorStrg = FALSE; cblas_dtrmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 2, A, 1, X, 1 ); chkxer(); cblas_info = 9; RowMajorStrg = FALSE; cblas_dtrmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 0, A, 1, X, 0 ); chkxer(); cblas_info = 2; RowMajorStrg = TRUE; cblas_dtrmv(CblasRowMajor, INVALID, CblasNoTrans, CblasNonUnit, 0, A, 1, X, 1 ); chkxer(); cblas_info = 3; RowMajorStrg = TRUE; cblas_dtrmv(CblasRowMajor, CblasUpper, INVALID, CblasNonUnit, 0, A, 1, X, 1 ); chkxer(); cblas_info = 4; RowMajorStrg = TRUE; cblas_dtrmv(CblasRowMajor, CblasUpper, CblasNoTrans, INVALID, 0, A, 1, X, 1 ); chkxer(); cblas_info = 5; RowMajorStrg = TRUE; cblas_dtrmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, INVALID, A, 1, X, 1 ); chkxer(); cblas_info = 7; RowMajorStrg = TRUE; cblas_dtrmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 2, A, 1, X, 1 ); chkxer(); cblas_info = 9; RowMajorStrg = TRUE; cblas_dtrmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 0, A, 1, X, 0 ); chkxer(); } else if (strncmp( sf,"cblas_dtbmv",11)==0) { cblas_rout = "cblas_dtbmv"; cblas_info = 1; RowMajorStrg = FALSE; cblas_dtbmv(INVALID, CblasUpper, CblasNoTrans, CblasNonUnit, 0, 0, A, 1, X, 1 ); chkxer(); cblas_info = 2; RowMajorStrg = FALSE; cblas_dtbmv(CblasColMajor, INVALID, CblasNoTrans, CblasNonUnit, 0, 0, A, 1, X, 1 ); chkxer(); cblas_info = 3; RowMajorStrg = FALSE; cblas_dtbmv(CblasColMajor, CblasUpper, INVALID, CblasNonUnit, 0, 0, A, 1, X, 1 ); chkxer(); cblas_info = 4; RowMajorStrg = FALSE; cblas_dtbmv(CblasColMajor, CblasUpper, CblasNoTrans, INVALID, 0, 0, A, 1, X, 1 ); chkxer(); cblas_info = 5; RowMajorStrg = FALSE; cblas_dtbmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, INVALID, 0, A, 1, X, 1 ); chkxer(); cblas_info = 6; RowMajorStrg = FALSE; cblas_dtbmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 0, INVALID, A, 1, X, 1 ); chkxer(); cblas_info = 8; RowMajorStrg = FALSE; cblas_dtbmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 0, 1, A, 1, X, 1 ); chkxer(); cblas_info = 10; RowMajorStrg = FALSE; cblas_dtbmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 0, 0, A, 1, X, 0 ); chkxer(); cblas_info = 2; RowMajorStrg = TRUE; cblas_dtbmv(CblasRowMajor, INVALID, CblasNoTrans, CblasNonUnit, 0, 0, A, 1, X, 1 ); chkxer(); cblas_info = 3; RowMajorStrg = TRUE; cblas_dtbmv(CblasRowMajor, CblasUpper, INVALID, CblasNonUnit, 0, 0, A, 1, X, 1 ); chkxer(); cblas_info = 4; RowMajorStrg = TRUE; cblas_dtbmv(CblasRowMajor, CblasUpper, CblasNoTrans, INVALID, 0, 0, A, 1, X, 1 ); chkxer(); cblas_info = 5; RowMajorStrg = TRUE; cblas_dtbmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, INVALID, 0, A, 1, X, 1 ); chkxer(); cblas_info = 6; RowMajorStrg = TRUE; cblas_dtbmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 0, INVALID, A, 1, X, 1 ); chkxer(); cblas_info = 8; RowMajorStrg = TRUE; cblas_dtbmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 0, 1, A, 1, X, 1 ); chkxer(); cblas_info = 10; RowMajorStrg = TRUE; cblas_dtbmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 0, 0, A, 1, X, 0 ); chkxer(); } else if (strncmp( sf,"cblas_dtpmv",11)==0) { cblas_rout = "cblas_dtpmv"; cblas_info = 1; RowMajorStrg = FALSE; cblas_dtpmv(INVALID, CblasUpper, CblasNoTrans, CblasNonUnit, 0, A, X, 1 ); chkxer(); cblas_info = 2; RowMajorStrg = FALSE; cblas_dtpmv(CblasColMajor, INVALID, CblasNoTrans, CblasNonUnit, 0, A, X, 1 ); chkxer(); cblas_info = 3; RowMajorStrg = FALSE; cblas_dtpmv(CblasColMajor, CblasUpper, INVALID, CblasNonUnit, 0, A, X, 1 ); chkxer(); cblas_info = 4; RowMajorStrg = FALSE; cblas_dtpmv(CblasColMajor, CblasUpper, CblasNoTrans, INVALID, 0, A, X, 1 ); chkxer(); cblas_info = 5; RowMajorStrg = FALSE; cblas_dtpmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, INVALID, A, X, 1 ); chkxer(); cblas_info = 8; RowMajorStrg = FALSE; cblas_dtpmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 0, A, X, 0 ); chkxer(); cblas_info = 2; RowMajorStrg = TRUE; cblas_dtpmv(CblasRowMajor, INVALID, CblasNoTrans, CblasNonUnit, 0, A, X, 1 ); chkxer(); cblas_info = 3; RowMajorStrg = TRUE; cblas_dtpmv(CblasRowMajor, CblasUpper, INVALID, CblasNonUnit, 0, A, X, 1 ); chkxer(); cblas_info = 4; RowMajorStrg = TRUE; cblas_dtpmv(CblasRowMajor, CblasUpper, CblasNoTrans, INVALID, 0, A, X, 1 ); chkxer(); cblas_info = 5; RowMajorStrg = TRUE; cblas_dtpmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, INVALID, A, X, 1 ); chkxer(); cblas_info = 8; RowMajorStrg = TRUE; cblas_dtpmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 0, A, X, 0 ); chkxer(); } else if (strncmp( sf,"cblas_dtrsv",11)==0) { cblas_rout = "cblas_dtrsv"; cblas_info = 1; RowMajorStrg = FALSE; cblas_dtrsv(INVALID, CblasUpper, CblasNoTrans, CblasNonUnit, 0, A, 1, X, 1 ); chkxer(); cblas_info = 2; RowMajorStrg = FALSE; cblas_dtrsv(CblasColMajor, INVALID, CblasNoTrans, CblasNonUnit, 0, A, 1, X, 1 ); chkxer(); cblas_info = 3; RowMajorStrg = FALSE; cblas_dtrsv(CblasColMajor, CblasUpper, INVALID, CblasNonUnit, 0, A, 1, X, 1 ); chkxer(); cblas_info = 4; RowMajorStrg = FALSE; cblas_dtrsv(CblasColMajor, CblasUpper, CblasNoTrans, INVALID, 0, A, 1, X, 1 ); chkxer(); cblas_info = 5; RowMajorStrg = FALSE; cblas_dtrsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, INVALID, A, 1, X, 1 ); chkxer(); cblas_info = 7; RowMajorStrg = FALSE; cblas_dtrsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 2, A, 1, X, 1 ); chkxer(); cblas_info = 9; RowMajorStrg = FALSE; cblas_dtrsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 0, A, 1, X, 0 ); chkxer(); cblas_info = 2; RowMajorStrg = TRUE; cblas_dtrsv(CblasRowMajor, INVALID, CblasNoTrans, CblasNonUnit, 0, A, 1, X, 1 ); chkxer(); cblas_info = 3; RowMajorStrg = TRUE; cblas_dtrsv(CblasRowMajor, CblasUpper, INVALID, CblasNonUnit, 0, A, 1, X, 1 ); chkxer(); cblas_info = 4; RowMajorStrg = TRUE; cblas_dtrsv(CblasRowMajor, CblasUpper, CblasNoTrans, INVALID, 0, A, 1, X, 1 ); chkxer(); cblas_info = 5; RowMajorStrg = TRUE; cblas_dtrsv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, INVALID, A, 1, X, 1 ); chkxer(); cblas_info = 7; RowMajorStrg = TRUE; cblas_dtrsv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 2, A, 1, X, 1 ); chkxer(); cblas_info = 9; RowMajorStrg = TRUE; cblas_dtrsv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 0, A, 1, X, 0 ); chkxer(); } else if (strncmp( sf,"cblas_dtbsv",11)==0) { cblas_rout = "cblas_dtbsv"; cblas_info = 1; RowMajorStrg = FALSE; cblas_dtbsv(INVALID, CblasUpper, CblasNoTrans, CblasNonUnit, 0, 0, A, 1, X, 1 ); chkxer(); cblas_info = 2; RowMajorStrg = FALSE; cblas_dtbsv(CblasColMajor, INVALID, CblasNoTrans, CblasNonUnit, 0, 0, A, 1, X, 1 ); chkxer(); cblas_info = 3; RowMajorStrg = FALSE; cblas_dtbsv(CblasColMajor, CblasUpper, INVALID, CblasNonUnit, 0, 0, A, 1, X, 1 ); chkxer(); cblas_info = 4; RowMajorStrg = FALSE; cblas_dtbsv(CblasColMajor, CblasUpper, CblasNoTrans, INVALID, 0, 0, A, 1, X, 1 ); chkxer(); cblas_info = 5; RowMajorStrg = FALSE; cblas_dtbsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, INVALID, 0, A, 1, X, 1 ); chkxer(); cblas_info = 6; RowMajorStrg = FALSE; cblas_dtbsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 0, INVALID, A, 1, X, 1 ); chkxer(); cblas_info = 8; RowMajorStrg = FALSE; cblas_dtbsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 0, 1, A, 1, X, 1 ); chkxer(); cblas_info = 10; RowMajorStrg = FALSE; cblas_dtbsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 0, 0, A, 1, X, 0 ); chkxer(); cblas_info = 2; RowMajorStrg = TRUE; cblas_dtbsv(CblasRowMajor, INVALID, CblasNoTrans, CblasNonUnit, 0, 0, A, 1, X, 1 ); chkxer(); cblas_info = 3; RowMajorStrg = TRUE; cblas_dtbsv(CblasRowMajor, CblasUpper, INVALID, CblasNonUnit, 0, 0, A, 1, X, 1 ); chkxer(); cblas_info = 4; RowMajorStrg = TRUE; cblas_dtbsv(CblasRowMajor, CblasUpper, CblasNoTrans, INVALID, 0, 0, A, 1, X, 1 ); chkxer(); cblas_info = 5; RowMajorStrg = TRUE; cblas_dtbsv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, INVALID, 0, A, 1, X, 1 ); chkxer(); cblas_info = 6; RowMajorStrg = TRUE; cblas_dtbsv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 0, INVALID, A, 1, X, 1 ); chkxer(); cblas_info = 8; RowMajorStrg = TRUE; cblas_dtbsv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 0, 1, A, 1, X, 1 ); chkxer(); cblas_info = 10; RowMajorStrg = TRUE; cblas_dtbsv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 0, 0, A, 1, X, 0 ); chkxer(); } else if (strncmp( sf,"cblas_dtpsv",11)==0) { cblas_rout = "cblas_dtpsv"; cblas_info = 1; RowMajorStrg = FALSE; cblas_dtpsv(INVALID, CblasUpper, CblasNoTrans, CblasNonUnit, 0, A, X, 1 ); chkxer(); cblas_info = 2; RowMajorStrg = FALSE; cblas_dtpsv(CblasColMajor, INVALID, CblasNoTrans, CblasNonUnit, 0, A, X, 1 ); chkxer(); cblas_info = 3; RowMajorStrg = FALSE; cblas_dtpsv(CblasColMajor, CblasUpper, INVALID, CblasNonUnit, 0, A, X, 1 ); chkxer(); cblas_info = 4; RowMajorStrg = FALSE; cblas_dtpsv(CblasColMajor, CblasUpper, CblasNoTrans, INVALID, 0, A, X, 1 ); chkxer(); cblas_info = 5; RowMajorStrg = FALSE; cblas_dtpsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, INVALID, A, X, 1 ); chkxer(); cblas_info = 8; RowMajorStrg = FALSE; cblas_dtpsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 0, A, X, 0 ); chkxer(); cblas_info = 2; RowMajorStrg = TRUE; cblas_dtpsv(CblasRowMajor, INVALID, CblasNoTrans, CblasNonUnit, 0, A, X, 1 ); chkxer(); cblas_info = 3; RowMajorStrg = TRUE; cblas_dtpsv(CblasRowMajor, CblasUpper, INVALID, CblasNonUnit, 0, A, X, 1 ); chkxer(); cblas_info = 4; RowMajorStrg = TRUE; cblas_dtpsv(CblasRowMajor, CblasUpper, CblasNoTrans, INVALID, 0, A, X, 1 ); chkxer(); cblas_info = 5; RowMajorStrg = TRUE; cblas_dtpsv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, INVALID, A, X, 1 ); chkxer(); cblas_info = 8; RowMajorStrg = TRUE; cblas_dtpsv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 0, A, X, 0 ); chkxer(); } else if (strncmp( sf,"cblas_dger",10)==0) { cblas_rout = "cblas_dger"; cblas_info = 1; RowMajorStrg = FALSE; cblas_dger(INVALID, 0, 0, ALPHA, X, 1, Y, 1, A, 1 ); chkxer(); cblas_info = 2; RowMajorStrg = FALSE; cblas_dger(CblasColMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A, 1 ); chkxer(); cblas_info = 3; RowMajorStrg = FALSE; cblas_dger(CblasColMajor, 0, INVALID, ALPHA, X, 1, Y, 1, A, 1 ); chkxer(); cblas_info = 6; RowMajorStrg = FALSE; cblas_dger(CblasColMajor, 0, 0, ALPHA, X, 0, Y, 1, A, 1 ); chkxer(); cblas_info = 8; RowMajorStrg = FALSE; cblas_dger(CblasColMajor, 0, 0, ALPHA, X, 1, Y, 0, A, 1 ); chkxer(); cblas_info = 10; RowMajorStrg = FALSE; cblas_dger(CblasColMajor, 2, 0, ALPHA, X, 1, Y, 1, A, 1 ); chkxer(); cblas_info = 2; RowMajorStrg = TRUE; cblas_dger(CblasRowMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A, 1 ); chkxer(); cblas_info = 3; RowMajorStrg = TRUE; cblas_dger(CblasRowMajor, 0, INVALID, ALPHA, X, 1, Y, 1, A, 1 ); chkxer(); cblas_info = 6; RowMajorStrg = TRUE; cblas_dger(CblasRowMajor, 0, 0, ALPHA, X, 0, Y, 1, A, 1 ); chkxer(); cblas_info = 8; RowMajorStrg = TRUE; cblas_dger(CblasRowMajor, 0, 0, ALPHA, X, 1, Y, 0, A, 1 ); chkxer(); cblas_info = 10; RowMajorStrg = TRUE; cblas_dger(CblasRowMajor, 0, 2, ALPHA, X, 1, Y, 1, A, 1 ); chkxer(); } else if (strncmp( sf,"cblas_dsyr2",11)==0) { cblas_rout = "cblas_dsyr2"; cblas_info = 1; RowMajorStrg = FALSE; cblas_dsyr2(INVALID, CblasUpper, 0, ALPHA, X, 1, Y, 1, A, 1 ); chkxer(); cblas_info = 2; RowMajorStrg = FALSE; cblas_dsyr2(CblasColMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A, 1 ); chkxer(); cblas_info = 3; RowMajorStrg = FALSE; cblas_dsyr2(CblasColMajor, CblasUpper, INVALID, ALPHA, X, 1, Y, 1, A, 1 ); chkxer(); cblas_info = 6; RowMajorStrg = FALSE; cblas_dsyr2(CblasColMajor, CblasUpper, 0, ALPHA, X, 0, Y, 1, A, 1 ); chkxer(); cblas_info = 8; RowMajorStrg = FALSE; cblas_dsyr2(CblasColMajor, CblasUpper, 0, ALPHA, X, 1, Y, 0, A, 1 ); chkxer(); cblas_info = 10; RowMajorStrg = FALSE; cblas_dsyr2(CblasColMajor, CblasUpper, 2, ALPHA, X, 1, Y, 1, A, 1 ); chkxer(); cblas_info = 2; RowMajorStrg = TRUE; cblas_dsyr2(CblasRowMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A, 1 ); chkxer(); cblas_info = 3; RowMajorStrg = TRUE; cblas_dsyr2(CblasRowMajor, CblasUpper, INVALID, ALPHA, X, 1, Y, 1, A, 1 ); chkxer(); cblas_info = 6; RowMajorStrg = TRUE; cblas_dsyr2(CblasRowMajor, CblasUpper, 0, ALPHA, X, 0, Y, 1, A, 1 ); chkxer(); cblas_info = 8; RowMajorStrg = TRUE; cblas_dsyr2(CblasRowMajor, CblasUpper, 0, ALPHA, X, 1, Y, 0, A, 1 ); chkxer(); cblas_info = 10; RowMajorStrg = TRUE; cblas_dsyr2(CblasRowMajor, CblasUpper, 2, ALPHA, X, 1, Y, 1, A, 1 ); chkxer(); } else if (strncmp( sf,"cblas_dspr2",11)==0) { cblas_rout = "cblas_dspr2"; cblas_info = 1; RowMajorStrg = FALSE; cblas_dspr2(INVALID, CblasUpper, 0, ALPHA, X, 1, Y, 1, A ); chkxer(); cblas_info = 2; RowMajorStrg = FALSE; cblas_dspr2(CblasColMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A ); chkxer(); cblas_info = 3; RowMajorStrg = FALSE; cblas_dspr2(CblasColMajor, CblasUpper, INVALID, ALPHA, X, 1, Y, 1, A ); chkxer(); cblas_info = 6; RowMajorStrg = FALSE; cblas_dspr2(CblasColMajor, CblasUpper, 0, ALPHA, X, 0, Y, 1, A ); chkxer(); cblas_info = 8; RowMajorStrg = FALSE; cblas_dspr2(CblasColMajor, CblasUpper, 0, ALPHA, X, 1, Y, 0, A ); chkxer(); cblas_info = 2; RowMajorStrg = TRUE; cblas_dspr2(CblasRowMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A ); chkxer(); cblas_info = 3; RowMajorStrg = TRUE; cblas_dspr2(CblasRowMajor, CblasUpper, INVALID, ALPHA, X, 1, Y, 1, A ); chkxer(); cblas_info = 6; RowMajorStrg = TRUE; cblas_dspr2(CblasRowMajor, CblasUpper, 0, ALPHA, X, 0, Y, 1, A ); chkxer(); cblas_info = 8; RowMajorStrg = TRUE; cblas_dspr2(CblasRowMajor, CblasUpper, 0, ALPHA, X, 1, Y, 0, A ); chkxer(); } else if (strncmp( sf,"cblas_dsyr",10)==0) { cblas_rout = "cblas_dsyr"; cblas_info = 1; RowMajorStrg = FALSE; cblas_dsyr(INVALID, CblasUpper, 0, ALPHA, X, 1, A, 1 ); chkxer(); cblas_info = 2; RowMajorStrg = FALSE; cblas_dsyr(CblasColMajor, INVALID, 0, ALPHA, X, 1, A, 1 ); chkxer(); cblas_info = 3; RowMajorStrg = FALSE; cblas_dsyr(CblasColMajor, CblasUpper, INVALID, ALPHA, X, 1, A, 1 ); chkxer(); cblas_info = 6; RowMajorStrg = FALSE; cblas_dsyr(CblasColMajor, CblasUpper, 0, ALPHA, X, 0, A, 1 ); chkxer(); cblas_info = 8; RowMajorStrg = FALSE; cblas_dsyr(CblasColMajor, CblasUpper, 2, ALPHA, X, 1, A, 1 ); chkxer(); cblas_info = 2; RowMajorStrg = TRUE; cblas_dsyr(CblasRowMajor, INVALID, 0, ALPHA, X, 1, A, 1 ); chkxer(); cblas_info = 3; RowMajorStrg = TRUE; cblas_dsyr(CblasRowMajor, CblasUpper, INVALID, ALPHA, X, 1, A, 1 ); chkxer(); cblas_info = 6; RowMajorStrg = TRUE; cblas_dsyr(CblasRowMajor, CblasUpper, 0, ALPHA, X, 0, A, 1 ); chkxer(); cblas_info = 8; RowMajorStrg = TRUE; cblas_dsyr(CblasRowMajor, CblasUpper, 2, ALPHA, X, 1, A, 1 ); chkxer(); } else if (strncmp( sf,"cblas_dspr",10)==0) { cblas_rout = "cblas_dspr"; cblas_info = 1; RowMajorStrg = FALSE; cblas_dspr(INVALID, CblasUpper, 0, ALPHA, X, 1, A ); chkxer(); cblas_info = 2; RowMajorStrg = FALSE; cblas_dspr(CblasColMajor, INVALID, 0, ALPHA, X, 1, A ); chkxer(); cblas_info = 3; RowMajorStrg = FALSE; cblas_dspr(CblasColMajor, CblasUpper, INVALID, ALPHA, X, 1, A ); chkxer(); cblas_info = 6; RowMajorStrg = FALSE; cblas_dspr(CblasColMajor, CblasUpper, 0, ALPHA, X, 0, A ); chkxer(); cblas_info = 2; RowMajorStrg = FALSE; cblas_dspr(CblasColMajor, INVALID, 0, ALPHA, X, 1, A ); chkxer(); cblas_info = 3; RowMajorStrg = FALSE; cblas_dspr(CblasColMajor, CblasUpper, INVALID, ALPHA, X, 1, A ); chkxer(); cblas_info = 6; RowMajorStrg = FALSE; cblas_dspr(CblasColMajor, CblasUpper, 0, ALPHA, X, 0, A ); chkxer(); } if (cblas_ok == TRUE) printf(" %-12s PASSED THE TESTS OF ERROR-EXITS\n", cblas_rout); else printf("******* %s FAILED THE TESTS OF ERROR-EXITS *******\n",cblas_rout); }
void test_syr2 (void) { const double flteps = 1e-4, dbleps = 1e-6; { int order = 101; int uplo = 121; int N = 1; int lda = 1; float alpha = 0.0f; float A[] = { 0.862f }; float X[] = { 0.823f }; int incX = -1; float Y[] = { 0.699f }; int incY = -1; float A_expected[] = { 0.862f }; cblas_ssyr2(order, uplo, N, alpha, X, incX, Y, incY, A, lda); { int i; for (i = 0; i < 1; i++) { gsl_test_rel(A[i], A_expected[i], flteps, "ssyr2(case 1434)"); } }; }; { int order = 101; int uplo = 122; int N = 1; int lda = 1; float alpha = 0.0f; float A[] = { 0.862f }; float X[] = { 0.823f }; int incX = -1; float Y[] = { 0.699f }; int incY = -1; float A_expected[] = { 0.862f }; cblas_ssyr2(order, uplo, N, alpha, X, incX, Y, incY, A, lda); { int i; for (i = 0; i < 1; i++) { gsl_test_rel(A[i], A_expected[i], flteps, "ssyr2(case 1435)"); } }; }; { int order = 102; int uplo = 121; int N = 1; int lda = 1; float alpha = 0.0f; float A[] = { 0.862f }; float X[] = { 0.823f }; int incX = -1; float Y[] = { 0.699f }; int incY = -1; float A_expected[] = { 0.862f }; cblas_ssyr2(order, uplo, N, alpha, X, incX, Y, incY, A, lda); { int i; for (i = 0; i < 1; i++) { gsl_test_rel(A[i], A_expected[i], flteps, "ssyr2(case 1436)"); } }; }; { int order = 102; int uplo = 122; int N = 1; int lda = 1; float alpha = 0.0f; float A[] = { 0.862f }; float X[] = { 0.823f }; int incX = -1; float Y[] = { 0.699f }; int incY = -1; float A_expected[] = { 0.862f }; cblas_ssyr2(order, uplo, N, alpha, X, incX, Y, incY, A, lda); { int i; for (i = 0; i < 1; i++) { gsl_test_rel(A[i], A_expected[i], flteps, "ssyr2(case 1437)"); } }; }; { int order = 101; int uplo = 121; int N = 1; int lda = 1; double alpha = 0; double A[] = { -0.824 }; double X[] = { 0.684 }; int incX = -1; double Y[] = { 0.965 }; int incY = -1; double A_expected[] = { -0.824 }; cblas_dsyr2(order, uplo, N, alpha, X, incX, Y, incY, A, lda); { int i; for (i = 0; i < 1; i++) { gsl_test_rel(A[i], A_expected[i], dbleps, "dsyr2(case 1438)"); } }; }; { int order = 101; int uplo = 122; int N = 1; int lda = 1; double alpha = 0; double A[] = { -0.824 }; double X[] = { 0.684 }; int incX = -1; double Y[] = { 0.965 }; int incY = -1; double A_expected[] = { -0.824 }; cblas_dsyr2(order, uplo, N, alpha, X, incX, Y, incY, A, lda); { int i; for (i = 0; i < 1; i++) { gsl_test_rel(A[i], A_expected[i], dbleps, "dsyr2(case 1439)"); } }; }; { int order = 102; int uplo = 121; int N = 1; int lda = 1; double alpha = 0; double A[] = { -0.824 }; double X[] = { 0.684 }; int incX = -1; double Y[] = { 0.965 }; int incY = -1; double A_expected[] = { -0.824 }; cblas_dsyr2(order, uplo, N, alpha, X, incX, Y, incY, A, lda); { int i; for (i = 0; i < 1; i++) { gsl_test_rel(A[i], A_expected[i], dbleps, "dsyr2(case 1440)"); } }; }; { int order = 102; int uplo = 122; int N = 1; int lda = 1; double alpha = 0; double A[] = { -0.824 }; double X[] = { 0.684 }; int incX = -1; double Y[] = { 0.965 }; int incY = -1; double A_expected[] = { -0.824 }; cblas_dsyr2(order, uplo, N, alpha, X, incX, Y, incY, A, lda); { int i; for (i = 0; i < 1; i++) { gsl_test_rel(A[i], A_expected[i], dbleps, "dsyr2(case 1441)"); } }; }; }