2016-05-08 09:49:00 +02:00
CLBlast: API reference
================
xSWAP: Swap two vectors
-------------
2016-06-13 20:17:26 +02:00
Interchanges _n_ elements of vectors _x_ and _y_ .
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Swap(const size_t n,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastSswap(const size_t n,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDswap(const size_t n,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastCswap(const size_t n,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZswap(const size_t n,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastHswap(const size_t n,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to SWAP:
2016-06-13 20:17:26 +02:00
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `cl_mem x_buffer` : OpenCL buffer to store the output x vector.
* `const size_t x_offset` : The offset in elements from the start of the output x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the output x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_mem y_buffer` : OpenCL buffer to store the output y vector.
* `const size_t y_offset` : The offset in elements from the start of the output y vector.
2016-06-13 20:17:26 +02:00
* `const size_t y_inc` : Stride/increment of the output y vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
xSCAL: Vector scaling
-------------
2016-06-13 20:17:26 +02:00
Multiplies _n_ elements of vector _x_ by a scalar constant _alpha_ .
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Scal(const size_t n,
const T alpha,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastSscal(const size_t n,
const float alpha,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDscal(const size_t n,
const double alpha,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastCscal(const size_t n,
const cl_float2 alpha,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZscal(const size_t n,
const cl_double2 alpha,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastHscal(const size_t n,
const cl_half alpha,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to SCAL:
2016-06-13 20:17:26 +02:00
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `cl_mem x_buffer` : OpenCL buffer to store the output x vector.
* `const size_t x_offset` : The offset in elements from the start of the output x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the output x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
xCOPY: Vector copy
-------------
2016-06-13 20:17:26 +02:00
Copies the contents of vector _x_ into vector _y_ .
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Copy(const size_t n,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastScopy(const size_t n,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDcopy(const size_t n,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastCcopy(const size_t n,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZcopy(const size_t n,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastHcopy(const size_t n,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to COPY:
2016-06-13 20:17:26 +02:00
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_mem y_buffer` : OpenCL buffer to store the output y vector.
* `const size_t y_offset` : The offset in elements from the start of the output y vector.
2016-06-13 20:17:26 +02:00
* `const size_t y_inc` : Stride/increment of the output y vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
xAXPY: Vector-times-constant plus vector
-------------
2016-06-13 20:17:26 +02:00
Performs the operation _y = alpha * x + y_ , in which _x_ and _y_ are vectors and _alpha_ is a scalar constant.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Axpy(const size_t n,
const T alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastSaxpy(const size_t n,
const float alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDaxpy(const size_t n,
const double alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastCaxpy(const size_t n,
const cl_float2 alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZaxpy(const size_t n,
const cl_double2 alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastHaxpy(const size_t n,
const cl_half alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to AXPY:
2016-06-13 20:17:26 +02:00
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_mem y_buffer` : OpenCL buffer to store the output y vector.
* `const size_t y_offset` : The offset in elements from the start of the output y vector.
2016-06-13 20:17:26 +02:00
* `const size_t y_inc` : Stride/increment of the output y vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
xDOT: Dot product of two vectors
-------------
2016-06-13 20:17:26 +02:00
Multiplies _n_ elements of the vectors _x_ and _y_ element-wise and accumulates the results. The sum is stored in the _dot_ buffer.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Dot(const size_t n,
cl_mem dot_buffer, const size_t dot_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastSdot(const size_t n,
cl_mem dot_buffer, const size_t dot_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDdot(const size_t n,
cl_mem dot_buffer, const size_t dot_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastHdot(const size_t n,
cl_mem dot_buffer, const size_t dot_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to DOT:
2016-06-13 20:17:26 +02:00
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `cl_mem dot_buffer` : OpenCL buffer to store the output dot vector.
* `const size_t dot_offset` : The offset in elements from the start of the output dot vector.
* `cl_mem dot_buffer` : OpenCL buffer to store the output dot vector.
* `const size_t dot_offset` : The offset in elements from the start of the output dot vector.
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const cl_mem y_buffer` : OpenCL buffer to store the input y vector.
* `const size_t y_offset` : The offset in elements from the start of the input y vector.
2016-06-13 20:17:26 +02:00
* `const size_t y_inc` : Stride/increment of the input y vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
xDOTU: Dot product of two complex vectors
-------------
See the regular xDOT routine.
C++ API:
```
template < typename T >
StatusCode Dotu(const size_t n,
cl_mem dot_buffer, const size_t dot_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastCdotu(const size_t n,
cl_mem dot_buffer, const size_t dot_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZdotu(const size_t n,
cl_mem dot_buffer, const size_t dot_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to DOTU:
2016-06-13 20:17:26 +02:00
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `cl_mem dot_buffer` : OpenCL buffer to store the output dot vector.
* `const size_t dot_offset` : The offset in elements from the start of the output dot vector.
* `cl_mem dot_buffer` : OpenCL buffer to store the output dot vector.
* `const size_t dot_offset` : The offset in elements from the start of the output dot vector.
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const cl_mem y_buffer` : OpenCL buffer to store the input y vector.
* `const size_t y_offset` : The offset in elements from the start of the input y vector.
2016-06-13 20:17:26 +02:00
* `const size_t y_inc` : Stride/increment of the input y vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
xDOTC: Dot product of two complex vectors, one conjugated
-------------
See the regular xDOT routine.
C++ API:
```
template < typename T >
StatusCode Dotc(const size_t n,
cl_mem dot_buffer, const size_t dot_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastCdotc(const size_t n,
cl_mem dot_buffer, const size_t dot_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZdotc(const size_t n,
cl_mem dot_buffer, const size_t dot_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to DOTC:
2016-06-13 20:17:26 +02:00
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `cl_mem dot_buffer` : OpenCL buffer to store the output dot vector.
* `const size_t dot_offset` : The offset in elements from the start of the output dot vector.
* `cl_mem dot_buffer` : OpenCL buffer to store the output dot vector.
* `const size_t dot_offset` : The offset in elements from the start of the output dot vector.
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const cl_mem y_buffer` : OpenCL buffer to store the input y vector.
* `const size_t y_offset` : The offset in elements from the start of the input y vector.
2016-06-13 20:17:26 +02:00
* `const size_t y_inc` : Stride/increment of the input y vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
xNRM2: Euclidian norm of a vector
-------------
2016-06-13 20:17:26 +02:00
Accumulates the square of _n_ elements in the _x_ vector and takes the square root. The resulting L2 norm is stored in the _nrm2_ buffer.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Nrm2(const size_t n,
cl_mem nrm2_buffer, const size_t nrm2_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastSnrm2(const size_t n,
cl_mem nrm2_buffer, const size_t nrm2_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDnrm2(const size_t n,
cl_mem nrm2_buffer, const size_t nrm2_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastScnrm2(const size_t n,
cl_mem nrm2_buffer, const size_t nrm2_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDznrm2(const size_t n,
cl_mem nrm2_buffer, const size_t nrm2_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastHnrm2(const size_t n,
cl_mem nrm2_buffer, const size_t nrm2_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to NRM2:
2016-06-13 20:17:26 +02:00
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `cl_mem nrm2_buffer` : OpenCL buffer to store the output nrm2 vector.
* `const size_t nrm2_offset` : The offset in elements from the start of the output nrm2 vector.
* `cl_mem nrm2_buffer` : OpenCL buffer to store the output nrm2 vector.
* `const size_t nrm2_offset` : The offset in elements from the start of the output nrm2 vector.
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
xASUM: Absolute sum of values in a vector
-------------
2016-06-13 20:17:26 +02:00
Accumulates the absolute value of _n_ elements in the _x_ vector. The results are stored in the _asum_ buffer.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Asum(const size_t n,
cl_mem asum_buffer, const size_t asum_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastSasum(const size_t n,
cl_mem asum_buffer, const size_t asum_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDasum(const size_t n,
cl_mem asum_buffer, const size_t asum_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastScasum(const size_t n,
cl_mem asum_buffer, const size_t asum_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDzasum(const size_t n,
cl_mem asum_buffer, const size_t asum_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastHasum(const size_t n,
cl_mem asum_buffer, const size_t asum_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to ASUM:
2016-06-13 20:17:26 +02:00
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `cl_mem asum_buffer` : OpenCL buffer to store the output asum vector.
* `const size_t asum_offset` : The offset in elements from the start of the output asum vector.
* `cl_mem asum_buffer` : OpenCL buffer to store the output asum vector.
* `const size_t asum_offset` : The offset in elements from the start of the output asum vector.
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
xSUM: Sum of values in a vector (non-BLAS function)
-------------
2016-06-13 20:17:26 +02:00
Accumulates the values of _n_ elements in the _x_ vector. The results are stored in the _sum_ buffer. This routine is the non-absolute version of the xASUM BLAS routine.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Sum(const size_t n,
cl_mem sum_buffer, const size_t sum_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastSsum(const size_t n,
cl_mem sum_buffer, const size_t sum_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDsum(const size_t n,
cl_mem sum_buffer, const size_t sum_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastScsum(const size_t n,
cl_mem sum_buffer, const size_t sum_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDzsum(const size_t n,
cl_mem sum_buffer, const size_t sum_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastHsum(const size_t n,
cl_mem sum_buffer, const size_t sum_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to SUM:
2016-06-13 20:17:26 +02:00
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `cl_mem sum_buffer` : OpenCL buffer to store the output sum vector.
* `const size_t sum_offset` : The offset in elements from the start of the output sum vector.
* `cl_mem sum_buffer` : OpenCL buffer to store the output sum vector.
* `const size_t sum_offset` : The offset in elements from the start of the output sum vector.
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
xAMAX: Index of absolute maximum value in a vector
-------------
2016-06-13 20:17:26 +02:00
Finds the index of the maximum of the absolute values in the _x_ vector. The resulting integer index is stored in the _imax_ buffer.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Amax(const size_t n,
cl_mem imax_buffer, const size_t imax_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastiSamax(const size_t n,
cl_mem imax_buffer, const size_t imax_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastiDamax(const size_t n,
cl_mem imax_buffer, const size_t imax_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastiCamax(const size_t n,
cl_mem imax_buffer, const size_t imax_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastiZamax(const size_t n,
cl_mem imax_buffer, const size_t imax_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastiHamax(const size_t n,
cl_mem imax_buffer, const size_t imax_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to AMAX:
2016-06-13 20:17:26 +02:00
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `cl_mem imax_buffer` : OpenCL buffer to store the output imax vector.
* `const size_t imax_offset` : The offset in elements from the start of the output imax vector.
* `cl_mem imax_buffer` : OpenCL buffer to store the output imax vector.
* `const size_t imax_offset` : The offset in elements from the start of the output imax vector.
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
xMAX: Index of maximum value in a vector (non-BLAS function)
-------------
2016-06-13 20:17:26 +02:00
Finds the index of the maximum of the values in the _x_ vector. The resulting integer index is stored in the _imax_ buffer. This routine is the non-absolute version of the IxAMAX BLAS routine.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Max(const size_t n,
cl_mem imax_buffer, const size_t imax_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastiSmax(const size_t n,
cl_mem imax_buffer, const size_t imax_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastiDmax(const size_t n,
cl_mem imax_buffer, const size_t imax_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastiCmax(const size_t n,
cl_mem imax_buffer, const size_t imax_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastiZmax(const size_t n,
cl_mem imax_buffer, const size_t imax_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastiHmax(const size_t n,
cl_mem imax_buffer, const size_t imax_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to MAX:
2016-06-13 20:17:26 +02:00
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `cl_mem imax_buffer` : OpenCL buffer to store the output imax vector.
* `const size_t imax_offset` : The offset in elements from the start of the output imax vector.
* `cl_mem imax_buffer` : OpenCL buffer to store the output imax vector.
* `const size_t imax_offset` : The offset in elements from the start of the output imax vector.
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
xMIN: Index of minimum value in a vector (non-BLAS function)
-------------
2016-06-13 20:17:26 +02:00
Finds the index of the minimum of the values in the _x_ vector. The resulting integer index is stored in the _imin_ buffer. This routine is the non-absolute minimum version of the IxAMAX BLAS routine.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Min(const size_t n,
cl_mem imin_buffer, const size_t imin_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastiSmin(const size_t n,
cl_mem imin_buffer, const size_t imin_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastiDmin(const size_t n,
cl_mem imin_buffer, const size_t imin_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastiCmin(const size_t n,
cl_mem imin_buffer, const size_t imin_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastiZmin(const size_t n,
cl_mem imin_buffer, const size_t imin_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastiHmin(const size_t n,
cl_mem imin_buffer, const size_t imin_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to MIN:
2016-06-13 20:17:26 +02:00
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `cl_mem imin_buffer` : OpenCL buffer to store the output imin vector.
* `const size_t imin_offset` : The offset in elements from the start of the output imin vector.
* `cl_mem imin_buffer` : OpenCL buffer to store the output imin vector.
* `const size_t imin_offset` : The offset in elements from the start of the output imin vector.
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
xGEMV: General matrix-vector multiplication
-------------
2016-06-13 20:17:26 +02:00
Performs the operation _y = alpha * A * x + beta * y_ , in which _x_ is an input vector, _y_ is an input and output vector, _A_ is an input matrix, and _alpha_ and _beta_ are scalars. The matrix _A_ can optionally be transposed before performing the operation.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Gemv(const Layout layout, const Transpose a_transpose,
const size_t m, const size_t n,
const T alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const T beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastSgemv(const CLBlastLayout layout, const CLBlastTranspose a_transpose,
const size_t m, const size_t n,
const float alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const float beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDgemv(const CLBlastLayout layout, const CLBlastTranspose a_transpose,
const size_t m, const size_t n,
const double alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const double beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastCgemv(const CLBlastLayout layout, const CLBlastTranspose a_transpose,
const size_t m, const size_t n,
const cl_float2 alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_float2 beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZgemv(const CLBlastLayout layout, const CLBlastTranspose a_transpose,
const size_t m, const size_t n,
const cl_double2 alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_double2 beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastHgemv(const CLBlastLayout layout, const CLBlastTranspose a_transpose,
const size_t m, const size_t n,
const cl_half alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_half beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to GEMV:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Transpose a_transpose` : Transposing the input matrix A, either `Transpose::kNo` (111), `Transpose::kYes` (112), or `Transpose::kConjugate` (113) for a complex-conjugate transpose.
* `const size_t m` : Integer size argument. This value must be positive.
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `const cl_mem a_buffer` : OpenCL buffer to store the input A matrix.
* `const size_t a_offset` : The offset in elements from the start of the input A matrix.
2016-06-13 20:17:26 +02:00
* `const size_t a_ld` : Leading dimension of the input A matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const T beta` : Input scalar constant.
* `cl_mem y_buffer` : OpenCL buffer to store the output y vector.
* `const size_t y_offset` : The offset in elements from the start of the output y vector.
2016-06-13 20:17:26 +02:00
* `const size_t y_inc` : Stride/increment of the output y vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
2016-06-13 20:17:26 +02:00
Requirements for GEMV:
* The value of `a_ld` must be at least `m` .
2016-05-08 09:49:00 +02:00
xGBMV: General banded matrix-vector multiplication
-------------
2016-06-13 20:17:26 +02:00
Same operation as xGEMV, but matrix _A_ is banded instead.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Gbmv(const Layout layout, const Transpose a_transpose,
const size_t m, const size_t n, const size_t kl, const size_t ku,
const T alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const T beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastSgbmv(const CLBlastLayout layout, const CLBlastTranspose a_transpose,
const size_t m, const size_t n, const size_t kl, const size_t ku,
const float alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const float beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDgbmv(const CLBlastLayout layout, const CLBlastTranspose a_transpose,
const size_t m, const size_t n, const size_t kl, const size_t ku,
const double alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const double beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastCgbmv(const CLBlastLayout layout, const CLBlastTranspose a_transpose,
const size_t m, const size_t n, const size_t kl, const size_t ku,
const cl_float2 alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_float2 beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZgbmv(const CLBlastLayout layout, const CLBlastTranspose a_transpose,
const size_t m, const size_t n, const size_t kl, const size_t ku,
const cl_double2 alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_double2 beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastHgbmv(const CLBlastLayout layout, const CLBlastTranspose a_transpose,
const size_t m, const size_t n, const size_t kl, const size_t ku,
const cl_half alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_half beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to GBMV:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Transpose a_transpose` : Transposing the input matrix A, either `Transpose::kNo` (111), `Transpose::kYes` (112), or `Transpose::kConjugate` (113) for a complex-conjugate transpose.
* `const size_t m` : Integer size argument. This value must be positive.
* `const size_t n` : Integer size argument. This value must be positive.
* `const size_t kl` : Integer size argument. This value must be positive.
* `const size_t ku` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `const cl_mem a_buffer` : OpenCL buffer to store the input A matrix.
* `const size_t a_offset` : The offset in elements from the start of the input A matrix.
2016-06-13 20:17:26 +02:00
* `const size_t a_ld` : Leading dimension of the input A matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const T beta` : Input scalar constant.
* `cl_mem y_buffer` : OpenCL buffer to store the output y vector.
* `const size_t y_offset` : The offset in elements from the start of the output y vector.
2016-06-13 20:17:26 +02:00
* `const size_t y_inc` : Stride/increment of the output y vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
2016-06-13 20:17:26 +02:00
Requirements for GBMV:
* The value of `a_ld` must be at least `kl + ku + 1` .
2016-05-08 09:49:00 +02:00
xHEMV: Hermitian matrix-vector multiplication
-------------
2016-06-13 20:17:26 +02:00
Same operation as xGEMV, but matrix _A_ is an Hermitian matrix instead.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Hemv(const Layout layout, const Triangle triangle,
const size_t n,
const T alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const T beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastChemv(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const cl_float2 alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_float2 beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZhemv(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const cl_double2 alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_double2 beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to HEMV:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Triangle triangle` : The part of the array of the triangular matrix to be used, either `Triangle::kUpper` (121) or `Triangle::kLower` (122).
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `const cl_mem a_buffer` : OpenCL buffer to store the input A matrix.
* `const size_t a_offset` : The offset in elements from the start of the input A matrix.
2016-06-13 20:17:26 +02:00
* `const size_t a_ld` : Leading dimension of the input A matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const T beta` : Input scalar constant.
* `cl_mem y_buffer` : OpenCL buffer to store the output y vector.
* `const size_t y_offset` : The offset in elements from the start of the output y vector.
2016-06-13 20:17:26 +02:00
* `const size_t y_inc` : Stride/increment of the output y vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
2016-06-13 20:17:26 +02:00
Requirements for HEMV:
* The value of `a_ld` must be at least `n` .
2016-05-08 09:49:00 +02:00
xHBMV: Hermitian banded matrix-vector multiplication
-------------
2016-06-13 20:17:26 +02:00
Same operation as xGEMV, but matrix _A_ is an Hermitian banded matrix instead.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Hbmv(const Layout layout, const Triangle triangle,
const size_t n, const size_t k,
const T alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const T beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastChbmv(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n, const size_t k,
const cl_float2 alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_float2 beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZhbmv(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n, const size_t k,
const cl_double2 alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_double2 beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to HBMV:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Triangle triangle` : The part of the array of the triangular matrix to be used, either `Triangle::kUpper` (121) or `Triangle::kLower` (122).
* `const size_t n` : Integer size argument. This value must be positive.
* `const size_t k` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `const cl_mem a_buffer` : OpenCL buffer to store the input A matrix.
* `const size_t a_offset` : The offset in elements from the start of the input A matrix.
2016-06-13 20:17:26 +02:00
* `const size_t a_ld` : Leading dimension of the input A matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const T beta` : Input scalar constant.
* `cl_mem y_buffer` : OpenCL buffer to store the output y vector.
* `const size_t y_offset` : The offset in elements from the start of the output y vector.
2016-06-13 20:17:26 +02:00
* `const size_t y_inc` : Stride/increment of the output y vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
2016-06-13 20:17:26 +02:00
Requirements for HBMV:
* The value of `a_ld` must be at least `k + 1` .
2016-05-08 09:49:00 +02:00
xHPMV: Hermitian packed matrix-vector multiplication
-------------
2016-06-13 20:17:26 +02:00
Same operation as xGEMV, but matrix _A_ is an Hermitian packed matrix instead and represented as _AP_ .
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Hpmv(const Layout layout, const Triangle triangle,
const size_t n,
const T alpha,
const cl_mem ap_buffer, const size_t ap_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const T beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastChpmv(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const cl_float2 alpha,
const cl_mem ap_buffer, const size_t ap_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_float2 beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZhpmv(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const cl_double2 alpha,
const cl_mem ap_buffer, const size_t ap_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_double2 beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to HPMV:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Triangle triangle` : The part of the array of the triangular matrix to be used, either `Triangle::kUpper` (121) or `Triangle::kLower` (122).
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `const cl_mem ap_buffer` : OpenCL buffer to store the input AP matrix.
* `const size_t ap_offset` : The offset in elements from the start of the input AP matrix.
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const T beta` : Input scalar constant.
* `cl_mem y_buffer` : OpenCL buffer to store the output y vector.
* `const size_t y_offset` : The offset in elements from the start of the output y vector.
2016-06-13 20:17:26 +02:00
* `const size_t y_inc` : Stride/increment of the output y vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
xSYMV: Symmetric matrix-vector multiplication
-------------
2016-06-13 20:17:26 +02:00
Same operation as xGEMV, but matrix _A_ is symmetric instead.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Symv(const Layout layout, const Triangle triangle,
const size_t n,
const T alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const T beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastSsymv(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const float alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const float beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDsymv(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const double alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const double beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastHsymv(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const cl_half alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_half beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to SYMV:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Triangle triangle` : The part of the array of the triangular matrix to be used, either `Triangle::kUpper` (121) or `Triangle::kLower` (122).
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `const cl_mem a_buffer` : OpenCL buffer to store the input A matrix.
* `const size_t a_offset` : The offset in elements from the start of the input A matrix.
2016-06-13 20:17:26 +02:00
* `const size_t a_ld` : Leading dimension of the input A matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const T beta` : Input scalar constant.
* `cl_mem y_buffer` : OpenCL buffer to store the output y vector.
* `const size_t y_offset` : The offset in elements from the start of the output y vector.
2016-06-13 20:17:26 +02:00
* `const size_t y_inc` : Stride/increment of the output y vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
2016-06-13 20:17:26 +02:00
Requirements for SYMV:
* The value of `a_ld` must be at least `n` .
2016-05-08 09:49:00 +02:00
xSBMV: Symmetric banded matrix-vector multiplication
-------------
2016-06-13 20:17:26 +02:00
Same operation as xGEMV, but matrix _A_ is symmetric and banded instead.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Sbmv(const Layout layout, const Triangle triangle,
const size_t n, const size_t k,
const T alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const T beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastSsbmv(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n, const size_t k,
const float alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const float beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDsbmv(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n, const size_t k,
const double alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const double beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastHsbmv(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n, const size_t k,
const cl_half alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_half beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to SBMV:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Triangle triangle` : The part of the array of the triangular matrix to be used, either `Triangle::kUpper` (121) or `Triangle::kLower` (122).
* `const size_t n` : Integer size argument. This value must be positive.
* `const size_t k` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `const cl_mem a_buffer` : OpenCL buffer to store the input A matrix.
* `const size_t a_offset` : The offset in elements from the start of the input A matrix.
2016-06-13 20:17:26 +02:00
* `const size_t a_ld` : Leading dimension of the input A matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const T beta` : Input scalar constant.
* `cl_mem y_buffer` : OpenCL buffer to store the output y vector.
* `const size_t y_offset` : The offset in elements from the start of the output y vector.
2016-06-13 20:17:26 +02:00
* `const size_t y_inc` : Stride/increment of the output y vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
2016-06-13 20:17:26 +02:00
Requirements for SBMV:
* The value of `a_ld` must be at least `k + 1` .
2016-05-08 09:49:00 +02:00
xSPMV: Symmetric packed matrix-vector multiplication
-------------
2016-06-13 20:17:26 +02:00
Same operation as xGEMV, but matrix _A_ is a symmetric packed matrix instead and represented as _AP_ .
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Spmv(const Layout layout, const Triangle triangle,
const size_t n,
const T alpha,
const cl_mem ap_buffer, const size_t ap_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const T beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastSspmv(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const float alpha,
const cl_mem ap_buffer, const size_t ap_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const float beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDspmv(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const double alpha,
const cl_mem ap_buffer, const size_t ap_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const double beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastHspmv(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const cl_half alpha,
const cl_mem ap_buffer, const size_t ap_offset,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_half beta,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to SPMV:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Triangle triangle` : The part of the array of the triangular matrix to be used, either `Triangle::kUpper` (121) or `Triangle::kLower` (122).
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `const cl_mem ap_buffer` : OpenCL buffer to store the input AP matrix.
* `const size_t ap_offset` : The offset in elements from the start of the input AP matrix.
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const T beta` : Input scalar constant.
* `cl_mem y_buffer` : OpenCL buffer to store the output y vector.
* `const size_t y_offset` : The offset in elements from the start of the output y vector.
2016-06-13 20:17:26 +02:00
* `const size_t y_inc` : Stride/increment of the output y vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
xTRMV: Triangular matrix-vector multiplication
-------------
2016-06-13 20:17:26 +02:00
Same operation as xGEMV, but matrix _A_ is triangular instead.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Trmv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
const size_t n,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastStrmv(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const CLBlastDiagonal diagonal,
const size_t n,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDtrmv(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const CLBlastDiagonal diagonal,
const size_t n,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastCtrmv(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const CLBlastDiagonal diagonal,
const size_t n,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZtrmv(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const CLBlastDiagonal diagonal,
const size_t n,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastHtrmv(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const CLBlastDiagonal diagonal,
const size_t n,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to TRMV:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Triangle triangle` : The part of the array of the triangular matrix to be used, either `Triangle::kUpper` (121) or `Triangle::kLower` (122).
* `const Transpose a_transpose` : Transposing the input matrix A, either `Transpose::kNo` (111), `Transpose::kYes` (112), or `Transpose::kConjugate` (113) for a complex-conjugate transpose.
* `const Diagonal diagonal` : The property of the diagonal matrix, either `Diagonal::kNonUnit` (131) for non-unit values on the diagonal or `Diagonal::kUnit` (132) for unit values on the diagonal.
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const cl_mem a_buffer` : OpenCL buffer to store the input A matrix.
* `const size_t a_offset` : The offset in elements from the start of the input A matrix.
2016-06-13 20:17:26 +02:00
* `const size_t a_ld` : Leading dimension of the input A matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_mem x_buffer` : OpenCL buffer to store the output x vector.
* `const size_t x_offset` : The offset in elements from the start of the output x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the output x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
2016-06-13 20:17:26 +02:00
Requirements for TRMV:
* The value of `a_ld` must be at least `n` .
2016-05-08 09:49:00 +02:00
xTBMV: Triangular banded matrix-vector multiplication
-------------
2016-06-13 20:17:26 +02:00
Same operation as xGEMV, but matrix _A_ is triangular and banded instead.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Tbmv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
const size_t n, const size_t k,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastStbmv(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const CLBlastDiagonal diagonal,
const size_t n, const size_t k,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDtbmv(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const CLBlastDiagonal diagonal,
const size_t n, const size_t k,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastCtbmv(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const CLBlastDiagonal diagonal,
const size_t n, const size_t k,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZtbmv(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const CLBlastDiagonal diagonal,
const size_t n, const size_t k,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastHtbmv(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const CLBlastDiagonal diagonal,
const size_t n, const size_t k,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to TBMV:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Triangle triangle` : The part of the array of the triangular matrix to be used, either `Triangle::kUpper` (121) or `Triangle::kLower` (122).
* `const Transpose a_transpose` : Transposing the input matrix A, either `Transpose::kNo` (111), `Transpose::kYes` (112), or `Transpose::kConjugate` (113) for a complex-conjugate transpose.
* `const Diagonal diagonal` : The property of the diagonal matrix, either `Diagonal::kNonUnit` (131) for non-unit values on the diagonal or `Diagonal::kUnit` (132) for unit values on the diagonal.
* `const size_t n` : Integer size argument. This value must be positive.
* `const size_t k` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const cl_mem a_buffer` : OpenCL buffer to store the input A matrix.
* `const size_t a_offset` : The offset in elements from the start of the input A matrix.
2016-06-13 20:17:26 +02:00
* `const size_t a_ld` : Leading dimension of the input A matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_mem x_buffer` : OpenCL buffer to store the output x vector.
* `const size_t x_offset` : The offset in elements from the start of the output x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the output x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
2016-06-13 20:17:26 +02:00
Requirements for TBMV:
* The value of `a_ld` must be at least `k + 1` .
2016-05-08 09:49:00 +02:00
xTPMV: Triangular packed matrix-vector multiplication
-------------
2016-06-13 20:17:26 +02:00
Same operation as xGEMV, but matrix _A_ is a triangular packed matrix instead and repreented as _AP_ .
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Tpmv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
const size_t n,
const cl_mem ap_buffer, const size_t ap_offset,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastStpmv(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const CLBlastDiagonal diagonal,
const size_t n,
const cl_mem ap_buffer, const size_t ap_offset,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDtpmv(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const CLBlastDiagonal diagonal,
const size_t n,
const cl_mem ap_buffer, const size_t ap_offset,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastCtpmv(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const CLBlastDiagonal diagonal,
const size_t n,
const cl_mem ap_buffer, const size_t ap_offset,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZtpmv(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const CLBlastDiagonal diagonal,
const size_t n,
const cl_mem ap_buffer, const size_t ap_offset,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastHtpmv(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const CLBlastDiagonal diagonal,
const size_t n,
const cl_mem ap_buffer, const size_t ap_offset,
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to TPMV:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Triangle triangle` : The part of the array of the triangular matrix to be used, either `Triangle::kUpper` (121) or `Triangle::kLower` (122).
* `const Transpose a_transpose` : Transposing the input matrix A, either `Transpose::kNo` (111), `Transpose::kYes` (112), or `Transpose::kConjugate` (113) for a complex-conjugate transpose.
* `const Diagonal diagonal` : The property of the diagonal matrix, either `Diagonal::kNonUnit` (131) for non-unit values on the diagonal or `Diagonal::kUnit` (132) for unit values on the diagonal.
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const cl_mem ap_buffer` : OpenCL buffer to store the input AP matrix.
* `const size_t ap_offset` : The offset in elements from the start of the input AP matrix.
* `cl_mem x_buffer` : OpenCL buffer to store the output x vector.
* `const size_t x_offset` : The offset in elements from the start of the output x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the output x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
xGER: General rank-1 matrix update
-------------
2016-06-13 20:17:26 +02:00
Performs the operation _A = alpha * x * y^T + A_ , in which _x_ is an input vector, _y^T_ is the transpose of the input vector _y_ , _A_ is the matrix to be updated, and _alpha_ is a scalar value.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Ger(const Layout layout,
const size_t m, const size_t n,
const T alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastSger(const CLBlastLayout layout,
const size_t m, const size_t n,
const float alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDger(const CLBlastLayout layout,
const size_t m, const size_t n,
const double alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastHger(const CLBlastLayout layout,
const size_t m, const size_t n,
const cl_half alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to GER:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const size_t m` : Integer size argument. This value must be positive.
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const cl_mem y_buffer` : OpenCL buffer to store the input y vector.
* `const size_t y_offset` : The offset in elements from the start of the input y vector.
2016-06-13 20:17:26 +02:00
* `const size_t y_inc` : Stride/increment of the input y vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_mem a_buffer` : OpenCL buffer to store the output A matrix.
* `const size_t a_offset` : The offset in elements from the start of the output A matrix.
2016-06-13 20:17:26 +02:00
* `const size_t a_ld` : Leading dimension of the output A matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
2016-06-13 20:17:26 +02:00
Requirements for GER:
* The value of `a_ld` must be at least `m` .
2016-05-08 09:49:00 +02:00
xGERU: General rank-1 complex matrix update
-------------
2016-06-10 11:16:06 +02:00
Same operation as xGER, but with complex data-types.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Geru(const Layout layout,
const size_t m, const size_t n,
const T alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastCgeru(const CLBlastLayout layout,
const size_t m, const size_t n,
const cl_float2 alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZgeru(const CLBlastLayout layout,
const size_t m, const size_t n,
const cl_double2 alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to GERU:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const size_t m` : Integer size argument. This value must be positive.
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const cl_mem y_buffer` : OpenCL buffer to store the input y vector.
* `const size_t y_offset` : The offset in elements from the start of the input y vector.
2016-06-13 20:17:26 +02:00
* `const size_t y_inc` : Stride/increment of the input y vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_mem a_buffer` : OpenCL buffer to store the output A matrix.
* `const size_t a_offset` : The offset in elements from the start of the output A matrix.
2016-06-13 20:17:26 +02:00
* `const size_t a_ld` : Leading dimension of the output A matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
2016-06-13 20:17:26 +02:00
Requirements for GERU:
* The value of `a_ld` must be at least `m` .
2016-05-08 09:49:00 +02:00
xGERC: General rank-1 complex conjugated matrix update
-------------
2016-06-10 11:16:06 +02:00
Same operation as xGERU, but the update is done based on the complex conjugate of the input vectors.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Gerc(const Layout layout,
const size_t m, const size_t n,
const T alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastCgerc(const CLBlastLayout layout,
const size_t m, const size_t n,
const cl_float2 alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZgerc(const CLBlastLayout layout,
const size_t m, const size_t n,
const cl_double2 alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to GERC:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const size_t m` : Integer size argument. This value must be positive.
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const cl_mem y_buffer` : OpenCL buffer to store the input y vector.
* `const size_t y_offset` : The offset in elements from the start of the input y vector.
2016-06-13 20:17:26 +02:00
* `const size_t y_inc` : Stride/increment of the input y vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_mem a_buffer` : OpenCL buffer to store the output A matrix.
* `const size_t a_offset` : The offset in elements from the start of the output A matrix.
2016-06-13 20:17:26 +02:00
* `const size_t a_ld` : Leading dimension of the output A matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
2016-06-13 20:17:26 +02:00
Requirements for GERC:
* The value of `a_ld` must be at least `m` .
2016-05-08 09:49:00 +02:00
xHER: Hermitian rank-1 matrix update
-------------
2016-06-13 20:17:26 +02:00
Performs the operation _A = alpha * x * x^T + A_ , in which x is an input vector, x^T is the transpose of this vector, _A_ is the triangular Hermetian matrix to be updated, and alpha is a scalar value.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Her(const Layout layout, const Triangle triangle,
const size_t n,
const T alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastCher(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const float alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZher(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const double alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to HER:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Triangle triangle` : The part of the array of the triangular matrix to be used, either `Triangle::kUpper` (121) or `Triangle::kLower` (122).
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_mem a_buffer` : OpenCL buffer to store the output A matrix.
* `const size_t a_offset` : The offset in elements from the start of the output A matrix.
2016-06-13 20:17:26 +02:00
* `const size_t a_ld` : Leading dimension of the output A matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
2016-06-13 20:17:26 +02:00
Requirements for HER:
* The value of `a_ld` must be at least `n` .
2016-05-08 09:49:00 +02:00
xHPR: Hermitian packed rank-1 matrix update
-------------
2016-06-13 20:17:26 +02:00
Same operation as xHER, but matrix _A_ is an Hermitian packed matrix instead and represented as _AP_ .
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Hpr(const Layout layout, const Triangle triangle,
const size_t n,
const T alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem ap_buffer, const size_t ap_offset,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastChpr(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const float alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem ap_buffer, const size_t ap_offset,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZhpr(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const double alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem ap_buffer, const size_t ap_offset,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to HPR:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Triangle triangle` : The part of the array of the triangular matrix to be used, either `Triangle::kUpper` (121) or `Triangle::kLower` (122).
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_mem ap_buffer` : OpenCL buffer to store the output AP matrix.
* `const size_t ap_offset` : The offset in elements from the start of the output AP matrix.
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
xHER2: Hermitian rank-2 matrix update
-------------
2016-06-13 20:17:26 +02:00
Performs the operation _A = alpha * x * y^T + conj(alpha) * y * x^T + A_ , in which _x_ is an input vector and _x^T_ its transpose, _y_ is an input vector and _y^T_ its transpose, _A_ is the triangular Hermetian matrix to be updated, _alpha_ is a scalar value and _conj(alpha)_ its complex conjugate.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Her2(const Layout layout, const Triangle triangle,
const size_t n,
const T alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastCher2(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const cl_float2 alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZher2(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const cl_double2 alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to HER2:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Triangle triangle` : The part of the array of the triangular matrix to be used, either `Triangle::kUpper` (121) or `Triangle::kLower` (122).
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const cl_mem y_buffer` : OpenCL buffer to store the input y vector.
* `const size_t y_offset` : The offset in elements from the start of the input y vector.
2016-06-13 20:17:26 +02:00
* `const size_t y_inc` : Stride/increment of the input y vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_mem a_buffer` : OpenCL buffer to store the output A matrix.
* `const size_t a_offset` : The offset in elements from the start of the output A matrix.
2016-06-13 20:17:26 +02:00
* `const size_t a_ld` : Leading dimension of the output A matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
2016-06-13 20:17:26 +02:00
Requirements for HER2:
* The value of `a_ld` must be at least `n` .
2016-05-08 09:49:00 +02:00
xHPR2: Hermitian packed rank-2 matrix update
-------------
2016-06-13 20:17:26 +02:00
Same operation as xHER2, but matrix _A_ is an Hermitian packed matrix instead and represented as _AP_ .
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Hpr2(const Layout layout, const Triangle triangle,
const size_t n,
const T alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_mem ap_buffer, const size_t ap_offset,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastChpr2(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const cl_float2 alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_mem ap_buffer, const size_t ap_offset,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZhpr2(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const cl_double2 alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_mem ap_buffer, const size_t ap_offset,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to HPR2:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Triangle triangle` : The part of the array of the triangular matrix to be used, either `Triangle::kUpper` (121) or `Triangle::kLower` (122).
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const cl_mem y_buffer` : OpenCL buffer to store the input y vector.
* `const size_t y_offset` : The offset in elements from the start of the input y vector.
2016-06-13 20:17:26 +02:00
* `const size_t y_inc` : Stride/increment of the input y vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_mem ap_buffer` : OpenCL buffer to store the output AP matrix.
* `const size_t ap_offset` : The offset in elements from the start of the output AP matrix.
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
xSYR: Symmetric rank-1 matrix update
-------------
2016-06-10 11:16:06 +02:00
Same operation as xHER, but matrix A is a symmetric matrix instead.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Syr(const Layout layout, const Triangle triangle,
const size_t n,
const T alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastSsyr(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const float alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDsyr(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const double alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastHsyr(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const cl_half alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to SYR:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Triangle triangle` : The part of the array of the triangular matrix to be used, either `Triangle::kUpper` (121) or `Triangle::kLower` (122).
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_mem a_buffer` : OpenCL buffer to store the output A matrix.
* `const size_t a_offset` : The offset in elements from the start of the output A matrix.
2016-06-13 20:17:26 +02:00
* `const size_t a_ld` : Leading dimension of the output A matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
2016-06-13 20:17:26 +02:00
Requirements for SYR:
* The value of `a_ld` must be at least `n` .
2016-05-08 09:49:00 +02:00
xSPR: Symmetric packed rank-1 matrix update
-------------
2016-06-13 20:17:26 +02:00
Same operation as xSPR, but matrix _A_ is a symmetric packed matrix instead and represented as _AP_ .
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Spr(const Layout layout, const Triangle triangle,
const size_t n,
const T alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem ap_buffer, const size_t ap_offset,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastSspr(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const float alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem ap_buffer, const size_t ap_offset,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDspr(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const double alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem ap_buffer, const size_t ap_offset,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastHspr(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const cl_half alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
cl_mem ap_buffer, const size_t ap_offset,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to SPR:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Triangle triangle` : The part of the array of the triangular matrix to be used, either `Triangle::kUpper` (121) or `Triangle::kLower` (122).
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_mem ap_buffer` : OpenCL buffer to store the output AP matrix.
* `const size_t ap_offset` : The offset in elements from the start of the output AP matrix.
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
xSYR2: Symmetric rank-2 matrix update
-------------
2016-06-13 20:17:26 +02:00
Same operation as xHER2, but matrix _A_ is a symmetric matrix instead.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Syr2(const Layout layout, const Triangle triangle,
const size_t n,
const T alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastSsyr2(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const float alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDsyr2(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const double alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastHsyr2(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const cl_half alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to SYR2:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Triangle triangle` : The part of the array of the triangular matrix to be used, either `Triangle::kUpper` (121) or `Triangle::kLower` (122).
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const cl_mem y_buffer` : OpenCL buffer to store the input y vector.
* `const size_t y_offset` : The offset in elements from the start of the input y vector.
2016-06-13 20:17:26 +02:00
* `const size_t y_inc` : Stride/increment of the input y vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_mem a_buffer` : OpenCL buffer to store the output A matrix.
* `const size_t a_offset` : The offset in elements from the start of the output A matrix.
2016-06-13 20:17:26 +02:00
* `const size_t a_ld` : Leading dimension of the output A matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
2016-06-13 20:17:26 +02:00
Requirements for SYR2:
* The value of `a_ld` must be at least `n` .
2016-05-08 09:49:00 +02:00
xSPR2: Symmetric packed rank-2 matrix update
-------------
2016-06-13 20:17:26 +02:00
Same operation as xSPR2, but matrix _A_ is a symmetric packed matrix instead and represented as _AP_ .
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Spr2(const Layout layout, const Triangle triangle,
const size_t n,
const T alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_mem ap_buffer, const size_t ap_offset,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastSspr2(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const float alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_mem ap_buffer, const size_t ap_offset,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDspr2(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const double alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_mem ap_buffer, const size_t ap_offset,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastHspr2(const CLBlastLayout layout, const CLBlastTriangle triangle,
const size_t n,
const cl_half alpha,
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_mem ap_buffer, const size_t ap_offset,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to SPR2:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Triangle triangle` : The part of the array of the triangular matrix to be used, either `Triangle::kUpper` (121) or `Triangle::kLower` (122).
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `const cl_mem x_buffer` : OpenCL buffer to store the input x vector.
* `const size_t x_offset` : The offset in elements from the start of the input x vector.
2016-06-13 20:17:26 +02:00
* `const size_t x_inc` : Stride/increment of the input x vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const cl_mem y_buffer` : OpenCL buffer to store the input y vector.
* `const size_t y_offset` : The offset in elements from the start of the input y vector.
2016-06-13 20:17:26 +02:00
* `const size_t y_inc` : Stride/increment of the input y vector. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_mem ap_buffer` : OpenCL buffer to store the output AP matrix.
* `const size_t ap_offset` : The offset in elements from the start of the output AP matrix.
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
xGEMM: General matrix-matrix multiplication
-------------
2016-06-13 20:17:26 +02:00
Performs the matrix product _C = alpha * A * B + beta * C_ , in which _A_ (_m_ by _k_ ) and _B_ (_k_ by _n_ ) are two general rectangular input matrices, _C_ (_m_ by _n_ ) is the matrix to be updated, and _alpha_ and _beta_ are scalar values. The matrices _A_ and/or _B_ can optionally be transposed before performing the operation.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Gemm(const Layout layout, const Transpose a_transpose, const Transpose b_transpose,
const size_t m, const size_t n, const size_t k,
const T alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
const T beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastSgemm(const CLBlastLayout layout, const CLBlastTranspose a_transpose, const CLBlastTranspose b_transpose,
const size_t m, const size_t n, const size_t k,
const float alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
const float beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDgemm(const CLBlastLayout layout, const CLBlastTranspose a_transpose, const CLBlastTranspose b_transpose,
const size_t m, const size_t n, const size_t k,
const double alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
const double beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastCgemm(const CLBlastLayout layout, const CLBlastTranspose a_transpose, const CLBlastTranspose b_transpose,
const size_t m, const size_t n, const size_t k,
const cl_float2 alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
const cl_float2 beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZgemm(const CLBlastLayout layout, const CLBlastTranspose a_transpose, const CLBlastTranspose b_transpose,
const size_t m, const size_t n, const size_t k,
const cl_double2 alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
const cl_double2 beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastHgemm(const CLBlastLayout layout, const CLBlastTranspose a_transpose, const CLBlastTranspose b_transpose,
const size_t m, const size_t n, const size_t k,
const cl_half alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
const cl_half beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to GEMM:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Transpose a_transpose` : Transposing the input matrix A, either `Transpose::kNo` (111), `Transpose::kYes` (112), or `Transpose::kConjugate` (113) for a complex-conjugate transpose.
* `const Transpose b_transpose` : Transposing the input matrix B, either `Transpose::kNo` (111), `Transpose::kYes` (112), or `Transpose::kConjugate` (113) for a complex-conjugate transpose.
* `const size_t m` : Integer size argument. This value must be positive.
* `const size_t n` : Integer size argument. This value must be positive.
* `const size_t k` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `const cl_mem a_buffer` : OpenCL buffer to store the input A matrix.
* `const size_t a_offset` : The offset in elements from the start of the input A matrix.
2016-06-13 20:17:26 +02:00
* `const size_t a_ld` : Leading dimension of the input A matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const cl_mem b_buffer` : OpenCL buffer to store the input B matrix.
* `const size_t b_offset` : The offset in elements from the start of the input B matrix.
2016-06-13 20:17:26 +02:00
* `const size_t b_ld` : Leading dimension of the input B matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const T beta` : Input scalar constant.
* `cl_mem c_buffer` : OpenCL buffer to store the output C matrix.
* `const size_t c_offset` : The offset in elements from the start of the output C matrix.
2016-06-13 20:17:26 +02:00
* `const size_t c_ld` : Leading dimension of the output C matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
2016-06-13 20:17:26 +02:00
Requirements for GEMM:
* When `transpose_a == Transpose::kNo` , then `a_ld` must be at least `m` , otherwise `a_ld` must be at least `k` .
* When `transpose_b == Transpose::kNo` , then `b_ld` must be at least `k` , otherwise `b_ld` must be at least `n` .
* The value of `c_ld` must be at least `m` .
2016-05-08 09:49:00 +02:00
xSYMM: Symmetric matrix-matrix multiplication
-------------
2016-06-13 20:17:26 +02:00
Same operation as xGEMM, but _A_ is symmetric instead. In case of `side == kLeft` , _A_ is a symmetric _m_ by _m_ matrix and _C = alpha * A * B + beta * C_ is performed. Otherwise, in case of `side == kRight` , _A_ is a symmtric _n_ by _n_ matrix and _C = alpha * B * A + beta * C_ is performed.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Symm(const Layout layout, const Side side, const Triangle triangle,
const size_t m, const size_t n,
const T alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
const T beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastSsymm(const CLBlastLayout layout, const CLBlastSide side, const CLBlastTriangle triangle,
const size_t m, const size_t n,
const float alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
const float beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDsymm(const CLBlastLayout layout, const CLBlastSide side, const CLBlastTriangle triangle,
const size_t m, const size_t n,
const double alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
const double beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastCsymm(const CLBlastLayout layout, const CLBlastSide side, const CLBlastTriangle triangle,
const size_t m, const size_t n,
const cl_float2 alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
const cl_float2 beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZsymm(const CLBlastLayout layout, const CLBlastSide side, const CLBlastTriangle triangle,
const size_t m, const size_t n,
const cl_double2 alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
const cl_double2 beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastHsymm(const CLBlastLayout layout, const CLBlastSide side, const CLBlastTriangle triangle,
const size_t m, const size_t n,
const cl_half alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
const cl_half beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to SYMM:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Side side` : The position of the triangular matrix in the operation, either on the `Side::kLeft` (141) or `Side::kRight` (142).
* `const Triangle triangle` : The part of the array of the triangular matrix to be used, either `Triangle::kUpper` (121) or `Triangle::kLower` (122).
* `const size_t m` : Integer size argument. This value must be positive.
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `const cl_mem a_buffer` : OpenCL buffer to store the input A matrix.
* `const size_t a_offset` : The offset in elements from the start of the input A matrix.
2016-06-13 20:17:26 +02:00
* `const size_t a_ld` : Leading dimension of the input A matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const cl_mem b_buffer` : OpenCL buffer to store the input B matrix.
* `const size_t b_offset` : The offset in elements from the start of the input B matrix.
2016-06-13 20:17:26 +02:00
* `const size_t b_ld` : Leading dimension of the input B matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const T beta` : Input scalar constant.
* `cl_mem c_buffer` : OpenCL buffer to store the output C matrix.
* `const size_t c_offset` : The offset in elements from the start of the output C matrix.
2016-06-13 20:17:26 +02:00
* `const size_t c_ld` : Leading dimension of the output C matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
2016-06-13 20:17:26 +02:00
Requirements for SYMM:
* When `side = Side::kLeft` then `a_ld` must be at least `m` , otherwise `a_ld` must be at least `n` .
* The value of `b_ld` must be at least `m` .
* The value of `c_ld` must be at least `m` .
2016-05-08 09:49:00 +02:00
xHEMM: Hermitian matrix-matrix multiplication
-------------
2016-06-13 20:17:26 +02:00
Same operation as xSYMM, but _A_ is an Hermitian matrix instead.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Hemm(const Layout layout, const Side side, const Triangle triangle,
const size_t m, const size_t n,
const T alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
const T beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastChemm(const CLBlastLayout layout, const CLBlastSide side, const CLBlastTriangle triangle,
const size_t m, const size_t n,
const cl_float2 alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
const cl_float2 beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZhemm(const CLBlastLayout layout, const CLBlastSide side, const CLBlastTriangle triangle,
const size_t m, const size_t n,
const cl_double2 alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
const cl_double2 beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to HEMM:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Side side` : The position of the triangular matrix in the operation, either on the `Side::kLeft` (141) or `Side::kRight` (142).
* `const Triangle triangle` : The part of the array of the triangular matrix to be used, either `Triangle::kUpper` (121) or `Triangle::kLower` (122).
* `const size_t m` : Integer size argument. This value must be positive.
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `const cl_mem a_buffer` : OpenCL buffer to store the input A matrix.
* `const size_t a_offset` : The offset in elements from the start of the input A matrix.
2016-06-13 20:17:26 +02:00
* `const size_t a_ld` : Leading dimension of the input A matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const cl_mem b_buffer` : OpenCL buffer to store the input B matrix.
* `const size_t b_offset` : The offset in elements from the start of the input B matrix.
2016-06-13 20:17:26 +02:00
* `const size_t b_ld` : Leading dimension of the input B matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const T beta` : Input scalar constant.
* `cl_mem c_buffer` : OpenCL buffer to store the output C matrix.
* `const size_t c_offset` : The offset in elements from the start of the output C matrix.
2016-06-13 20:17:26 +02:00
* `const size_t c_ld` : Leading dimension of the output C matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
2016-06-13 20:17:26 +02:00
Requirements for HEMM:
* When `side = Side::kLeft` then `a_ld` must be at least `m` , otherwise `a_ld` must be at least `n` .
* The value of `b_ld` must be at least `m` .
* The value of `c_ld` must be at least `m` .
2016-05-08 09:49:00 +02:00
xSYRK: Rank-K update of a symmetric matrix
-------------
2016-06-13 20:17:26 +02:00
Performs the matrix product _C = alpha * A * A^T + beta * C_ or _C = alpha * A^T * A + beta * C_ , in which _A_ is a general matrix and _A^T_ is its transpose, _C_ (_n_ by _n_ ) is the symmetric matrix to be updated, and _alpha_ and _beta_ are scalar values.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Syrk(const Layout layout, const Triangle triangle, const Transpose a_transpose,
const size_t n, const size_t k,
const T alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const T beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastSsyrk(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose,
const size_t n, const size_t k,
const float alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const float beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDsyrk(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose,
const size_t n, const size_t k,
const double alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const double beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastCsyrk(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose,
const size_t n, const size_t k,
const cl_float2 alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_float2 beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZsyrk(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose,
const size_t n, const size_t k,
const cl_double2 alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_double2 beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastHsyrk(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose,
const size_t n, const size_t k,
const cl_half alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_half beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to SYRK:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Triangle triangle` : The part of the array of the triangular matrix to be used, either `Triangle::kUpper` (121) or `Triangle::kLower` (122).
* `const Transpose a_transpose` : Transposing the input matrix A, either `Transpose::kNo` (111), `Transpose::kYes` (112), or `Transpose::kConjugate` (113) for a complex-conjugate transpose.
* `const size_t n` : Integer size argument. This value must be positive.
* `const size_t k` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `const cl_mem a_buffer` : OpenCL buffer to store the input A matrix.
* `const size_t a_offset` : The offset in elements from the start of the input A matrix.
2016-06-13 20:17:26 +02:00
* `const size_t a_ld` : Leading dimension of the input A matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const T beta` : Input scalar constant.
* `cl_mem c_buffer` : OpenCL buffer to store the output C matrix.
* `const size_t c_offset` : The offset in elements from the start of the output C matrix.
2016-06-13 20:17:26 +02:00
* `const size_t c_ld` : Leading dimension of the output C matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
2016-06-13 20:17:26 +02:00
Requirements for SYRK:
* When `transpose == Transpose::kNo` , then `a_ld` must be at least `n` , otherwise `a_ld` must be at least `k` .
* The value of `c_ld` must be at least `m` .
2016-05-08 09:49:00 +02:00
xHERK: Rank-K update of a hermitian matrix
-------------
2016-06-13 20:17:26 +02:00
Same operation as xSYRK, but _C_ is an Hermitian matrix instead.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Herk(const Layout layout, const Triangle triangle, const Transpose a_transpose,
const size_t n, const size_t k,
const T alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const T beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastCherk(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose,
const size_t n, const size_t k,
const float alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const float beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZherk(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose,
const size_t n, const size_t k,
const double alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const double beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to HERK:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Triangle triangle` : The part of the array of the triangular matrix to be used, either `Triangle::kUpper` (121) or `Triangle::kLower` (122).
* `const Transpose a_transpose` : Transposing the input matrix A, either `Transpose::kNo` (111), `Transpose::kYes` (112), or `Transpose::kConjugate` (113) for a complex-conjugate transpose.
* `const size_t n` : Integer size argument. This value must be positive.
* `const size_t k` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `const cl_mem a_buffer` : OpenCL buffer to store the input A matrix.
* `const size_t a_offset` : The offset in elements from the start of the input A matrix.
2016-06-13 20:17:26 +02:00
* `const size_t a_ld` : Leading dimension of the input A matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const T beta` : Input scalar constant.
* `cl_mem c_buffer` : OpenCL buffer to store the output C matrix.
* `const size_t c_offset` : The offset in elements from the start of the output C matrix.
2016-06-13 20:17:26 +02:00
* `const size_t c_ld` : Leading dimension of the output C matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
2016-06-13 20:17:26 +02:00
Requirements for HERK:
* When `transpose == Transpose::kNo` , then `a_ld` must be at least `n` , otherwise `a_ld` must be at least `k` .
* The value of `c_ld` must be at least `m` .
2016-05-08 09:49:00 +02:00
xSYR2K: Rank-2K update of a symmetric matrix
-------------
2016-06-13 20:17:26 +02:00
Performs the matrix product _C = alpha * A * B^T + alpha * B * A^T + beta * C_ or _C = alpha * A^T * B + alpha * B^T * A + beta * C_ , in which _A_ and _B_ are general matrices and _A^T_ and _B^T_ are their transposed versions, _C_ (_n_ by _n_ ) is the symmetric matrix to be updated, and _alpha_ and _beta_ are scalar values.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Syr2k(const Layout layout, const Triangle triangle, const Transpose ab_transpose,
const size_t n, const size_t k,
const T alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
const T beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastSsyr2k(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose ab_transpose,
const size_t n, const size_t k,
const float alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
const float beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDsyr2k(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose ab_transpose,
const size_t n, const size_t k,
const double alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
const double beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastCsyr2k(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose ab_transpose,
const size_t n, const size_t k,
const cl_float2 alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
const cl_float2 beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZsyr2k(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose ab_transpose,
const size_t n, const size_t k,
const cl_double2 alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
const cl_double2 beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastHsyr2k(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose ab_transpose,
const size_t n, const size_t k,
const cl_half alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
const cl_half beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to SYR2K:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Triangle triangle` : The part of the array of the triangular matrix to be used, either `Triangle::kUpper` (121) or `Triangle::kLower` (122).
* `const Transpose ab_transpose` : Transposing the packed input matrix AP, either `Transpose::kNo` (111), `Transpose::kYes` (112), or `Transpose::kConjugate` (113) for a complex-conjugate transpose.
* `const size_t n` : Integer size argument. This value must be positive.
* `const size_t k` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `const cl_mem a_buffer` : OpenCL buffer to store the input A matrix.
* `const size_t a_offset` : The offset in elements from the start of the input A matrix.
2016-06-13 20:17:26 +02:00
* `const size_t a_ld` : Leading dimension of the input A matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const cl_mem b_buffer` : OpenCL buffer to store the input B matrix.
* `const size_t b_offset` : The offset in elements from the start of the input B matrix.
2016-06-13 20:17:26 +02:00
* `const size_t b_ld` : Leading dimension of the input B matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const T beta` : Input scalar constant.
* `cl_mem c_buffer` : OpenCL buffer to store the output C matrix.
* `const size_t c_offset` : The offset in elements from the start of the output C matrix.
2016-06-13 20:17:26 +02:00
* `const size_t c_ld` : Leading dimension of the output C matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
2016-06-13 20:17:26 +02:00
Requirements for SYR2K:
* When `transpose == Transpose::kNo` , then `a_ld` must be at least `n` , otherwise `a_ld` must be at least `k` .
* When `transpose == Transpose::kNo` , then `b_ld` must be at least `n` , otherwise `b_ld` must be at least `k` .
* The value of `c_ld` must be at least `n` .
2016-05-08 09:49:00 +02:00
xHER2K: Rank-2K update of a hermitian matrix
-------------
2016-06-13 20:17:26 +02:00
Same operation as xSYR2K, but _C_ is an Hermitian matrix instead.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T , typename U >
StatusCode Her2k(const Layout layout, const Triangle triangle, const Transpose ab_transpose,
const size_t n, const size_t k,
const T alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
const U beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastCher2k(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose ab_transpose,
const size_t n, const size_t k,
const cl_float2 alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
const float beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZher2k(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose ab_transpose,
const size_t n, const size_t k,
const cl_double2 alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
const cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
const double beta,
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to HER2K:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Triangle triangle` : The part of the array of the triangular matrix to be used, either `Triangle::kUpper` (121) or `Triangle::kLower` (122).
* `const Transpose ab_transpose` : Transposing the packed input matrix AP, either `Transpose::kNo` (111), `Transpose::kYes` (112), or `Transpose::kConjugate` (113) for a complex-conjugate transpose.
* `const size_t n` : Integer size argument. This value must be positive.
* `const size_t k` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `const cl_mem a_buffer` : OpenCL buffer to store the input A matrix.
* `const size_t a_offset` : The offset in elements from the start of the input A matrix.
2016-06-13 20:17:26 +02:00
* `const size_t a_ld` : Leading dimension of the input A matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const cl_mem b_buffer` : OpenCL buffer to store the input B matrix.
* `const size_t b_offset` : The offset in elements from the start of the input B matrix.
2016-06-13 20:17:26 +02:00
* `const size_t b_ld` : Leading dimension of the input B matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `const U beta` : Input scalar constant.
* `cl_mem c_buffer` : OpenCL buffer to store the output C matrix.
* `const size_t c_offset` : The offset in elements from the start of the output C matrix.
2016-06-13 20:17:26 +02:00
* `const size_t c_ld` : Leading dimension of the output C matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
2016-06-13 20:17:26 +02:00
Requirements for HER2K:
* When `transpose == Transpose::kNo` , then `a_ld` must be at least `n` , otherwise `a_ld` must be at least `k` .
* When `transpose == Transpose::kNo` , then `b_ld` must be at least `n` , otherwise `b_ld` must be at least `k` .
* The value of `c_ld` must be at least `n` .
2016-05-08 09:49:00 +02:00
xTRMM: Triangular matrix-matrix multiplication
-------------
2016-06-13 20:17:26 +02:00
Performs the matrix product _B = alpha * A * B_ or _B = alpha * B * A_ , in which _A_ is a unit or non-unit triangular matrix, _B_ (_m_ by _n_ ) is the general matrix to be updated, and _alpha_ is a scalar value.
2016-05-08 09:49:00 +02:00
C++ API:
```
template < typename T >
StatusCode Trmm(const Layout layout, const Side side, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
const size_t m, const size_t n,
const T alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastStrmm(const CLBlastLayout layout, const CLBlastSide side, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const CLBlastDiagonal diagonal,
const size_t m, const size_t n,
const float alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDtrmm(const CLBlastLayout layout, const CLBlastSide side, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const CLBlastDiagonal diagonal,
const size_t m, const size_t n,
const double alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastCtrmm(const CLBlastLayout layout, const CLBlastSide side, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const CLBlastDiagonal diagonal,
const size_t m, const size_t n,
const cl_float2 alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZtrmm(const CLBlastLayout layout, const CLBlastSide side, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const CLBlastDiagonal diagonal,
const size_t m, const size_t n,
const cl_double2 alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastHtrmm(const CLBlastLayout layout, const CLBlastSide side, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const CLBlastDiagonal diagonal,
const size_t m, const size_t n,
const cl_half alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
cl_command_queue* queue, cl_event* event)
2016-05-08 09:49:00 +02:00
```
Arguments to TRMM:
2016-06-13 20:17:26 +02:00
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Side side` : The position of the triangular matrix in the operation, either on the `Side::kLeft` (141) or `Side::kRight` (142).
* `const Triangle triangle` : The part of the array of the triangular matrix to be used, either `Triangle::kUpper` (121) or `Triangle::kLower` (122).
* `const Transpose a_transpose` : Transposing the input matrix A, either `Transpose::kNo` (111), `Transpose::kYes` (112), or `Transpose::kConjugate` (113) for a complex-conjugate transpose.
* `const Diagonal diagonal` : The property of the diagonal matrix, either `Diagonal::kNonUnit` (131) for non-unit values on the diagonal or `Diagonal::kUnit` (132) for unit values on the diagonal.
* `const size_t m` : Integer size argument. This value must be positive.
* `const size_t n` : Integer size argument. This value must be positive.
2016-05-08 09:49:00 +02:00
* `const T alpha` : Input scalar constant.
* `const cl_mem a_buffer` : OpenCL buffer to store the input A matrix.
* `const size_t a_offset` : The offset in elements from the start of the input A matrix.
2016-06-13 20:17:26 +02:00
* `const size_t a_ld` : Leading dimension of the input A matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_mem b_buffer` : OpenCL buffer to store the output B matrix.
* `const size_t b_offset` : The offset in elements from the start of the output B matrix.
2016-06-13 20:17:26 +02:00
* `const size_t b_ld` : Leading dimension of the output B matrix. This value must be greater than 0.
2016-05-08 09:49:00 +02:00
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
2016-06-13 20:17:26 +02:00
Requirements for TRMM:
* When `side = Side::kLeft` then `a_ld` must be at least `m` , otherwise `a_ld` must be at least `n` .
* The value of `b_ld` must be at least `m` .
2016-05-08 09:49:00 +02:00
2016-12-18 12:30:16 +01:00
xTRSM: Solves a triangular system of equations
-------------
Solves the equation _A * X = alpha * B_ for the unknown _m_ by _n_ matrix X, in which _A_ is an _n_ by _n_ unit or non-unit triangular matrix and B is an _m_ by _n_ matrix. The matrix _B_ is overwritten by the solution _X_ .
C++ API:
```
template < typename T >
StatusCode Trsm(const Layout layout, const Side side, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
const size_t m, const size_t n,
const T alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
cl_command_queue* queue, cl_event* event)
```
C API:
```
CLBlastStatusCode CLBlastStrsm(const CLBlastLayout layout, const CLBlastSide side, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const CLBlastDiagonal diagonal,
const size_t m, const size_t n,
const float alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDtrsm(const CLBlastLayout layout, const CLBlastSide side, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const CLBlastDiagonal diagonal,
const size_t m, const size_t n,
const double alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastCtrsm(const CLBlastLayout layout, const CLBlastSide side, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const CLBlastDiagonal diagonal,
const size_t m, const size_t n,
const cl_float2 alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZtrsm(const CLBlastLayout layout, const CLBlastSide side, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const CLBlastDiagonal diagonal,
const size_t m, const size_t n,
const cl_double2 alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastHtrsm(const CLBlastLayout layout, const CLBlastSide side, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const CLBlastDiagonal diagonal,
const size_t m, const size_t n,
const cl_half alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
cl_command_queue* queue, cl_event* event)
```
Arguments to TRSM:
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Side side` : The position of the triangular matrix in the operation, either on the `Side::kLeft` (141) or `Side::kRight` (142).
* `const Triangle triangle` : The part of the array of the triangular matrix to be used, either `Triangle::kUpper` (121) or `Triangle::kLower` (122).
* `const Transpose a_transpose` : Transposing the input matrix A, either `Transpose::kNo` (111), `Transpose::kYes` (112), or `Transpose::kConjugate` (113) for a complex-conjugate transpose.
* `const Diagonal diagonal` : The property of the diagonal matrix, either `Diagonal::kNonUnit` (131) for non-unit values on the diagonal or `Diagonal::kUnit` (132) for unit values on the diagonal.
* `const size_t m` : Integer size argument. This value must be positive.
* `const size_t n` : Integer size argument. This value must be positive.
* `const T alpha` : Input scalar constant.
* `const cl_mem a_buffer` : OpenCL buffer to store the input A matrix.
* `const size_t a_offset` : The offset in elements from the start of the input A matrix.
* `const size_t a_ld` : Leading dimension of the input A matrix. This value must be greater than 0.
* `cl_mem b_buffer` : OpenCL buffer to store the output B matrix.
* `const size_t b_offset` : The offset in elements from the start of the output B matrix.
* `const size_t b_ld` : Leading dimension of the output B matrix. This value must be greater than 0.
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
2016-06-16 18:07:46 +02:00
xOMATCOPY: Scaling and out-place transpose/copy (non-BLAS function)
-------------
Performs scaling and out-of-place transposition/copying of matrices according to _B = alpha*op(A)_ , in which _A_ is an input matrix (_m_ rows by _n_ columns), _B_ an output matrix, and _alpha_ a scalar value. The operation _op_ can be a normal matrix copy, a transposition or a conjugate transposition.
C++ API:
```
template < typename T >
StatusCode Omatcopy(const Layout layout, const Transpose a_transpose,
const size_t m, const size_t n,
const T alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
cl_command_queue* queue, cl_event* event)
```
C API:
```
2016-10-22 16:14:56 +02:00
CLBlastStatusCode CLBlastSomatcopy(const CLBlastLayout layout, const CLBlastTranspose a_transpose,
const size_t m, const size_t n,
const float alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastDomatcopy(const CLBlastLayout layout, const CLBlastTranspose a_transpose,
const size_t m, const size_t n,
const double alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastComatcopy(const CLBlastLayout layout, const CLBlastTranspose a_transpose,
const size_t m, const size_t n,
const cl_float2 alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastZomatcopy(const CLBlastLayout layout, const CLBlastTranspose a_transpose,
const size_t m, const size_t n,
const cl_double2 alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
cl_command_queue* queue, cl_event* event)
CLBlastStatusCode CLBlastHomatcopy(const CLBlastLayout layout, const CLBlastTranspose a_transpose,
const size_t m, const size_t n,
const cl_half alpha,
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
cl_command_queue* queue, cl_event* event)
2016-06-16 18:07:46 +02:00
```
Arguments to OMATCOPY:
* `const Layout layout` : Data-layout of the matrices, either `Layout::kRowMajor` (101) for row-major layout or `Layout::kColMajor` (102) for column-major data-layout.
* `const Transpose a_transpose` : Transposing the input matrix A, either `Transpose::kNo` (111), `Transpose::kYes` (112), or `Transpose::kConjugate` (113) for a complex-conjugate transpose.
* `const size_t m` : Integer size argument. This value must be positive.
* `const size_t n` : Integer size argument. This value must be positive.
* `const T alpha` : Input scalar constant.
* `const cl_mem a_buffer` : OpenCL buffer to store the input A matrix.
* `const size_t a_offset` : The offset in elements from the start of the input A matrix.
* `const size_t a_ld` : Leading dimension of the input A matrix. This value must be greater than 0.
* `cl_mem b_buffer` : OpenCL buffer to store the output B matrix.
* `const size_t b_offset` : The offset in elements from the start of the output B matrix.
* `const size_t b_ld` : Leading dimension of the output B matrix. This value must be greater than 0.
* `cl_command_queue* queue` : Pointer to an OpenCL command queue associated with a context and device to execute the routine on.
* `cl_event* event` : Pointer to an OpenCL event to be able to wait for completion of the routine's OpenCL kernel(s). This is an optional argument.
Requirements for OMATCOPY:
* The value of `a_ld` must be at least `m` .
* The value of `b_ld` must be at least `n` .