Blaze 3.9
trmm.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_BLAS_CBLAS_TRMM_H_
36#define _BLAZE_MATH_BLAS_CBLAS_TRMM_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
44#include <blaze/system/BLAS.h>
45#include <blaze/util/Complex.h>
47
48
49namespace blaze {
50
51//=================================================================================================
52//
53// BLAS TRIANGULAR MATRIX MULTIPLICATION FUNCTIONS (TRMM)
54//
55//=================================================================================================
56
57//*************************************************************************************************
60#if BLAZE_BLAS_MODE
61
62void trmm( CBLAS_ORDER order, CBLAS_SIDE side, CBLAS_UPLO uplo,
63 CBLAS_TRANSPOSE transA, CBLAS_DIAG diag, blas_int_t m, blas_int_t n,
64 float alpha, const float* A, blas_int_t lda, float* B, blas_int_t ldb );
65
66void trmm( CBLAS_ORDER order, CBLAS_SIDE side, CBLAS_UPLO uplo,
67 CBLAS_TRANSPOSE transA, CBLAS_DIAG diag, blas_int_t m, blas_int_t n,
68 double alpha, const double* A, blas_int_t lda, double* B, blas_int_t ldb );
69
70void trmm( CBLAS_ORDER order, CBLAS_SIDE side, CBLAS_UPLO uplo,
71 CBLAS_TRANSPOSE transA, CBLAS_DIAG diag, blas_int_t m, blas_int_t n,
72 complex<float> alpha, const complex<float>* A, blas_int_t lda,
73 complex<float>* B, blas_int_t ldb );
74
75void trmm( CBLAS_ORDER order, CBLAS_SIDE side, CBLAS_UPLO uplo,
76 CBLAS_TRANSPOSE transA, CBLAS_DIAG diag, blas_int_t m, blas_int_t n,
77 complex<double> alpha, const complex<double>* A, blas_int_t lda,
79
80#endif
82//*************************************************************************************************
83
84
85//*************************************************************************************************
86#if BLAZE_BLAS_MODE
112inline void trmm( CBLAS_ORDER order, CBLAS_SIDE side, CBLAS_UPLO uplo,
113 CBLAS_TRANSPOSE transA, CBLAS_DIAG diag, blas_int_t m, blas_int_t n,
114 float alpha, const float* A, blas_int_t lda, float* B, blas_int_t ldb )
115{
116 cblas_strmm( order, side, uplo, transA, diag, m, n, alpha, A, lda, B, ldb );
117}
118#endif
119//*************************************************************************************************
120
121
122//*************************************************************************************************
123#if BLAZE_BLAS_MODE
149inline void trmm( CBLAS_ORDER order, CBLAS_SIDE side, CBLAS_UPLO uplo,
150 CBLAS_TRANSPOSE transA, CBLAS_DIAG diag, blas_int_t m, blas_int_t n,
151 double alpha, const double* A, blas_int_t lda, double* B, blas_int_t ldb )
152{
153 cblas_dtrmm( order, side, uplo, transA, diag, m, n, alpha, A, lda, B, ldb );
154}
155#endif
156//*************************************************************************************************
157
158
159//*************************************************************************************************
160#if BLAZE_BLAS_MODE
186inline void trmm( CBLAS_ORDER order, CBLAS_SIDE side, CBLAS_UPLO uplo,
187 CBLAS_TRANSPOSE transA, CBLAS_DIAG diag, blas_int_t m, blas_int_t n,
188 complex<float> alpha, const complex<float>* A, blas_int_t lda,
189 complex<float>* B, blas_int_t ldb )
190{
191 BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
192
193 cblas_ctrmm( order, side, uplo, transA, diag, m, n, reinterpret_cast<const float*>( &alpha ),
194 reinterpret_cast<const float*>( A ), lda, reinterpret_cast<float*>( B ), ldb );
195}
196#endif
197//*************************************************************************************************
198
199
200//*************************************************************************************************
201#if BLAZE_BLAS_MODE
227inline void trmm( CBLAS_ORDER order, CBLAS_SIDE side, CBLAS_UPLO uplo,
228 CBLAS_TRANSPOSE transA, CBLAS_DIAG diag, blas_int_t m, blas_int_t n,
229 complex<double> alpha, const complex<double>* A, blas_int_t lda,
231{
232 BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
233
234 cblas_ztrmm( order, side, uplo, transA, diag, m, n, reinterpret_cast<const double*>( &alpha ),
235 reinterpret_cast<const double*>( A ), lda, reinterpret_cast<double*>( B ), ldb );
236}
237#endif
238//*************************************************************************************************
239
240} // namespace blaze
241
242#endif
Header file for the complex data type.
Compile time assertion.
Complex data type of the Blaze library.
int32_t blas_int_t
Signed integer type used in the BLAS/LAPACK wrapper functions.
Definition: Types.h:64
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.
Definition: StaticAssert.h:112
Header file for basic BLAS type definitions.
System settings for the BLAS mode.