1 /* ========================================================================== */
2 /* === Include/cholmod_gpu_kernels.h ======================================== */
3 /* ========================================================================== */
4 
5 /* -----------------------------------------------------------------------------
6  * CHOLMOD/Include/cholmod_gpu_kernels.h.
7  * Copyright (C) 2014, Timothy A. Davis
8  * CHOLMOD/Include/cholmod_gpu.h and the CHOLMOD GPU Module are licensed under
9  * Version 2.0 of the GNU General Public License.  See gpl.txt for a text of
10  * the license.  CHOLMOD is also available under other licenses; contact
11  * authors for details.
12  * http://www.suitesparse.com
13  * -------------------------------------------------------------------------- */
14 
15 /* -----------------------------------------------------------------------------
16  * CUDA kernel support routines for CHOLMOD
17  * -------------------------------------------------------------------------- */
18 
19 #ifndef CHOLMODGPUKERNELS_H
20 #define CHOLMODGPUKERNELS_H
21 
22 /* make it easy for C++ programs to include CHOLMOD */
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 #include "SuiteSparse_config.h"
28 
29 int createMapOnDevice ( Int *d_Map, Int *d_Ls, Int psi, Int nsrow );
30 
31 int createRelativeMapOnDevice ( Int *d_Map, Int *d_Ls, Int *d_RelativeMap,
32                            Int pdi1, Int ndrow, cudaStream_t astream );
33 
34 int addUpateOnDevice ( double *d_A, double *devPtrC, Int *d_RelativeMap,
35     Int ndrow1, Int ndrow2, Int nsrow, cudaStream_t astream );
36 
37 int addComplexUpateOnDevice ( double *d_A, double *devPtrC, Int *d_RelativeMap,
38     Int ndrow1, Int ndrow2, Int nsrow, cudaStream_t astream );
39 
40 int sumAOnDevice ( double *a1, double *a2, const double alpha, int nsrow,
41     int nscol );
42 
43 int sumComplexAOnDevice ( double *a1, double *a2, const double alpha,
44     int nsrow, int nscol );
45 
46 #ifdef __cplusplus
47 }
48 #endif
49 
50 #endif
51