File: GPUQREngine_Common.hpp

package info (click to toggle)
suitesparse 1%3A5.8.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 152,716 kB
  • sloc: ansic: 774,385; cpp: 24,213; makefile: 6,310; fortran: 1,927; java: 1,826; csh: 1,686; ruby: 725; sh: 535; perl: 225; python: 209; sed: 164; awk: 60
file content (82 lines) | stat: -rw-r--r-- 2,886 bytes parent folder | download | duplicates (4)
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
// =============================================================================
// === GPUQREngine/Include/GPUQREngine_Common.hpp ==============================
// =============================================================================
//
// This include file contains
//    - Thread geometry and related manifest constants
//    - Common macros and definitions
//
// =============================================================================

#ifndef GPUQRENGINE_COMMON_HPP
#define GPUQRENGINE_COMMON_HPP

#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include "SuiteSparseGPU_Runtime.hpp"


/*** GPU Parameters **********************************************************/

//
// PANELSIZE  refers to the number of tiles that we can accomodate in
//            an apply or factorize tasks
// TILESIZE   refers to the square dimension of dense front data composed
//            as blocks into panels
// HALFTILE   refers to half the TILESIZE square dimension. This is used in
//            some kernels to optimize
// PADDING    refers to the amount of padding required to prevent shared memory
//            bank conflicts. In reality, our "tiles" are TILESIZE+PADDING in
//            square dimension size.
// NUMTHREADS refers to the number of threads with which we launch each kernel
// PACKASSEMBLY_SHMEM_MAPINTS
//            refers to the number of RiMap and RjMap integers that we can
//            keep in shared memory for pack assembly tasks. This value is
//            used in the decomposition of contribution blocks and the
//            subsequent construction of PackAssembly tasks.
#define PANELSIZE           (3)
#define TILESIZE            (32)
#define HALFTILE            (TILESIZE / 2)
#define PADDING             (1)

#define NUMTHREADS                     384
#define PACKASSEMBLY_SHMEM_MAPINTS     2024


/*** Common Macros ***********************************************************/

// ceiling of a/b for two integers a and b
#ifndef CEIL
#define CEIL(a,b)   (((a) + (b) - 1) / (b))
#endif

#ifndef MIN
#define MIN(x,y)    ((x) < (y) ? (x) : (y))
#endif

#ifndef MAX
#define MAX(x,y)    ((x) > (y) ? (x) : (y))
#endif

#define EMPTY       (-1)
#define Int         SuiteSparse_long

// To render the buckets for visualization in graphvis, uncomment this next
// line, or compile the code with -DGPUQRENGINE_RENDER
// #define GPUQRENGINE_RENDER

// deprecated:
// and also enable one or both of these, as true:
// #define RENDER_DENSE_FACTORIZATION       false
// #define RENDER_SPARSE_FACTORIZATION      false

// To enable pipelining (combined apply-factorize tasks), uncomment this
// next 3 lines, or compile with -DGPUQRENGINE_PIPELINING
//  #ifndef GPUQRENGINE_PIPELINING
//  #define GPUQRENGINE_PIPELINING
//  #endif
// This is an experimental feature that is not fully tested.
// It should not be used in production use.

#endif