clBLAS  2.11
 All Functions Typedefs Enumerations Enumerator Groups Pages
Functions
HER2K - Hermitian rank-2k update to a matrix

Functions

clblasStatus clblasCher2k (clblasOrder order, clblasUplo uplo, clblasTranspose trans, size_t N, size_t K, FloatComplex alpha, const cl_mem A, size_t offa, size_t lda, const cl_mem B, size_t offb, size_t ldb, cl_float beta, cl_mem C, size_t offc, size_t ldc, cl_uint numCommandQueues, cl_command_queue *commandQueues, cl_uint numEventsInWaitList, const cl_event *eventWaitList, cl_event *events)
 Rank-2k update of a hermitian matrix with float-complex elements. More...
 
clblasStatus clblasZher2k (clblasOrder order, clblasUplo uplo, clblasTranspose trans, size_t N, size_t K, DoubleComplex alpha, const cl_mem A, size_t offa, size_t lda, const cl_mem B, size_t offb, size_t ldb, cl_double beta, cl_mem C, size_t offc, size_t ldc, cl_uint numCommandQueues, cl_command_queue *commandQueues, cl_uint numEventsInWaitList, const cl_event *eventWaitList, cl_event *events)
 Rank-2k update of a hermitian matrix with double-complex elements. More...
 

Detailed Description

Function Documentation

clblasStatus clblasCher2k ( clblasOrder  order,
clblasUplo  uplo,
clblasTranspose  trans,
size_t  N,
size_t  K,
FloatComplex  alpha,
const cl_mem  A,
size_t  offa,
size_t  lda,
const cl_mem  B,
size_t  offb,
size_t  ldb,
cl_float  beta,
cl_mem  C,
size_t  offc,
size_t  ldc,
cl_uint  numCommandQueues,
cl_command_queue *  commandQueues,
cl_uint  numEventsInWaitList,
const cl_event *  eventWaitList,
cl_event *  events 
)

Rank-2k update of a hermitian matrix with float-complex elements.

Rank-k updates:

  • \( C \leftarrow \alpha A B^H + conj( \alpha ) B A^H + \beta C \)
  • \( C \leftarrow \alpha A^H B + conj( \alpha ) B^H A + \beta C \)

where C is a hermitian matrix.

Parameters
[in]orderRow/column order.
[in]uploThe triangle in matrix C being referenced.
[in]transHow matrix A is to be transposed.
[in]NNumber of rows and columns in matrix C.
[in]KNumber of columns of the matrix A if it is not transposed, and number of rows otherwise.
[in]alphaThe factor of matrix A.
[in]ABuffer object storing the matrix A.
[in]offaOffset in number of elements for the first element in matrix A.
[in]ldaLeading dimension of matrix A. It cannot be less than K if A is in the row-major format, and less than N otherwise. Vice-versa for transpose case.
[in]BBuffer object storing the matrix B.
[in]offbOffset in number of elements for the first element in matrix B.
[in]ldbLeading dimension of matrix B. It cannot be less than K if B is in the row-major format, and less than N otherwise. Vice-versa for transpose case
[in]betaThe factor of the matrix C.
[out]CBuffer object storing matrix C.
[in]offcOffset in number of elements for the first element in matrix C.
[in]ldcLeading dimension of matric C. It cannot be less than N.
[in]numCommandQueuesNumber of OpenCL command queues in which the task is to be performed.
[in]commandQueuesOpenCL command queues.
[in]numEventsInWaitListNumber of events in the event wait list.
[in]eventWaitListEvent wait list.
[in]eventsEvent objects per each command queue that identify a particular kernel execution instance.
Returns
  • clblasSuccess on success;
  • clblasNotInitialized if clblasSetup() was not called;
  • clblasInvalidValue if invalid parameters are passed:
    • either N or K is zero, or
    • any of the leading dimensions is invalid;
    • the matrix sizes lead to accessing outsize of any of the buffers;
  • clblasInvalidMemObject if either A , B or C object is invalid, or an image object rather than the buffer one;
  • clblasOutOfHostMemory if the library can't allocate memory for internal structures;
  • clblasInvalidCommandQueue if the passed command queue is invalid;
  • clblasInvalidContext if a context a passed command queue belongs to was released.
Examples:
example_cher2k.c.
clblasStatus clblasZher2k ( clblasOrder  order,
clblasUplo  uplo,
clblasTranspose  trans,
size_t  N,
size_t  K,
DoubleComplex  alpha,
const cl_mem  A,
size_t  offa,
size_t  lda,
const cl_mem  B,
size_t  offb,
size_t  ldb,
cl_double  beta,
cl_mem  C,
size_t  offc,
size_t  ldc,
cl_uint  numCommandQueues,
cl_command_queue *  commandQueues,
cl_uint  numEventsInWaitList,
const cl_event *  eventWaitList,
cl_event *  events 
)

Rank-2k update of a hermitian matrix with double-complex elements.

Rank-k updates:

  • \( C \leftarrow \alpha A B^H + conj( \alpha ) B A^H + \beta C \)
  • \( C \leftarrow \alpha A^H B + conj( \alpha ) B^H A + \beta C \)

where C is a hermitian matrix.

Parameters
[in]orderRow/column order.
[in]uploThe triangle in matrix C being referenced.
[in]transHow matrix A is to be transposed.
[in]NNumber of rows and columns in matrix C.
[in]KNumber of columns of the matrix A if it is not transposed, and number of rows otherwise.
[in]alphaThe factor of matrix A.
[in]ABuffer object storing the matrix A.
[in]offaOffset in number of elements for the first element in matrix A.
[in]ldaLeading dimension of matrix A. It cannot be less than K if A is in the row-major format, and less than N otherwise. Vice-versa for transpose case.
[in]BBuffer object storing the matrix B.
[in]offbOffset in number of elements for the first element in matrix B.
[in]ldbLeading dimension of matrix B. It cannot be less than K if B is in the row-major format, and less than N otherwise. Vice-versa for transpose case.
[in]betaThe factor of the matrix C.
[out]CBuffer object storing matrix C.
[in]offcOffset in number of elements for the first element in matrix C.
[in]ldcLeading dimension of matric C. It cannot be less than N.
[in]numCommandQueuesNumber of OpenCL command queues in which the task is to be performed.
[in]commandQueuesOpenCL command queues.
[in]numEventsInWaitListNumber of events in the event wait list.
[in]eventWaitListEvent wait list.
[in]eventsEvent objects per each command queue that identify a particular kernel execution instance.
Returns
  • clblasSuccess on success;
  • clblasInvalidDevice if a target device does not support floating point arithmetic with double precision;
  • the same error codes as the clblasCher2k() function otherwise.