1 // Boost.Geometry (aka GGL, Generic Geometry Library)
2 
3 // Copyright (c) 2015 Barend Gehrels, Amsterdam, the Netherlands.
4 
5 // This file was modified by Oracle on 2018.
6 // Modifications copyright (c) 2018, Oracle and/or its affiliates.
7 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
8 
9 // Use, modification and distribution is subject to the Boost Software License,
10 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
11 // http://www.boost.org/LICENSE_1_0.txt)
12 
13 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_SECTIONS_SECTION_BOX_POLICIES_HPP
14 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_SECTIONS_SECTION_BOX_POLICIES_HPP
15 
16 
17 #include <boost/geometry/core/coordinate_type.hpp>
18 #include <boost/geometry/algorithms/detail/disjoint/box_box.hpp>
19 #include <boost/geometry/algorithms/expand.hpp>
20 
21 
22 namespace boost { namespace geometry
23 {
24 
25 #ifndef DOXYGEN_NO_DETAIL
26 namespace detail { namespace section
27 {
28 
29 template <typename ExpandBoxStrategy>
30 struct get_section_box
31 {
32     template <typename Box, typename Section>
33     static inline void apply(Box& total, Section const& section)
34     {
35         assert_coordinate_type_equal(total, section.bounding_box);
36         geometry::expand(total, section.bounding_box,
37                          ExpandBoxStrategy());
38     }
39 };
LoadBalancerAC(int64_t sqrtx,int64_t y,int threads,bool is_print)40 
41 template <typename DisjointBoxBoxStrategy>
42 struct overlaps_section_box
43 {
44     template <typename Box, typename Section>
45     static inline bool apply(Box const& box, Section const& section)
46     {
47         assert_coordinate_type_equal(box, section.bounding_box);
48         return ! detail::disjoint::disjoint_box_box(box, section.bounding_box,
49                                                     DisjointBoxBoxStrategy());
50     }
51 };
52 
53 
54 }} // namespace detail::section
55 #endif
56 
57 
58 }} // namespace boost::geometry
59 
60 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_SECTIONS_SECTION_BOX_POLICIES_HPP
61