cblas_?trsm_batch
cblas_?trsm_batch
Solves a triangular matrix equation for a group of matrices.
Syntax
void
cblas_strsm_batch
(
const
CBLAS_LAYOUT
Layout
,
const
CBLAS_SIDE
*Side_Array
,
const
CBLAS_UPLO
*Uplo_Array
,
const
CBLAS_TRANSPOSE
*TransA_Array
,
const
CBLAS_DIAG
*Diag_Array
,
const
MKL_INT
*M_Array
,
const
MKL_INT
*N_Array
,
const
float
*alpha_Array
,
const
float
*
*A_Array
,
const
MKL_INT
*lda_Array
,
float
*
*B_Array
,
const
MKL_INT
*ldb_Array
,
const
MKL_INT
group_count
,
const
MKL_INT
*group_size
);
void
cblas_dtrsm_batch
(
const
CBLAS_LAYOUT
Layout
,
const
CBLAS_SIDE
*Side_Array
,
const
CBLAS_UPLO
*Uplo_Array
,
const
CBLAS_TRANSPOSE
*Transa_Array
,
const
CBLAS_DIAG
*Diag_Array
,
const
MKL_INT
*M_Array
,
const
MKL_INT
*N_Array
,
const
double
*alpha_Array
,
const
double
*
*A_Array
,
const
MKL_INT
*lda_Array
,
double
*
*B_Array
,
const
MKL_INT
*ldb_Array
,
const
MKL_INT
group_count
,
const
MKL_INT
*group_size
);
void
cblas_ctrsm_batch
(
const
CBLAS_LAYOUT
Layout
,
const
CBLAS_SIDE
*Side_Array
,
const
CBLAS_UPLO
*Uplo_Array
,
const
CBLAS_TRANSPOSE
*Transa_Array
,
const
CBLAS_DIAG
*Diag_Array
,
const
MKL_INT
*M_Array
,
const
MKL_INT
*N_Array
,
const
void
*alpha_Array
,
const
void
*
*A_Array
,
const
MKL_INT
*lda_Array
,
void
*
*B_Array
,
const
MKL_INT
*ldb_Array
,
const
MKL_INT
group_count
,
const
MKL_INT
*group_size
);
void
cblas_ztrsm_batch
(
const
CBLAS_LAYOUT
Layout
,
const
CBLAS_SIDE
*Side_Array
,
const
CBLAS_UPLO
*Uplo_Array
,
const
CBLAS_TRANSPOSE
*Transa_Array
,
const
CBLAS_DIAG
*Diag_Array
,
const
MKL_INT
*M_Array
,
const
MKL_INT
*N_Array
,
const
void
*alpha_Array
,
const
void
*
*A_Array
,
const
MKL_INT
*lda_Array
,
void
*
*B_Array
,
const
MKL_INT
*ldb_Array
,
const
MKL_INT
group_count
,
const
MKL_INT
*group_size
);
Include Files
- mkl.h
Description
The
?trsm_batch
routines solve a series of matrix equations. They are similar to the ?trsm
routines except that they operate on groups of matrices which have the same parameters. The ?trsm_batch
routines process a number of groups at once. idx = 0 for i = 0..group_count - 1 alpha in alpha_array[i] for j = 0..group_size[i] - 1 A and B matrix in a_array[idx] and b_array[idx] Solve op(A)*X = alpha*B or Solve X*op(A) = alpha*B idx = idx + 1 end for end for
where:
alpha
is a scalar element of alpha_array
,X
and B
are m
-by-n
matrices for m
and n
which are elements of m_array
and n_array
, respectively,A
is a unit, or non-unit, upper or lower triangular matrix,and
op(
is one of A
)op(
, or A
) = A
op(
, or A
) = A
T
op(
.A
) = conjg(A
T
)A
and B
represent matrices stored at addresses pointed to by a_array
and b_array
, respectively. There are total_batch_count
entries in each of a_array
and b_array
, where total_batch_count
is the sum of all the group_size
entries.Input Parameters
- Layout
- Specifies whether two-dimensional array storage is row-major (CblasRowMajor) or column-major (CblasColMajor).
- side_array
- Array of sizegroup_count. For groupi,0,≤i≤group_count- 1side=iside_array[specifies whetheri]op(appears on the left or right ofA)Xin the equation:if, thenside=iCblasLeftop(;A)*X=alpha*Bif, thenside=iCblasRight.X*op(A) =alpha*B
- uplo_array
- Array of sizegroup_count. For groupi,0,≤i≤group_count- 1uplo=iuplo_array[specifies whether the matrixi]Ais upper or lower triangular:uplo=iCblasUpperif, then the matrix is low triangular.uplo=iCblasLower
- transa_array
- Array of sizegroup_count. For groupi,0,≤i≤group_count- 1transa=itransa_array[specifies the form ofi]op(used in the matrix multiplication:A)if, thentransa=iCblasNoTransop(;A) =Aif;transa=iCblasTransif, thentransa=iCblasConjTransop(.A) = conjg(A')
- diag_array
- Array of sizegroup_count. For groupi,0,≤i≤group_count- 1diag=idiag_array[specifies whether the matrixi]Ais unit triangular:ifthen the matrix is unit triangular;diag=iCblasUnitif, then the matrix is not unit triangular.diag=iCblasNonUnit
- m_array
- Array of sizegroup_count. For groupi,0,≤i≤group_count- 1m=im_array[specifies the number of rows ofi]B. The value ofmmust be at least zero.i
- n_array
- Array of sizegroup_count. For groupi,0,≤i≤group_count- 1n=in_array[specifies the number of columns ofi]B. The value ofnmust be at least zero.i
- alpha_array
- Array of sizegroup_count. For groupi,0,≤i≤group_count- 1alpha_array[specifies the scalari]alpha.i
- a_array
- Array, sizetotal_batch_count, of pointers to arrays used to storeAmatrices.For groupi,0,≤i≤group_count- 1kismwheniand isside=iCblasLeftnwheniandside=iCblasRightais any of thegroup_size[arrays starting withi]a_array[:group_size[0] +group_size[1] + ... +group_size(i- 1)]Before entry with, the leadinguplo=iCblasUpperkbykupper triangular part of the arrayamust contain the upper triangular matrix and the strictly lower triangular part ofais not referenced.Before entry withlower triangular part of the arrayuplo=iCblasLoweramust contain the lower triangular matrix and the strictly upper triangular part ofais not referenced.When, the diagonal elements ofdiag=iCblasUnitaare not referenced either, but are assumed to be unity.
- lda_array
- Array of sizegroup_count. For groupi,0,≤i≤group_count- 1lda=ilda_array[specifies the leading dimension ofi]aas declared in the calling (sub)program. When, thenside=iCblasLeftldamust be at leastimax(1,, whenm)i, thenside=iCblasRightldamust be at leastimax(1,.n)i
- b_array
- Array, sizetotal_batch_count, of pointers to arrays used to storeBmatrices.For groupi,0,≤i≤group_count- 1bis any of thegroup_size[arrays starting withi]b_array[:group_size[0] +group_size[1] + ... +group_size(i- 1)]ForLayout=CblasColMajor: before entry, the leadingm-by-inpart of the arrayibmust contain the matrixB.ForLayout=CblasRowMajor: before entry, the leadingn-by-impart of the arrayibmust contain the matrixB.
- ldb_array
- Array of sizegroup_count. Specifies the leading dimension ofbas declared in the calling (sub)program.WhenLayout=CblasColMajor,ldbmust be at leastmax(1,m); otherwise,.ldbmust be at leastmax(1,n)Array of sizegroup_count. For groupi,0,≤i≤group_count- 1ldb=ildb_array[specifies the leading dimension ofi]bas declared in the calling (sub)program.WhenLayout=CblasColMajor,ldbmust be at leastimax(1,m)i; otherwise,.ldbmust be at leastimax(1,n)i
- group_count
- Specifies the number of groups. Must be at least 0.
- group_size
- Array of sizegroup_count. The elementgroup_size[specifies the number of matrices in groupi]i. Each element ingroup_sizemust be at least 0.
Output Parameters
- b_array
- Overwritten by the solution matrixX.