1 //------------------------------------------------------------------------------
2 // GxB_cuda_init: initialize GraphBLAS for use with CUDA
3 //------------------------------------------------------------------------------
4
5 // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
6 // SPDX-License-Identifier: Apache-2.0
7
8 //------------------------------------------------------------------------------
9
10 // DRAFT: in progress
11
12 // GrB_init, GxB_init, or GxB_cuda_init must called before any other GraphBLAS
13 // operation. GrB_finalize must be called as the last GraphBLAS operation.
14
15 // If CUDA was not available when GraphBLAS was compiled, then this function
16 // acks just like GrB_init.
17
18 #include "GB.h"
19
GxB_cuda_init(GrB_Mode mode)20 GrB_Info GxB_cuda_init // start up GraphBLAS for use with CUDA
21 (
22 GrB_Mode mode // blocking or non-blocking mode
23 )
24 {
25
26 //--------------------------------------------------------------------------
27 // check inputs
28 //--------------------------------------------------------------------------
29
30 GB_CONTEXT ("GxB_cuda_init (mode)") ;
31
32 //--------------------------------------------------------------------------
33 // initialize GraphBLAS
34 //--------------------------------------------------------------------------
35
36 return (GB_init
37 (mode, // blocking or non-blocking mode
38 NULL, NULL, NULL, NULL, // use GxB_cuda_* memory managment
39 true, // memory functions are thread-safe
40 true, // use CUDA
41 Context)) ;
42 }
43
44