-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclsupport.h
More file actions
39 lines (29 loc) · 834 Bytes
/
clsupport.h
File metadata and controls
39 lines (29 loc) · 834 Bytes
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
/**
* @file clsupport.h
* @brief OpenCL helper functions for n-puzzle solver program
* @author Mitchell Clay
* @date 4/18/2020
**/
#ifndef clsupport_H
#define clsupport_H
struct CLNode {
// address of parent Node struct that this node was
// generated from
unsigned parent;
// stores blank tile position
unsigned blank_position;
// count of how many elements are not in final position
int cost;
// number of moves from initial state to get here
int level;
// direction blank moved to get here
int direction;
// child nodes
int children[4];
// row-major representation of puzzle grid state
unsigned arr[9];
};
void print_ret_status(int);
int print_cl_devices();
void CLSolve(unsigned*, unsigned*, unsigned, unsigned, bool, bool);
#endif