1 /*
2     Copyright (c) 2005-2021 Intel Corporation
3 
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7 
8         http://www.apache.org/licenses/LICENSE-2.0
9 
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15 */
16 
17 /*!
18  * polyover.h : extern declarations for polyover.cpp
19 */
20 
21 #ifndef TBB_examples_polygon_overlay_polyover_H
22 #define TBB_examples_polygon_overlay_polyover_H
23 
24 #include "oneapi/tbb/spin_mutex.h"
25 
26 #include "rpolygon.hpp"
27 
28 extern void OverlayOnePolygonWithMap(Polygon_map_t *resultMap,
29                                      RPolygon *myPoly,
30                                      Polygon_map_t *map2,
31                                      oneapi::tbb::spin_mutex *rMutex);
32 
33 extern void SerialOverlayMaps(Polygon_map_t **resultMap, Polygon_map_t *map1, Polygon_map_t *map2);
34 
35 // extern void NaiveParallelOverlay(Polygon_map_t **result_map, Polygon_map_t *polymap1, Polygon_map_t *polymap2);
36 extern void NaiveParallelOverlay(Polygon_map_t *&result_map,
37                                  Polygon_map_t &polymap1,
38                                  Polygon_map_t &polymap2);
39 
40 extern void SplitParallelOverlay(Polygon_map_t **result_map,
41                                  Polygon_map_t *polymap1,
42                                  Polygon_map_t *polymap2);
43 extern void SplitParallelOverlayCV(concurrent_Polygon_map_t **result_map,
44                                    Polygon_map_t *polymap1,
45                                    Polygon_map_t *polymap2);
46 extern void SplitParallelOverlayETS(ETS_Polygon_map_t **result_map,
47                                     Polygon_map_t *polymap1,
48                                     Polygon_map_t *polymap2);
49 
50 extern void CheckPolygonMap(Polygon_map_t *checkMap);
51 extern bool ComparePolygonMaps(Polygon_map_t *map1, Polygon_map_t *map2);
52 
53 #endif /* TBB_examples_polygon_overlay_polyover_H */
54