Developer Reference

Contents

omatadd

Computes a sum of two general matrices, with optional transposes.

Description

The
omatadd
routine performs an out-of-place scaled matrix addition with optional transposes in the arguments. The operation is defined as:
LaTex Math image.
where:
  • op(
    X
    ) is one of op(
    X
    ) =
    X
    , or op(
    X
    ) =
    X
    T
    , or op(
    X
    ) =
    X
    H
  • alpha
    and
    beta
    are scalars
  • A
    ,
    B
    and
    C
    are matrices
  • op(
    A
    ) is
    m
    x
    n
    matrix
  • op(
    B
    ) is
    m
    x
    n
    matrix
  • C
    is
    m
    x
    n
    matrix
omatadd
supports the following precisions:
T
float
double
std::complex<float>
std::complex<double>

omatadd (Buffer Version)

Syntax
namespace oneapi::mkl::blas::column_major { void omatadd(sycl::queue &queue, oneapi::mkl::transpose transa, oneapi::mkl::transpose transb, std::int64_t m, std::int64_t n, T alpha, sycl::buffer<T, 1> &a, std::int64_t lda, T beta, sycl::buffer<T, 1> &b, std::int64_t ldb, sycl::buffer<T, 1> &c, std::int64_t ldc) }
namespace oneapi::mkl::blas::row_major { void omatadd(sycl::queue &queue, oneapi::mkl::transpose transa, oneapi::mkl::transpose transb, std::int64_t m, std::int64_t n, T alpha, sycl::buffer<T, 1> &a, std::int64_t lda, T beta, sycl::buffer<T, 1> &b, std::int64_t ldb, sycl::buffer<T, 1> &c, std::int64_t ldc) }
Input Parameters
queue
The queue where the routine will be executed.
transa
Specifies op(
A
), the transposition operation applied to the matrix A.
transb
Specifies op(
B
), the transposition operation applied to the matrix B.
m
Number of rows for the result matrix
C
. Must be at least zero.
n
Number of columns for the result matrix
C
. Must be at least zero.
alpha
Scaling factor for the matrix
A
.
a
Buffer holding the input matrix
A
.
transa
=
transpose::nontrans
transa
=
transpose::trans
or
transa
=
transpose::conjtrans
Column major
A
is
m
x
n
matrix. Size of array
a
must be at least
lda
*
n
A
is
n
x
m
matrix. Size of array
a
must be at least
lda
*
m
Row major
A
is
m
x
n
matrix. Size of array
a
must be at least
lda
*
m
A
is
n
x
m
matrix. Size of array
a
must be at least
lda
*
n
lda
Leading dimension of matrix
A
. Must be positive
transa
=
transpose::nontrans
transa
=
transpose::trans
or
transa
=
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
beta
Scaling factor for the matrix
B
.
b
Buffer holding the input matrix
B
.
transb
=
transpose::nontrans
transb
=
transpose::trans
or
transb
=
transpose::conjtrans
Column major
B
is
m
x
n
matrix. Size of array
b
must be at least
ldb
*
n
B
is
n
x
m
matrix. Size of array
b
must be at least
ldb
*
m
Row major
B
is
m
x
n
matrix. Size of array
b
must be at least
ldb
*
m
B
is
n
x
m
matrix. Size of array
b
must be at least
ldb
*
n
ldb
Leading dimension of marix
B
. Must be positive.
transb
=
transpose::nontrans
transb
=
transpose::trans
or
transb
=
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
c
Buffer holding output matrix
C
.
Column major
C
is
m
x
n
matrix. Size of array
c
must be at least
ldc
*
n
Row major
C
is
m
x
n
matrix. Size of array
c
must be at least
ldc
*
m
ldc
Leading dimension of the matrix
C
. If matrices are stored using column major layout,
ldc
must be at least
m
. If matrices are stored using row major layout,
ldc
must be at least
n
. Must be positive.
Output Parameters
c
Output buffer overwritten by
alpha
* op(
A
) +
beta
* op(
B
).

omatadd (USM Version)

Syntax
namespace oneapi::mkl::blas::column_major { sycl::event omatadd_batch(sycl::queue &queue, oneapi::mkl::transpose transa, oneapi::mkl::transpose transb, std::int64_t m, std::int64_t n, T alpha, const T *a, std::int64_t lda, T beta, T *b, std::int64_t ldb, T *c, std::int64_t ldc, const std::vector<sycl::event> &dependencies = {}); }
namespace oneapi::mkl::blas::row_major { sycl::event omatadd_batch(sycl::queue &queue, oneapi::mkl::transpose transa, oneapi::mkl::transpose transb, std::int64_t m, std::int64_t n, T alpha, const T *a, std::int64_t lda, T beta, T *b, std::int64_t ldb, T *c, std::int64_t ldc, const std::vector<sycl::event> &dependencies = {}); }
Input Parameters
queue
The queue where the routine will be executed.
transa
Specifies op(
A
), the transposition operation applied to matrix
A
. See Data Types for more details.
transb
Specifies op(
B
), the transposition operation applied to matrix
B
. See Data Types for more details.
m
Number of rows for the result matrix
C
. Must be at least zero.
n
Number of columns for the result matrix
C
. Must be at least zero.
alpha
Scaling factor for the matrix
A
.
a
Pointer to input matrix
A
. See Matrix Storage for more details.
transa
=
transpose::nontrans
transa
=
transpose::trans
or
transa
=
transpose::conjtrans
Column major
A
is
m
x
n
matrix. Size of array
a
must be at least
lda
*
n
A
is
n
x
m
matrix. Size of array
a
must be at least
lda
*
m
Row major
A
is
m
x
n
matrix. Size of array
a
must be at least
lda
*
m
A
is
n
x
m
matrix. Size of array
a
must be at least
lda
*
n
lda
Leading dimension of matrix
A
. Must be positive
transa
=
transpose::nontrans
transa
=
transpose::trans
or
transa
=
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
beta
Scaling factor for the matrix
B
.
b
Pointer to input matrix
B
. See Matrix Storage for more details.
transb
=
transpose::nontrans
transb
=
transpose::trans
or
transb
=
transpose::conjtrans
Column major
B
is
m
x
n
matrix. Size of array
b
must be at least
ldb
*
n
B
is
n
x
m
matrix. Size of array
b
must be at least
ldb
*
m
Row major
B
is
m
x
n
matrix. Size of array
b
must be at least
ldb
*
m
B
is
n
x
m
matrix. Size of array
b
must be at least
ldb
*
n
ldb
Leading dimension of marix
B
. Must be positive.
transb
=
transpose::nontrans
transb
=
transpose::trans
or
transb
=
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
c
Pointer to output matrix
C
. See Matrix Storage for more details.
Column major
C
is
m
x
n
matrix. Size of array
c
must be at least
ldc
*
n
Row major
C
is
m
x
n
matrix. Size of array
c
must be at least
ldc
*
m
ldc
Leading dimension of the matrix
C
. If matrices are stored using column major layout,
ldc
must be at least
m
. If matrices are stored using row major layout,
ldc
must be at least
n
. Must be positive.
dependencies
List of events to wait for before starting computation, if any. If omitted, defaults to no dependencies.
Output Parameters
c
Pointer to output matrix overwritten by
alpha
* op(
A
) +
beta
* op(
B
).
Return Values
Output event to wait for to ensure computation is complete.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.