1 #ifndef SPQRGPU_HPP_
2 #define SPQRGPU_HPP_
3 
4 #include "GPUQREngine.hpp"
5 
6 void spqrgpu_kernel
7 (
8     spqr_blob <double> *Blob    // contains the entire problem input/output
9 ) ;
10 
11 void spqrgpu_kernel             // placeholder, since complex case not supported
12 (
13     spqr_blob <Complex> *Blob
14 ) ;
15 
16 void spqrgpu_computeFrontStaging
17 (
18     // inputs, not modified on output
19     Long numFronts,     // total number of fronts (nf in caller)
20     Long *Parent,       // size nf+1, assembly tree (f=nf is placeholder)
21     Long *Childp,       // size nf+2, children of f are
22                         //      Child [Childp [f] ... Childp [f+1]-1]
23     Long *Child,        // size nf+1.
24 
25     Long *Fm,           // size nf+1, front f has Fm [f] rows
26     Long *Cm,           // size nf+1, front f has Cm [f] rows in contrib
27     Long *Rp,           // size nf+1, Rj[Rp[f]...Rp[f+1]-1] are the cols in f
28     Long *Sp,           // size m+1, row pointers for sparse matrix S
29     Long *Sleft,        // size n+2, see spqr_stranspose for description
30     Long *Super,        // size nf+1, front f pivotal cols are
31                         //      Super[f]..Super[f+1]-1
32     Long *Post,         // size nf+1, front f is kth, if f = Post [k]
33 
34     Long RimapSize,     // scalar, size of Rimap on the GPU (# of int's)
35     Long RjmapSize,     // scalar, size of Rjmap on the GPU (# of int's)
36 
37     // output, not defined on input:
38     bool *feasible,     // scalar, true if feasible, false if GPU memory too low
39     Long *numStages,    // scalar, number of stages
40     Long *Stagingp,     // size nf+2, fronts are in the list
41                         //      Post [Stagingp [stage]...Stagingp[stage+1]-1]
42     Long *StageMap,     // size nf, front f is in stage StageMap [f]
43 
44     size_t *FSize,      // size nf+1, FSize[stage]: size in bytes of MongoF
45     size_t *RSize,      // size nf+1, Rsize[stage]: size in bytes of MongoR
46     size_t *SSize,      // size nf+1, Ssize[stage]: size in bytes of S
47     Long *FOffsets,     // size nf, front f in MondoF [FOffsets[f]...] on GPU
48     Long *ROffsets,     // size nf, R block in MondoR [Roffsets[f]...] on CPU
49     Long *SOffsets,     // size nf, S entries for front f are in
50                         //      wsS [SOffsets[f]...]
51 
52     // input/output:
53     cholmod_common *cc
54 );
55 
56 void spqrgpu_buildAssemblyMaps
57 (
58     Long numFronts,
59     Long n,
60     Long *Fmap,
61     Long *Post,
62     Long *Super,
63     Long *Rp,
64     Long *Rj,
65     Long *Sleft,
66     Long *Sp,
67     Long *Sj,
68     double *Sx,
69     Long *Fm,
70     Long *Cm,
71     Long *Childp,
72     Long *Child,
73     Long *CompleteStair,
74     int *CompleteRjmap,
75     Long *RjmapOffsets,
76     int *CompleteRimap,
77     Long *RimapOffsets,
78     SEntry *cpuS
79 );
80 
81 #endif
82