1 // =============================================================================
2 // === GPUQREngine/Include/GPUQREngine.hpp =====================================
3 // =============================================================================
4 //
5 // This is the main user-level include file.
6 //
7 // =============================================================================
8 
9 #ifndef GPUQRENGINE_HPP
10 #define GPUQRENGINE_HPP
11 
12 #include "SuiteSparseGPU_Runtime.hpp"
13 #include "GPUQREngine_Front.hpp"
14 #include "GPUQREngine_Stats.hpp"
15 
16 enum QREngineResultCode
17 {
18     QRENGINE_SUCCESS,           // GPU QR was successfull
19     QRENGINE_OUTOFMEMORY,       // GPU QR ran out of memory
20     QRENGINE_GPUERROR           // failed to communicated with the GPU
21 };
22 
23 // Use C++ Polymorphism to provide many different function signatures and
24 // call patterns.
25 QREngineResultCode GPUQREngine
26 (
27     size_t gpuMemorySize,
28     Front *userFronts,
29     Int numFronts,
30     QREngineStats *stats = NULL
31 );
32 
33 QREngineResultCode GPUQREngine
34 (
35     size_t gpuMemorySize,
36     Front *userFronts,
37     Int numFronts,
38     Int *Parent,
39     Int *Childp,
40     Int *Child,
41     QREngineStats *stats = NULL
42 );
43 
44 Int *GPUQREngine_FindStaircase
45 (
46     Front *front                // The front whose staircase we are computing
47 );
48 
49 // Version information:
50 #define GPUQRENGINE_DATE "May 4, 2016"
51 #define GPUQRENGINE_VER_CODE(main,sub) ((main) * 1000 + (sub))
52 #define GPUQRENGINE_MAIN_VERSION 1
53 #define GPUQRENGINE_SUB_VERSION 0
54 #define GPUQRENGINE_SUBSUB_VERSION 5
55 #define GPUQRENGINE_VERSION \
56     GPUQRENGINE_VER_CODE(GPUQRENGINE_MAIN_VERSION,GPUQRENGINE_SUB_VERSION)
57 
58 #endif
59