Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
cusparse.h6107 linesDownload Raw Back to include
1/*
2 * Copyright 1993-2023 NVIDIA Corporation.  All rights reserved.
3 *
4 * NOTICE TO LICENSEE:
5 *
6 * This source code and/or documentation ("Licensed Deliverables") are
7 * subject to NVIDIA intellectual property rights under U.S. and
8 * international Copyright laws.
9 *
10 * These Licensed Deliverables contained herein is PROPRIETARY and
11 * CONFIDENTIAL to NVIDIA and is being provided under the terms and
12 * conditions of a form of NVIDIA software license agreement by and
13 * between NVIDIA and Licensee ("License Agreement") or electronically
14 * accepted by Licensee.  Notwithstanding any terms or conditions to
15 * the contrary in the License Agreement, reproduction or disclosure
16 * of the Licensed Deliverables to any third party without the express
17 * written consent of NVIDIA is prohibited.
18 *
19 * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
20 * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
21 * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE.  IT IS
22 * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
23 * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
24 * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
25 * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
26 * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
27 * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
28 * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
29 * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
30 * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
31 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
32 * OF THESE LICENSED DELIVERABLES.
33 *
34 * U.S. Government End Users.  These Licensed Deliverables are a
35 * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
36 * 1995), consisting of "commercial computer software" and "commercial
37 * computer software documentation" as such terms are used in 48
38 * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
39 * only as a commercial end item.  Consistent with 48 C.F.R.12.212 and
40 * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
41 * U.S. Government End Users acquire the Licensed Deliverables with
42 * only those rights set forth herein.
43 *
44 * Any use of the Licensed Deliverables in individual and commercial
45 * software must include, in the user documentation and internal
46 * comments to the code, the above Disclaimer and U.S. Government End
47 * Users Notice.
48 */
49#if !defined(CUSPARSE_H_)
50#define CUSPARSE_H_
51
52#include <cuComplex.h>        // cuComplex
53#include <cuda_runtime_api.h> // cudaStream_t
54#include <library_types.h>    // CUDA_R_32F
55#include <stdint.h>           // int64_t
56#include <stdio.h>            // FILE*
57
58#if defined(__cplusplus)
59#   include <cuda_fp16.h>     // __half
60#endif // defined(__cplusplus)
61
62//##############################################################################
63//# CUSPARSE VERSION INFORMATION
64//##############################################################################
65
66#define CUSPARSE_VER_MAJOR 12
67#define CUSPARSE_VER_MINOR 3
68#define CUSPARSE_VER_PATCH 1
69#define CUSPARSE_VER_BUILD 170
70#define CUSPARSE_VERSION (CUSPARSE_VER_MAJOR * 1000 + \
71                          CUSPARSE_VER_MINOR *  100 + \
72                          CUSPARSE_VER_PATCH)
73
74// #############################################################################
75// # BASIC MACROS
76// #############################################################################
77
78#if !defined(CUSPARSEAPI)
79#    if defined(_WIN32)
80#        define CUSPARSEAPI __stdcall
81#    else
82#        define CUSPARSEAPI
83#    endif
84#endif
85
86//------------------------------------------------------------------------------
87
88#if !defined(_MSC_VER)
89#   define CUSPARSE_CPP_VERSION __cplusplus
90#elif _MSC_FULL_VER >= 190024210 // Visual Studio 2015 Update 3
91#   define CUSPARSE_CPP_VERSION _MSVC_LANG
92#else
93#   define CUSPARSE_CPP_VERSION 0
94#endif
95
96// #############################################################################
97// # CUSPARSE_DEPRECATED MACRO
98// #############################################################################
99
100#if !defined(DISABLE_CUSPARSE_DEPRECATED)
101
102#   if CUSPARSE_CPP_VERSION >= 201402L
103
104#       define CUSPARSE_DEPRECATED_REPLACE_WITH(new_func)                      \
105            [[deprecated("please use " #new_func " instead")]]
106
107#       define CUSPARSE_DEPRECATED                                             \
108         [[deprecated("The routine will be removed in the next major release")]]
109
110#       define CUSPARSE_DEPRECATED_TYPE                                        \
111         [[deprecated("The type will be removed in the next major release")]]
112
113#       define CUSPARSE_DEPRECATED_TYPE_MSVC
114
115#   elif defined(_MSC_VER)
116
117#       define CUSPARSE_DEPRECATED_REPLACE_WITH(new_func)                      \
118            __declspec(deprecated("please use " #new_func " instead"))
119
120#       define CUSPARSE_DEPRECATED                                             \
121            __declspec(deprecated(                                             \
122                "The routine will be removed in the next major release"))
123
124#       define CUSPARSE_DEPRECATED_TYPE
125
126#       define CUSPARSE_DEPRECATED_TYPE_MSVC
127            __declspec(deprecated(                                             \
128                "The type will be removed in the next major release"))
129
130#   elif defined(__INTEL_COMPILER) || defined(__clang__) ||                    \
131         (defined(__GNUC__) &&                                                 \
132          (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)))
133
134#       define CUSPARSE_DEPRECATED_REPLACE_WITH(new_func)                      \
135            __attribute__((deprecated("please use " #new_func " instead")))
136
137#       define CUSPARSE_DEPRECATED                                             \
138            __attribute__((deprecated(                                         \
139                "The routine will be removed in the next major release")))
140
141#       define CUSPARSE_DEPRECATED_TYPE                                        \
142            __attribute__((deprecated(                                         \
143                "The type will be removed in the next major release")))
144
145#       define CUSPARSE_DEPRECATED_TYPE_MSVC
146
147#   elif defined(__GNUC__) || defined(__xlc__)
148
149#       define CUSPARSE_DEPRECATED_REPLACE_WITH(new_func)                      \
150            __attribute__((deprecated))
151
152#       define CUSPARSE_DEPRECATED      __attribute__((deprecated))
153#       define CUSPARSE_DEPRECATED_TYPE __attribute__((deprecated))
154#       define CUSPARSE_DEPRECATED_TYPE_MSVC
155
156#   else
157
158#       define CUSPARSE_DEPRECATED_REPLACE_WITH(new_func)
159#       define CUSPARSE_DEPRECATED
160#       define CUSPARSE_DEPRECATED_TYPE
161#       define CUSPARSE_DEPRECATED_TYPE_MSVC
162
163#   endif // defined(__cplusplus) && __cplusplus >= 201402L
164//------------------------------------------------------------------------------
165
166#   if CUSPARSE_CPP_VERSION >= 201703L
167
168#       define CUSPARSE_DEPRECATED_ENUM_REPLACE_WITH(new_enum)                 \
169            [[deprecated("please use " #new_enum " instead")]]
170
171#       define CUSPARSE_DEPRECATED_ENUM                                        \
172            [[deprecated("The enum will be removed in the next major release")]]
173
174#   elif defined(__clang__) ||                                                 \
175         (defined(__GNUC__) && __GNUC__ >= 6 && !defined(__PGI))
176
177#       define CUSPARSE_DEPRECATED_ENUM_REPLACE_WITH(new_enum)                 \
178            __attribute__((deprecated("please use " #new_enum " instead")))
179
180#       define CUSPARSE_DEPRECATED_ENUM                                        \
181            __attribute__((deprecated(                                         \
182                "The enum will be removed in the next major release")))
183
184#   else
185
186#       define CUSPARSE_DEPRECATED_ENUM_REPLACE_WITH(new_enum)
187#       define CUSPARSE_DEPRECATED_ENUM
188
189#   endif // defined(__cplusplus) && __cplusplus >= 201402L
190
191#else // defined(DISABLE_CUSPARSE_DEPRECATED)
192
193#   define CUSPARSE_DEPRECATED_REPLACE_WITH(new_func)
194#   define CUSPARSE_DEPRECATED
195#   define CUSPARSE_DEPRECATED_TYPE
196#   define CUSPARSE_DEPRECATED_TYPE_MSVC
197#   define CUSPARSE_DEPRECATED_ENUM_REPLACE_WITH(new_enum)
198#   define CUSPARSE_DEPRECATED_ENUM
199
200#endif // !defined(DISABLE_CUSPARSE_DEPRECATED)
201
202#undef CUSPARSE_CPP_VERSION
203
204//------------------------------------------------------------------------------
205
206#if defined(__cplusplus)
207extern "C" {
208#endif // defined(__cplusplus)
209
210//##############################################################################
211//# OPAQUE DATA STRUCTURES
212//##############################################################################
213
214struct cusparseContext;
215typedef struct cusparseContext* cusparseHandle_t;
216
217struct cusparseMatDescr;
218typedef struct cusparseMatDescr* cusparseMatDescr_t;
219
220struct bsrsv2Info;
221typedef CUSPARSE_DEPRECATED_TYPE_MSVC
222struct bsrsv2Info* bsrsv2Info_t CUSPARSE_DEPRECATED_TYPE;
223
224struct bsrsm2Info;
225typedef CUSPARSE_DEPRECATED_TYPE_MSVC
226struct bsrsm2Info* bsrsm2Info_t CUSPARSE_DEPRECATED_TYPE;
227
228struct csric02Info;
229typedef CUSPARSE_DEPRECATED_TYPE_MSVC
230struct csric02Info* csric02Info_t CUSPARSE_DEPRECATED_TYPE;
231
232struct bsric02Info;
233typedef CUSPARSE_DEPRECATED_TYPE_MSVC
234struct bsric02Info* bsric02Info_t CUSPARSE_DEPRECATED_TYPE;
235
236struct csrilu02Info;
237typedef CUSPARSE_DEPRECATED_TYPE_MSVC
238struct csrilu02Info* csrilu02Info_t CUSPARSE_DEPRECATED_TYPE;
239
240struct bsrilu02Info;
241typedef CUSPARSE_DEPRECATED_TYPE_MSVC
242struct bsrilu02Info* bsrilu02Info_t CUSPARSE_DEPRECATED_TYPE;
243
244struct csru2csrInfo;
245typedef CUSPARSE_DEPRECATED_TYPE_MSVC
246struct csru2csrInfo* csru2csrInfo_t CUSPARSE_DEPRECATED_TYPE;
247
248struct cusparseColorInfo;
249typedef CUSPARSE_DEPRECATED_TYPE_MSVC
250struct cusparseColorInfo* cusparseColorInfo_t CUSPARSE_DEPRECATED_TYPE;
251
252struct pruneInfo;
253typedef CUSPARSE_DEPRECATED_TYPE_MSVC
254struct pruneInfo* pruneInfo_t CUSPARSE_DEPRECATED_TYPE;
255
256//##############################################################################
257//# ENUMERATORS
258//##############################################################################
259
260typedef enum {
261    CUSPARSE_STATUS_SUCCESS                   = 0,
262    CUSPARSE_STATUS_NOT_INITIALIZED           = 1,
263    CUSPARSE_STATUS_ALLOC_FAILED              = 2,
264    CUSPARSE_STATUS_INVALID_VALUE             = 3,
265    CUSPARSE_STATUS_ARCH_MISMATCH             = 4,
266    CUSPARSE_STATUS_MAPPING_ERROR             = 5,
267    CUSPARSE_STATUS_EXECUTION_FAILED          = 6,
268    CUSPARSE_STATUS_INTERNAL_ERROR            = 7,
269    CUSPARSE_STATUS_MATRIX_TYPE_NOT_SUPPORTED = 8,
270    CUSPARSE_STATUS_ZERO_PIVOT                = 9,
271    CUSPARSE_STATUS_NOT_SUPPORTED             = 10,
272    CUSPARSE_STATUS_INSUFFICIENT_RESOURCES    = 11
273} cusparseStatus_t;
274
275typedef enum {
276    CUSPARSE_POINTER_MODE_HOST   = 0,
277    CUSPARSE_POINTER_MODE_DEVICE = 1
278} cusparsePointerMode_t;
279
280typedef enum {
281    CUSPARSE_ACTION_SYMBOLIC = 0,
282    CUSPARSE_ACTION_NUMERIC  = 1
283} cusparseAction_t;
284
285typedef enum {
286    CUSPARSE_MATRIX_TYPE_GENERAL    = 0,
287    CUSPARSE_MATRIX_TYPE_SYMMETRIC  = 1,
288    CUSPARSE_MATRIX_TYPE_HERMITIAN  = 2,
289    CUSPARSE_MATRIX_TYPE_TRIANGULAR = 3
290} cusparseMatrixType_t;
291
292typedef enum {
293    CUSPARSE_FILL_MODE_LOWER = 0,
294    CUSPARSE_FILL_MODE_UPPER = 1
295} cusparseFillMode_t;
296
297typedef enum {
298    CUSPARSE_DIAG_TYPE_NON_UNIT = 0,
299    CUSPARSE_DIAG_TYPE_UNIT     = 1
300} cusparseDiagType_t;
301
302typedef enum {
303    CUSPARSE_INDEX_BASE_ZERO = 0,
304    CUSPARSE_INDEX_BASE_ONE  = 1
305} cusparseIndexBase_t;
306
307typedef enum {
308    CUSPARSE_OPERATION_NON_TRANSPOSE       = 0,
309    CUSPARSE_OPERATION_TRANSPOSE           = 1,
310    CUSPARSE_OPERATION_CONJUGATE_TRANSPOSE = 2
311} cusparseOperation_t;
312
313typedef enum {
314    CUSPARSE_DIRECTION_ROW    = 0,
315    CUSPARSE_DIRECTION_COLUMN = 1
316} cusparseDirection_t;
317
318typedef enum {
319    CUSPARSE_SOLVE_POLICY_NO_LEVEL = 0,
320    CUSPARSE_SOLVE_POLICY_USE_LEVEL = 1
321} cusparseSolvePolicy_t CUSPARSE_DEPRECATED_TYPE;
322
323typedef enum {
324    CUSPARSE_COLOR_ALG0 = 0, // default
325    CUSPARSE_COLOR_ALG1 = 1
326} cusparseColorAlg_t CUSPARSE_DEPRECATED_TYPE;
327
328//##############################################################################
329//# INITIALIZATION AND MANAGEMENT ROUTINES
330//##############################################################################
331
332cusparseStatus_t CUSPARSEAPI
333cusparseCreate(cusparseHandle_t* handle);
334
335cusparseStatus_t CUSPARSEAPI
336cusparseDestroy(cusparseHandle_t handle);
337
338cusparseStatus_t CUSPARSEAPI
339cusparseGetVersion(cusparseHandle_t handle,
340                   int*             version);
341
342cusparseStatus_t CUSPARSEAPI
343cusparseGetProperty(libraryPropertyType type,
344                    int*                value);
345
346const char* CUSPARSEAPI
347cusparseGetErrorName(cusparseStatus_t status);
348
349const char* CUSPARSEAPI
350cusparseGetErrorString(cusparseStatus_t status);
351
352cusparseStatus_t CUSPARSEAPI
353cusparseSetStream(cusparseHandle_t handle,
354                  cudaStream_t     streamId);
355
356cusparseStatus_t CUSPARSEAPI
357cusparseGetStream(cusparseHandle_t handle,
358                  cudaStream_t*    streamId);
359
360cusparseStatus_t CUSPARSEAPI
361cusparseGetPointerMode(cusparseHandle_t       handle,
362                       cusparsePointerMode_t* mode);
363
364cusparseStatus_t CUSPARSEAPI
365cusparseSetPointerMode(cusparseHandle_t      handle,
366                       cusparsePointerMode_t mode);
367
368//##############################################################################
369//# LOGGING APIs
370//##############################################################################
371
372typedef void (*cusparseLoggerCallback_t)(int         logLevel,
373                                         const char* functionName,
374                                         const char* message);
375
376cusparseStatus_t CUSPARSEAPI
377cusparseLoggerSetCallback(cusparseLoggerCallback_t callback);
378
379cusparseStatus_t CUSPARSEAPI
380cusparseLoggerSetFile(FILE* file);
381
382cusparseStatus_t CUSPARSEAPI
383cusparseLoggerOpenFile(const char* logFile);
384
385cusparseStatus_t CUSPARSEAPI
386cusparseLoggerSetLevel(int level);
387
388cusparseStatus_t CUSPARSEAPI
389cusparseLoggerSetMask(int mask);
390
391cusparseStatus_t CUSPARSEAPI
392cusparseLoggerForceDisable(void);
393
394//##############################################################################
395//# HELPER ROUTINES
396//##############################################################################
397
398cusparseStatus_t CUSPARSEAPI
399cusparseCreateMatDescr(cusparseMatDescr_t* descrA);
400
401cusparseStatus_t CUSPARSEAPI
402cusparseDestroyMatDescr(cusparseMatDescr_t descrA);
403
404cusparseStatus_t CUSPARSEAPI
405cusparseSetMatType(cusparseMatDescr_t   descrA,
406                   cusparseMatrixType_t type);
407
408cusparseMatrixType_t CUSPARSEAPI
409cusparseGetMatType(const cusparseMatDescr_t descrA);
410
411cusparseStatus_t CUSPARSEAPI
412cusparseSetMatFillMode(cusparseMatDescr_t descrA,
413                       cusparseFillMode_t fillMode);
414
415cusparseFillMode_t CUSPARSEAPI
416cusparseGetMatFillMode(const cusparseMatDescr_t descrA);
417
418cusparseStatus_t CUSPARSEAPI
419cusparseSetMatDiagType(cusparseMatDescr_t descrA,
420                       cusparseDiagType_t diagType);
421
422cusparseDiagType_t CUSPARSEAPI
423cusparseGetMatDiagType(const cusparseMatDescr_t descrA);
424
425cusparseStatus_t CUSPARSEAPI
426cusparseSetMatIndexBase(cusparseMatDescr_t  descrA,
427                        cusparseIndexBase_t base);
428
429cusparseIndexBase_t CUSPARSEAPI
430cusparseGetMatIndexBase(const cusparseMatDescr_t descrA);
431
432CUSPARSE_DEPRECATED
433cusparseStatus_t CUSPARSEAPI
434cusparseCreateCsric02Info(csric02Info_t* info);
435
436CUSPARSE_DEPRECATED
437cusparseStatus_t CUSPARSEAPI
438cusparseDestroyCsric02Info(csric02Info_t info);
439
440CUSPARSE_DEPRECATED
441cusparseStatus_t CUSPARSEAPI
442cusparseCreateBsric02Info(bsric02Info_t* info);
443
444CUSPARSE_DEPRECATED
445cusparseStatus_t CUSPARSEAPI
446cusparseDestroyBsric02Info(bsric02Info_t info);
447
448CUSPARSE_DEPRECATED
449cusparseStatus_t CUSPARSEAPI
450cusparseCreateCsrilu02Info(csrilu02Info_t* info);
451
452CUSPARSE_DEPRECATED
453cusparseStatus_t CUSPARSEAPI
454cusparseDestroyCsrilu02Info(csrilu02Info_t info);
455
456CUSPARSE_DEPRECATED
457cusparseStatus_t CUSPARSEAPI
458cusparseCreateBsrilu02Info(bsrilu02Info_t* info);
459
460CUSPARSE_DEPRECATED
461cusparseStatus_t CUSPARSEAPI
462cusparseDestroyBsrilu02Info(bsrilu02Info_t info);
463
464CUSPARSE_DEPRECATED
465cusparseStatus_t CUSPARSEAPI
466cusparseCreateBsrsv2Info(bsrsv2Info_t* info);
467
468CUSPARSE_DEPRECATED
469cusparseStatus_t CUSPARSEAPI
470cusparseDestroyBsrsv2Info(bsrsv2Info_t info);
471
472CUSPARSE_DEPRECATED
473cusparseStatus_t CUSPARSEAPI
474cusparseCreateBsrsm2Info(bsrsm2Info_t* info);
475
476CUSPARSE_DEPRECATED
477cusparseStatus_t CUSPARSEAPI
478cusparseDestroyBsrsm2Info(bsrsm2Info_t info);
479
480CUSPARSE_DEPRECATED
481cusparseStatus_t CUSPARSEAPI
482cusparseCreateCsru2csrInfo(csru2csrInfo_t* info);
483
484CUSPARSE_DEPRECATED
485cusparseStatus_t CUSPARSEAPI
486cusparseDestroyCsru2csrInfo(csru2csrInfo_t info);
487
488CUSPARSE_DEPRECATED
489cusparseStatus_t CUSPARSEAPI
490cusparseCreateColorInfo(cusparseColorInfo_t* info);
491
492CUSPARSE_DEPRECATED
493cusparseStatus_t CUSPARSEAPI
494cusparseDestroyColorInfo(cusparseColorInfo_t info);
495
496CUSPARSE_DEPRECATED
497cusparseStatus_t CUSPARSEAPI
498cusparseCreatePruneInfo(pruneInfo_t* info);
499
500CUSPARSE_DEPRECATED
501cusparseStatus_t CUSPARSEAPI
502cusparseDestroyPruneInfo(pruneInfo_t info);
503
504//##############################################################################
505//# SPARSE LEVEL 2 ROUTINES
506//##############################################################################
507
508cusparseStatus_t CUSPARSEAPI
509cusparseSgemvi(cusparseHandle_t    handle,
510               cusparseOperation_t transA,
511               int                 m,
512               int                 n,
513               const float*        alpha,
514               const float*        A,
515               int                 lda,
516               int                 nnz,
517               const float*        xVal,
518               const int*          xInd,
519               const float*        beta,
520               float*              y,
521               cusparseIndexBase_t idxBase,
522               void*               pBuffer);
523
524cusparseStatus_t CUSPARSEAPI
525cusparseSgemvi_bufferSize(cusparseHandle_t    handle,
526                          cusparseOperation_t transA,
527                          int                 m,
528                          int                 n,
529                          int                 nnz,
530                          int*                pBufferSize);
531
532cusparseStatus_t CUSPARSEAPI
533cusparseDgemvi(cusparseHandle_t    handle,
534               cusparseOperation_t transA,
535               int                 m,
536               int                 n,
537               const double*       alpha,
538               const double*       A,
539               int                 lda,
540               int                 nnz,
541               const double*       xVal,
542               const int*          xInd,
543               const double*       beta,
544               double*             y,
545               cusparseIndexBase_t idxBase,
546               void*               pBuffer);
547
548cusparseStatus_t CUSPARSEAPI
549cusparseDgemvi_bufferSize(cusparseHandle_t    handle,
550                          cusparseOperation_t transA,
551                          int                 m,
552                          int                 n,
553                          int                 nnz,
554                          int*                pBufferSize);
555
556cusparseStatus_t CUSPARSEAPI
557cusparseCgemvi(cusparseHandle_t    handle,
558               cusparseOperation_t transA,
559               int                 m,
560               int                 n,
561               const cuComplex*    alpha,
562               const cuComplex*    A,
563               int                 lda,
564               int                 nnz,
565               const cuComplex*    xVal,
566               const int*          xInd,
567               const cuComplex*    beta,
568               cuComplex*          y,
569               cusparseIndexBase_t idxBase,
570               void*               pBuffer);
571
572cusparseStatus_t CUSPARSEAPI
573cusparseCgemvi_bufferSize(cusparseHandle_t    handle,
574                          cusparseOperation_t transA,
575                          int                 m,
576                          int                 n,
577                          int                 nnz,
578                          int*                pBufferSize);
579
580cusparseStatus_t CUSPARSEAPI
581cusparseZgemvi(cusparseHandle_t       handle,
582               cusparseOperation_t    transA,
583               int                    m,
584               int                    n,
585               const cuDoubleComplex* alpha,
586               const cuDoubleComplex* A,
587               int                    lda,
588               int                    nnz,
589               const cuDoubleComplex* xVal,
590               const int*             xInd,
591               const cuDoubleComplex* beta,
592               cuDoubleComplex*       y,
593               cusparseIndexBase_t    idxBase,
594               void*                  pBuffer);
595
596cusparseStatus_t CUSPARSEAPI
597cusparseZgemvi_bufferSize(cusparseHandle_t    handle,
598                          cusparseOperation_t transA,
599                          int                 m,
600                          int                 n,
601                          int                 nnz,
602                          int*                pBufferSize);
603
604cusparseStatus_t CUSPARSEAPI
605cusparseSbsrmv(cusparseHandle_t         handle,
606               cusparseDirection_t      dirA,
607               cusparseOperation_t      transA,
608               int                      mb,
609               int                      nb,
610               int                      nnzb,
611               const float*             alpha,
612               const cusparseMatDescr_t descrA,
613               const float*             bsrSortedValA,
614               const int*               bsrSortedRowPtrA,
615               const int*               bsrSortedColIndA,
616               int                      blockDim,
617               const float*             x,
618               const float*             beta,
619               float*                   y);
620
621cusparseStatus_t CUSPARSEAPI
622cusparseDbsrmv(cusparseHandle_t         handle,
623               cusparseDirection_t      dirA,
624               cusparseOperation_t      transA,
625               int                      mb,
626               int                      nb,
627               int                      nnzb,
628               const double*            alpha,
629               const cusparseMatDescr_t descrA,
630               const double*            bsrSortedValA,
631               const int*               bsrSortedRowPtrA,
632               const int*               bsrSortedColIndA,
633               int                      blockDim,
634               const double*            x,
635               const double*            beta,
636               double*                  y);
637
638cusparseStatus_t CUSPARSEAPI
639cusparseCbsrmv(cusparseHandle_t         handle,
640               cusparseDirection_t      dirA,
641               cusparseOperation_t      transA,
642               int                      mb,
643               int                      nb,
644               int                      nnzb,
645               const cuComplex*         alpha,
646               const cusparseMatDescr_t descrA,
647               const cuComplex*         bsrSortedValA,
648               const int*               bsrSortedRowPtrA,
649               const int*               bsrSortedColIndA,
650               int                      blockDim,
651               const cuComplex*         x,
652               const cuComplex*         beta,
653               cuComplex*               y);
654
655cusparseStatus_t CUSPARSEAPI
656cusparseZbsrmv(cusparseHandle_t         handle,
657               cusparseDirection_t      dirA,
658               cusparseOperation_t      transA,
659               int                      mb,
660               int                      nb,
661               int                      nnzb,
662               const cuDoubleComplex*   alpha,
663               const cusparseMatDescr_t descrA,
664               const cuDoubleComplex*   bsrSortedValA,
665               const int*               bsrSortedRowPtrA,
666               const int*               bsrSortedColIndA,
667               int                      blockDim,
668               const cuDoubleComplex*   x,
669               const cuDoubleComplex*   beta,
670               cuDoubleComplex*         y);
671
672CUSPARSE_DEPRECATED
673cusparseStatus_t CUSPARSEAPI
674cusparseSbsrxmv(cusparseHandle_t         handle,
675                cusparseDirection_t      dirA,
676                cusparseOperation_t      transA,
677                int                      sizeOfMask,
678                int                      mb,
679                int                      nb,
680                int                      nnzb,
681                const float*             alpha,
682                const cusparseMatDescr_t descrA,
683                const float*             bsrSortedValA,
684                const int*               bsrSortedMaskPtrA,
685                const int*               bsrSortedRowPtrA,
686                const int*               bsrSortedEndPtrA,
687                const int*               bsrSortedColIndA,
688                int                      blockDim,
689                const float*             x,
690                const float*             beta,
691                float*                   y);
692
693CUSPARSE_DEPRECATED
694cusparseStatus_t CUSPARSEAPI
695cusparseDbsrxmv(cusparseHandle_t         handle,
696                cusparseDirection_t      dirA,
697                cusparseOperation_t      transA,
698                int                      sizeOfMask,
699                int                      mb,
700                int                      nb,
701                int                      nnzb,
702                const double*            alpha,
703                const cusparseMatDescr_t descrA,
704                const double*            bsrSortedValA,
705                const int*               bsrSortedMaskPtrA,
706                const int*               bsrSortedRowPtrA,
707                const int*               bsrSortedEndPtrA,
708                const int*               bsrSortedColIndA,
709                int                      blockDim,
710                const double*            x,
711                const double*            beta,
712                double*                  y);
713
714CUSPARSE_DEPRECATED
715cusparseStatus_t CUSPARSEAPI
716cusparseCbsrxmv(cusparseHandle_t         handle,
717                cusparseDirection_t      dirA,
718                cusparseOperation_t      transA,
719                int                      sizeOfMask,
720                int                      mb,
721                int                      nb,
722                int                      nnzb,
723                const cuComplex*         alpha,
724                const cusparseMatDescr_t descrA,
725                const cuComplex*         bsrSortedValA,
726                const int*               bsrSortedMaskPtrA,
727                const int*               bsrSortedRowPtrA,
728                const int*               bsrSortedEndPtrA,
729                const int*               bsrSortedColIndA,
730                int                      blockDim,
731                const cuComplex*         x,
732                const cuComplex*         beta,
733                cuComplex*               y);
734
735CUSPARSE_DEPRECATED
736cusparseStatus_t CUSPARSEAPI
737cusparseZbsrxmv(cusparseHandle_t         handle,
738                cusparseDirection_t      dirA,
739                cusparseOperation_t      transA,
740                int                      sizeOfMask,
741                int                      mb,
742                int                      nb,
743                int                      nnzb,
744                const cuDoubleComplex*   alpha,
745                const cusparseMatDescr_t descrA,
746                const cuDoubleComplex*   bsrSortedValA,
747                const int*               bsrSortedMaskPtrA,
748                const int*               bsrSortedRowPtrA,
749                const int*               bsrSortedEndPtrA,
750                const int*               bsrSortedColIndA,
751                int                      blockDim,
752                const cuDoubleComplex*   x,
753                const cuDoubleComplex*   beta,
754                cuDoubleComplex*         y);
755
756CUSPARSE_DEPRECATED
757cusparseStatus_t CUSPARSEAPI
758cusparseXbsrsv2_zeroPivot(cusparseHandle_t handle,
759                          bsrsv2Info_t     info,
760                          int*             position);
761
762CUSPARSE_DEPRECATED
763cusparseStatus_t CUSPARSEAPI
764cusparseSbsrsv2_bufferSize(cusparseHandle_t         handle,
765                           cusparseDirection_t      dirA,
766                           cusparseOperation_t      transA,
767                           int                      mb,
768                           int                      nnzb,
769                           const cusparseMatDescr_t descrA,
770                           float*                   bsrSortedValA,
771                           const int*               bsrSortedRowPtrA,
772                           const int*               bsrSortedColIndA,
773                           int                      blockDim,
774                           bsrsv2Info_t             info,
775                           int*                     pBufferSizeInBytes);
776
777CUSPARSE_DEPRECATED
778cusparseStatus_t CUSPARSEAPI
779cusparseDbsrsv2_bufferSize(cusparseHandle_t         handle,
780                           cusparseDirection_t      dirA,
781                           cusparseOperation_t      transA,
782                           int                      mb,
783                           int                      nnzb,
784                           const cusparseMatDescr_t descrA,
785                           double*                  bsrSortedValA,
786                           const int*               bsrSortedRowPtrA,
787                           const int*               bsrSortedColIndA,
788                           int                      blockDim,
789                           bsrsv2Info_t             info,
790                           int*                     pBufferSizeInBytes);
791
792CUSPARSE_DEPRECATED
793cusparseStatus_t CUSPARSEAPI
794cusparseCbsrsv2_bufferSize(cusparseHandle_t         handle,
795                           cusparseDirection_t      dirA,
796                           cusparseOperation_t      transA,
797                           int                      mb,
798                           int                      nnzb,
799                           const cusparseMatDescr_t descrA,
800                           cuComplex*               bsrSortedValA,
801                           const int*               bsrSortedRowPtrA,
802                           const int*               bsrSortedColIndA,
803                           int                      blockDim,
804                           bsrsv2Info_t             info,
805                           int*                     pBufferSizeInBytes);
806
807CUSPARSE_DEPRECATED
808cusparseStatus_t CUSPARSEAPI
809cusparseZbsrsv2_bufferSize(cusparseHandle_t         handle,
810                           cusparseDirection_t      dirA,
811                           cusparseOperation_t      transA,
812                           int                      mb,
813                           int                      nnzb,
814                           const cusparseMatDescr_t descrA,
815                           cuDoubleComplex*         bsrSortedValA,
816                           const int*               bsrSortedRowPtrA,
817                           const int*               bsrSortedColIndA,
818                           int                      blockDim,
819                           bsrsv2Info_t             info,
820                           int*                     pBufferSizeInBytes);
821
822CUSPARSE_DEPRECATED
823cusparseStatus_t CUSPARSEAPI
824cusparseSbsrsv2_bufferSizeExt(cusparseHandle_t         handle,
825                              cusparseDirection_t      dirA,
826                              cusparseOperation_t      transA,
827                              int                      mb,
828                              int                      nnzb,
829                              const cusparseMatDescr_t descrA,
830                              float*                   bsrSortedValA,
831                              const int*               bsrSortedRowPtrA,
832                              const int*               bsrSortedColIndA,
833                              int                      blockSize,
834                              bsrsv2Info_t             info,
835                              size_t*                  pBufferSize);
836
837CUSPARSE_DEPRECATED
838cusparseStatus_t CUSPARSEAPI
839cusparseDbsrsv2_bufferSizeExt(cusparseHandle_t         handle,
840                              cusparseDirection_t      dirA,
841                              cusparseOperation_t      transA,
842                              int                      mb,
843                              int                      nnzb,
844                              const cusparseMatDescr_t descrA,
845                              double*                  bsrSortedValA,
846                              const int*               bsrSortedRowPtrA,
847                              const int*               bsrSortedColIndA,
848                              int                      blockSize,
849                              bsrsv2Info_t             info,
850                              size_t*                  pBufferSize);
851
852CUSPARSE_DEPRECATED
853cusparseStatus_t CUSPARSEAPI
854cusparseCbsrsv2_bufferSizeExt(cusparseHandle_t         handle,
855                              cusparseDirection_t      dirA,
856                              cusparseOperation_t      transA,
857                              int                      mb,
858                              int                      nnzb,
859                              const cusparseMatDescr_t descrA,
860                              cuComplex*               bsrSortedValA,
861                              const int*               bsrSortedRowPtrA,
862                              const int*               bsrSortedColIndA,
863                              int                      blockSize,
864                              bsrsv2Info_t             info,
865                              size_t*                  pBufferSize);
866
867CUSPARSE_DEPRECATED
868cusparseStatus_t CUSPARSEAPI
869cusparseZbsrsv2_bufferSizeExt(cusparseHandle_t         handle,
870                              cusparseDirection_t      dirA,
871                              cusparseOperation_t      transA,
872                              int                      mb,
873                              int                      nnzb,
874                              const cusparseMatDescr_t descrA,
875                              cuDoubleComplex*         bsrSortedValA,
876                              const int*               bsrSortedRowPtrA,
877                              const int*               bsrSortedColIndA,
878                              int                      blockSize,
879                              bsrsv2Info_t             info,
880                              size_t*                  pBufferSize);
881
882CUSPARSE_DEPRECATED
883cusparseStatus_t CUSPARSEAPI
884cusparseSbsrsv2_analysis(cusparseHandle_t         handle,
885                         cusparseDirection_t      dirA,
886                         cusparseOperation_t      transA,
887                         int                      mb,
888                         int                      nnzb,
889                         const cusparseMatDescr_t descrA,
890                         const float*             bsrSortedValA,
891                         const int*               bsrSortedRowPtrA,
892                         const int*               bsrSortedColIndA,
893                         int                      blockDim,
894                         bsrsv2Info_t             info,
895                         cusparseSolvePolicy_t    policy,
896                         void*                    pBuffer);
897
898CUSPARSE_DEPRECATED
899cusparseStatus_t CUSPARSEAPI
900cusparseDbsrsv2_analysis(cusparseHandle_t         handle,
901                         cusparseDirection_t      dirA,
902                         cusparseOperation_t      transA,
903                         int                      mb,
904                         int                      nnzb,
905                         const cusparseMatDescr_t descrA,
906                         const double*            bsrSortedValA,
907                         const int*               bsrSortedRowPtrA,
908                         const int*               bsrSortedColIndA,
909                         int                      blockDim,
910                         bsrsv2Info_t             info,
911                         cusparseSolvePolicy_t    policy,
912                         void*                    pBuffer);
913
914CUSPARSE_DEPRECATED
915cusparseStatus_t CUSPARSEAPI
916cusparseCbsrsv2_analysis(cusparseHandle_t         handle,
917                         cusparseDirection_t      dirA,
918                         cusparseOperation_t      transA,
919                         int                      mb,
920                         int                      nnzb,
921                         const cusparseMatDescr_t descrA,
922                         const cuComplex*         bsrSortedValA,
923                         const int*               bsrSortedRowPtrA,
924                         const int*               bsrSortedColIndA,
925                         int                      blockDim,
926                         bsrsv2Info_t             info,
927                         cusparseSolvePolicy_t    policy,
928                         void*                    pBuffer);
929
930CUSPARSE_DEPRECATED
931cusparseStatus_t CUSPARSEAPI
932cusparseZbsrsv2_analysis(cusparseHandle_t         handle,
933                         cusparseDirection_t      dirA,
934                         cusparseOperation_t      transA,
935                         int                      mb,
936                         int                      nnzb,
937                         const cusparseMatDescr_t descrA,
938                         const cuDoubleComplex*   bsrSortedValA,
939                         const int*               bsrSortedRowPtrA,
940                         const int*               bsrSortedColIndA,
941                         int                      blockDim,
942                         bsrsv2Info_t             info,
943                         cusparseSolvePolicy_t    policy,
944                         void*                    pBuffer);
945
946CUSPARSE_DEPRECATED
947cusparseStatus_t CUSPARSEAPI
948cusparseSbsrsv2_solve(cusparseHandle_t         handle,
949                      cusparseDirection_t      dirA,
950                      cusparseOperation_t      transA,
951                      int                      mb,
952                      int                      nnzb,
953                      const float*             alpha,
954                      const cusparseMatDescr_t descrA,
955                      const float*             bsrSortedValA,
956                      const int*               bsrSortedRowPtrA,
957                      const int*               bsrSortedColIndA,
958                      int                      blockDim,
959                      bsrsv2Info_t             info,
960                      const float*             f,
961                      float*                   x,
962                      cusparseSolvePolicy_t    policy,
963                      void*                    pBuffer);
964
965CUSPARSE_DEPRECATED
966cusparseStatus_t CUSPARSEAPI
967cusparseDbsrsv2_solve(cusparseHandle_t         handle,
968                      cusparseDirection_t      dirA,
969                      cusparseOperation_t      transA,
970                      int                      mb,
971                      int                      nnzb,
972                      const double*            alpha,
973                      const cusparseMatDescr_t descrA,
974                      const double*            bsrSortedValA,
975                      const int*               bsrSortedRowPtrA,
976                      const int*               bsrSortedColIndA,
977                      int                      blockDim,
978                      bsrsv2Info_t             info,
979                      const double*            f,
980                      double*                  x,
981                      cusparseSolvePolicy_t    policy,
982                      void*                    pBuffer);
983
984CUSPARSE_DEPRECATED
985cusparseStatus_t CUSPARSEAPI
986cusparseCbsrsv2_solve(cusparseHandle_t         handle,
987                      cusparseDirection_t      dirA,
988                      cusparseOperation_t      transA,
989                      int                      mb,
990                      int                      nnzb,
991                      const cuComplex*         alpha,
992                      const cusparseMatDescr_t descrA,
993                      const cuComplex*         bsrSortedValA,
994                      const int*               bsrSortedRowPtrA,
995                      const int*               bsrSortedColIndA,
996                      int                      blockDim,
997                      bsrsv2Info_t             info,
998                      const cuComplex*         f,
999                      cuComplex*               x,
1000                      cusparseSolvePolicy_t    policy,
1001                      void*                    pBuffer);
1002
1003CUSPARSE_DEPRECATED
1004cusparseStatus_t CUSPARSEAPI
1005cusparseZbsrsv2_solve(cusparseHandle_t         handle,
1006                      cusparseDirection_t      dirA,
1007                      cusparseOperation_t      transA,
1008                      int                      mb,
1009                      int                      nnzb,
1010                      const cuDoubleComplex*   alpha,
1011                      const cusparseMatDescr_t descrA,
1012                      const cuDoubleComplex*   bsrSortedValA,
1013                      const int*               bsrSortedRowPtrA,
1014                      const int*               bsrSortedColIndA,
1015                      int                      blockDim,
1016                      bsrsv2Info_t             info,
1017                      const cuDoubleComplex*   f,
1018                      cuDoubleComplex*         x,
1019                      cusparseSolvePolicy_t    policy,
1020                      void*                    pBuffer);
1021
1022//##############################################################################
1023//# SPARSE LEVEL 3 ROUTINES
1024//##############################################################################
1025
1026cusparseStatus_t CUSPARSEAPI
1027cusparseSbsrmm(cusparseHandle_t         handle,
1028               cusparseDirection_t      dirA,
1029               cusparseOperation_t      transA,
1030               cusparseOperation_t      transB,
1031               int                      mb,
1032               int                      n,
1033               int                      kb,
1034               int                      nnzb,
1035               const float*             alpha,
1036               const cusparseMatDescr_t descrA,
1037               const float* bsrSortedValA,
1038               const int*   bsrSortedRowPtrA,
1039               const int*   bsrSortedColIndA,
1040               const int    blockSize,
1041               const float* B,
1042               const int    ldb,
1043               const float* beta,
1044               float*       C,
1045               int          ldc);
1046
1047cusparseStatus_t CUSPARSEAPI
1048cusparseDbsrmm(cusparseHandle_t         handle,
1049               cusparseDirection_t      dirA,
1050               cusparseOperation_t      transA,
1051               cusparseOperation_t      transB,
1052               int                      mb,
1053               int                      n,
1054               int                      kb,
1055               int                      nnzb,
1056               const double*            alpha,
1057               const cusparseMatDescr_t descrA,
1058               const double* bsrSortedValA,
1059               const int*    bsrSortedRowPtrA,
1060               const int*    bsrSortedColIndA,
1061               const int     blockSize,
1062               const double* B,
1063               const int     ldb,
1064               const double* beta,
1065               double*       C,
1066               int           ldc);
1067
1068cusparseStatus_t CUSPARSEAPI
1069cusparseCbsrmm(cusparseHandle_t         handle,
1070               cusparseDirection_t      dirA,
1071               cusparseOperation_t      transA,
1072               cusparseOperation_t      transB,
1073               int                      mb,
1074               int                      n,
1075               int                      kb,
1076               int                      nnzb,
1077               const cuComplex*         alpha,
1078               const cusparseMatDescr_t descrA,
1079               const cuComplex* bsrSortedValA,
1080               const int*       bsrSortedRowPtrA,
1081               const int*       bsrSortedColIndA,
1082               const int        blockSize,
1083               const cuComplex* B,
1084               const int        ldb,
1085               const cuComplex* beta,
1086               cuComplex*       C,
1087               int              ldc);
1088
1089cusparseStatus_t CUSPARSEAPI
1090cusparseZbsrmm(cusparseHandle_t         handle,
1091                cusparseDirection_t      dirA,
1092                cusparseOperation_t      transA,
1093                cusparseOperation_t      transB,
1094                int                      mb,
1095                int                      n,
1096                int                      kb,
1097                int                      nnzb,
1098                const cuDoubleComplex*   alpha,
1099                const cusparseMatDescr_t descrA,
1100                const cuDoubleComplex*   bsrSortedValA,
1101                const int*               bsrSortedRowPtrA,
1102                const int*               bsrSortedColIndA,
1103                const int                blockSize,
1104                const cuDoubleComplex*   B,
1105                const int                ldb,
1106                const cuDoubleComplex*   beta,
1107                cuDoubleComplex*         C,
1108                int                      ldc);
1109
1110CUSPARSE_DEPRECATED
1111cusparseStatus_t CUSPARSEAPI
1112cusparseXbsrsm2_zeroPivot(cusparseHandle_t handle,
1113                          bsrsm2Info_t     info,
1114                          int*             position);
1115
1116CUSPARSE_DEPRECATED
1117cusparseStatus_t CUSPARSEAPI
1118cusparseSbsrsm2_bufferSize(cusparseHandle_t         handle,
1119                           cusparseDirection_t      dirA,
1120                           cusparseOperation_t      transA,
1121                           cusparseOperation_t      transXY,
1122                           int                      mb,
1123                           int                      n,
1124                           int                      nnzb,
1125                           const cusparseMatDescr_t descrA,
1126                           float*                   bsrSortedVal,
1127                           const int*               bsrSortedRowPtr,
1128                           const int*               bsrSortedColInd,
1129                           int                      blockSize,
1130                           bsrsm2Info_t             info,
1131                           int*                     pBufferSizeInBytes);
1132
1133CUSPARSE_DEPRECATED
1134cusparseStatus_t CUSPARSEAPI
1135cusparseDbsrsm2_bufferSize(cusparseHandle_t         handle,
1136                           cusparseDirection_t      dirA,
1137                           cusparseOperation_t      transA,
1138                           cusparseOperation_t      transXY,
1139                           int                      mb,
1140                           int                      n,
1141                           int                      nnzb,
1142                           const cusparseMatDescr_t descrA,
1143                           double*                  bsrSortedVal,
1144                           const int*               bsrSortedRowPtr,
1145                           const int*               bsrSortedColInd,
1146                           int                      blockSize,
1147                           bsrsm2Info_t             info,
1148                           int*                     pBufferSizeInBytes);
1149
1150CUSPARSE_DEPRECATED
1151cusparseStatus_t CUSPARSEAPI
1152cusparseCbsrsm2_bufferSize(cusparseHandle_t         handle,
1153                           cusparseDirection_t      dirA,
1154                           cusparseOperation_t      transA,
1155                           cusparseOperation_t      transXY,
1156                           int                      mb,
1157                           int                      n,
1158                           int                      nnzb,
1159                           const cusparseMatDescr_t descrA,
1160                           cuComplex*               bsrSortedVal,
1161                           const int*               bsrSortedRowPtr,
1162                           const int*               bsrSortedColInd,
1163                           int                      blockSize,
1164                           bsrsm2Info_t             info,
1165                           int*                     pBufferSizeInBytes);
1166
1167CUSPARSE_DEPRECATED
1168cusparseStatus_t CUSPARSEAPI
1169cusparseZbsrsm2_bufferSize(cusparseHandle_t         handle,
1170                           cusparseDirection_t      dirA,
1171                           cusparseOperation_t      transA,
1172                           cusparseOperation_t      transXY,
1173                           int                      mb,
1174                           int                      n,
1175                           int                      nnzb,
1176                           const cusparseMatDescr_t descrA,
1177                           cuDoubleComplex*         bsrSortedVal,
1178                           const int*               bsrSortedRowPtr,
1179                           const int*               bsrSortedColInd,
1180                           int                      blockSize,
1181                           bsrsm2Info_t             info,
1182                           int*                     pBufferSizeInBytes);
1183
1184CUSPARSE_DEPRECATED
1185cusparseStatus_t CUSPARSEAPI
1186cusparseSbsrsm2_bufferSizeExt(cusparseHandle_t         handle,
1187                              cusparseDirection_t      dirA,
1188                              cusparseOperation_t      transA,
1189                              cusparseOperation_t      transB,
1190                              int                      mb,
1191                              int                      n,
1192                              int                      nnzb,
1193                              const cusparseMatDescr_t descrA,
1194                              float*                   bsrSortedVal,
1195                              const int*               bsrSortedRowPtr,
1196                              const int*               bsrSortedColInd,
1197                              int                      blockSize,
1198                              bsrsm2Info_t             info,
1199                              size_t*                  pBufferSize);
1200

Showing the first 1,200 of 6107 lines. Download the file for the rest.

codekingpro/portable-devtools · Team Ai