omatcopy2#
Computes two-strided scaling and out-of-place transposition or copying of general dense matrices.
Description
The omatcopy2 routine performs a two-strided scaling and out-of-place
transposition or copy of matrices. For complex matrices the transpose operation can
be a conjugate transpose.
Normally, matrices in the BLAS or LAPACK are specified by a single
stride index. For instance, in the column-major order, A(2,1) is
stored in memory one element away from A(1,1), but A(1,2) is a leading
dimension away. The leading dimension in this case is at least the
number of rows of the source matrix. If a matrix has two strides, then
both A(2,1) and A(1,2) may be an arbitrary distance from A(1,1).
The operation is defined as:
where:
op(X) is one of op(X) = X, or op(X) = XT, or op(X) = XH,
alpha is a scalar,
A and  B are matrices,
A is m x n matrix,
B is m x n matrix if op is non-transpose and an n x m matrix otherwise.,
omatcopy2 supports the following precisions:
T
float
double
std::complex<float>
std::complex<double>
omatcopy2 (Buffer Version)#
Syntax
namespace oneapi::mkl::blas::column_major {
    void omatcopy2(sycl::queue &queue,
                   oneapi::mkl::transpose trans,
                   std::int64_t m,
                   std::int64_t n,
                   T alpha,
                   sycl::buffer<T, 1> &a,
                   std::int64_t lda,
                   std::int64_t stridea,
                   sycl::buffer<T, 1> &b,
                   std::int64_t ldb,
                   std::int64_t strideb);
}
namespace oneapi::mkl::blas::row_major {
    void omatcopy2(sycl::queue &queue,
                   oneapi::mkl::transpose trans,
                   std::int64_t m,
                   std::int64_t n,
                   T alpha,
                   sycl::buffer<T, 1> &a,
                   std::int64_t lda,
                   std::int64_t stridea,
                   sycl::buffer<T, 1> &b,
                   std::int64_t ldb,
                   std::int64_t strideb);
}
Input Parameters
- queue
 The queue where the routine should be executed.
- trans
 Specifies op(
A), the transposition operation applied to the matrixA. See oneMKL defined datatypes for more details.- m
 Number of rows for the matrix
A. Must be at least zero.- n
 Number of columns for the matrix
A. Must be at least zero.- alpha
 Scaling factor for the matrix transposition or copy.
- a
 Buffer holding the input matrix
A. Must have size at leastlda*nfor column major ordering and at leastlda*mfor row major ordering.- lda
 Leading dimension of the matrix
A. If matrices are stored using column major layout,ldais the number of elements in the array between adjacent columns of the matrix, and must be at leaststridea* (m-1) + 1. If using row major layout,ldais the number of elements between adjacent rows of the matrix and must be at leaststridea* (n-1) + 1.- stridea
 The second stride of the matrix
A. For column major layout,strideais the number of elements in the array between adjacent rows of the matrix. For row major layoutstrideais the number of elements between adjacent columns of the matrix. In both casesstrideamust be at least 1.- b
 Buffer holding the output matrix
B.trans=transpose::nontranstrans=transpose::transortrans=transpose::conjtransColumn major
Bismxnmatrix. Size of bufferbmust be at leastldb*nBisnxmmatrix. Size of bufferbmust be at leastldb*mRow major
Bismxnmatrix. Size of bufferbmust be at leastldb*mBisnxmmatrix. Size of bufferbmust be at leastldb*n- ldb
 The leading dimension of the matrix
B. Must be positive.trans=transpose::nontranstrans=transpose::transortrans=transpose::conjtransColumn major
ldbmust be at leaststrideb* (m-1) + 1.ldbmust be at leaststrideb* (n-1) + 1.Row major
ldbmust be at leaststrideb* (n-1) + 1.ldbmust be at leaststrideb* (m-1) + 1.- strideb
 The second stride of the matrix
