/** Perform triangular matrix-vector product. \f$ x = A x \f$ (trans == MagmaNoTrans), or \n \f$ x = A^T x \f$ (trans == MagmaTrans), or \n \f$ x = A^H x \f$ (trans == MagmaConjTrans). @param[in] uplo Whether the upper or lower triangle of A is referenced. @param[in] trans Operation to perform on A. @param[in] diag Whether the diagonal of A is assumed to be unit or non-unit. @param[in] n Number of rows and columns of A. n >= 0. @param[in] dA COMPLEX array of dimension (ldda,n), ldda >= max(1,n). The n-by-n matrix A, on GPU device. @param[in] ldda Leading dimension of dA. @param[in] dx COMPLEX array on GPU device. The n element vector x of dimension (1 + (n-1)*incx). @param[in] incx Stride between consecutive elements of dx. incx != 0. @ingroup magma_cblas2 */ extern "C" void magma_ctrmv( magma_uplo_t uplo, magma_trans_t trans, magma_diag_t diag, magma_int_t n, magmaFloatComplex_const_ptr dA, size_t dA_offset, magma_int_t ldda, magmaFloatComplex_ptr dx, size_t dx_offset, magma_int_t incx, magma_queue_t queue ) { if ( n <= 0 ) return; magmaFloatComplex_ptr dwork; magma_cmalloc( &dwork, (1 + (n-1)*abs(incx)) ); cl_int err = clblasCtrmv( clblasColumnMajor, clblas_uplo_const( uplo ), clblas_trans_const( trans ), clblas_diag_const( diag ), n, dA, dA_offset, ldda, dx, dx_offset, incx, dwork, 1, &queue, 0, NULL, g_event ); clFlush(queue); check_error( err ); magma_free( dwork ); }
void xTrmv<cl_float2>:: call_func() { timer.Start(timer_id); clblasCtrmv(order_, buffer_.uplo_, buffer_.trans_a_, buffer_.diag_, buffer_.m_, buffer_.buf_a_, 0, buffer_.lda_, buffer_.buf_x_, 0, 1, buffer_.scratch_, 1, &queue_, 0, NULL, &event_); clWaitForEvents(1, &event_); timer.Stop(timer_id); }