omatcopy#
Computes an out-of-place scaled matrix transpose or copy operation using a general dense matrix.
Description
The omatcopy
routine performs an out-of-place scaled
matrix copy or transposition.
The operation is defined as:
where:
op(X
) is one of op(X
) = X
, or op(X
) = X
T, or op(X
) = X
H,
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.,
omatcopy
supports the following precisions:
T
float
double
std::complex<float>
std::complex<double>
omatcopy (Buffer Version)#
Syntax
namespace oneapi::mkl::blas::column_major {
void omatcopy(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,
sycl::buffer<T, 1> &b,
std::int64_t ldb);
}
namespace oneapi::mkl::blas::row_major {
void omatcopy(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,
sycl::buffer<T, 1> &b,
std::int64_t ldb);
}
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
*n
for column-major and at leastlda
*m
for row-major.- lda
Leading dimension of the matrix
A
. If matrices are stored using column major layout,lda
must be at leastm
. If matrices are stored using row major layout,lda
must be at leastn
. Must be positive.- b
Buffer holding the output matrix
B
.trans
=transpose::nontrans
trans
=transpose::trans
ortrans
=transpose::conjtrans
Column major
B
ism
xn
matrix. Size of arrayb
must be at leastldb
*n
B
isn
xm
matrix. Size of arrayb
must be at leastldb
*m
Row major
B
ism
xn
matrix. Size of arrayb
must be at leastldb
*m
B
isn
xm
matrix. Size of arrayb
must be at leastldb
*n
- ldb
The leading dimension of the matrix
B
. Must be positive.trans
=transpose::nontrans
trans
=transpose::trans
ortrans
=transpose::conjtrans
Column major
ldb
must be at leastm
.ldb
must be at leastn
.Row major
ldb
must be at leastn
.ldb
must be at leastm
.
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.
omatcopy (USM Version)#
Syntax
namespace oneapi::mkl::blas::column_major {
sycl::event omatcopy(sycl::queue &queue,
oneapi::mkl::transpose trans,
std::int64_t m,
std::int64_t n,
T alpha,
const T *a,
std::int64_t lda,
T *b,
std::int64_t ldb,
const std::vector<sycl::event> &dependencies = {});
}
namespace oneapi::mkl::blas::row_major {
sycl::event omatcopy(sycl::queue &queue,
oneapi::mkl::transpose trans,
std::int64_t m,
std::int64_t n,
T alpha,
const T *a,
std::int64_t lda,
T *b,
std::int64_t ldb,
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 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
Pointer to input matrix
A
. Must have size at leastlda
*n
for column-major and at leastlda
*m
for row-major.- lda
Leading dimension of the matrix
A
. If matrices are stored using column major layout,lda
must be at leastm
. If matrices are stored using row major layout,lda
must be at leastn
. Must be positive.- b
Pointer to output matrix
B
.trans
=transpose::nontrans
trans
=transpose::trans
ortrans
=transpose::conjtrans
Column major
B
ism
xn
matrix. Size of arrayb
must be at leastldb
*n
B
isn
xm
matrix. Size of arrayb
must be at leastldb
*m
Row major
B
ism
xn
matrix. Size of arrayb
must be at leastldb
*m
B
isn
xm
matrix. Size of arrayb
must be at leastldb
*n
- ldb
Leading dimension of the matrix
B
. Must be positive.trans
=transpose::nontrans
trans
=transpose::trans
ortrans
=transpose::conjtrans
Column major
Must be at least
m
Must be at least
n
Row major
Must be at least
n
Must be at least
m
- 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
B
overwritten 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