2015-08-13 13:46:13 +02:00
|
|
|
|
|
|
|
// =================================================================================================
|
|
|
|
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
|
|
|
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
|
|
|
// width of 100 characters per line.
|
|
|
|
//
|
|
|
|
// Author(s):
|
|
|
|
// Cedric Nugteren <www.cedricnugteren.nl>
|
|
|
|
//
|
|
|
|
// This file contains the plain C interface to the CLBlast BLAS routines, the counter-part of the
|
|
|
|
// normal 'clblast.h' C++ header.
|
|
|
|
//
|
|
|
|
// =================================================================================================
|
|
|
|
|
|
|
|
#ifndef CLBLAST_CLBLAST_C_H_
|
|
|
|
#define CLBLAST_CLBLAST_C_H_
|
|
|
|
|
|
|
|
// Includes the normal OpenCL C header
|
|
|
|
#if defined(__APPLE__) || defined(__MACOSX)
|
|
|
|
#include <OpenCL/opencl.h>
|
|
|
|
#else
|
|
|
|
#include <CL/opencl.h>
|
|
|
|
#endif
|
|
|
|
|
2016-03-23 20:49:28 +01:00
|
|
|
// Exports library functions under Windows when building a DLL. See also:
|
|
|
|
// https://msdn.microsoft.com/en-us/library/a90k134d.aspx
|
|
|
|
#ifdef _WIN32
|
|
|
|
#define PUBLIC_API __declspec(dllexport)
|
|
|
|
#else
|
|
|
|
#define PUBLIC_API
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// The C interface
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2015-08-13 13:46:13 +02:00
|
|
|
// =================================================================================================
|
|
|
|
|
|
|
|
// Status codes. These codes can be returned by functions declared in this header file. The error
|
|
|
|
// codes match either the standard OpenCL error codes or the clBLAS error codes.
|
|
|
|
typedef enum StatusCode_ {
|
|
|
|
|
|
|
|
// Status codes in common with the OpenCL standard
|
|
|
|
kSuccess = 0, // CL_SUCCESS
|
|
|
|
kTempBufferAllocFailure = -4, // CL_MEM_OBJECT_ALLOCATION_FAILURE
|
|
|
|
kBuildProgramFailure = -11, // CL_BUILD_PROGRAM_FAILURE: OpenCL compilation error
|
|
|
|
kInvalidBinary = -42, // CL_INVALID_BINARY
|
|
|
|
kInvalidKernel = -48, // CL_INVALID_KERNEL
|
|
|
|
kInvalidLocalNumDimensions = -53, // CL_INVALID_WORK_DIMENSION: Too many thread dimensions
|
|
|
|
kInvalidLocalThreadsTotal = -54, // CL_INVALID_WORK_GROUP_SIZE: Too many threads in total
|
|
|
|
kInvalidLocalThreadsDim = -55, // CL_INVALID_WORK_ITEM_SIZE: ... or for a specific dimension
|
|
|
|
kInvalidTempBufferSize = -61, // CL_INVALID_BUFFER_SIZE
|
|
|
|
|
|
|
|
// Status codes in common with the clBLAS library
|
|
|
|
kNotImplemented = -1024, // Routine or functionality not implemented yet
|
|
|
|
kInvalidMatrixA = -1022, // Matrix A is not a valid OpenCL buffer
|
|
|
|
kInvalidMatrixB = -1021, // Matrix B is not a valid OpenCL buffer
|
|
|
|
kInvalidMatrixC = -1020, // Matrix C is not a valid OpenCL buffer
|
|
|
|
kInvalidVectorX = -1019, // Vector X is not a valid OpenCL buffer
|
|
|
|
kInvalidVectorY = -1018, // Vector Y is not a valid OpenCL buffer
|
|
|
|
kInvalidDimension = -1017, // Dimensions M, N, and K have to be larger than zero
|
|
|
|
kInvalidLeadDimA = -1016, // LD of A is smaller than the matrix's first dimension
|
|
|
|
kInvalidLeadDimB = -1015, // LD of B is smaller than the matrix's first dimension
|
|
|
|
kInvalidLeadDimC = -1014, // LD of C is smaller than the matrix's first dimension
|
|
|
|
kInvalidIncrementX = -1013, // Increment of vector X cannot be zero
|
|
|
|
kInvalidIncrementY = -1012, // Increment of vector Y cannot be zero
|
|
|
|
kInsufficientMemoryA = -1011, // Matrix A's OpenCL buffer is too small
|
|
|
|
kInsufficientMemoryB = -1010, // Matrix B's OpenCL buffer is too small
|
|
|
|
kInsufficientMemoryC = -1009, // Matrix C's OpenCL buffer is too small
|
|
|
|
kInsufficientMemoryX = -1008, // Vector X's OpenCL buffer is too small
|
|
|
|
kInsufficientMemoryY = -1007, // Vector Y's OpenCL buffer is too small
|
|
|
|
|
|
|
|
// Custom additional status codes for CLBlast
|
|
|
|
kKernelLaunchError = -2048, // Problem occurred when enqueuing the kernel
|
|
|
|
kKernelRunError = -2047, // Problem occurred while running the kernel
|
|
|
|
kInvalidLocalMemUsage = -2046, // Not enough local memory available on this device
|
|
|
|
kNoHalfPrecision = -2045, // Half precision (16-bits) not supported by the device
|
|
|
|
kNoDoublePrecision = -2044, // Double precision (64-bits) not supported by the device
|
2015-09-14 16:57:00 +02:00
|
|
|
kInvalidVectorDot = -2043, // Vector dot is not a valid OpenCL buffer
|
|
|
|
kInsufficientMemoryDot = -2042, // Vector dot's OpenCL buffer is too small
|
2015-08-13 13:46:13 +02:00
|
|
|
} StatusCode;
|
|
|
|
|
|
|
|
// Matrix layout and transpose types
|
2016-04-27 11:37:55 +02:00
|
|
|
typedef enum Layout_ { kRowMajor = 101, kColMajor = 102 } Layout;
|
|
|
|
typedef enum Transpose_ { kNo = 111, kYes = 112, kConjugate = 113 } Transpose;
|
|
|
|
typedef enum Triangle_ { kUpper = 121, kLower = 122 } Triangle;
|
|
|
|
typedef enum Diagonal_ { kNonUnit = 131, kUnit = 132 } Diagonal;
|
|
|
|
typedef enum Side_ { kLeft = 141, kRight = 142 } Side;
|
2015-08-13 13:46:13 +02:00
|
|
|
|
|
|
|
// Precision scoped enum (values in bits)
|
|
|
|
typedef enum Precision_ { kHalf = 16, kSingle = 32, kDouble = 64,
|
|
|
|
kComplexSingle = 3232, kComplexDouble = 6464 } Precision;
|
|
|
|
|
|
|
|
// =================================================================================================
|
|
|
|
// BLAS level-1 (vector-vector) routines
|
2015-08-13 17:58:46 +02:00
|
|
|
// =================================================================================================
|
|
|
|
|
2016-03-30 17:32:13 +02:00
|
|
|
// Generate givens plane rotation: SROTG/DROTG
|
|
|
|
StatusCode PUBLIC_API CLBlastSrotg(cl_mem sa_buffer, const size_t sa_offset,
|
|
|
|
cl_mem sb_buffer, const size_t sb_offset,
|
|
|
|
cl_mem sc_buffer, const size_t sc_offset,
|
|
|
|
cl_mem ss_buffer, const size_t ss_offset,
|
2016-03-30 16:17:16 +02:00
|
|
|
cl_command_queue* queue, cl_event* event);
|
2016-03-30 17:32:13 +02:00
|
|
|
StatusCode PUBLIC_API CLBlastDrotg(cl_mem sa_buffer, const size_t sa_offset,
|
|
|
|
cl_mem sb_buffer, const size_t sb_offset,
|
|
|
|
cl_mem sc_buffer, const size_t sc_offset,
|
|
|
|
cl_mem ss_buffer, const size_t ss_offset,
|
2016-03-30 16:17:16 +02:00
|
|
|
cl_command_queue* queue, cl_event* event);
|
|
|
|
|
2016-03-30 17:32:13 +02:00
|
|
|
// Generate modified givens plane rotation: SROTMG/DROTMG
|
|
|
|
StatusCode PUBLIC_API CLBlastSrotmg(cl_mem sd1_buffer, const size_t sd1_offset,
|
|
|
|
cl_mem sd2_buffer, const size_t sd2_offset,
|
|
|
|
cl_mem sx1_buffer, const size_t sx1_offset,
|
2016-04-02 07:36:39 +02:00
|
|
|
const cl_mem sy1_buffer, const size_t sy1_offset,
|
2016-03-30 17:32:13 +02:00
|
|
|
cl_mem sparam_buffer, const size_t sparam_offset,
|
|
|
|
cl_command_queue* queue, cl_event* event);
|
|
|
|
StatusCode PUBLIC_API CLBlastDrotmg(cl_mem sd1_buffer, const size_t sd1_offset,
|
|
|
|
cl_mem sd2_buffer, const size_t sd2_offset,
|
|
|
|
cl_mem sx1_buffer, const size_t sx1_offset,
|
2016-04-02 07:36:39 +02:00
|
|
|
const cl_mem sy1_buffer, const size_t sy1_offset,
|
2016-03-30 17:32:13 +02:00
|
|
|
cl_mem sparam_buffer, const size_t sparam_offset,
|
|
|
|
cl_command_queue* queue, cl_event* event);
|
|
|
|
|
|
|
|
// Apply givens plane rotation: SROT/DROT
|
2016-03-30 16:17:16 +02:00
|
|
|
StatusCode PUBLIC_API CLBlastSrot(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,
|
2016-03-30 17:32:13 +02:00
|
|
|
const float cos,
|
|
|
|
const float sin,
|
2016-03-30 16:17:16 +02:00
|
|
|
cl_command_queue* queue, cl_event* event);
|
|
|
|
StatusCode PUBLIC_API CLBlastDrot(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,
|
2016-03-30 17:32:13 +02:00
|
|
|
const double cos,
|
|
|
|
const double sin,
|
2016-03-30 16:17:16 +02:00
|
|
|
cl_command_queue* queue, cl_event* event);
|
|
|
|
|
2016-03-30 17:32:13 +02:00
|
|
|
// Apply modified givens plane rotation: SROTM/DROTM
|
|
|
|
StatusCode PUBLIC_API CLBlastSrotm(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_mem sparam_buffer, const size_t sparam_offset,
|
|
|
|
cl_command_queue* queue, cl_event* event);
|
|
|
|
StatusCode PUBLIC_API CLBlastDrotm(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_mem sparam_buffer, const size_t sparam_offset,
|
|
|
|
cl_command_queue* queue, cl_event* event);
|
|
|
|
|
2015-08-22 17:11:20 +02:00
|
|
|
// Swap two vectors: SSWAP/DSWAP/CSWAP/ZSWAP
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API 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);
|
2015-08-22 17:11:20 +02:00
|
|
|
|
|
|
|
// Vector scaling: SSCAL/DSCAL/CSCAL/ZSCAL
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API 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);
|
2015-08-22 17:11:20 +02:00
|
|
|
|
|
|
|
// Vector copy: SCOPY/DCOPY/CCOPY/ZCOPY
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API 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);
|
2015-08-22 17:11:20 +02:00
|
|
|
|
2016-05-13 20:49:34 +02:00
|
|
|
// Vector-times-constant plus vector: SAXPY/DAXPY/CAXPY/ZAXPY/HAXPY
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API 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);
|
2016-05-13 20:49:34 +02:00
|
|
|
StatusCode PUBLIC_API 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);
|
2015-08-13 13:46:13 +02:00
|
|
|
|
2015-09-14 16:57:00 +02:00
|
|
|
// Dot product of two vectors: SDOT/DDOT
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API 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);
|
2015-09-14 16:57:00 +02:00
|
|
|
|
|
|
|
// Dot product of two complex vectors: CDOTU/ZDOTU
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API 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);
|
2015-09-14 16:57:00 +02:00
|
|
|
|
|
|
|
// Dot product of two complex vectors, one conjugated: CDOTC/ZDOTC
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API 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);
|
2015-09-14 16:57:00 +02:00
|
|
|
|
2016-03-25 10:30:38 +01:00
|
|
|
// Euclidian norm of a vector: SNRM2/DNRM2/ScNRM2/DzNRM2
|
2016-03-25 10:00:40 +01:00
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastDnrm2(const size_t n,
|
|
|
|
cl_mem nrm2_buffer, const size_t nrm2_offset,
|
2016-03-25 10:30:38 +01:00
|
|
|
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
|
|
|
cl_command_queue* queue, cl_event* event);
|
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastDznrm2(const size_t n,
|
|
|
|
cl_mem nrm2_buffer, const size_t nrm2_offset,
|
2016-03-25 10:00:40 +01:00
|
|
|
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
|
|
|
cl_command_queue* queue, cl_event* event);
|
|
|
|
|
2016-04-14 05:44:49 +02:00
|
|
|
// Absolute sum of values in a vector: SASUM/DASUM/ScASUM/DzASUM
|
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
|
2016-04-27 18:07:30 +02:00
|
|
|
// Sum of values in a vector (non-BLAS function): SSUM/DSUM/ScSUM/DzSUM
|
2016-04-27 17:06:19 +02:00
|
|
|
StatusCode PUBLIC_API CLBlastSsum(const size_t n,
|
2016-04-27 18:07:30 +02:00
|
|
|
cl_mem sum_buffer, const size_t sum_offset,
|
2016-04-27 17:06:19 +02:00
|
|
|
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
|
|
|
cl_command_queue* queue, cl_event* event);
|
|
|
|
StatusCode PUBLIC_API CLBlastDsum(const size_t n,
|
2016-04-27 18:07:30 +02:00
|
|
|
cl_mem sum_buffer, const size_t sum_offset,
|
2016-04-27 17:06:19 +02:00
|
|
|
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
|
|
|
cl_command_queue* queue, cl_event* event);
|
|
|
|
StatusCode PUBLIC_API CLBlastScsum(const size_t n,
|
2016-04-27 18:07:30 +02:00
|
|
|
cl_mem sum_buffer, const size_t sum_offset,
|
2016-04-27 17:06:19 +02:00
|
|
|
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
|
|
|
cl_command_queue* queue, cl_event* event);
|
|
|
|
StatusCode PUBLIC_API CLBlastDzsum(const size_t n,
|
2016-04-27 18:07:30 +02:00
|
|
|
cl_mem sum_buffer, const size_t sum_offset,
|
2016-04-27 17:06:19 +02:00
|
|
|
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
|
|
|
cl_command_queue* queue, cl_event* event);
|
|
|
|
|
|
|
|
// Index of absolute maximum value in a vector: iSAMAX/iDAMAX/iCAMAX/iZAMAX
|
2016-04-21 05:11:33 +02:00
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
|
2016-04-27 18:07:30 +02:00
|
|
|
// Index of maximum value in a vector (non-BLAS function): iSMAX/iDMAX/iCMAX/iZMAX
|
2016-04-27 17:06:19 +02:00
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
|
2016-04-30 09:49:39 +02:00
|
|
|
// Index of minimum value in a vector (non-BLAS function): iSMIN/iDMIN/iCMIN/iZMIN
|
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
StatusCode PUBLIC_API 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);
|
|
|
|
|
2015-08-13 13:46:13 +02:00
|
|
|
// =================================================================================================
|
|
|
|
// BLAS level-2 (matrix-vector) routines
|
2015-08-13 17:58:46 +02:00
|
|
|
// =================================================================================================
|
|
|
|
|
2015-09-17 17:05:45 +02:00
|
|
|
// General matrix-vector multiplication: SGEMV/DGEMV/CGEMV/ZGEMV
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastSgemv(const Layout layout, const Transpose 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastDgemv(const Layout layout, const Transpose 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastCgemv(const Layout layout, const Transpose 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastZgemv(const Layout layout, const Transpose 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);
|
2015-08-13 17:58:46 +02:00
|
|
|
|
2015-09-17 17:05:45 +02:00
|
|
|
// General banded matrix-vector multiplication: SGBMV/DGBMV/CGBMV/ZGBMV
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastSgbmv(const Layout layout, const Transpose 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastDgbmv(const Layout layout, const Transpose 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastCgbmv(const Layout layout, const Transpose 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastZgbmv(const Layout layout, const Transpose 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);
|
2015-09-17 17:05:45 +02:00
|
|
|
|
2015-08-13 17:58:46 +02:00
|
|
|
// Hermitian matrix-vector multiplication: CHEMV/ZHEMV
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastChemv(const Layout layout, const Triangle 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastZhemv(const Layout layout, const Triangle 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);
|
2015-08-13 17:58:46 +02:00
|
|
|
|
2015-09-17 17:05:45 +02:00
|
|
|
// Hermitian banded matrix-vector multiplication: CHBMV/ZHBMV
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastChbmv(const Layout layout, const Triangle 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastZhbmv(const Layout layout, const Triangle 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);
|
2015-09-17 17:05:45 +02:00
|
|
|
|
|
|
|
// Hermitian packed matrix-vector multiplication: CHPMV/ZHPMV
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastChpmv(const Layout layout, const Triangle 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastZhpmv(const Layout layout, const Triangle 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);
|
2015-09-17 17:05:45 +02:00
|
|
|
|
2015-08-13 17:58:46 +02:00
|
|
|
// Symmetric matrix-vector multiplication: SSYMV/DSYMV
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastSsymv(const Layout layout, const Triangle 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastDsymv(const Layout layout, const Triangle 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);
|
2015-08-13 13:46:13 +02:00
|
|
|
|
2015-09-17 17:05:45 +02:00
|
|
|
// Symmetric banded matrix-vector multiplication: SSBMV/DSBMV
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastSsbmv(const Layout layout, const Triangle 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastDsbmv(const Layout layout, const Triangle 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);
|
2015-09-17 17:05:45 +02:00
|
|
|
|
|
|
|
// Symmetric packed matrix-vector multiplication: SSPMV/DSPMV
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastSspmv(const Layout layout, const Triangle 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastDspmv(const Layout layout, const Triangle 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);
|
2015-09-17 17:05:45 +02:00
|
|
|
|
|
|
|
// Triangular matrix-vector multiplication: STRMV/DTRMV/CTRMV/ZTRMV
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastStrmv(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);
|
|
|
|
StatusCode PUBLIC_API CLBlastDtrmv(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);
|
|
|
|
StatusCode PUBLIC_API CLBlastCtrmv(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);
|
|
|
|
StatusCode PUBLIC_API CLBlastZtrmv(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);
|
2015-09-17 17:05:45 +02:00
|
|
|
|
|
|
|
// Triangular banded matrix-vector multiplication: STBMV/DTBMV/CTBMV/ZTBMV
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastStbmv(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);
|
|
|
|
StatusCode PUBLIC_API CLBlastDtbmv(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);
|
|
|
|
StatusCode PUBLIC_API CLBlastCtbmv(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);
|
|
|
|
StatusCode PUBLIC_API CLBlastZtbmv(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);
|
2015-09-17 17:05:45 +02:00
|
|
|
|
|
|
|
// Triangular packed matrix-vector multiplication: STPMV/DTPMV/CTPMV/ZTPMV
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastStpmv(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);
|
|
|
|
StatusCode PUBLIC_API CLBlastDtpmv(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);
|
|
|
|
StatusCode PUBLIC_API CLBlastCtpmv(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);
|
|
|
|
StatusCode PUBLIC_API CLBlastZtpmv(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);
|
2015-09-17 17:05:45 +02:00
|
|
|
|
|
|
|
// Solves a triangular system of equations: STRSV/DTRSV/CTRSV/ZTRSV
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastStrsv(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);
|
|
|
|
StatusCode PUBLIC_API CLBlastDtrsv(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);
|
|
|
|
StatusCode PUBLIC_API CLBlastCtrsv(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);
|
|
|
|
StatusCode PUBLIC_API CLBlastZtrsv(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);
|
2015-09-17 17:05:45 +02:00
|
|
|
|
|
|
|
// Solves a banded triangular system of equations: STBSV/DTBSV/CTBSV/ZTBSV
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastStbsv(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);
|
|
|
|
StatusCode PUBLIC_API CLBlastDtbsv(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);
|
|
|
|
StatusCode PUBLIC_API CLBlastCtbsv(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);
|
|
|
|
StatusCode PUBLIC_API CLBlastZtbsv(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);
|
2015-09-17 17:05:45 +02:00
|
|
|
|
|
|
|
// Solves a packed triangular system of equations: STPSV/DTPSV/CTPSV/ZTPSV
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastStpsv(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);
|
|
|
|
StatusCode PUBLIC_API CLBlastDtpsv(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);
|
|
|
|
StatusCode PUBLIC_API CLBlastCtpsv(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);
|
|
|
|
StatusCode PUBLIC_API CLBlastZtpsv(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);
|
2015-09-17 17:05:45 +02:00
|
|
|
|
|
|
|
// General rank-1 matrix update: SGER/DGER
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastSger(const Layout 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastDger(const Layout 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);
|
2015-09-17 17:05:45 +02:00
|
|
|
|
|
|
|
// General rank-1 complex matrix update: CGERU/ZGERU
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastCgeru(const Layout 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastZgeru(const Layout 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);
|
2015-09-17 17:05:45 +02:00
|
|
|
|
|
|
|
// General rank-1 complex conjugated matrix update: CGERC/ZGERC
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastCgerc(const Layout 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastZgerc(const Layout 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);
|
2015-09-17 17:05:45 +02:00
|
|
|
|
|
|
|
// Hermitian rank-1 matrix update: CHER/ZHER
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastCher(const Layout layout, const Triangle 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastZher(const Layout layout, const Triangle 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);
|
2015-09-17 17:05:45 +02:00
|
|
|
|
|
|
|
// Hermitian packed rank-1 matrix update: CHPR/ZHPR
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastChpr(const Layout layout, const Triangle 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastZhpr(const Layout layout, const Triangle 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);
|
2015-09-17 17:05:45 +02:00
|
|
|
|
|
|
|
// Hermitian rank-2 matrix update: CHER2/ZHER2
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastCher2(const Layout layout, const Triangle 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastZher2(const Layout layout, const Triangle 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);
|
2015-09-17 17:05:45 +02:00
|
|
|
|
|
|
|
// Hermitian packed rank-2 matrix update: CHPR2/ZHPR2
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastChpr2(const Layout layout, const Triangle 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastZhpr2(const Layout layout, const Triangle 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);
|
2015-09-17 17:05:45 +02:00
|
|
|
|
|
|
|
// Symmetric rank-1 matrix update: SSYR/DSYR
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastSsyr(const Layout layout, const Triangle 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastDsyr(const Layout layout, const Triangle 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);
|
2015-09-17 17:05:45 +02:00
|
|
|
|
|
|
|
// Symmetric packed rank-1 matrix update: SSPR/DSPR
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastSspr(const Layout layout, const Triangle 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastDspr(const Layout layout, const Triangle 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);
|
2015-09-17 17:05:45 +02:00
|
|
|
|
|
|
|
// Symmetric rank-2 matrix update: SSYR2/DSYR2
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastSsyr2(const Layout layout, const Triangle 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastDsyr2(const Layout layout, const Triangle 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);
|
2015-09-17 17:05:45 +02:00
|
|
|
|
|
|
|
// Symmetric packed rank-2 matrix update: SSPR2/DSPR2
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastSspr2(const Layout layout, const Triangle 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastDspr2(const Layout layout, const Triangle 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);
|
2015-09-17 17:05:45 +02:00
|
|
|
|
2015-08-13 13:46:13 +02:00
|
|
|
// =================================================================================================
|
|
|
|
// BLAS level-3 (matrix-matrix) routines
|
2015-08-13 17:58:46 +02:00
|
|
|
// =================================================================================================
|
2015-08-13 13:46:13 +02:00
|
|
|
|
2015-09-17 17:05:45 +02:00
|
|
|
// General matrix-matrix multiplication: SGEMM/DGEMM/CGEMM/ZGEMM
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastSgemm(const Layout layout, const Transpose a_transpose, const Transpose 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastDgemm(const Layout layout, const Transpose a_transpose, const Transpose 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastCgemm(const Layout layout, const Transpose a_transpose, const Transpose 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastZgemm(const Layout layout, const Transpose a_transpose, const Transpose 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);
|
2015-08-13 13:46:13 +02:00
|
|
|
|
2015-08-13 17:58:46 +02:00
|
|
|
// Symmetric matrix-matrix multiplication: SSYMM/DSYMM/CSYMM/ZSYMM
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastSsymm(const Layout layout, const Side side, const Triangle 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastDsymm(const Layout layout, const Side side, const Triangle 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastCsymm(const Layout layout, const Side side, const Triangle 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastZsymm(const Layout layout, const Side side, const Triangle 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);
|
2015-08-13 17:58:46 +02:00
|
|
|
|
|
|
|
// Hermitian matrix-matrix multiplication: CHEMM/ZHEMM
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastChemm(const Layout layout, const Side side, const Triangle 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastZhemm(const Layout layout, const Side side, const Triangle 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);
|
2015-08-13 17:58:46 +02:00
|
|
|
|
|
|
|
// Rank-K update of a symmetric matrix: SSYRK/DSYRK/CSYRK/ZSYRK
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastSsyrk(const Layout layout, const Triangle triangle, const Transpose 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastDsyrk(const Layout layout, const Triangle triangle, const Transpose 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastCsyrk(const Layout layout, const Triangle triangle, const Transpose 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastZsyrk(const Layout layout, const Triangle triangle, const Transpose 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);
|
2015-08-13 17:58:46 +02:00
|
|
|
|
|
|
|
// Rank-K update of a hermitian matrix: CHERK/ZHERK
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastCherk(const Layout layout, const Triangle triangle, const Transpose 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastZherk(const Layout layout, const Triangle triangle, const Transpose 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);
|
2015-08-13 17:58:46 +02:00
|
|
|
|
|
|
|
// Rank-2K update of a symmetric matrix: SSYR2K/DSYR2K/CSYR2K/ZSYR2K
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastSsyr2k(const Layout layout, const Triangle triangle, const Transpose 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastDsyr2k(const Layout layout, const Triangle triangle, const Transpose 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastCsyr2k(const Layout layout, const Triangle triangle, const Transpose 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastZsyr2k(const Layout layout, const Triangle triangle, const Transpose 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);
|
2015-08-13 17:58:46 +02:00
|
|
|
|
|
|
|
// Rank-2K update of a hermitian matrix: CHER2K/ZHER2K
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastCher2k(const Layout layout, const Triangle triangle, const Transpose 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastZher2k(const Layout layout, const Triangle triangle, const Transpose 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);
|
2015-08-13 17:58:46 +02:00
|
|
|
|
|
|
|
// Triangular matrix-matrix multiplication: STRMM/DTRMM/CTRMM/ZTRMM
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastStrmm(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 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastDtrmm(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 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastCtrmm(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 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastZtrmm(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 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);
|
2015-08-13 17:58:46 +02:00
|
|
|
|
2015-09-17 17:05:45 +02:00
|
|
|
// Solves a triangular system of equations: STRSM/DTRSM/CTRSM/ZTRSM
|
2016-03-23 20:49:28 +01:00
|
|
|
StatusCode PUBLIC_API CLBlastStrsm(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 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastDtrsm(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 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastCtrsm(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 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);
|
|
|
|
StatusCode PUBLIC_API CLBlastZtrsm(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 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);
|
2015-09-17 17:05:45 +02:00
|
|
|
|
2015-08-13 13:46:13 +02:00
|
|
|
// =================================================================================================
|
|
|
|
|
2016-04-27 16:02:13 +02:00
|
|
|
// CLBlast stores binaries of compiled kernels into a cache in case the same kernel is used later on
|
|
|
|
// for the same device. This cache can be cleared to free up system memory or in case of debugging.
|
2016-04-28 21:14:17 +02:00
|
|
|
StatusCode PUBLIC_API CLBlastClearCache();
|
2016-04-27 16:02:13 +02:00
|
|
|
|
2016-04-29 23:33:12 +02:00
|
|
|
// The cache can also be pre-initialized for a specific device with all possible CLBLast kernels.
|
|
|
|
// Further CLBlast routine calls will then run at maximum speed.
|
|
|
|
StatusCode PUBLIC_API CLBlastFillCache(const cl_device_id device);
|
|
|
|
|
2016-04-27 16:02:13 +02:00
|
|
|
// =================================================================================================
|
|
|
|
|
2016-03-23 20:49:28 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
} // extern "C"
|
|
|
|
#endif
|
|
|
|
|
2015-08-13 13:46:13 +02:00
|
|
|
// CLBLAST_CLBLAST_C_H_
|
|
|
|
#endif
|