-
Notifications
You must be signed in to change notification settings - Fork 4
/
pla.h
46 lines (29 loc) · 761 Bytes
/
pla.h
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
//
// Created by Jikai Lu on 4/30/20.
//
#ifndef FINAL_PLA_H
#define FINAL_PLA_H
#include <omp.h>
#include <vector>
#include <queue>
#include <atomic>
#include "map.h"
class thread_state {
public:
priority_queue<pair<int, pair<Node*, Node *>>> open_list;
int count;
std::queue<pair<int, pair<Node*,Node *>>> wait_list;
std::vector<thread_state*> neighbors;
omp_lock_t lock;
public:
thread_state() : count(0){
omp_init_lock(&lock);
}
};
extern int optimal_length;
extern std::atomic<int> open_node_num;
extern thread_state* thread_array;
extern std::vector<int> start_g_value;
//extern std::queue<pair<int, Node *>> wait_list;
TestResult* find_path_pla(const Map* map, int thread_count);
#endif //FINAL_PLA_H