summaryrefslogtreecommitdiff
path: root/benchmarks/CUDA/MUM/common.cu
blob: 5a9183f3e3347de1d49b443480f839dcba5e0b89 (plain)
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
#ifndef COMMON_CU__
#define COMMON_CU__ 1
// Children are labeled as ACGT$
const int basecount = 5;

// Note: max pixel size is 16 bytes

const unsigned char DNA_A = 'A';
const unsigned char DNA_C = 'B';
const unsigned char DNA_G = 'C';
const unsigned char DNA_T = 'D';
const unsigned char DNA_S = 'E';

// 4 bytes
struct TextureAddress
{
  union
  {
    unsigned int data;

    struct
    {
	  unsigned short x;
      unsigned short y;
    };
  };
};

// Store the start, end coordinate of node, and $link in 1 pixel
struct PixelOfNode
{
  union
  {
    ulong4 data;
    struct
    {
      int start;
      int end;
      TextureAddress childD;
      TextureAddress suffix;
    };
  };
};

// Store the ACGT links in 1 pixel
struct PixelOfChildren
{
  union
  {
    ulong4 data;
	TextureAddress children[4];
  };
};

#define FORWARD   0x0000
#define REVERSE   0x8000
#define FRMASK    0x8000
#define FRUMASK   0x7FFF


#endif