B. For column major layout,stridebis the number of elements in the array between adjacent rows of the matrix. For row major layout,stridebis the number of elements between adjacent columns of the matrix. In both casesstridebmust be at least 1.
Output Parameters
- b
 Output buffer, overwritten by
alpha* op(A).
Throws
This routine shall throw the following exceptions if the associated condition is detected. An implementation may throw additional implementation-specific exception(s) in case of error conditions not covered here.
omatcopy2 (USM Version)#
Syntax
namespace oneapi::mkl::blas::column_major {
    sycl::event omatcopy2(sycl::queue &queue,
                          oneapi::mkl::transpose trans,
                          std::int64_t m,
                          std::int64_t n,
                          value_or_pointer<T> alpha,
                          const T *a,
                          std::int64_t lda,
                          std::int64_t stridea,
                          T *b,
                          std::int64_t ldb,
                          std::int64_t strideb,
                          const std::vector<sycl::event> &dependencies = {});
}
namespace oneapi::mkl::blas::row_major {
    sycl::event omatcopy2(sycl::queue &queue,
                          oneapi::mkl::transpose trans,
                          std::int64_t m,
                          std::int64_t n,
                          value_or_pointer<T> alpha,
                          const T *a,
                          std::int64_t lda,
                          std::int64_t stridea,
                          T *b,
                          std::int64_t ldb,
                          std::int64_t strideb,
                          const std::vector<sycl::event> &dependencies = {});
}
Input Parameters
- queue
 The queue where the routine will be executed.
- trans
 Specifies op(
A), the transposition operation applied to matrixA. See oneMKL defined datatypes for more details.- m
 Number of rows for the matrix
A. Must be at least zero.- n
 Number of columns for the matrix
A. Must be at least zero.- alpha
 Scaling factor for the matrix transposition or copy. See Scalar Arguments in BLAS for more details.
- a
 Pointer to input matrix
A. Must have size at leastlda*nfor column-major and at leastlda*mfor row-major.- lda
 Leading dimension of the matrix
A. If matrices are stored using column major layout,ldais the number of elements in the array between adjacent columns of the matrix, and must be at leaststridea* (m-1) + 1. If using row major layout,ldais the number of elements between adjacent rows of the matrix and must be at leaststridea* (n-1) + 1.- stridea
 The second stride of the matrix
A. For column major layout,strideais the number of elements in the array between adjacent rows of the matrix. For row major layoutstrideais the number of elements between adjacent columns of the matrix. In both casesstrideamust be at least 1.- b
 Pointer to output matrix
B.trans=transpose::nontranstrans=transpose::transortrans=transpose::conjtransColumn major
Bismxnmatrix. Size of arraybmust be at leastldb*nBisnxmmatrix. Size of arraybmust be at leastldb*mRow major
Bismxnmatrix. Size of arraybmust be at leastldb*mBisnxmmatrix. Size of arraybmust be at leastldb*n- ldb
 The leading dimension of the matrix
B. Must be positive.trans=transpose::nontranstrans=transpose::transortrans=transpose::conjtransColumn major
ldbmust be at leaststrideb* (m-1) + 1.ldbmust be at leaststrideb* (n-1) + 1.Row major
ldbmust be at leaststrideb* (n-1) + 1.ldbmust be at leaststrideb* (m-1) + 1.- strideb
 The second stride of the matrix
B. For column major layout,stridebis the number of elements in the array between adjacent rows of the matrix. For row major layout,stridebis the number of elements between adjacent columns of the matrix. In both casesstridebmust be at least 1.- dependencies
 List of events to wait for before starting computation, if any. If omitted, defaults to no dependencies.
Output Parameters
- b
 Pointer to output matrix
Boverwritten byalpha* op(A).
Return Values
Output event to wait on to ensure computation is complete.
Throws
This routine shall throw the following exceptions if the associated condition is detected. An implementation may throw additional implementation-specific exception(s) in case of error conditions not covered here.
oneapi::mkl::unsupported_device
Parent topic: BLAS-like Extensions