94b2b13d
Pedro Roque
PHACT source
|
1
|
/*
|
4d26a735
Pedro Roque
Increased recogni...
|
2
|
* cl_expore.h
|
94b2b13d
Pedro Roque
PHACT source
|
3
4
|
*
* Created on: 10/09/2019
|
4d26a735
Pedro Roque
Increased recogni...
|
5
|
* Author: pedro
|
94b2b13d
Pedro Roque
PHACT source
|
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
*/
#ifndef SRC_KERNELS_CL_EXPLORE_H_
#define SRC_KERNELS_CL_EXPLORE_H_
#ifndef __OPENCL_VERSION__
#include <stddef.h>
#include <stdio.h>
#include "cl_aux_functions.h"
#include "cl_propagators.h"
#include "../utils/cl_syntax.h"
#else
#include "cl_aux_functions.c"
#include "cl_propagators.c"
#endif
|
94b2b13d
Pedro Roque
PHACT source
|
26
27
28
29
30
31
32
33
34
35
36
37
|
#define CL_PRINT_CSP 0 // 1 to print the CSP as received in the device, 0 to not print
#include "../config.h"
#include "../domains.h"
#include "cl_constraints.h"
#include "cl_variables.h"
#include "cl_ttl.h"
#if CL_D_TYPE == CL_BITMAP
#include "cl_bitmaps.h"
#elif CL_D_TYPE == CL_INTERVAL
#include "cl_intervals.h"
|
4d26a735
Pedro Roque
Increased recogni...
|
38
39
|
#endif
|
94b2b13d
Pedro Roque
PHACT source
|
40
41
42
43
44
45
46
47
48
49
50
|
__kernel void explore( __global unsigned int* atoms, CL_INTS_MEM int* ints,
__global DOMAIN_* backtrack1,
#if CL_USE_N_BUFFERS > 1
__global DOMAIN_* backtrack2,
#endif
#if CL_USE_N_BUFFERS > 2
__global DOMAIN_* backtrack3,
#endif
#if CL_USE_N_BUFFERS > 3
__global DOMAIN_* backtrack4,
|
4d26a735
Pedro Roque
Increased recogni...
|
51
|
#endif
|
94b2b13d
Pedro Roque
PHACT source
|
52
|
|
4d26a735
Pedro Roque
Increased recogni...
|
53
|
__global int* generic_mem,
|
94b2b13d
Pedro Roque
PHACT source
|
54
55
56
|
#if CL_CS_IGNORE
__global char* cs_ignore_,
#endif
|
4d26a735
Pedro Roque
Increased recogni...
|
57
|
|
94b2b13d
Pedro Roque
PHACT source
|
58
59
|
#if CL_WORK == CL_ONE || CL_WORK == CL_OPT
__global DOMAIN_* domains,
|
4d26a735
Pedro Roque
Increased recogni...
|
60
61
|
#endif
|
94b2b13d
Pedro Roque
PHACT source
|
62
63
|
CL_VS_MEM VARS* vs, CL_CS_MEM cl_constr* cs,
CL_MEMORY VARS_PROP* vs_prop, CL_MEMORY unsigned short* vs_id_to_prop
|
4d26a735
Pedro Roque
Increased recogni...
|
64
|
|
94b2b13d
Pedro Roque
PHACT source
|
65
66
67
|
#if CL_D_TYPE == CL_BITMAP
, CL_B_DS_MEM cl_bitmap* b_ds // when using bitmaps, this array contains the original domains of all the CSP variables
#endif
|
4d26a735
Pedro Roque
Increased recogni...
|
68
|
|
94b2b13d
Pedro Roque
PHACT source
|
69
70
71
|
#if CL_STATS == 1
, __global unsigned long* stats // if statistics should be collected
#endif
|
4d26a735
Pedro Roque
Increased recogni...
|
72
|
|
94b2b13d
Pedro Roque
PHACT source
|
73
74
75
|
#if CL_N_DEVS > 1
,
__global unsigned long* props // 1 per work-item for counting the number of propagations made by each work-item
|
4d26a735
Pedro Roque
Increased recogni...
|
76
|
#endif
|
94b2b13d
Pedro Roque
PHACT source
|
77
78
79
80
|
#if CL_N_SHARED_SS > 0
, __global DOMAIN_* shared_ss // stores for work-sharing
, __global int* shared_ss_flags
|
4d26a735
Pedro Roque
Increased recogni...
|
81
82
|
#endif
|
94b2b13d
Pedro Roque
PHACT source
|
83
84
85
86
87
|
#if CL_FILTERING
, __global DOMAIN_* filt_domains // when filtering the CSP for the domains of the variables
, __global char* filt_cs // when filtering the CSP for the flag of ignoring constraints
#endif
|