Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
cusolverSp.h924 linesDownload Raw Back to include
1/*
2 * Copyright 2014 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
50#if !defined(CUSOLVERSP_H_)
51  #define CUSOLVERSP_H_
52
53  #include "cusparse.h"
54  #include "cublas_v2.h"
55  #include "cusolver_common.h"
56
57  #if defined(__cplusplus)
58extern "C" {
59  #endif /* __cplusplus */
60
61  struct cusolverSpContext;
62  typedef struct cusolverSpContext *cusolverSpHandle_t;
63
64  struct csrqrInfo;
65  typedef struct csrqrInfo *csrqrInfo_t;
66
67  cusolverStatus_t CUSOLVERAPI cusolverSpCreate(cusolverSpHandle_t *handle);
68  cusolverStatus_t CUSOLVERAPI cusolverSpDestroy(cusolverSpHandle_t handle);
69  cusolverStatus_t CUSOLVERAPI
70    cusolverSpSetStream(cusolverSpHandle_t handle, cudaStream_t streamId);
71  cusolverStatus_t CUSOLVERAPI
72    cusolverSpGetStream(cusolverSpHandle_t handle, cudaStream_t *streamId);
73
74  cusolverStatus_t CUSOLVERAPI cusolverSpXcsrissymHost(
75    cusolverSpHandle_t       handle,
76    int                      m,
77    int                      nnzA,
78    const cusparseMatDescr_t descrA,
79    const int *              csrRowPtrA,
80    const int *              csrEndPtrA,
81    const int *              csrColIndA,
82    int *                    issym);
83
84  /* -------- GPU linear solver by LU factorization
85   *       solve A*x = b, A can be singular
86   * [ls] stands for linear solve
87   * [v] stands for vector
88   * [lu] stands for LU factorization
89   */
90  cusolverStatus_t CUSOLVERAPI cusolverSpScsrlsvluHost(
91    cusolverSpHandle_t       handle,
92    int                      n,
93    int                      nnzA,
94    const cusparseMatDescr_t descrA,
95    const float *            csrValA,
96    const int *              csrRowPtrA,
97    const int *              csrColIndA,
98    const float *            b,
99    float                    tol,
100    int                      reorder,
101    float *                  x,
102    int *                    singularity);
103
104  cusolverStatus_t CUSOLVERAPI cusolverSpDcsrlsvluHost(
105    cusolverSpHandle_t       handle,
106    int                      n,
107    int                      nnzA,
108    const cusparseMatDescr_t descrA,
109    const double *           csrValA,
110    const int *              csrRowPtrA,
111    const int *              csrColIndA,
112    const double *           b,
113    double                   tol,
114    int                      reorder,
115    double *                 x,
116    int *                    singularity);
117
118  cusolverStatus_t CUSOLVERAPI cusolverSpCcsrlsvluHost(
119    cusolverSpHandle_t       handle,
120    int                      n,
121    int                      nnzA,
122    const cusparseMatDescr_t descrA,
123    const cuComplex *        csrValA,
124    const int *              csrRowPtrA,
125    const int *              csrColIndA,
126    const cuComplex *        b,
127    float                    tol,
128    int                      reorder,
129    cuComplex *              x,
130    int *                    singularity);
131
132  cusolverStatus_t CUSOLVERAPI cusolverSpZcsrlsvluHost(
133    cusolverSpHandle_t       handle,
134    int                      n,
135    int                      nnzA,
136    const cusparseMatDescr_t descrA,
137    const cuDoubleComplex *  csrValA,
138    const int *              csrRowPtrA,
139    const int *              csrColIndA,
140    const cuDoubleComplex *  b,
141    double                   tol,
142    int                      reorder,
143    cuDoubleComplex *        x,
144    int *                    singularity);
145
146  /* -------- GPU linear solver by QR factorization
147   *       solve A*x = b, A can be singular
148   * [ls] stands for linear solve
149   * [v] stands for vector
150   * [qr] stands for QR factorization
151   */
152  cusolverStatus_t CUSOLVERAPI cusolverSpScsrlsvqr(
153    cusolverSpHandle_t       handle,
154    int                      m,
155    int                      nnz,
156    const cusparseMatDescr_t descrA,
157    const float *            csrVal,
158    const int *              csrRowPtr,
159    const int *              csrColInd,
160    const float *            b,
161    float                    tol,
162    int                      reorder,
163    float *                  x,
164    int *                    singularity);
165
166  cusolverStatus_t CUSOLVERAPI cusolverSpDcsrlsvqr(
167    cusolverSpHandle_t       handle,
168    int                      m,
169    int                      nnz,
170    const cusparseMatDescr_t descrA,
171    const double *           csrVal,
172    const int *              csrRowPtr,
173    const int *              csrColInd,
174    const double *           b,
175    double                   tol,
176    int                      reorder,
177    double *                 x,
178    int *                    singularity);
179
180  cusolverStatus_t CUSOLVERAPI cusolverSpCcsrlsvqr(
181    cusolverSpHandle_t       handle,
182    int                      m,
183    int                      nnz,
184    const cusparseMatDescr_t descrA,
185    const cuComplex *        csrVal,
186    const int *              csrRowPtr,
187    const int *              csrColInd,
188    const cuComplex *        b,
189    float                    tol,
190    int                      reorder,
191    cuComplex *              x,
192    int *                    singularity);
193
194  cusolverStatus_t CUSOLVERAPI cusolverSpZcsrlsvqr(
195    cusolverSpHandle_t       handle,
196    int                      m,
197    int                      nnz,
198    const cusparseMatDescr_t descrA,
199    const cuDoubleComplex *  csrVal,
200    const int *              csrRowPtr,
201    const int *              csrColInd,
202    const cuDoubleComplex *  b,
203    double                   tol,
204    int                      reorder,
205    cuDoubleComplex *        x,
206    int *                    singularity);
207
208  /* -------- CPU linear solver by QR factorization
209   *       solve A*x = b, A can be singular
210   * [ls] stands for linear solve
211   * [v] stands for vector
212   * [qr] stands for QR factorization
213   */
214  cusolverStatus_t CUSOLVERAPI cusolverSpScsrlsvqrHost(
215    cusolverSpHandle_t       handle,
216    int                      m,
217    int                      nnz,
218    const cusparseMatDescr_t descrA,
219    const float *            csrValA,
220    const int *              csrRowPtrA,
221    const int *              csrColIndA,
222    const float *            b,
223    float                    tol,
224    int                      reorder,
225    float *                  x,
226    int *                    singularity);
227
228  cusolverStatus_t CUSOLVERAPI cusolverSpDcsrlsvqrHost(
229    cusolverSpHandle_t       handle,
230    int                      m,
231    int                      nnz,
232    const cusparseMatDescr_t descrA,
233    const double *           csrValA,
234    const int *              csrRowPtrA,
235    const int *              csrColIndA,
236    const double *           b,
237    double                   tol,
238    int                      reorder,
239    double *                 x,
240    int *                    singularity);
241
242  cusolverStatus_t CUSOLVERAPI cusolverSpCcsrlsvqrHost(
243    cusolverSpHandle_t       handle,
244    int                      m,
245    int                      nnz,
246    const cusparseMatDescr_t descrA,
247    const cuComplex *        csrValA,
248    const int *              csrRowPtrA,
249    const int *              csrColIndA,
250    const cuComplex *        b,
251    float                    tol,
252    int                      reorder,
253    cuComplex *              x,
254    int *                    singularity);
255
256  cusolverStatus_t CUSOLVERAPI cusolverSpZcsrlsvqrHost(
257    cusolverSpHandle_t       handle,
258    int                      m,
259    int                      nnz,
260    const cusparseMatDescr_t descrA,
261    const cuDoubleComplex *  csrValA,
262    const int *              csrRowPtrA,
263    const int *              csrColIndA,
264    const cuDoubleComplex *  b,
265    double                   tol,
266    int                      reorder,
267    cuDoubleComplex *        x,
268    int *                    singularity);
269
270  /* -------- CPU linear solver by Cholesky factorization
271   *       solve A*x = b, A can be singular
272   * [ls] stands for linear solve
273   * [v] stands for vector
274   * [chol] stands for Cholesky factorization
275   *
276   * Only works for symmetric positive definite matrix.
277   * The upper part of A is ignored.
278   */
279  cusolverStatus_t CUSOLVERAPI cusolverSpScsrlsvcholHost(
280    cusolverSpHandle_t       handle,
281    int                      m,
282    int                      nnz,
283    const cusparseMatDescr_t descrA,
284    const float *            csrVal,
285    const int *              csrRowPtr,
286    const int *              csrColInd,
287    const float *            b,
288    float                    tol,
289    int                      reorder,
290    float *                  x,
291    int *                    singularity);
292
293  cusolverStatus_t CUSOLVERAPI cusolverSpDcsrlsvcholHost(
294    cusolverSpHandle_t       handle,
295    int                      m,
296    int                      nnz,
297    const cusparseMatDescr_t descrA,
298    const double *           csrVal,
299    const int *              csrRowPtr,
300    const int *              csrColInd,
301    const double *           b,
302    double                   tol,
303    int                      reorder,
304    double *                 x,
305    int *                    singularity);
306
307  cusolverStatus_t CUSOLVERAPI cusolverSpCcsrlsvcholHost(
308    cusolverSpHandle_t       handle,
309    int                      m,
310    int                      nnz,
311    const cusparseMatDescr_t descrA,
312    const cuComplex *        csrVal,
313    const int *              csrRowPtr,
314    const int *              csrColInd,
315    const cuComplex *        b,
316    float                    tol,
317    int                      reorder,
318    cuComplex *              x,
319    int *                    singularity);
320
321  cusolverStatus_t CUSOLVERAPI cusolverSpZcsrlsvcholHost(
322    cusolverSpHandle_t       handle,
323    int                      m,
324    int                      nnz,
325    const cusparseMatDescr_t descrA,
326    const cuDoubleComplex *  csrVal,
327    const int *              csrRowPtr,
328    const int *              csrColInd,
329    const cuDoubleComplex *  b,
330    double                   tol,
331    int                      reorder,
332    cuDoubleComplex *        x,
333    int *                    singularity);
334
335  /* -------- GPU linear solver by Cholesky factorization
336   *       solve A*x = b, A can be singular
337   * [ls] stands for linear solve
338   * [v] stands for vector
339   * [chol] stands for Cholesky factorization
340   *
341   * Only works for symmetric positive definite matrix.
342   * The upper part of A is ignored.
343   */
344  cusolverStatus_t CUSOLVERAPI cusolverSpScsrlsvchol(
345    cusolverSpHandle_t       handle,
346    int                      m,
347    int                      nnz,
348    const cusparseMatDescr_t descrA,
349    const float *            csrVal,
350    const int *              csrRowPtr,
351    const int *              csrColInd,
352    const float *            b,
353    float                    tol,
354    int                      reorder,
355    // output
356    float *x,
357    int *  singularity);
358
359  cusolverStatus_t CUSOLVERAPI cusolverSpDcsrlsvchol(
360    cusolverSpHandle_t       handle,
361    int                      m,
362    int                      nnz,
363    const cusparseMatDescr_t descrA,
364    const double *           csrVal,
365    const int *              csrRowPtr,
366    const int *              csrColInd,
367    const double *           b,
368    double                   tol,
369    int                      reorder,
370    // output
371    double *x,
372    int *   singularity);
373
374  cusolverStatus_t CUSOLVERAPI cusolverSpCcsrlsvchol(
375    cusolverSpHandle_t       handle,
376    int                      m,
377    int                      nnz,
378    const cusparseMatDescr_t descrA,
379    const cuComplex *        csrVal,
380    const int *              csrRowPtr,
381    const int *              csrColInd,
382    const cuComplex *        b,
383    float                    tol,
384    int                      reorder,
385    // output
386    cuComplex *x,
387    int *      singularity);
388
389  cusolverStatus_t CUSOLVERAPI cusolverSpZcsrlsvchol(
390    cusolverSpHandle_t       handle,
391    int                      m,
392    int                      nnz,
393    const cusparseMatDescr_t descrA,
394    const cuDoubleComplex *  csrVal,
395    const int *              csrRowPtr,
396    const int *              csrColInd,
397    const cuDoubleComplex *  b,
398    double                   tol,
399    int                      reorder,
400    // output
401    cuDoubleComplex *x,
402    int *            singularity);
403
404  /* ----------- CPU least square solver by QR factorization
405   *       solve min|b - A*x|
406   * [lsq] stands for least square
407   * [v] stands for vector
408   * [qr] stands for QR factorization
409   */
410  cusolverStatus_t CUSOLVERAPI cusolverSpScsrlsqvqrHost(
411    cusolverSpHandle_t       handle,
412    int                      m,
413    int                      n,
414    int                      nnz,
415    const cusparseMatDescr_t descrA,
416    const float *            csrValA,
417    const int *              csrRowPtrA,
418    const int *              csrColIndA,
419    const float *            b,
420    float                    tol,
421    int *                    rankA,
422    float *                  x,
423    int *                    p,
424    float *                  min_norm);
425
426  cusolverStatus_t CUSOLVERAPI cusolverSpDcsrlsqvqrHost(
427    cusolverSpHandle_t       handle,
428    int                      m,
429    int                      n,
430    int                      nnz,
431    const cusparseMatDescr_t descrA,
432    const double *           csrValA,
433    const int *              csrRowPtrA,
434    const int *              csrColIndA,
435    const double *           b,
436    double                   tol,
437    int *                    rankA,
438    double *                 x,
439    int *                    p,
440    double *                 min_norm);
441
442  cusolverStatus_t CUSOLVERAPI cusolverSpCcsrlsqvqrHost(
443    cusolverSpHandle_t       handle,
444    int                      m,
445    int                      n,
446    int                      nnz,
447    const cusparseMatDescr_t descrA,
448    const cuComplex *        csrValA,
449    const int *              csrRowPtrA,
450    const int *              csrColIndA,
451    const cuComplex *        b,
452    float                    tol,
453    int *                    rankA,
454    cuComplex *              x,
455    int *                    p,
456    float *                  min_norm);
457
458  cusolverStatus_t CUSOLVERAPI cusolverSpZcsrlsqvqrHost(
459    cusolverSpHandle_t       handle,
460    int                      m,
461    int                      n,
462    int                      nnz,
463    const cusparseMatDescr_t descrA,
464    const cuDoubleComplex *  csrValA,
465    const int *              csrRowPtrA,
466    const int *              csrColIndA,
467    const cuDoubleComplex *  b,
468    double                   tol,
469    int *                    rankA,
470    cuDoubleComplex *        x,
471    int *                    p,
472    double *                 min_norm);
473
474  /* --------- CPU eigenvalue solver by shift inverse
475   *      solve A*x = lambda * x
476   *   where lambda is the eigenvalue nearest mu0.
477   * [eig] stands for eigenvalue solver
478   * [si] stands for shift-inverse
479   */
480  cusolverStatus_t CUSOLVERAPI cusolverSpScsreigvsiHost(
481    cusolverSpHandle_t       handle,
482    int                      m,
483    int                      nnz,
484    const cusparseMatDescr_t descrA,
485    const float *            csrValA,
486    const int *              csrRowPtrA,
487    const int *              csrColIndA,
488    float                    mu0,
489    const float *            x0,
490    int                      maxite,
491    float                    tol,
492    float *                  mu,
493    float *                  x);
494
495  cusolverStatus_t CUSOLVERAPI cusolverSpDcsreigvsiHost(
496    cusolverSpHandle_t       handle,
497    int                      m,
498    int                      nnz,
499    const cusparseMatDescr_t descrA,
500    const double *           csrValA,
501    const int *              csrRowPtrA,
502    const int *              csrColIndA,
503    double                   mu0,
504    const double *           x0,
505    int                      maxite,
506    double                   tol,
507    double *                 mu,
508    double *                 x);
509
510  cusolverStatus_t CUSOLVERAPI cusolverSpCcsreigvsiHost(
511    cusolverSpHandle_t       handle,
512    int                      m,
513    int                      nnz,
514    const cusparseMatDescr_t descrA,
515    const cuComplex *        csrValA,
516    const int *              csrRowPtrA,
517    const int *              csrColIndA,
518    cuComplex                mu0,
519    const cuComplex *        x0,
520    int                      maxite,
521    float                    tol,
522    cuComplex *              mu,
523    cuComplex *              x);
524
525  cusolverStatus_t CUSOLVERAPI cusolverSpZcsreigvsiHost(
526    cusolverSpHandle_t       handle,
527    int                      m,
528    int                      nnz,
529    const cusparseMatDescr_t descrA,
530    const cuDoubleComplex *  csrValA,
531    const int *              csrRowPtrA,
532    const int *              csrColIndA,
533    cuDoubleComplex          mu0,
534    const cuDoubleComplex *  x0,
535    int                      maxite,
536    double                   tol,
537    cuDoubleComplex *        mu,
538    cuDoubleComplex *        x);
539
540  /* --------- GPU eigenvalue solver by shift inverse
541   *      solve A*x = lambda * x
542   *   where lambda is the eigenvalue nearest mu0.
543   * [eig] stands for eigenvalue solver
544   * [si] stands for shift-inverse
545   */
546  cusolverStatus_t CUSOLVERAPI cusolverSpScsreigvsi(
547    cusolverSpHandle_t       handle,
548    int                      m,
549    int                      nnz,
550    const cusparseMatDescr_t descrA,
551    const float *            csrValA,
552    const int *              csrRowPtrA,
553    const int *              csrColIndA,
554    float                    mu0,
555    const float *            x0,
556    int                      maxite,
557    float                    eps,
558    float *                  mu,
559    float *                  x);
560
561  cusolverStatus_t CUSOLVERAPI cusolverSpDcsreigvsi(
562    cusolverSpHandle_t       handle,
563    int                      m,
564    int                      nnz,
565    const cusparseMatDescr_t descrA,
566    const double *           csrValA,
567    const int *              csrRowPtrA,
568    const int *              csrColIndA,
569    double                   mu0,
570    const double *           x0,
571    int                      maxite,
572    double                   eps,
573    double *                 mu,
574    double *                 x);
575
576  cusolverStatus_t CUSOLVERAPI cusolverSpCcsreigvsi(
577    cusolverSpHandle_t       handle,
578    int                      m,
579    int                      nnz,
580    const cusparseMatDescr_t descrA,
581    const cuComplex *        csrValA,
582    const int *              csrRowPtrA,
583    const int *              csrColIndA,
584    cuComplex                mu0,
585    const cuComplex *        x0,
586    int                      maxite,
587    float                    eps,
588    cuComplex *              mu,
589    cuComplex *              x);
590
591  cusolverStatus_t CUSOLVERAPI cusolverSpZcsreigvsi(
592    cusolverSpHandle_t       handle,
593    int                      m,
594    int                      nnz,
595    const cusparseMatDescr_t descrA,
596    const cuDoubleComplex *  csrValA,
597    const int *              csrRowPtrA,
598    const int *              csrColIndA,
599    cuDoubleComplex          mu0,
600    const cuDoubleComplex *  x0,
601    int                      maxite,
602    double                   eps,
603    cuDoubleComplex *        mu,
604    cuDoubleComplex *        x);
605
606  // ----------- enclosed eigenvalues
607
608  cusolverStatus_t CUSOLVERAPI cusolverSpScsreigsHost(
609    cusolverSpHandle_t       handle,
610    int                      m,
611    int                      nnz,
612    const cusparseMatDescr_t descrA,
613    const float *            csrValA,
614    const int *              csrRowPtrA,
615    const int *              csrColIndA,
616    cuComplex                left_bottom_corner,
617    cuComplex                right_upper_corner,
618    int *                    num_eigs);
619
620  cusolverStatus_t CUSOLVERAPI cusolverSpDcsreigsHost(
621    cusolverSpHandle_t       handle,
622    int                      m,
623    int                      nnz,
624    const cusparseMatDescr_t descrA,
625    const double *           csrValA,
626    const int *              csrRowPtrA,
627    const int *              csrColIndA,
628    cuDoubleComplex          left_bottom_corner,
629    cuDoubleComplex          right_upper_corner,
630    int *                    num_eigs);
631
632  cusolverStatus_t CUSOLVERAPI cusolverSpCcsreigsHost(
633    cusolverSpHandle_t       handle,
634    int                      m,
635    int                      nnz,
636    const cusparseMatDescr_t descrA,
637    const cuComplex *        csrValA,
638    const int *              csrRowPtrA,
639    const int *              csrColIndA,
640    cuComplex                left_bottom_corner,
641    cuComplex                right_upper_corner,
642    int *                    num_eigs);
643
644  cusolverStatus_t CUSOLVERAPI cusolverSpZcsreigsHost(
645    cusolverSpHandle_t       handle,
646    int                      m,
647    int                      nnz,
648    const cusparseMatDescr_t descrA,
649    const cuDoubleComplex *  csrValA,
650    const int *              csrRowPtrA,
651    const int *              csrColIndA,
652    cuDoubleComplex          left_bottom_corner,
653    cuDoubleComplex          right_upper_corner,
654    int *                    num_eigs);
655
656  /* --------- CPU symrcm
657   *   Symmetric reverse Cuthill McKee permutation
658   *
659   */
660  cusolverStatus_t CUSOLVERAPI cusolverSpXcsrsymrcmHost(
661    cusolverSpHandle_t       handle,
662    int                      n,
663    int                      nnzA,
664    const cusparseMatDescr_t descrA,
665    const int *              csrRowPtrA,
666    const int *              csrColIndA,
667    int *                    p);
668
669  /* --------- CPU symmdq
670   *   Symmetric minimum degree algorithm by quotient graph
671   *
672   */
673  cusolverStatus_t CUSOLVERAPI cusolverSpXcsrsymmdqHost(
674    cusolverSpHandle_t       handle,
675    int                      n,
676    int                      nnzA,
677    const cusparseMatDescr_t descrA,
678    const int *              csrRowPtrA,
679    const int *              csrColIndA,
680    int *                    p);
681
682  /* --------- CPU symmdq
683   *   Symmetric Approximate minimum degree algorithm by quotient graph
684   *
685   */
686  cusolverStatus_t CUSOLVERAPI cusolverSpXcsrsymamdHost(
687    cusolverSpHandle_t       handle,
688    int                      n,
689    int                      nnzA,
690    const cusparseMatDescr_t descrA,
691    const int *              csrRowPtrA,
692    const int *              csrColIndA,
693    int *                    p);
694
695  /* --------- CPU metis
696   *   symmetric reordering
697   */
698  cusolverStatus_t CUSOLVERAPI cusolverSpXcsrmetisndHost(
699    cusolverSpHandle_t       handle,
700    int                      n,
701    int                      nnzA,
702    const cusparseMatDescr_t descrA,
703    const int *              csrRowPtrA,
704    const int *              csrColIndA,
705    const int64_t *          options,
706    int *                    p);
707
708  /* --------- CPU zfd
709   *  Zero free diagonal reordering
710   */
711  cusolverStatus_t CUSOLVERAPI cusolverSpScsrzfdHost(
712    cusolverSpHandle_t       handle,
713    int                      n,
714    int                      nnz,
715    const cusparseMatDescr_t descrA,
716    const float *            csrValA,
717    const int *              csrRowPtrA,
718    const int *              csrColIndA,
719    int *                    P,
720    int *                    numnz);
721
722  cusolverStatus_t CUSOLVERAPI cusolverSpDcsrzfdHost(
723    cusolverSpHandle_t       handle,
724    int                      n,
725    int                      nnz,
726    const cusparseMatDescr_t descrA,
727    const double *           csrValA,
728    const int *              csrRowPtrA,
729    const int *              csrColIndA,
730    int *                    P,
731    int *                    numnz);
732
733  cusolverStatus_t CUSOLVERAPI cusolverSpCcsrzfdHost(
734    cusolverSpHandle_t       handle,
735    int                      n,
736    int                      nnz,
737    const cusparseMatDescr_t descrA,
738    const cuComplex *        csrValA,
739    const int *              csrRowPtrA,
740    const int *              csrColIndA,
741    int *                    P,
742    int *                    numnz);
743
744  cusolverStatus_t CUSOLVERAPI cusolverSpZcsrzfdHost(
745    cusolverSpHandle_t       handle,
746    int                      n,
747    int                      nnz,
748    const cusparseMatDescr_t descrA,
749    const cuDoubleComplex *  csrValA,
750    const int *              csrRowPtrA,
751    const int *              csrColIndA,
752    int *                    P,
753    int *                    numnz);
754
755  /* --------- CPU permuation
756   *   P*A*Q^T
757   *
758   */
759  cusolverStatus_t CUSOLVERAPI cusolverSpXcsrperm_bufferSizeHost(
760    cusolverSpHandle_t       handle,
761    int                      m,
762    int                      n,
763    int                      nnzA,
764    const cusparseMatDescr_t descrA,
765    const int *              csrRowPtrA,
766    const int *              csrColIndA,
767    const int *              p,
768    const int *              q,
769    size_t *                 bufferSizeInBytes);
770
771  cusolverStatus_t CUSOLVERAPI cusolverSpXcsrpermHost(
772    cusolverSpHandle_t       handle,
773    int                      m,
774    int                      n,
775    int                      nnzA,
776    const cusparseMatDescr_t descrA,
777    int *                    csrRowPtrA,
778    int *                    csrColIndA,
779    const int *              p,
780    const int *              q,
781    int *                    map,
782    void *                   pBuffer);
783
784  /*
785   *  Low-level API: Batched QR
786   *
787   */
788
789  cusolverStatus_t CUSOLVERAPI cusolverSpCreateCsrqrInfo(csrqrInfo_t *info);
790
791  cusolverStatus_t CUSOLVERAPI cusolverSpDestroyCsrqrInfo(csrqrInfo_t info);
792
793  cusolverStatus_t CUSOLVERAPI cusolverSpXcsrqrAnalysisBatched(
794    cusolverSpHandle_t       handle,
795    int                      m,
796    int                      n,
797    int                      nnzA,
798    const cusparseMatDescr_t descrA,
799    const int *              csrRowPtrA,
800    const int *              csrColIndA,
801    csrqrInfo_t              info);
802
803  cusolverStatus_t CUSOLVERAPI cusolverSpScsrqrBufferInfoBatched(
804    cusolverSpHandle_t       handle,
805    int                      m,
806    int                      n,
807    int                      nnz,
808    const cusparseMatDescr_t descrA,
809    const float *            csrVal,
810    const int *              csrRowPtr,
811    const int *              csrColInd,
812    int                      batchSize,
813    csrqrInfo_t              info,
814    size_t *                 internalDataInBytes,
815    size_t *                 workspaceInBytes);
816
817  cusolverStatus_t CUSOLVERAPI cusolverSpDcsrqrBufferInfoBatched(
818    cusolverSpHandle_t       handle,
819    int                      m,
820    int                      n,
821    int                      nnz,
822    const cusparseMatDescr_t descrA,
823    const double *           csrVal,
824    const int *              csrRowPtr,
825    const int *              csrColInd,
826    int                      batchSize,
827    csrqrInfo_t              info,
828    size_t *                 internalDataInBytes,
829    size_t *                 workspaceInBytes);
830
831  cusolverStatus_t CUSOLVERAPI cusolverSpCcsrqrBufferInfoBatched(
832    cusolverSpHandle_t       handle,
833    int                      m,
834    int                      n,
835    int                      nnz,
836    const cusparseMatDescr_t descrA,
837    const cuComplex *        csrVal,
838    const int *              csrRowPtr,
839    const int *              csrColInd,
840    int                      batchSize,
841    csrqrInfo_t              info,
842    size_t *                 internalDataInBytes,
843    size_t *                 workspaceInBytes);
844
845  cusolverStatus_t CUSOLVERAPI cusolverSpZcsrqrBufferInfoBatched(
846    cusolverSpHandle_t       handle,
847    int                      m,
848    int                      n,
849    int                      nnz,
850    const cusparseMatDescr_t descrA,
851    const cuDoubleComplex *  csrVal,
852    const int *              csrRowPtr,
853    const int *              csrColInd,
854    int                      batchSize,
855    csrqrInfo_t              info,
856    size_t *                 internalDataInBytes,
857    size_t *                 workspaceInBytes);
858
859  cusolverStatus_t CUSOLVERAPI cusolverSpScsrqrsvBatched(
860    cusolverSpHandle_t       handle,
861    int                      m,
862    int                      n,
863    int                      nnz,
864    const cusparseMatDescr_t descrA,
865    const float *            csrValA,
866    const int *              csrRowPtrA,
867    const int *              csrColIndA,
868    const float *            b,
869    float *                  x,
870    int                      batchSize,
871    csrqrInfo_t              info,
872    void *                   pBuffer);
873
874  cusolverStatus_t CUSOLVERAPI cusolverSpDcsrqrsvBatched(
875    cusolverSpHandle_t       handle,
876    int                      m,
877    int                      n,
878    int                      nnz,
879    const cusparseMatDescr_t descrA,
880    const double *           csrValA,
881    const int *              csrRowPtrA,
882    const int *              csrColIndA,
883    const double *           b,
884    double *                 x,
885    int                      batchSize,
886    csrqrInfo_t              info,
887    void *                   pBuffer);
888
889  cusolverStatus_t CUSOLVERAPI cusolverSpCcsrqrsvBatched(
890    cusolverSpHandle_t       handle,
891    int                      m,
892    int                      n,
893    int                      nnz,
894    const cusparseMatDescr_t descrA,
895    const cuComplex *        csrValA,
896    const int *              csrRowPtrA,
897    const int *              csrColIndA,
898    const cuComplex *        b,
899    cuComplex *              x,
900    int                      batchSize,
901    csrqrInfo_t              info,
902    void *                   pBuffer);
903
904  cusolverStatus_t CUSOLVERAPI cusolverSpZcsrqrsvBatched(
905    cusolverSpHandle_t       handle,
906    int                      m,
907    int                      n,
908    int                      nnz,
909    const cusparseMatDescr_t descrA,
910    const cuDoubleComplex *  csrValA,
911    const int *              csrRowPtrA,
912    const int *              csrColIndA,
913    const cuDoubleComplex *  b,
914    cuDoubleComplex *        x,
915    int                      batchSize,
916    csrqrInfo_t              info,
917    void *                   pBuffer);
918
919  #if defined(__cplusplus)
920}
921  #endif /* __cplusplus */
922
923#endif // define CUSOLVERSP_H_
924 
codekingpro/portable-devtools · Team Ai