Intel clBLAS
iclBLAS.h
Go to the documentation of this file.
1 /* Copyright (c) 2017-2018 Intel Corporation
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #pragma once
17 
18 /*****************************************************************************/
19 // exporting symbols from dynamic library
20 #ifdef EXPORT_ICLBLAS_SYMBOLS
21 # if defined(_MSC_VER)
22 // Microsoft
23 # define ICLBLAS_API __declspec(dllexport)
24 # elif defined(__GNUC__)
25 // GCC
26 # define ICLBLAS_API __attribute__((visibility("default")))
27 # else
28 # define ICLBLAS_API
29 # pragma warning Unknown dynamic link import/export semantics.
30 # endif
31 #else //import dll
32 # if defined(_MSC_VER)
33 // Microsoft
34 # define ICLBLAS_API __declspec(dllimport)
35 # elif defined(__GNUC__)
36 // GCC
37 # define ICLBLAS_API
38 # else
39 # define ICLBLAS_API
40 # pragma warning Unknown dynamic link import/export semantics.
41 # endif
42 #endif
43 
44 #if defined(_MSC_VER) || defined(__INTEL_COMPILER) || defined(__ICC)
45 # define ICLBLAS_ALWAYS_INLINE __forceinline
46 #elif defined(__GNUC__) || defined(__clang__)
47 # define ICLBLAS_ALWAYS_INLINE __attribute__((always_inline))
48 #else
49 # define ICLBLAS_ALWAYS_INLINE
50 # pragma message ("warning Unknown always-inline function attribute.")
51 #endif
52 
53 /*****************************************************************************/
54 
60 /*
61  * or more obtusely but canonical reference here: http://www.netlib.org/blas/
62  * Inside Tensorflow is another view of blas.h https://github.com/tensorflow/tensorflow/blob/master/tensorflow/stream_executor/blas.h
63  *
64  * OCL BLAS better name than genBLAS because this interface should work for all opencl implementations (though some kernels may not be available
65  * if they use special gen extensions like subgroups
66 */
67 
71 #ifdef __cplusplus
72 # include <complex>
73  typedef std::complex<float> oclComplex_t;
74  inline float Creal(const oclComplex_t& a) { return a.real(); }
75  inline float Cimag(const oclComplex_t& a) { return a.imag(); }
76  inline void Csetreal(oclComplex_t* a, float r) { a->real(r); }
77  inline void Csetimag(oclComplex_t* a, float i) { a->imag(i); }
78 #else
79  typedef struct _oclComplex_t
80  {
81  float val[2];
82  } oclComplex_t;
83  ICLBLAS_ALWAYS_INLINE float Creal(struct _oclComplex_t a) { return a.val[0]; }
84  ICLBLAS_ALWAYS_INLINE float Cimag(struct _oclComplex_t a) { return a.val[1]; }
85  ICLBLAS_ALWAYS_INLINE void Csetreal(struct _oclComplex_t* a, float r) { a->val[0] = r; }
86  ICLBLAS_ALWAYS_INLINE void Csetimag(struct _oclComplex_t* a, float i) { a->val[1] = i; }
87 #endif
88 
89 #ifdef __cplusplus
90 extern "C" {
91 #endif
92 
93 /*****************************************************************************/
104 typedef enum {
105  ICLBLAS_STATUS_SUCCESS = 0,
106  ICLBLAS_STATUS_NOT_INITIALIZED = 1,
107  ICLBLAS_STATUS_ALLOC_FAILED = 3,
108  ICLBLAS_STATUS_INVALID_VALUE = 7,
109  ICLBLAS_STATUS_ARCH_MISMATCH = 8,
110  ICLBLAS_STATUS_MAPPING_ERROR = 11,
111  ICLBLAS_STATUS_EXECUTION_FAILED = 13,
112  ICLBLAS_STATUS_INTERNAL_ERROR = 14,
113  ICLBLAS_STATUS_NOT_SUPPORTED = 15,
114  ICLBLAS_STATUS_LICENSE_ERROR = 16,
115  ICLBLAS_STATUS_ERROR,
116 
118 
119 
123 typedef struct iclblasContext *iclblasHandle_t;
124 
128 typedef enum {
133 
137 typedef enum {
141 
147 typedef enum {
151 
155 typedef enum {
161 /*****************************************************************************/
172 ICLBLAS_API iclblasStatus_t iclblasCreate(iclblasHandle_t* handle);
173 
179 ICLBLAS_API iclblasStatus_t iclblasDestroy(iclblasHandle_t handle);
182 /*****************************************************************************/
203 ICLBLAS_API iclblasStatus_t iclblasScopy(iclblasHandle_t handle, int n, float *x, int incx, float *y, int incy);
204 
219 ICLBLAS_API iclblasStatus_t iclblasSscal(iclblasHandle_t handle, int n, const float* alpha, float *x, int incx);
220 
237 ICLBLAS_API iclblasStatus_t iclblasSaxpy(iclblasHandle_t handle, int n, const float* alpha, float *x, int incx, float *y, int incy);
238 
250 ICLBLAS_API iclblasStatus_t iclblasSnrm2(iclblasHandle_t handle, int n, float *x, int incx, float *result);
251 
262 ICLBLAS_API iclblasStatus_t iclblasSrotmg(iclblasHandle_t handle, float *d1, float *d2, float *x1, const float *y1, float* params);
263 
275 ICLBLAS_API iclblasStatus_t iclblasIsamax(iclblasHandle_t handle, int n, float* x, int incx, int* result);
276 
288 ICLBLAS_API iclblasStatus_t iclblasIsamin(iclblasHandle_t handle, int n, float* x, int incx, int* result);
289 
305 ICLBLAS_API iclblasStatus_t iclblasSswap(iclblasHandle_t handle, int n, float* x, int incx, float* y, int incy);
306 
319 ICLBLAS_API iclblasStatus_t iclblasSrot(iclblasHandle_t handle, int n, float* x, int incx, float* y, int incy, float c, float s);
320 
332 ICLBLAS_API iclblasStatus_t iclblasSrotm(iclblasHandle_t handle, int n, float* x, int incx, float* y, int incy, float* param);
333 
345 ICLBLAS_API iclblasStatus_t iclblasSasum(iclblasHandle_t handle, int n, float* x, int incx, float* result);
346 
356 ICLBLAS_API iclblasStatus_t iclblasSrotg(iclblasHandle_t handle, float* a, float* b, float* c, float* s);
357 
371 ICLBLAS_API iclblasStatus_t iclblasSdot(iclblasHandle_t handle, int n, float* x, int incx, float* y, int incy, float* result);
374 /*****************************************************************************/
395 ICLBLAS_API iclblasStatus_t iclblasCcopy(iclblasHandle_t handle, int n, oclComplex_t *x, int incx, oclComplex_t *y, int incy);
396 
411 ICLBLAS_API iclblasStatus_t iclblasCscal(iclblasHandle_t handle, int n, const oclComplex_t* alpha, oclComplex_t *x, int incx);
412 
427 ICLBLAS_API iclblasStatus_t iclblasCsscal(iclblasHandle_t handle, int n, const float* alpha, oclComplex_t *x, int incx);
428 
444 ICLBLAS_API iclblasStatus_t iclblasCswap(iclblasHandle_t handle, int n, oclComplex_t* x, int incx, oclComplex_t* y, int incy);
445 
462 ICLBLAS_API iclblasStatus_t iclblasCdotu(iclblasHandle_t handle, int n, oclComplex_t* x, int incx, oclComplex_t* y, int incy, oclComplex_t* result);
463 
475 ICLBLAS_API iclblasStatus_t iclblasScnrm2(iclblasHandle_t handle, int n, oclComplex_t* x, int incx, float* result);
476 
488 ICLBLAS_API iclblasStatus_t iclblasIcamax(iclblasHandle_t handle, int n, oclComplex_t* x, int incx, int* result);
489 
501 ICLBLAS_API iclblasStatus_t iclblasIcamin(iclblasHandle_t handle, int n, oclComplex_t* x, int incx, int* result);
502 
519 ICLBLAS_API iclblasStatus_t iclblasCaxpy(iclblasHandle_t handle, int n, const oclComplex_t* alpha, oclComplex_t* x, int incx, oclComplex_t* y, int incy);
520 
530 ICLBLAS_API iclblasStatus_t iclblasCrotg(iclblasHandle_t handle, oclComplex_t* a, oclComplex_t* b, float* c, oclComplex_t* s);
531 
549 ICLBLAS_API iclblasStatus_t iclblasCdotc(iclblasHandle_t handle, int n, oclComplex_t* x, int incx, oclComplex_t* y, int incy, oclComplex_t* result);
550 
563 ICLBLAS_API iclblasStatus_t iclblasCrot(iclblasHandle_t handle, int n, oclComplex_t* x, int incx, oclComplex_t* y, int incy, const float* c, const oclComplex_t* s);
564 
577 ICLBLAS_API iclblasStatus_t iclblasCsrot(iclblasHandle_t handle, int n, oclComplex_t* x, int incx, oclComplex_t* y, int incy, const float* c, const float* s);
578 
590 ICLBLAS_API iclblasStatus_t iclblasScasum(iclblasHandle_t handle, int n, oclComplex_t *x, int incx, float* result);
593 /*****************************************************************************/
630 ICLBLAS_API iclblasStatus_t iclblasStrsv(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, iclblasDiagType_t diag, int n, float* A, int lda, float* x, int incx);
631 
670 ICLBLAS_API iclblasStatus_t iclblasStbsv(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, iclblasDiagType_t diag, int n, int k, float* A, int lda, float* x, int incx);
671 
706 ICLBLAS_API iclblasStatus_t iclblasStpsv(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, iclblasDiagType_t diag, int n, float* AP, float* x, int incx);
707 
727 ICLBLAS_API iclblasStatus_t iclblasSger(iclblasHandle_t handle, int m, int n, const float* alpha, float* x, int incx, float* y, int incy, float* A, int lda);
728 
748 ICLBLAS_API iclblasStatus_t iclblasSsyr2(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, const float* alpha, float *x, int incx, float* y, int incy, float* A, int lda);
749 
767 ICLBLAS_API iclblasStatus_t iclblasSsyr(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, const float* alpha, float*x, int incx, float* A, int lda);
768 
794 ICLBLAS_API iclblasStatus_t iclblasStrmv(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, iclblasDiagType_t diag, int n, float* A, int lda, float* x, int incx);
795 
829 ICLBLAS_API iclblasStatus_t iclblasStbmv(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, iclblasDiagType_t diag, int n, int k, float* A, int lda, float* x, int incx);
830 
865 ICLBLAS_API iclblasStatus_t iclblasSgbmv(iclblasHandle_t handle, iclblasOperation_t trans, int m, int n, int kl, int ku, const float* alpha, float* A, int lda, float* x, int incx, const float* beta, float* y, int incy);
866 
896 ICLBLAS_API iclblasStatus_t iclblasStpmv(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, iclblasDiagType_t diag, int n, float* AP, float* x, int incx);
897 
925 ICLBLAS_API iclblasStatus_t iclblasSsbmv(iclblasHandle_t handle, iclblasFillMode_t uplo, char n, char k, const float* alpha, float* A, int lda, float* x, int incx, const float* beta, float* y, int incy);
926 
950 ICLBLAS_API iclblasStatus_t iclblasSspmv(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, const float* alpha, float* AP, float* x, int incx, const float* beta, float* y, int incy);
951 
974 ICLBLAS_API iclblasStatus_t iclblasSspr2(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, const float* alpha, float *x, int incx, float* y, int incy, float* AP);
975 
996 ICLBLAS_API iclblasStatus_t iclblasSspr(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, const float* alpha, float *x, int incx, float* AP);
997 
1018 ICLBLAS_API iclblasStatus_t iclblasSsymv(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, const float* alpha, float *A, int lda, float *x, int incx, const float* beta, float *y, int incy);
1019 
1049 ICLBLAS_API iclblasStatus_t iclblasSgemv(iclblasHandle_t handle, iclblasOperation_t trans, int m, int n, const float* alpha, float *A, int lda, float *x, int incx, const float* beta, float *y, int incy);
1052 /*****************************************************************************/
1091 ICLBLAS_API iclblasStatus_t iclblasCgbmv(iclblasHandle_t handle, iclblasOperation_t trans, int m, int n, int kl, int ku, const oclComplex_t* alpha, oclComplex_t* A, int lda, oclComplex_t* x, int incx, const oclComplex_t* beta, oclComplex_t* y, int incy);
1092 
1112 ICLBLAS_API iclblasStatus_t iclblasCgeru(iclblasHandle_t handle, int m, int n, const oclComplex_t* alpha, oclComplex_t* x, int incx, oclComplex_t* y, int incy, oclComplex_t* A, int lda);
1113 
1133 ICLBLAS_API iclblasStatus_t iclblasCgerc(iclblasHandle_t handle, int m, int n, const oclComplex_t* alpha, oclComplex_t* x, int incx, oclComplex_t* y, int incy, oclComplex_t* A, int lda);
1134 
1164 ICLBLAS_API iclblasStatus_t iclblasCgemv(iclblasHandle_t handle, iclblasOperation_t trans, int m, int n, const oclComplex_t* alpha, oclComplex_t* A, int lda, oclComplex_t* x, int incx, const oclComplex_t* beta, oclComplex_t* y, int incy);
1165 
1183 ICLBLAS_API iclblasStatus_t iclblasCher(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, const float* alpha, oclComplex_t* x, int incx, oclComplex_t* A, int lda);
1184 
1205 ICLBLAS_API iclblasStatus_t iclblasChemv(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, const oclComplex_t* alpha, oclComplex_t* A, int lda, oclComplex_t* x, int incx, const oclComplex_t* beta, oclComplex_t* y, int incy);
1206 
1232 ICLBLAS_API iclblasStatus_t iclblasCtrmv(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, iclblasDiagType_t diag, int n, oclComplex_t* A, int lda, oclComplex_t* x, int incx);
1233 
1253 ICLBLAS_API iclblasStatus_t iclblasCher2(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, const oclComplex_t* alpha, oclComplex_t* x, int incx, oclComplex_t* y, int incy, oclComplex_t* A, int lda);
1254 
1278 ICLBLAS_API iclblasStatus_t iclblasChpmv(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, const oclComplex_t* alpha, oclComplex_t* AP, oclComplex_t* x, int incx, const oclComplex_t* beta, oclComplex_t* y, int incy);
1279 
1300 ICLBLAS_API iclblasStatus_t iclblasChpr(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, const float* alpha, oclComplex_t*x, int incx, oclComplex_t* AP);
1301 
1324 ICLBLAS_API iclblasStatus_t iclblasChpr2(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, const oclComplex_t* alpha, oclComplex_t* x, int incx, oclComplex_t* y, int incy, oclComplex_t* AP);
1325 
1355 ICLBLAS_API iclblasStatus_t iclblasCtpmv(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, iclblasDiagType_t diag, int n, oclComplex_t* AP, oclComplex_t* x, int incx);
1356 
1390 ICLBLAS_API iclblasStatus_t iclblasCtbmv(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, iclblasDiagType_t diag, int n, int k, oclComplex_t* A, int lda, oclComplex_t* x, int incx);
1391 
1430 ICLBLAS_API iclblasStatus_t iclblasCtbsv(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, iclblasDiagType_t diag, int n, int k, oclComplex_t* A, int lda, oclComplex_t* x, int incx);
1431 
1463 ICLBLAS_API iclblasStatus_t iclblasCtrsv(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, iclblasDiagType_t diag, int n, oclComplex_t* A, int lda, oclComplex_t* x, int incx);
1464 
1499 ICLBLAS_API iclblasStatus_t iclblasCtpsv(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, iclblasDiagType_t diag, int n, oclComplex_t* AP, oclComplex_t* x, int incx);
1500 
1528 ICLBLAS_API iclblasStatus_t iclblasChbmv(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, int k, const oclComplex_t* alpha, oclComplex_t* A, int lda, oclComplex_t* x, int incx, const oclComplex_t* beta, oclComplex_t* y, int incy);
1529 
1547 ICLBLAS_API iclblasStatus_t iclblasCsyr(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, const oclComplex_t* alpha, oclComplex_t* x, int incx, oclComplex_t* A, int lda);
1550 /*****************************************************************************/
1579 ICLBLAS_API iclblasStatus_t iclblasSsymm(iclblasHandle_t handle, iclblasSideMode_t side, iclblasFillMode_t uplo, int m, int n, const float* alpha, float* A, int lda, float* B, int ldb, const float* beta, float* C, int ldc);
1580 
1608 ICLBLAS_API iclblasStatus_t iclblasSsyrk(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, int n, int k, const float* alpha, float* A, int lda, const float* beta, float* C, int ldc);
1609 
1645 ICLBLAS_API iclblasStatus_t iclblasSsyr2k(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, int n, int k, const float* alpha, float* A, int lda, float* B, int ldb, const float* beta, float* C, int ldc);
1646 
1685 ICLBLAS_API iclblasStatus_t iclblasSgemm(iclblasHandle_t handle, iclblasOperation_t transa, iclblasOperation_t transb, int m, int n, int k, const float* alpha, float* A, int lda, float* B, int ldb, const float* beta, float* C, int ldc);
1686 
1719 ICLBLAS_API iclblasStatus_t iclblasStrsm(iclblasHandle_t handle, iclblasSideMode_t side, iclblasFillMode_t uplo, iclblasOperation_t trans, iclblasDiagType_t diag, int m, int n, const float* alpha, float* A, int lda, float* B, int ldb);
1720 
1753 ICLBLAS_API iclblasStatus_t iclblasStrmm(iclblasHandle_t handle, iclblasSideMode_t side, iclblasFillMode_t uplo, iclblasOperation_t transa, iclblasDiagType_t diag, int m, int n, const float* alpha, float* A, int lda, float* B, int ldb, float* C, int ldc);
1756 /*****************************************************************************/
1799 ICLBLAS_API iclblasStatus_t iclblasCgemm(iclblasHandle_t handle, iclblasOperation_t transa, iclblasOperation_t transb, int m, int n, int k, const oclComplex_t* alpha, oclComplex_t* A, int lda, oclComplex_t* B, int ldb, const oclComplex_t* beta, oclComplex_t* C, int ldc);
1800 
1825 ICLBLAS_API iclblasStatus_t iclblasCsymm(iclblasHandle_t handle, iclblasSideMode_t side, iclblasFillMode_t uplo, int m, int n, const oclComplex_t* alpha, oclComplex_t* A, int lda, oclComplex_t* B, int ldb, const oclComplex_t* beta, oclComplex_t* C, int ldc);
1826 
1862 ICLBLAS_API iclblasStatus_t iclblasCsyr2k(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, int n, int k, const oclComplex_t* alpha, oclComplex_t* A, int lda, oclComplex_t* B, int ldb, const oclComplex_t* beta, oclComplex_t* C, int ldc);
1863 
1891 ICLBLAS_API iclblasStatus_t iclblasCsyrk(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, int n, int k, const oclComplex_t* alpha, oclComplex_t* A, int lda, const oclComplex_t* beta, oclComplex_t* C, int ldc);
1892 
1925 ICLBLAS_API iclblasStatus_t iclblasCtrsm(iclblasHandle_t handle, iclblasSideMode_t side, iclblasFillMode_t uplo, iclblasOperation_t trans, iclblasDiagType_t diag, int m, int n, const oclComplex_t* alpha, oclComplex_t* A, int lda, oclComplex_t* B, int ldb);
1926 
1954 ICLBLAS_API iclblasStatus_t iclblasCherk(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, int n, int k, const float* alpha, oclComplex_t* A, int lda, const float* beta, oclComplex_t* C, int ldc);
1955 
1991 ICLBLAS_API iclblasStatus_t iclblasCher2k(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, int n, int k, const oclComplex_t* alpha, oclComplex_t* A, int lda, oclComplex_t* B, int ldb, const float* beta, oclComplex_t* C, int ldc);
1992 
2025 ICLBLAS_API iclblasStatus_t iclblasCtrmm(iclblasHandle_t handle, iclblasSideMode_t side, iclblasFillMode_t uplo, iclblasOperation_t transa, iclblasDiagType_t diag, int m, int n, const oclComplex_t* alpha, oclComplex_t* A, int lda, oclComplex_t* B, int ldb, oclComplex_t* C, int ldc);
2026 
2051 ICLBLAS_API iclblasStatus_t iclblasChemm(iclblasHandle_t handle, iclblasSideMode_t side, iclblasFillMode_t uplo, int m, int n, const oclComplex_t* alpha, oclComplex_t* A, int lda, oclComplex_t* B, int ldb, const oclComplex_t* beta, oclComplex_t* C, int ldc);
2054 #ifdef __cplusplus
2055 } // extern "C"
2056 #endif
iclblasStatus_t iclblasCtpsv(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, iclblasDiagType_t diag, int n, oclComplex_t *AP, oclComplex_t *x, int incx)
Solves packed triangular linear system with single right-hand side.
iclblasStatus_t iclblasCtbsv(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, iclblasDiagType_t diag, int n, int k, oclComplex_t *A, int lda, oclComplex_t *x, int incx)
Solves triangular banded linear system with single right-hand side.
iclblasStatus_t iclblasSrotg(iclblasHandle_t handle, float *a, float *b, float *c, float *s)
Creates the Givens rotation matrix.
iclblasStatus_t iclblasCsyr(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, const oclComplex_t *alpha, oclComplex_t *x, int incx, oclComplex_t *A, int lda)
Performs symmetrix matrix rank 1 update.
iclblasStatus_t iclblasSgemm(iclblasHandle_t handle, iclblasOperation_t transa, iclblasOperation_t transb, int m, int n, int k, const float *alpha, float *A, int lda, float *B, int ldb, const float *beta, float *C, int ldc)
Performs matrix by matrix multiplication.
iclblasOperation_t
Indicates operation to be performed.
Definition: iclBLAS.h:128
iclblasStatus_t iclblasSsyr(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, const float *alpha, float *x, int incx, float *A, int lda)
Performs symmetrix matrix rank 1 update.
iclblasStatus_t iclblasCtrsm(iclblasHandle_t handle, iclblasSideMode_t side, iclblasFillMode_t uplo, iclblasOperation_t trans, iclblasDiagType_t diag, int m, int n, const oclComplex_t *alpha, oclComplex_t *A, int lda, oclComplex_t *B, int ldb)
Solves triangular linear system with multiple right-hand-sides.
iclblasStatus_t iclblasSgemv(iclblasHandle_t handle, iclblasOperation_t trans, int m, int n, const float *alpha, float *A, int lda, float *x, int incx, const float *beta, float *y, int incy)
Performs general matrix by vector multiplication.
iclblasStatus_t iclblasIcamax(iclblasHandle_t handle, int n, oclComplex_t *x, int incx, int *result)
Computes the first index of the highest magnitude value in complex vector x.
iclblasStatus_t iclblasSrot(iclblasHandle_t handle, int n, float *x, int incx, float *y, int incy, float c, float s)
Applies Givens rotation matrix.
iclblasStatus_t iclblasCrotg(iclblasHandle_t handle, oclComplex_t *a, oclComplex_t *b, float *c, oclComplex_t *s)
Creates the Givens rotation matrix.
iclblasStatus_t iclblasCreate(iclblasHandle_t *handle)
Create library context.
iclblasStatus_t iclblasSaxpy(iclblasHandle_t handle, int n, const float *alpha, float *x, int incx, float *y, int incy)
Multiply the vector x by the scalar and add it to the vector y.
iclblasStatus_t iclblasSsymm(iclblasHandle_t handle, iclblasSideMode_t side, iclblasFillMode_t uplo, int m, int n, const float *alpha, float *A, int lda, float *B, int ldb, const float *beta, float *C, int ldc)
Performs symmetric matrix by matrix multiplication.
iclblasStatus_t iclblasStbsv(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, iclblasDiagType_t diag, int n, int k, float *A, int lda, float *x, int incx)
Solves triangular banded linear system with single right-hand side.
iclblasStatus_t iclblasSgbmv(iclblasHandle_t handle, iclblasOperation_t trans, int m, int n, int kl, int ku, const float *alpha, float *A, int lda, float *x, int incx, const float *beta, float *y, int incy)
Performs general banded matrix by vector multiplication.
iclblasStatus_t iclblasCtrsv(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, iclblasDiagType_t diag, int n, oclComplex_t *A, int lda, oclComplex_t *x, int incx)
Solves triangular linear system with single right-hand side.
iclblasStatus_t iclblasIsamin(iclblasHandle_t handle, int n, float *x, int incx, int *result)
Computes the first index of the lowest value in vector x.
iclblasStatus_t iclblasCher2(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, const oclComplex_t *alpha, oclComplex_t *x, int incx, oclComplex_t *y, int incy, oclComplex_t *A, int lda)
Performs Hermitian matrix rank 2 update.
iclblasStatus_t iclblasCsyr2k(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, int n, int k, const oclComplex_t *alpha, oclComplex_t *A, int lda, oclComplex_t *B, int ldb, const oclComplex_t *beta, oclComplex_t *C, int ldc)
Performs symmetric rank-2k update.
iclblasStatus_t iclblasCsscal(iclblasHandle_t handle, int n, const float *alpha, oclComplex_t *x, int incx)
Multiply the complex vector by the scalar.
iclblasDiagType_t
Indicates whether the main diagonal of matrix is unity.
Definition: iclBLAS.h:147
iclblasStatus_t iclblasChemv(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, const oclComplex_t *alpha, oclComplex_t *A, int lda, oclComplex_t *x, int incx, const oclComplex_t *beta, oclComplex_t *y, int incy)
Performs Hermitian matrix by vector multiplication.
iclblasStatus_t iclblasCrot(iclblasHandle_t handle, int n, oclComplex_t *x, int incx, oclComplex_t *y, int incy, const float *c, const oclComplex_t *s)
Applies Givens rotation matrix.
iclblasFillMode_t
Indicates which part (lower or upper) of matrix is filled.
Definition: iclBLAS.h:137
iclblasStatus_t iclblasCsymm(iclblasHandle_t handle, iclblasSideMode_t side, iclblasFillMode_t uplo, int m, int n, const oclComplex_t *alpha, oclComplex_t *A, int lda, oclComplex_t *B, int ldb, const oclComplex_t *beta, oclComplex_t *C, int ldc)
Performs symmetric matrix by matrix multiplication.
iclblasStatus_t iclblasCcopy(iclblasHandle_t handle, int n, oclComplex_t *x, int incx, oclComplex_t *y, int incy)
Copy the elements from the vector x to the vector y.
iclblasStatus_t iclblasStrmv(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, iclblasDiagType_t diag, int n, float *A, int lda, float *x, int incx)
Performs triangular matrix by vector multiplication.
iclblasSideMode_t
Indicates on which side (left or right) the matrix in the equation solved by a function.
Definition: iclBLAS.h:155
iclblasStatus_t iclblasSsymv(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, const float *alpha, float *A, int lda, float *x, int incx, const float *beta, float *y, int incy)
Performs symmetric matrix by vector multiplication.
iclblasStatus_t iclblasCgeru(iclblasHandle_t handle, int m, int n, const oclComplex_t *alpha, oclComplex_t *x, int incx, oclComplex_t *y, int incy, oclComplex_t *A, int lda)
Performs general matrix rank 1 update.
iclblasStatus_t iclblasStrsm(iclblasHandle_t handle, iclblasSideMode_t side, iclblasFillMode_t uplo, iclblasOperation_t trans, iclblasDiagType_t diag, int m, int n, const float *alpha, float *A, int lda, float *B, int ldb)
Solves triangular linear system with multiple right-hand-sides.
iclblasStatus_t iclblasSrotmg(iclblasHandle_t handle, float *d1, float *d2, float *x1, const float *y1, float *params)
Constructs the modified Givens transformation.
iclblasStatus_t iclblasCtrmv(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, iclblasDiagType_t diag, int n, oclComplex_t *A, int lda, oclComplex_t *x, int incx)
Performs triangular matrix by vector multiplication.
iclblasStatus_t iclblasSsyrk(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, int n, int k, const float *alpha, float *A, int lda, const float *beta, float *C, int ldc)
Performs symmetric rank-k update.
iclblasStatus_t iclblasChpr(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, const float *alpha, oclComplex_t *x, int incx, oclComplex_t *AP)
Performs packed Hermitian matrix rank 1 update.
iclblasStatus_t iclblasCscal(iclblasHandle_t handle, int n, const oclComplex_t *alpha, oclComplex_t *x, int incx)
Multiply the complex vector by the scalar.
iclblasStatus_t iclblasSdot(iclblasHandle_t handle, int n, float *x, int incx, float *y, int incy, float *result)
Computes the dot product from vector x and vector y.
iclblasStatus_t iclblasCsrot(iclblasHandle_t handle, int n, oclComplex_t *x, int incx, oclComplex_t *y, int incy, const float *c, const float *s)
Applies Givens rotation matrix.
iclblasStatus_t iclblasCher2k(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, int n, int k, const oclComplex_t *alpha, oclComplex_t *A, int lda, oclComplex_t *B, int ldb, const float *beta, oclComplex_t *C, int ldc)
Performs Hermitian rank-2k update.
iclblasStatus_t iclblasSswap(iclblasHandle_t handle, int n, float *x, int incx, float *y, int incy)
Interchanges two vectors x and y.
iclblasStatus_t iclblasSspmv(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, const float *alpha, float *AP, float *x, int incx, const float *beta, float *y, int incy)
Performs packed symmetric matrix by vector multiplication.
iclblasStatus_t iclblasSsbmv(iclblasHandle_t handle, iclblasFillMode_t uplo, char n, char k, const float *alpha, float *A, int lda, float *x, int incx, const float *beta, float *y, int incy)
Performs symmetric banded matrix by vector multiplication.
iclblasStatus_t iclblasCdotu(iclblasHandle_t handle, int n, oclComplex_t *x, int incx, oclComplex_t *y, int incy, oclComplex_t *result)
Computes the dot product from complex vector x and vector y.
iclblasStatus_t iclblasSscal(iclblasHandle_t handle, int n, const float *alpha, float *x, int incx)
Multiply the vector by the scalar.
iclblasStatus_t iclblasCgbmv(iclblasHandle_t handle, iclblasOperation_t trans, int m, int n, int kl, int ku, const oclComplex_t *alpha, oclComplex_t *A, int lda, oclComplex_t *x, int incx, const oclComplex_t *beta, oclComplex_t *y, int incy)
Performs general banded matrix by vector multiplication.
iclblasStatus_t iclblasCaxpy(iclblasHandle_t handle, int n, const oclComplex_t *alpha, oclComplex_t *x, int incx, oclComplex_t *y, int incy)
Multiply the complex vector x by the complex scalar and add it to the complex vector y...
iclblasStatus_t iclblasCgerc(iclblasHandle_t handle, int m, int n, const oclComplex_t *alpha, oclComplex_t *x, int incx, oclComplex_t *y, int incy, oclComplex_t *A, int lda)
Performs general matrix rank 1 update.
iclblasStatus_t iclblasSger(iclblasHandle_t handle, int m, int n, const float *alpha, float *x, int incx, float *y, int incy, float *A, int lda)
Performs general matrix rank 1 update.
iclblasStatus_t iclblasScasum(iclblasHandle_t handle, int n, oclComplex_t *x, int incx, float *result)
Computes the sum of the absolute values from vector x.
iclblasStatus_t iclblasStrmm(iclblasHandle_t handle, iclblasSideMode_t side, iclblasFillMode_t uplo, iclblasOperation_t transa, iclblasDiagType_t diag, int m, int n, const float *alpha, float *A, int lda, float *B, int ldb, float *C, int ldc)
Performs triangular matrix by matrix multiplication.
iclblasStatus_t iclblasSsyr2(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, const float *alpha, float *x, int incx, float *y, int incy, float *A, int lda)
Performs symmetrix matrix rank 2 update.
struct iclblasContext * iclblasHandle_t
Opaque structure holding library context.
Definition: iclBLAS.h:123
iclblasStatus_t iclblasChbmv(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, int k, const oclComplex_t *alpha, oclComplex_t *A, int lda, oclComplex_t *x, int incx, const oclComplex_t *beta, oclComplex_t *y, int incy)
Performs Hermitian banded matrix by vector multiplication.
iclblasStatus_t iclblasChpmv(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, const oclComplex_t *alpha, oclComplex_t *AP, oclComplex_t *x, int incx, const oclComplex_t *beta, oclComplex_t *y, int incy)
Performs packed Hermitian matrix by vector multiplication.
iclblasStatus_t iclblasSsyr2k(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, int n, int k, const float *alpha, float *A, int lda, float *B, int ldb, const float *beta, float *C, int ldc)
Performs symmetric rank-2k update.
Complex type definition.
Definition: iclBLAS.h:79
iclblasStatus_t iclblasChemm(iclblasHandle_t handle, iclblasSideMode_t side, iclblasFillMode_t uplo, int m, int n, const oclComplex_t *alpha, oclComplex_t *A, int lda, oclComplex_t *B, int ldb, const oclComplex_t *beta, oclComplex_t *C, int ldc)
Performs Hermitian matrix by matrix multiplication.
iclblasStatus_t iclblasCher(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, const float *alpha, oclComplex_t *x, int incx, oclComplex_t *A, int lda)
Performs Hermitian matrix rank 1 update.
iclblasStatus_t iclblasSasum(iclblasHandle_t handle, int n, float *x, int incx, float *result)
Computes the sum of the absolute values from vector x.
iclblasStatus_t iclblasCdotc(iclblasHandle_t handle, int n, oclComplex_t *x, int incx, oclComplex_t *y, int incy, oclComplex_t *result)
Computes the dot product from complex vector x and vector y.
iclblasStatus_t iclblasIsamax(iclblasHandle_t handle, int n, float *x, int incx, int *result)
Computes the first index of the highest value in vector x.
iclblasStatus_t iclblasDestroy(iclblasHandle_t handle)
Destroy library context.
iclblasStatus_t iclblasChpr2(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, const oclComplex_t *alpha, oclComplex_t *x, int incx, oclComplex_t *y, int incy, oclComplex_t *AP)
Performs packed Hermitian matrix rank 2 update.
iclblasStatus_t iclblasSnrm2(iclblasHandle_t handle, int n, float *x, int incx, float *result)
Computes the Euclidean norm of the vector x.
iclblasStatus_t iclblasIcamin(iclblasHandle_t handle, int n, oclComplex_t *x, int incx, int *result)
Computes the first index of the lowest magnitude value in complex vector x.
iclblasStatus_t iclblasCtbmv(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, iclblasDiagType_t diag, int n, int k, oclComplex_t *A, int lda, oclComplex_t *x, int incx)
Performs triangular banded matrix by vector multiplication.
iclblasStatus_t iclblasCswap(iclblasHandle_t handle, int n, oclComplex_t *x, int incx, oclComplex_t *y, int incy)
Interchanges two complex vectors x and y.
iclblasStatus_t iclblasSrotm(iclblasHandle_t handle, int n, float *x, int incx, float *y, int incy, float *param)
Applies modified Givens rotation matrix.
iclblasStatus_t iclblasStrsv(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, iclblasDiagType_t diag, int n, float *A, int lda, float *x, int incx)
Solves triangular linear system with single right-hand side.
iclblasStatus_t iclblasSspr(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, const float *alpha, float *x, int incx, float *AP)
Performs packed symmetric matrix rank 1 update.
iclblasStatus_t iclblasSspr2(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, const float *alpha, float *x, int incx, float *y, int incy, float *AP)
Performs packed symmetric matrix rank 2 update.
iclblasStatus_t iclblasCherk(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, int n, int k, const float *alpha, oclComplex_t *A, int lda, const float *beta, oclComplex_t *C, int ldc)
Performs Hermitian rank-k update.
iclblasStatus_t iclblasStpmv(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, iclblasDiagType_t diag, int n, float *AP, float *x, int incx)
Performs packed triangular matrix by vector multiplication.
iclblasStatus_t iclblasCtpmv(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, iclblasDiagType_t diag, int n, oclComplex_t *AP, oclComplex_t *x, int incx)
Performs packed triangular matrix by vector multiplication.
iclblasStatus_t iclblasScopy(iclblasHandle_t handle, int n, float *x, int incx, float *y, int incy)
Copy the elements from the vector x to the vector y.
iclblasStatus_t iclblasCgemv(iclblasHandle_t handle, iclblasOperation_t trans, int m, int n, const oclComplex_t *alpha, oclComplex_t *A, int lda, oclComplex_t *x, int incx, const oclComplex_t *beta, oclComplex_t *y, int incy)
Performs general matrix by vector multiplication.
iclblasStatus_t iclblasScnrm2(iclblasHandle_t handle, int n, oclComplex_t *x, int incx, float *result)
Computes the Euclidean norm of the complex vector x.
iclblasStatus_t iclblasCgemm(iclblasHandle_t handle, iclblasOperation_t transa, iclblasOperation_t transb, int m, int n, int k, const oclComplex_t *alpha, oclComplex_t *A, int lda, oclComplex_t *B, int ldb, const oclComplex_t *beta, oclComplex_t *C, int ldc)
Performs matrix by matrix multiplication.
iclblasStatus_t iclblasStbmv(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, iclblasDiagType_t diag, int n, int k, float *A, int lda, float *x, int incx)
Performs triangular banded matrix by vector multiplication.
iclblasStatus_t iclblasStpsv(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, iclblasDiagType_t diag, int n, float *AP, float *x, int incx)
Solves packed triangular linear system with single right-hand side.
iclblasStatus_t iclblasCsyrk(iclblasHandle_t handle, iclblasFillMode_t uplo, iclblasOperation_t trans, int n, int k, const oclComplex_t *alpha, oclComplex_t *A, int lda, const oclComplex_t *beta, oclComplex_t *C, int ldc)
Performs symmetric rank-k update.
iclblasStatus_t iclblasCtrmm(iclblasHandle_t handle, iclblasSideMode_t side, iclblasFillMode_t uplo, iclblasOperation_t transa, iclblasDiagType_t diag, int m, int n, const oclComplex_t *alpha, oclComplex_t *A, int lda, oclComplex_t *B, int ldb, oclComplex_t *C, int ldc)
Performs triangular matrix by matrix multiplication.
iclblasStatus_t
Operations status codes.
Definition: iclBLAS.h:104