File: hipsolver-sparse.h

package info (click to toggle)
hipsolver 6.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 11,096 kB
  • sloc: cpp: 72,703; f90: 8,280; sh: 573; python: 531; ansic: 84; makefile: 51; xml: 10
file content (109 lines) | stat: -rw-r--r-- 7,499 bytes parent folder | download
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
/* ************************************************************************
 * Copyright (C) 2023-2024 Advanced Micro Devices, Inc.
 * ************************************************************************ */

#ifndef HIPSOLVER_SPARSE_H
#define HIPSOLVER_SPARSE_H

#include "hipsolver-types.h"

typedef void* hipsolverSpHandle_t;

typedef void* hipsparseMatDescr_t;

#ifdef __cplusplus
extern "C" {
#endif

HIPSOLVER_EXPORT hipsolverStatus_t hipsolverSpCreate(hipsolverSpHandle_t* handle);

HIPSOLVER_EXPORT hipsolverStatus_t hipsolverSpDestroy(hipsolverSpHandle_t handle);

HIPSOLVER_EXPORT hipsolverStatus_t hipsolverSpSetStream(hipsolverSpHandle_t handle,
                                                        hipStream_t         streamId);

// linear solver based on Cholesky
HIPSOLVER_EXPORT hipsolverStatus_t hipsolverSpScsrlsvchol(hipsolverSpHandle_t       handle,
                                                          int                       n,
                                                          int                       nnzA,
                                                          const hipsparseMatDescr_t descrA,
                                                          const float*              csrVal,
                                                          const int*                csrRowPtr,
                                                          const int*                csrColInd,
                                                          const float*              b,
                                                          float                     tolerance,
                                                          int                       reorder,
                                                          float*                    x,
                                                          int*                      singularity);

HIPSOLVER_EXPORT hipsolverStatus_t hipsolverSpDcsrlsvchol(hipsolverSpHandle_t       handle,
                                                          int                       n,
                                                          int                       nnzA,
                                                          const hipsparseMatDescr_t descrA,
                                                          const double*             csrVal,
                                                          const int*                csrRowPtr,
                                                          const int*                csrColInd,
                                                          const double*             b,
                                                          double                    tolerance,
                                                          int                       reorder,
                                                          double*                   x,
                                                          int*                      singularity);

HIPSOLVER_EXPORT hipsolverStatus_t hipsolverSpScsrlsvcholHost(hipsolverSpHandle_t       handle,
                                                              int                       n,
                                                              int                       nnzA,
                                                              const hipsparseMatDescr_t descrA,
                                                              const float*              csrVal,
                                                              const int*                csrRowPtr,
                                                              const int*                csrColInd,
                                                              const float*              b,
                                                              float                     tolerance,
                                                              int                       reorder,
                                                              float*                    x,
                                                              int* singularity);

HIPSOLVER_EXPORT hipsolverStatus_t hipsolverSpDcsrlsvcholHost(hipsolverSpHandle_t       handle,
                                                              int                       n,
                                                              int                       nnzA,
                                                              const hipsparseMatDescr_t descrA,
                                                              const double*             csrVal,
                                                              const int*                csrRowPtr,
                                                              const int*                csrColInd,
                                                              const double*             b,
                                                              double                    tolerance,
                                                              int                       reorder,
                                                              double*                   x,
                                                              int* singularity);

// linear solver based on QR
HIPSOLVER_EXPORT hipsolverStatus_t hipsolverSpScsrlsvqr(hipsolverSpHandle_t       handle,
                                                        int                       n,
                                                        int                       nnz,
                                                        const hipsparseMatDescr_t descrA,
                                                        const float*              csrVal,
                                                        const int*                csrRowPts,
                                                        const int*                csrColInd,
                                                        const float*              b,
                                                        double                    tolerance,
                                                        int                       reorder,
                                                        float*                    x,
                                                        int*                      singularity);

HIPSOLVER_EXPORT hipsolverStatus_t hipsolverSpDcsrlsvqr(hipsolverSpHandle_t       handle,
                                                        int                       n,
                                                        int                       nnz,
                                                        const hipsparseMatDescr_t descrA,
                                                        const double*             csrVal,
                                                        const int*                csrRowPts,
                                                        const int*                csrColInd,
                                                        const double*             b,
                                                        double                    tolerance,
                                                        int                       reorder,
                                                        double*                   x,
                                                        int*                      singularity);

#ifdef __cplusplus
}
#endif

#endif // HIPSOLVER_SPARSE_H