This repository was archived by the owner on Aug 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathiclBLAS.h
More file actions
2056 lines (1953 loc) · 101 KB
/
Copy pathiclBLAS.h
File metadata and controls
2056 lines (1953 loc) · 101 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* Copyright (c) 2017-2018 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
/*****************************************************************************/
// exporting symbols from dynamic library
#ifdef EXPORT_ICLBLAS_SYMBOLS
# if defined(_MSC_VER)
// Microsoft
# define ICLBLAS_API __declspec(dllexport)
# elif defined(__GNUC__)
// GCC
# define ICLBLAS_API __attribute__((visibility("default")))
# else
# define ICLBLAS_API
# pragma warning Unknown dynamic link import/export semantics.
# endif
#else //import dll
# if defined(_MSC_VER)
// Microsoft
# define ICLBLAS_API __declspec(dllimport)
# elif defined(__GNUC__)
// GCC
# define ICLBLAS_API
# else
# define ICLBLAS_API
# pragma warning Unknown dynamic link import/export semantics.
# endif
#endif
#if defined(_MSC_VER) || defined(__INTEL_COMPILER) || defined(__ICC)
# define ICLBLAS_ALWAYS_INLINE __forceinline
#elif defined(__GNUC__) || defined(__clang__)
# define ICLBLAS_ALWAYS_INLINE __attribute__((always_inline))
#else
# define ICLBLAS_ALWAYS_INLINE
# pragma message ("warning Unknown always-inline function attribute.")
#endif
/*****************************************************************************/
/*!
* @file iclBLAS.h
* @brief This file contains all of the BLAS related (public) interfaces and objects.
*/
/*
* or more obtusely but canonical reference here: http://www.netlib.org/blas/
* Inside Tensorflow is another view of blas.h https://github.com/tensorflow/tensorflow/blob/master/tensorflow/stream_executor/blas.h
*
* OCL BLAS better name than genBLAS because this interface should work for all opencl implementations (though some kernels may not be available
* if they use special gen extensions like subgroups
*/
/*!
* @brief Complex type definition
*/
#ifdef __cplusplus
# include <complex>
typedef std::complex<float> oclComplex_t;
inline float Creal(const oclComplex_t& a) { return a.real(); }
inline float Cimag(const oclComplex_t& a) { return a.imag(); }
inline void Csetreal(oclComplex_t* a, float r) { a->real(r); }
inline void Csetimag(oclComplex_t* a, float i) { a->imag(i); }
#else
typedef struct _oclComplex_t
{
float val[2]; /*!< real (val[0]) and imaginary (val[1]) parts of complex number */
} oclComplex_t;
ICLBLAS_ALWAYS_INLINE float Creal(struct _oclComplex_t a) { return a.val[0]; }
ICLBLAS_ALWAYS_INLINE float Cimag(struct _oclComplex_t a) { return a.val[1]; }
ICLBLAS_ALWAYS_INLINE void Csetreal(struct _oclComplex_t* a, float r) { a->val[0] = r; }
ICLBLAS_ALWAYS_INLINE void Csetimag(struct _oclComplex_t* a, float i) { a->val[1] = i; }
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*****************************************************************************/
/*!
* @addtogroup datatypes Datatypes
* @{
*/
/*!
* @brief Operations status codes
*
* A more detailed enum description.
*/
typedef enum {
ICLBLAS_STATUS_SUCCESS = 0,
ICLBLAS_STATUS_NOT_INITIALIZED = 1,
ICLBLAS_STATUS_ALLOC_FAILED = 3,
ICLBLAS_STATUS_INVALID_VALUE = 7,
ICLBLAS_STATUS_ARCH_MISMATCH = 8,
ICLBLAS_STATUS_MAPPING_ERROR = 11,
ICLBLAS_STATUS_EXECUTION_FAILED = 13,
ICLBLAS_STATUS_INTERNAL_ERROR = 14,
ICLBLAS_STATUS_NOT_SUPPORTED = 15,
ICLBLAS_STATUS_LICENSE_ERROR = 16,
ICLBLAS_STATUS_ERROR,
} iclblasStatus_t;
/*!
* @brief Opaque structure holding library context
*/
typedef struct iclblasContext *iclblasHandle_t;
/*!
* @brief Indicates operation to be performed.
*/
typedef enum {
ICLBLAS_OP_N = 0, /*!< the non-transpose operation is selected */
ICLBLAS_OP_T = 1, /*!< the transpose operation is selected */
ICLBLAS_OP_C = 2 /*!< the conjugate transpose operation is selected */
} iclblasOperation_t;
/*!
* @brief Indicates which part (lower or upper) of matrix is filled.
*/
typedef enum {
ICLBLAS_FILL_MODE_UPPER = 0, /*!< the upper part of matrix is filled */
ICLBLAS_FILL_MODE_LOWER = 1 /*!< the lower part of matrix is filled */
} iclblasFillMode_t;
/*!
* @brief Indicates whether the main diagonal of matrix is unity.
*
* In case of ::ICLBLAS_DIAG_UNIT the main diagonal is assumed to contain only unit elements and is not referenced.
*/
typedef enum {
ICLBLAS_DIAG_NON_UNIT = 0, /*!< the main diagonal contains non-unit elements */
ICLBLAS_DIAG_UNIT = 1 /*!< the main diagonal contains only unit elements */
} iclblasDiagType_t;
/*!
* @brief Indicates on which side (left or right) the matrix in the equation solved by a function.
*/
typedef enum {
ICLBLAS_SIDE_LEFT = 0, /*!< the matrix is on the left side in equation */
ICLBLAS_SIDE_RIGHT = 1 /*!< the matrix is on the right side in equation */
} iclblasSideMode_t;
/*! @} */
/*****************************************************************************/
/*!
* @addtogroup utilities Utility functions
* @{
*/
/*!
* @brief Create library context
*
* @param handle pointer to store context handle
*/
ICLBLAS_API iclblasStatus_t iclblasCreate(iclblasHandle_t* handle);
/*!
* @brief Destroy library context
*
* @param handle handle to the library context to be destroyed
*/
ICLBLAS_API iclblasStatus_t iclblasDestroy(iclblasHandle_t handle);
/*! @} */
/*****************************************************************************/
/*!
* @addtogroup BLAS_L1_S BLAS Level 1 Single
* @{
*/
/*!
* @brief Copy the elements from the vector x to the vector y
*
* @code
* y = x
* @endcode
* Where @b x and @b y are @b n element vectors
*
* @param[in] handle handle to the library context
* @param[in] n number of elements in @b x and @b y
* @param[in] x vector of size at least @b n * @b incx
* @param[in] incx stride between elements in @b x; should be at least 1
* @param[in,out] y vector of size at least @b n * @b incy
* @param[in] incy stride between elements in @b y; should be at least 1
*/
ICLBLAS_API iclblasStatus_t iclblasScopy(iclblasHandle_t handle, int n, float *x, int incx, float *y, int incy);
/*!
* @brief Multiply the vector by the scalar
*
* @code
* x = alpha * x
* @endcode
* Where @b x is @b n element vector
*
* @param[in] handle handle to the library context
* @param[in] n number of elements in @b x
* @param[in] alpha scalar used in multiplication
* @param[in,out] x vector of size at least @b n * @b incx
* @param[in] incx stride between elements in @b x; should be at least 1
*/
ICLBLAS_API iclblasStatus_t iclblasSscal(iclblasHandle_t handle, int n, const float* alpha, float *x, int incx);
/*!
* @brief Multiply the vector x by the scalar and add it to the vector y
*
* @code
* y = alpha * x + y
* @endcode
* Where @b x and @b y are @b n element vectors
*
* @param[in] handle handle to the library context
* @param[in] n number of elements in @b x and @b y
* @param[in] alpha scalar used in multiplication
* @param[in] x vector of size at least @b n * @b incx
* @param[in] incx stride between elements in @b x; should be at least 1
* @param[in, out] y vector of size at least @b n * @b incy
* @param[in] incy stride between elements in @b y; should be at least 1
*/
ICLBLAS_API iclblasStatus_t iclblasSaxpy(iclblasHandle_t handle, int n, const float* alpha, float *x, int incx, float *y, int incy);
/*!
* @brief Computes the Euclidean norm of the vector x
*
* Where @b x is @b n element vector
*
* @param[in] handle handle to the library context
* @param[in] n number of computed elements
* @param[in] x vector of size at least @b n * @b incx
* @param[in] incx stride between elements in @b x; should be at least 1
* @param[out] result Computed Euclidean norm
*/
ICLBLAS_API iclblasStatus_t iclblasSnrm2(iclblasHandle_t handle, int n, float *x, int incx, float *result);
/*!
* @brief Constructs the modified Givens transformation
*
* @param[in] handle handle to the library context
* @param[in,out] d1 scalar result of the computation
* @param[in,out] d2 scalar result of the computation
* @param[in,out] x1 scalar result of the computation
* @param[in] y1 scalar
* @param[out] params vector of 5 elements, param[0] contain the flag, param[1-4] contain the matrix H
*/
ICLBLAS_API iclblasStatus_t iclblasSrotmg(iclblasHandle_t handle, float *d1, float *d2, float *x1, const float *y1, float* params);
/*!
* @brief Computes the first index of the highest value in vector x
*
* Where @b x is n element vector
*
* @param[in] handle handle to the library context
* @param[in] n number of elements in @b x
* @param[in] x vector of size at least @b n * @b incx
* @param[in] incx stride between elements in @b x; should be at least 1
* @param[out] result calculated index
*/
ICLBLAS_API iclblasStatus_t iclblasIsamax(iclblasHandle_t handle, int n, float* x, int incx, int* result);
/*!
* @brief Computes the first index of the lowest value in vector x
*
* Where @b x is n element vector
*
* @param[in] handle handle to the library context
* @param[in] n number of elements in @b x
* @param[in] x vector of size at least @b n * @b incx
* @param[in] incx stride between elements in @b x; should be at least 1
* @param[out] result calculated index
*/
ICLBLAS_API iclblasStatus_t iclblasIsamin(iclblasHandle_t handle, int n, float* x, int incx, int* result);
/*!
* @brief Interchanges two vectors x and y
*
* @code
* y = x, x = y
* @endcode
* Where @b x and @b y are @b n element vectors
*
* @param[in] handle handle to the library context
* @param[in] n number of elements in @b x and @b y
* @param[in,out] x vector of size at least @b n * @b incx
* @param[in] incx stride between elements in @b x; should be at least 1
* @param[in,out] y vector of size at least @b n * @b incy
* @param[in] incy stride between elements in @b y; should be at least 1
*/
ICLBLAS_API iclblasStatus_t iclblasSswap(iclblasHandle_t handle, int n, float* x, int incx, float* y, int incy);
/*!
* @brief Applies Givens rotation matrix
*
* @param[in] handle handle to the library context
* @param[in] n number of elements in @b x and @b y
* @param[in,out] x vector of size at least @b n * @b incx
* @param[in] incx stride between elements in @b x; should be at least 1
* @param[in,out] y vector of size at least @b n * @b incy
* @param[in] incy stride between elements in @b y; should be at least 1
* @param[in] c cosine of the rotation matrix
* @param[in] s sine of the rotation matrix
*/
ICLBLAS_API iclblasStatus_t iclblasSrot(iclblasHandle_t handle, int n, float* x, int incx, float* y, int incy, float c, float s);
/*!
* @brief Applies modified Givens rotation matrix
*
* @param[in] handle handle to the library context
* @param[in] n number of elements in @b x and @b y
* @param[in,out] x vector of size at least @b n * @b incx
* @param[in] incx stride between elements in @b x; should be at least 1
* @param[in,out] y vector of size at least @b n * @b incy
* @param[in] incy stride between elements in @b y; should be at least 1
* @param[in] param vector of 5 elements, param[0] contain the flag, param[1-4] contain the matrix H
*/
ICLBLAS_API iclblasStatus_t iclblasSrotm(iclblasHandle_t handle, int n, float* x, int incx, float* y, int incy, float* param);
/*!
* @brief Computes the sum of the absolute values from vector x
*
* Where @b x is n elements vector
*
* @param[in] handle handle to the library context
* @param[in] n number of elements in @b x
* @param[in] x vector of size at least @b n * @b incx
* @param[in] incx stride between elements in @b x; should be at least 1
* @param[out] result result of the calculation
*/
ICLBLAS_API iclblasStatus_t iclblasSasum(iclblasHandle_t handle, int n, float* x, int incx, float* result);
/*!
* @brief Creates the Givens rotation matrix
*
* @param[in] handle handle to the library context
* @param[in,out] a scalar, later overwritten with r
* @param[in,out] b scalar, later overwritten with z
* @param[out] c Contains the parameter c associated with the Givens rotation.
* @param[out] s Contains the parameter s associated with the Givens rotation.
*/
ICLBLAS_API iclblasStatus_t iclblasSrotg(iclblasHandle_t handle, float* a, float* b, float* c, float* s);
/*!
* @brief Computes the dot product from vector x and vector y
*
* Where @b x and @b y are @b n elements vectors
*
* @param[in] handle handle to the library context
* @param[in] n number of elements in @b x and @b y
* @param[in] x vector of size at least @b n * @b incx
* @param[in] incx stride between elements in @b x; should be at least 1
* @param[in] y vector of size at least @b n * @b incy
* @param[in] incy stride between elements in @b y; should be at least 1
* @param[out] result result of the calculation
*/
ICLBLAS_API iclblasStatus_t iclblasSdot(iclblasHandle_t handle, int n, float* x, int incx, float* y, int incy, float* result);
/*! @} */
/*****************************************************************************/
/*!
* @addtogroup BLAS_L1_C BLAS Level 1 Complex
* @{
*/
/*!
* @brief Copy the elements from the vector x to the vector y
*
* @code
* y = x
* @endcode
* Where @b x and @b y are @b complex n element vectors
*
* @param[in] handle handle to the library context
* @param[in] n number of elements in @b x and @b y
* @param[in] x vector of size at least @b n * @b incx
* @param[in] incx stride between elements in @b x; should be at least 1
* @param[in,out] y vector of size at least @b n * @b incy
* @param[in] incy stride between elements in @b y; should be at least 1
*/
ICLBLAS_API iclblasStatus_t iclblasCcopy(iclblasHandle_t handle, int n, oclComplex_t *x, int incx, oclComplex_t *y, int incy);
/*!
* @brief Multiply the complex vector by the scalar
*
* @code
* x = alpha * x
* @endcode
* Where @b x is @b complex n element vector
*
* @param[in] handle handle to the library context
* @param[in] n number of elements in @b x
* @param[in] alpha complex scalar used in multiplication
* @param[in,out] x complex vector of size at least @b n * @b incx
* @param[in] incx stride between elements in @b x; should be at least 1
*/
ICLBLAS_API iclblasStatus_t iclblasCscal(iclblasHandle_t handle, int n, const oclComplex_t* alpha, oclComplex_t *x, int incx);
/*!
* @brief Multiply the complex vector by the scalar
*
* @code
* x = alpha * x
* @endcode
* Where @b x is @b complex n element vector
*
* @param[in] handle handle to the library context
* @param[in] n number of elements in @b x
* @param[in] alpha scalar used in multiplication
* @param[in,out] x complex vector of size at least @b n * @b incx
* @param[in] incx stride between elements in @b x; should be at least 1
*/
ICLBLAS_API iclblasStatus_t iclblasCsscal(iclblasHandle_t handle, int n, const float* alpha, oclComplex_t *x, int incx);
/*!
* @brief Interchanges two complex vectors x and y
*
* @code
* y = x, x = y
* @endcode
* Where @b x and @b y are @b complex n element vectors
*
* @param[in] handle handle to the library context
* @param[in] n number of elements in @b x and @b y
* @param[in,out] x complex vector of size at least @b n * @b incx
* @param[in] incx stride between elements in @b x; should be at least 1
* @param[in,out] y complex vector of size at least @b n * @b incy
* @param[in] incy stride between elements in @b y; should be at least 1
*/
ICLBLAS_API iclblasStatus_t iclblasCswap(iclblasHandle_t handle, int n, oclComplex_t* x, int incx, oclComplex_t* y, int incy);
/*!
* @brief Computes the dot product from complex vector x and vector y
*
* @code
* result = x^T * y
* @endcode
* Where @b x and @b y are @b complex n element vectors
*
* @param[in] handle handle to the library context
* @param[in] n number of elements in @b x and @b y
* @param[in] x complex vector of size at least @b n * @b incx
* @param[in] incx stride between elements in @b x; should be at least 1
* @param[in] y complex vector of size at least @b n * @b incy
* @param[in] incy stride between elements in @b y; should be at least 1
* @param[out] result calculated dot product
*/
ICLBLAS_API iclblasStatus_t iclblasCdotu(iclblasHandle_t handle, int n, oclComplex_t* x, int incx, oclComplex_t* y, int incy, oclComplex_t* result);
/*!
* @brief Computes the Euclidean norm of the complex vector x
*
* Where @b x is @b n element vector
*
* @param[in] handle handle to the library context
* @param[in] n number of computed elements
* @param[in] x vector of size at least @b n * @b incx
* @param[in] incx stride between elements in @b x; should be at least 1
* @param[out] result Computed Euclidean norm
*/
ICLBLAS_API iclblasStatus_t iclblasScnrm2(iclblasHandle_t handle, int n, oclComplex_t* x, int incx, float* result);
/*!
* @brief Computes the first index of the highest magnitude value in complex vector x
*
* Where @b x is complex n element vector
*
* @param[in] handle handle to the library context
* @param[in] n number of elements in @b x
* @param[in] x complex vector of size at least @b n * @b incx
* @param[in] incx stride between elements in @b x; should be at least 1
* @param[out] result calculated index
*/
ICLBLAS_API iclblasStatus_t iclblasIcamax(iclblasHandle_t handle, int n, oclComplex_t* x, int incx, int* result);
/*!
* @brief Computes the first index of the lowest magnitude value in complex vector x
*
* Where @b x is complex n element vector
*
* @param[in] handle handle to the library context
* @param[in] n number of elements in @b x
* @param[in] x complex vector of size at least @b n * @b incx
* @param[in] incx stride between elements in @b x; should be at least 1
* @param[in,out] result calculated index
*/
ICLBLAS_API iclblasStatus_t iclblasIcamin(iclblasHandle_t handle, int n, oclComplex_t* x, int incx, int* result);
/*!
* @brief Multiply the complex vector x by the complex scalar and add it to the complex vector y
*
* @code
* y = alpha * x + y
* @endcode
* Where @b x and @b y are @b complex n element vectors
*
* @param[in] handle handle to the library context
* @param[in] n number of elements in @b x and @b y
* @param[in] alpha complex scalar used in multiplication
* @param[in] x complex vector of size at least @b n * @b incx
* @param[in] incx stride between elements in @b x; should be at least 1
* @param[in,out] y complex vector of size at least @b n * @b incy
* @param[in] incy stride between elements in @b y; should be at least 1
*/
ICLBLAS_API iclblasStatus_t iclblasCaxpy(iclblasHandle_t handle, int n, const oclComplex_t* alpha, oclComplex_t* x, int incx, oclComplex_t* y, int incy);
/*!
* @brief Creates the Givens rotation matrix
*
* @param[in] handle handle to the library context
* @param[in,out] a complex scalar, later overwritten with r
* @param[in,out] b complex scalar, later overwritten with z
* @param[out] c Contains the parameter c associated with the Givens rotation.
* @param[out] s complex Contains the parameter s associated with the Givens rotation.
*/
ICLBLAS_API iclblasStatus_t iclblasCrotg(iclblasHandle_t handle, oclComplex_t* a, oclComplex_t* b, float* c, oclComplex_t* s);
/*!
* @brief Computes the dot product from complex vector x and vector y
*
* @code
* result = x^H * y
* @endcode
* Where @b x and @b y are @b complex n element vectors;
* and `H` - complex conjugation on elements of @b x
*
* @param[in] handle handle to the library context
* @param[in] n number of elements in @b x and @b y
* @param[in] x complex vector of size at least @b n * @b incx
* @param[in] incx stride between elements in @b x; should be at least 1
* @param[in] y complex vector of size at least @b n * @b incy
* @param[in] incy stride between elements in @b y; should be at least 1
* @param[out] result calculated dot product
*/
ICLBLAS_API iclblasStatus_t iclblasCdotc(iclblasHandle_t handle, int n, oclComplex_t* x, int incx, oclComplex_t* y, int incy, oclComplex_t* result);
/*!
* @brief Applies Givens rotation matrix
*
* @param[in] handle handle to the library context
* @param[in] n number of elements in @b x and @b y
* @param[in,out] x complex vector of size at least @b n * @b incx
* @param[in] incx stride between elements in @b x; should be at least 1
* @param[in,out] y complex vector of size at least @b n * @b incy
* @param[in] incy stride between elements in @b y; should be at least 1
* @param[in] c cosine of the rotation matrix
* @param[in] s sine of the rotation matrix
*/
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);
/*!
* @brief Applies Givens rotation matrix
*
* @param[in] handle handle to the library context
* @param[in] n number of elements in @b x and @b y
* @param[in,out] x complex vector of size at least @b n * @b incx
* @param[in] incx stride between elements in @b x; should be at least 1
* @param[in,out] y complex vector of size at least @b n * @b incy
* @param[in] incy stride between elements in @b y; should be at least 1
* @param[in] c cosine of the rotation matrix
* @param[in] s sine of the rotation matrix
*/
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);
/*!
* @brief Computes the sum of the absolute values from vector x
*
* Where @b x is n elements vector
*
* @param[in] handle handle to the library context
* @param[in] n number of elements in @b x
* @param[in] x vector of size at least @b n * @b incx
* @param[in] incx stride between elements in @b x; should be at least 1
* @param[out] result result of the calculation
*/
ICLBLAS_API iclblasStatus_t iclblasScasum(iclblasHandle_t handle, int n, oclComplex_t *x, int incx, float* result);
/*! @} */
/*****************************************************************************/
/*!
* @addtogroup BLAS_L2_S BLAS Level 2 Single
* @{
*/
/*!
* @brief Solves triangular linear system with single right-hand side
*
* @code
* op(A) * x = b
* @endcode
* Where @b b and @b x are @b n element vectors and @b A is @b n by @b n, unit or non-unit, upper or lower triangular matrix.
*
* Equation to be solved is specified by value of @b trans as follows:
* @code
* trans == ICLBLAS_OP_N op(A) = A
*
* trans == ICLBLAS_OP_T op(A) = A ^ T
*
* trans == ICLBLAS_OP_C op(A) = A ^ T
* @endcode
*
* On exit solution @b x overwrites right-hand side vector @b b.
*
* No test for singularity or near-singularity is included in this routine.
*
* @param[in] handle handle to the library context
* @param[in] uplo indicates if matrix @b A is an upper or lower triangular
* @param[in] trans indicates equation to be solved as operation on @b A
* @param[in] diag indicates if matrix @b A is unit or non-unit triangular
* @param[in] n specifies order of matrix @b A; should be at least 0
* @param[in] A array of size [@b lda x @b n] storing matrix @b A
* @param[in] lda first dimension of @b A; should be at least max(1, @b n)
* @param[in,out] x array of size at least @b n * @b incx; on entry stores vector @b b, overwritten by vector @b x on exit
* @param[in] incx stride between elements in @b x; should be at least 1
*/
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);
/*!
* @brief Solves triangular banded linear system with single right-hand side
*
* @code
* op(A) * x = b
* @endcode
* Where @b b and @b x are @b n element vectors and @b A is @b n by @b n, unit or non-unit, upper or lower triangular banded matrix with @b k sub- or super-diagonals.
*
* Operation on matrix @b A when solving is specified by value of @b trans as follows:
* @code
* trans == ICLBLAS_OP_N op(A) = A
*
* trans == ICLBLAS_OP_T op(A) = A ^ T
*
* trans == ICLBLAS_OP_C op(A) = A ^ T
* @endcode
*
* If `uplo == ::ICLBLAS_FILL_MODE_UPPER` then the matrix @b A is stored column by column with element `A(i, j)` at location `A(k + i - j, j)` in memory.
* The elements that don't correspond to elements in banded matrix (the top left @b k x @b k triangle) are not referenced.
*
* If `uplo == ::ICLBLAS_FILL_MODE_LOWER` then the matrix @b A is stored column by column with element `A(i, j)` at location `A(i - j, j)` in memory.
* The elements that don't correspond to elements in banded matrix (the bottom right @b k x @b k triangle) are not referenced.
*
* On exit solution @b x overwrites right-hand side vector @b b.
*
* No test for singularity or near-singularity is included in this routine.
*
* @param[in] handle handle to the library context
* @param[in] uplo indicates if matrix @b A is an upper or lower triangular
* @param[in] trans indicates equation to be solved as operation on @b A
* @param[in] diag indicates if matrix @b A is unit or non-unit triangular
* @param[in] n specifies order of matrix @b A; should be at least 0
* @param[in] k number of sub- or super-diagonals of matrix @b A; should be at least 0
* @param[in] A array of size [@b lda x @b n] storing matrix @b A
* @param[in] lda first dimension of @b A; should be at least @b k + 1
* @param[in,out] x array of size at least @b n * @b incx; on entry stores vector @b b, overwritten by vector @b x on exit
* @param[in] incx stride between elements in @b x; should be at least 1
*/
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);
/*!
* @brief Solves packed triangular linear system with single right-hand side
*
* @code
* op(A) * x = b
* @endcode
* Where @b b and @b x are @b n element vectors and @b A is @b n by @b n, unit or non-unit, upper or lower triangular matrix stored in packed format.
*
* Equation to be solved is specified by value of @b trans as operation on @b A.
* @code
* trans == ICLBLAS_OP_N op(A) = A
*
* trans == ICLBLAS_OP_T op(A) = A ^ T
*
* trans == ICLBLAS_OP_C op(A) = A ^ T
* @endcode
*
* If `uplo == ::ICLBLAS_FILL_MODE_UPPER` then the matrix @b A is packed column by column with element `A(i, j)` stored in memory at location `AP[(j + 1) * j / 2 + i]`.
*
* If `uplo == ::ICLBLAS_FILL_MODE_LOWER` then the matrix @b A is packed column by column with element `A(i, j)` stored in memory at location `AP[(2 * n - j - 1) * j / 2 + i]`.
*
* On exit solution @b x overwrites right-hand side vector @b b.
*
* No test for singularity or near-singularity is included in this routine.
*
* @param[in] handle handle to the library context
* @param[in] uplo indicates if matrix @b A is an upper or lower triangular
* @param[in] trans indicates equation to be solved as operation on @b A
* @param[in] diag indicates if matrix @b A is unit or non-unit triangular
* @param[in] n specifies order of matrix @b A; should be at least 0
* @param[in] AP array of size at least @b n * (@b n + 1) / 2 containing matrix @b A stored in packed format
* @param[in,out] x array of size at least @b n * @b incx; on entry stores vector @b b, overwritten by vector @b x on exit
* @param[in] incx stride between elements in @b x; should be at least 1
*/
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);
/*!
* @brief Performs general matrix rank 1 update
*
* @code
* A = alpha * x * y ^ T + A
* @endcode
* Where @b alpha is scalar, @b x is @b m element vector, @b y is @b n elements vector and @b A is @b m by @b n matrix.
*
* @param[in] handle handle to the library context
* @param[in] m number of rows in matrix @b A; should be at least 0
* @param[in] n number of columns in matrix @b A; should be at least 0
* @param[in] alpha scalar used in multiplication
* @param[in] x vector of size at least @b m * @b incx
* @param[in] incx stride between elements in @b x; should be at least 1
* @param[in] y vector of size at least @b n * @b incy
* @param[in] incy stride between elements in @b y; should be at least 1
* @param[in,out] A array of size [@b lda x @b n] storing matrix @b A
* @param[in] lda leading dimension of @b A; should be at least max(1, @b m)
*/
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);
/*!
* @brief Performs symmetrix matrix rank 2 update
*
* @code
* A = alpha * ( x * y ^ T + y * x ^ T ) + A
* @endcode
* Where @b alpha is scalar, @b x and @b y are @b n element vectors, and @b A is @b n by @b n symmetric matrix, stored in upper or lower mode.
*
* @param[in] handle handle to the library context
* @param[in] uplo indicates if upper or lower part of matrix is stored in @b A
* @param[in] n number of rows and columns in matrix @b A; should be at least 0
* @param[in] alpha scalar used in multiplication
* @param[in] x vector of size at least @b n * @b incx
* @param[in] incx stride between elements in @b x; should be at least 1
* @param[in] y vector of size at least @b n * @b incy
* @param[in] incy stride between elements in @b y; should be at least 1
* @param[in,out] A array of size [@b lda x @b n] storing matrix @b A
* @param[in] lda leading dimension of @b A; should be at least max(1, @b n)
*/
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);
/*!
* @brief Performs symmetrix matrix rank 1 update
*
* @code
* A = alpha * x * x ^ T + A
* @endcode
* Where @b alpha is scalar, @b x is @b n element vector and @b A is @b n by @b n symmetric matrix, stored in upper or lower mode.
*
* @param[in] handle handle to the library context
* @param[in] uplo indicates if upper or lower part of matrix is stored in @b A
* @param[in] n number of rows and columns in matrix @b A; should be at least 0
* @param[in] alpha scalar used in multiplication
* @param[in] x vector of size at least @b n * @b incx
* @param[in] incx stride between elements in @b x; should be at least 1
* @param[in,out] A array of size [@b lda x @b n] storing matrix @b A
* @param[in] lda leading dimension of @b A; should be at least max(1, @b n)
*/
ICLBLAS_API iclblasStatus_t iclblasSsyr(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, const float* alpha, float*x, int incx, float* A, int lda);
/*!
* @brief Performs triangular matrix by vector multiplication
*
* @code
* x = op(A) * x
* @endcode
* Where @b x is @b n element vector, @b A is @b n by @b n, upper or lower, unit or non-unit triangular matrix, and `op(A)` is indicated by value of @b trans as follows:
* @code
* trans == ICLBLAS_OP_N op(A) = A
*
* trans == ICLBLAS_OP_T op(A) = A ^ T
*
* trans == ICLBLAS_OP_C op(A) = A ^ T
* @endcode
*
* @param[in] handle handle to the library context
* @param[in] uplo indicates if @b A is upper or lower triangular
* @param[in] trans indicates operation used for multiplication
* @param[in] diag indicates if @b A is unit or non-unit triangular
* @param[in] n number of rows and columns in @b A; should be at least 0
* @param[in] A array of size [@b lda x @b n] storing matrix @b A
* @param[in] lda leading dimension of @b A; should be at least max(1, @b n)
* @param[in,out] x vector of size at least @b n * @b incx
* @param[in] incx stride between elements of @b x; should be at least 1
*/
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);
/*!
* @brief Performs triangular banded matrix by vector multiplication
*
* @code
* x = op(A) * x
* @endcode
* Where @b x is @b n element vector, @b A is @b n by @b n, upper or lower, unit or non-unit triangular banded matrix with @b k sub- or super-diagonals,
* and `op(A)` is indicated by value of @b trans as follows:
* @code
* trans == ICLBLAS_OP_N op(A) = A
*
* trans == ICLBLAS_OP_T op(A) = A ^ T
*
* trans == ICLBLAS_OP_C op(A) = A ^ T
* @endcode
*
* If `uplo == ::ICLBLAS_FILL_MODE_UPPER` then the matrix @b A is stored column by column with element `A(i, j)` at location `A(k + i - j, j)` in memory.
* The elements that don't correspond to elements in banded matrix (the top left @b k x @b k triangle) are not referenced.
*
* If `uplo == ::ICLBLAS_FILL_MODE_LOWER` then the matrix @b A is stored column by column with element `A(i, j)` at location `A(i - j, j)` in memory.
* The elements that don't correspond to elements in banded matrix (the bottom right @b k x @b k triangle) are not referenced.
*
* @param[in] handle handle to the library context
* @param[in] uplo indicates if @b A is upper or lower triangular
* @param[in] trans indicates operation used for multiplication
* @param[in] diag indicates if @b A is unit or non-unit triangular
* @param[in] n number of rows and columns in @b A; should be at least 0
* @param[in] k number of sub- or super-diagonals of matrix @b A; should be at least 0
* @param[in] A array of size [@b lda x @b n] storing matrix @b A
* @param[in] lda leading dimension of @b A; should be at least @b k + 1
* @param[in,out] x vector of size at least @b n * @b incx
* @param[in] incx stride between elements of @b x; should be at least 1
*/
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);
/*!
* @brief Performs general banded matrix by vector multiplication
*
* @code
* y = alpha * op(A) * x + beta * y
* @endcode
* Where @b alpha and @b beta are scalars, @b x and @b y are vectors, @b A is @b m by @b n banded matrix with @b kl subdiagonals and @b ku superdiagonals,
* and `op(A)` is indicated by value of @b trans as follows:
* @code
* trans == ICLBLAS_OP_N op(A) = A
*
* trans == ICLBLAS_OP_T op(A) = A ^ T
*
* trans == ICLBLAS_OP_C op(A) = A ^ T
* @endcode
*
* Matrix @b A is stored coulumn by column with element `A(i, j)` at location `A(ku + i - j, j)` in memory.
* The elements that do not correspond to elements in banded matrix (top left @b ku x @b ku and bottom right @b kl x @b kl triangles) are not referenced.
*
* @param[in] handle handle to the library context
* @param[in] trans indicates operation used for multiplication
* @param[in] m number of rows in matrix @b A; should be at least 0
* @param[in] n number of columns in matrix @b A; should be at least 0
* @param[in] kl number of subdiagonals in matrix @b A; should be at least 0
* @param[in] ku number of superdiagonals in matrix @b A; should be at least 0
* @param[in] alpha scalar used in multiplication
* @param[in] A array of size [@b lda x @b n]
* @param[in] lda leading dimension of @b A; should be at least @b kl + @b ku + 1
* @param[in] x vector of size at least @b n * @b incx if `trans == ICLBLAS_OP_N` and @b m * @b incx otherwise
* @param[in] incx stride between elements in @b x; should be at least 1
* @param[in] beta scalar used for multiplication; if `beta == 0`, @b y does not have to be initialized
* @param[in,out] y vector of size at least @b m * @b incy if `trans == ICLBLAS_OP_N` and @b n * @b incy otherwise
* @param[in] incy stride between elements of @b y; should be at least 1
*/
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);
/*!
* @brief Performs packed triangular matrix by vector multiplication
*
* @code
* x = op(A) * x
* @endcode
* Where @b x is @b n element vector, @b A is @b n by @b n, unit or non-unit, upper or lower triangular matrix stored in packed format,
* and `op(A)` is indicated by value of @b trans as follows:
* @code
* trans == ICLBLAS_OP_N op(A) = A
*
* trans == ICLBLAS_OP_T op(A) = A ^ T
*
* trans == ICLBLAS_OP_C op(A) = A ^ T
* @endcode
*
* If `uplo == ::ICLBLAS_FILL_MODE_UPPER` then the matrix @b A is packed column by column with element `A(i, j)` stored in memory at location `AP[(j + 1) * j / 2 + i]`.
*
* If `uplo == ::ICLBLAS_FILL_MODE_LOWER` then the matrix @b A is packed column by column with element `A(i, j)` stored in memory at location `AP[(2 * n - j - 1) * j / 2 + i]`.
*
* @param[in] handle handle to the library context
* @param[in] uplo indicates if @b A is upper or lower triangular
* @param[in] trans indicates operation used for multiplication
* @param[in] diag indicates if @b A is unit or non-unit triangular
* @param[in] n number of rows and columns of matrix @b A; should be at least 0
* @param[in] AP array of size at least @b n * (@b n + 1) / 2 containing matrix @b A stored in packed format
* @param[in,out] x vector of size at least @b n * @b incx
* @param[in] incx stride between elements of @b x; should be at least 1
*/
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);
/*!
* @brief Performs symmetric banded matrix by vector multiplication
*
* @code
* y = alpha * A * x + beta * y
* @endcode
* Where @b alpha and @b beta are scalars, @b x and @b y are @b n element vectors, @b A is @b n by @b n symmetric banded matrix with @b k subdiagonals and superdiagonals.
*
* If `uplo == ::ICLBLAS_FILL_MODE_UPPER` then the matrix @b A is stored column by column with element `A(i, j)` at location `A(k + i - j, j)` in memory.
* The elements that don't correspond to elements in banded matrix (the top left @b k x @b k triangle) are not referenced.
*
* If `uplo == ::ICLBLAS_FILL_MODE_LOWER` then the matrix @b A is stored column by column with element `A(i, j)` at location `A(i - j, j)` in memory.
* The elements that don't correspond to elements in banded matrix (the bottom right @b k x @b k triangle) are not referenced.
*
* @param[in] handle handle to the library context
* @param[in] uplo indicates if upper or lower part of matrix is stored in @b A
* @param[in] n number of rows and columns of @b A; should be at least 0
* @param[in] k number of sub- and super-diagonals of matrix @b A; should be at least 0
* @param[in] alpha scalar used in multiplication
* @param[in] A array of size [@b lda x @b n] storing matrix @b A
* @param[in] lda leading dimension of @b A; should be at least @b k + 1
* @param[in] x vector of size at least @b n * @b incx
* @param[in] incx stride between elements of @b x; should be at least 1
* @param[in] beta scalar used in multiplication; if `beta == 0`, @b y does not have to be initialized
* @param[in,out] y vector of size at least @b n * @b incy
* @param[in] incy stride between elements of @b y; should be at least 1
*/
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);
/*!
* @brief Performs packed symmetric matrix by vector multiplication
*
* @code
* y = alpha * A * x + beta * y
* @endcode
* Where @b alpha and @b beta are scalars, @b x and @b y are @b n element vectors, @b A is @b n by @b n symmetric matrix stored in packed format.
*
* If `uplo == ::ICLBLAS_FILL_MODE_UPPER` then the matrix @b A is packed column by column with element `A(i, j)` stored in memory at location `AP[(j + 1) * j / 2 + i]`.
*
* If `uplo == ::ICLBLAS_FILL_MODE_LOWER` then the matrix @b A is packed column by column with element `A(i, j)` stored in memory at location `AP[(2 * n - j - 1) * j / 2 + i]`.
*
* @param[in] handle handle to the library context
* @param[in] uplo indicates if upper or lower part of matrix is stored in @b AP
* @param[in] n number of rows and columns of matrix @b A; should be at least 0
* @param[in] alpha scalar used in multiplication
* @param[in] AP array of size at least @b n * (@b n + 1) / 2 containing matrix @b A stored in packed format
* @param[in] x vector of size at least @b n * @b incx
* @param[in] incx stride between elements of @b x; should be at least 1
* @param[in] beta scalar used in multiplication; if `beta == 0`, @b y does not have to be initialized
* @param[in,out] y vector of size at least @b n * @b incy
* @param[in] incy stride between elements of @b y; should be at least 1
*/
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);
/*!
* @brief Performs packed symmetric matrix rank 2 update
*
* @code
* A = alpha * ( x * y ^ T + y * x ^ T ) + A
* @endcode
* Where @b alpha is a scalar, @b x and @b y are @b n element vectors and @b A is @b n by @b n symmetric matrix stored in packed format.
*
* If `uplo == ::ICLBLAS_FILL_MODE_UPPER` then the matrix @b A is packed column by column with element `A(i, j)` stored in memory at location `AP[(j + 1) * j / 2 + i]`.
*
* If `uplo == ::ICLBLAS_FILL_MODE_LOWER` then the matrix @b A is packed column by column with element `A(i, j)` stored in memory at location `AP[(2 * n - j - 1) * j / 2 + i]`.
*
* @param[in] handle handle to the library context
* @param[in] uplo indicates if upper or lower part of matrix is stored in @b AP
* @param[in] n number of rows and columns in @b A; should be at least 0
* @param[in] alpha scalar used in multiplication
* @param[in] x vector of size at least @b n * @b incx
* @param[in] incx stride between elements of @b x; should be at least 1
* @param[in] y vector of size at least @b n * @b incy
* @param[in] incy stride between elements of @b y; should be at least 1
* @param[in,out] AP array of size at least @b n * (@b n + 1) / 2 containing matrix @b A stored in packed format
*/
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);
/*!
* @brief Performs packed symmetric matrix rank 1 update
*
* @code
* A = alpha * x * x ^ T + A
* @endcode
* Where @b alpha is a scalar, @b x is @b n element vector and @b A is @b n by @b n symmetric matrix stored in packed format.
*
* If `uplo == ::ICLBLAS_FILL_MODE_UPPER` then the matrix @b A is packed column by column with element `A(i, j)` stored in memory at location `AP[(j + 1) * j / 2 + i]`.
*
* If `uplo == ::ICLBLAS_FILL_MODE_LOWER` then the matrix @b A is packed column by column with element `A(i, j)` stored in memory at location `AP[(2 * n - j - 1) * j / 2 + i]`.
*
* @param[in] handle handle to the library context
* @param[in] uplo indicates if upper or lower part of matrix is stored in @b AP
* @param[in] n number of rows and columns in @b A; should be at least 0
* @param[in] alpha scalar used in multiplication
* @param[in] x vector of size at least @b n * @b incx
* @param[in] incx stride between elements of @b x; should be at least 1
* @param[in,out] AP array of size at least @b n * (@b n + 1) / 2 containing matrix @b A stored in packed format
*/
ICLBLAS_API iclblasStatus_t iclblasSspr(iclblasHandle_t handle, iclblasFillMode_t uplo, int n, const float* alpha, float *x, int incx, float* AP);
/*!
* @brief Performs symmetric matrix by vector multiplication
*