94b2b13d
Pedro Roque
PHACT source
|
1
2
3
4
|
/*
* cl_variables.h
*
* Created on: 01/12/2014
|
4d26a735
Pedro Roque
Increased recogni...
|
5
|
* Author: pedro
|
94b2b13d
Pedro Roque
PHACT source
|
6
7
8
9
10
11
12
13
14
15
|
*/
#ifndef SRC_KERNELS_CL_VARIABLES_H_
#define SRC_KERNELS_CL_VARIABLES_H_
#ifndef __OPENCL_VERSION__
#include "CL/cl.h"
#include "CL/cl_platform.h"
#endif
|
4d26a735
Pedro Roque
Increased recogni...
|
16
|
#include "../config.h"
|
94b2b13d
Pedro Roque
PHACT source
|
17
18
19
|
#if CL_D_TYPE == CL_BITMAP
|
4d26a735
Pedro Roque
Increased recogni...
|
20
|
struct cl_var_bitmap_ {
|
94b2b13d
Pedro Roque
PHACT source
|
21
|
cl_uint c_idx; // index of vs_cs_index where this variable first constraint id is
|
4d26a735
Pedro Roque
Increased recogni...
|
22
23
24
|
cl_ushort n_vals; // number of values in the propagated domain
cl_ushort n_cs; // Number of constraints that constrain this variable
cl_char to_label; // 1 if this variable is set for being labeled and 0 if not
|
94b2b13d
Pedro Roque
PHACT source
|
25
26
27
|
cl_char expanded; // 1 if this variable was fully expanded during sub-search space creation, or 0 if not
cl_char boolean; // 1 if this variable is a boolean or 0 if not
};
|
4d26a735
Pedro Roque
Increased recogni...
|
28
29
30
31
|
struct cl_var_p_bitmap_ {
cl_bitmap prop_d;
cl_ushort n_vals;
|
94b2b13d
Pedro Roque
PHACT source
|
32
33
|
cl_ushort min;
cl_ushort max;
|
4d26a735
Pedro Roque
Increased recogni...
|
34
|
cl_char to_prop; // 1 if this variable is set for being propagated and 0 if not
|
94b2b13d
Pedro Roque
PHACT source
|
35
|
cl_char boolean; // 1 if this variable is a boolean or 0 if not
|
4d26a735
Pedro Roque
Increased recogni...
|
36
37
38
39
|
};
typedef struct cl_var_bitmap_ cl_var_bitmap;
typedef struct cl_var_p_bitmap_ cl_var_p_bitmap;
|
94b2b13d
Pedro Roque
PHACT source
|
40
41
42
43
44
45
46
47
|
#endif
#if CL_D_TYPE == CL_INTERVAL || !__OPENCL_VERSION__
struct cl_var_interval_ {
interval domain;
cl_uint c_idx;
cl_ushort n_vals;
|
4d26a735
Pedro Roque
Increased recogni...
|
48
|
cl_ushort n_cs; // Number of constraints that constrain this variable
|
94b2b13d
Pedro Roque
PHACT source
|
49
|
cl_char to_label; // 1 if this variable is set for being labeled and 0 if not
|
4d26a735
Pedro Roque
Increased recogni...
|
50
|
cl_char expanded; // 1 if this variable was fully expanded during sub-search space creation, or 0 if not
|
94b2b13d
Pedro Roque
PHACT source
|
51
|
cl_char boolean; // 1 if this variable is a boolean or 0 if not
|
4d26a735
Pedro Roque
Increased recogni...
|
52
53
|
};
|
94b2b13d
Pedro Roque
PHACT source
|
54
|
|
4d26a735
Pedro Roque
Increased recogni...
|
55
|
struct cl_var_p_interval_ {
|
94b2b13d
Pedro Roque
PHACT source
|
56
57
58
|
interval prop_d; // propagated domain
cl_char to_prop; // 1 if this variable is set for being propagated and 0 if not
cl_char boolean; // 1 if this variable is a boolean or 0 if not
|
4d26a735
Pedro Roque
Increased recogni...
|
59
60
61
62
|
};
typedef struct cl_var_interval_ cl_var_interval;
typedef struct cl_var_p_interval_ cl_var_p_interval;
|
94b2b13d
Pedro Roque
PHACT source
|
63
64
|
#endif
|
4d26a735
Pedro Roque
Increased recogni...
|
65
|
|
94b2b13d
Pedro Roque
PHACT source
|
66
|
#endif /* SRC_KERNELS_CL_VARIABLES_H_ */
|
4d26a735
Pedro Roque
Increased recogni...
|
|
|
94b2b13d
Pedro Roque
PHACT source
|
|
|