cuda_ztrmm.c 1.38 KB
Newer Older
1
/**
2 3
 *
 * @file cuda_ztrmm.c
4
 *
Mathieu Faverge's avatar
Mathieu Faverge committed
5 6
 * @copyright 2009-2014 The University of Tennessee and The University of
 *                      Tennessee Research Foundation. All rights reserved.
PRUVOST Florent's avatar
PRUVOST Florent committed
7
 * @copyright 2012-2019 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
8
 *                      Univ. Bordeaux. All rights reserved.
9
 *
10
 ***
11
 *
12
 * @brief Chameleon cuda_ztrmm GPU kernel
13
 *
PRUVOST Florent's avatar
PRUVOST Florent committed
14
 * @version 0.9.2
15 16 17 18
 * @author Florent Pruvost
 * @date 2015-09-17
 * @precisions normal z -> c d s
 *
19
 */
20
#include "cudablas.h"
21 22

int CUDA_ztrmm(
23 24 25 26 27 28 29
    cham_side_t side, cham_uplo_t uplo,
    cham_trans_t transa, cham_diag_t diag,
    int m, int n,
    cuDoubleComplex *alpha,
    const cuDoubleComplex *A, int lda,
    cuDoubleComplex *B, int ldb,
    CUBLAS_STREAM_PARAM)
30
{
31 32 33 34 35

#if defined(CHAMELEON_USE_CUBLAS_V2)

    cublasZtrmm(
        CUBLAS_HANDLE
Mathieu Faverge's avatar
Mathieu Faverge committed
36 37
        chameleon_cublas_const(side), chameleon_cublas_const(uplo),
        chameleon_cublas_const(transa), chameleon_cublas_const(diag),
38
        m, n,
39
        CUBLAS_VALUE(alpha), A, lda,
40
        B, ldb,
41 42
        B, ldb);

43 44 45 46
#else

    cublasZtrmm(
        CUBLAS_HANDLE
Mathieu Faverge's avatar
Mathieu Faverge committed
47 48
        chameleon_cublas_const(side), chameleon_cublas_const(uplo),
        chameleon_cublas_const(transa), chameleon_cublas_const(diag),
49 50 51 52 53
        m, n,
        CUBLAS_VALUE(alpha), A, lda,
                             B, ldb);
#endif

54 55
    assert( CUBLAS_STATUS_SUCCESS == cublasGetError() );

56
    return CHAMELEON_SUCCESS;
57
}
58