Boost-Geometry-Utils

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
src/boost/mpi/packed_iarchive.hpp
src/boost/mpi/packed_oarchive.hpp
src/boost/mpi/python.hpp
src/boost/mpi/python/config.hpp
src/boost/mpi/python/serialize.hpp
src/boost/mpi/python/skeleton_and_content.hpp
src/boost/mpi/request.hpp
src/boost/mpi/skeleton_and_content.hpp
src/boost/mpi/skeleton_and_content_fwd.hpp
src/boost/mpi/status.hpp
src/boost/mpi/timer.hpp
src/boost/mpl/advance.hpp
src/boost/mpl/advance_fwd.hpp
src/boost/mpl/always.hpp
src/boost/mpl/and.hpp
src/boost/mpl/apply.hpp
src/boost/mpl/apply_fwd.hpp
src/boost/mpl/apply_wrap.hpp
src/boost/mpl/arg.hpp
src/boost/mpl/arg_fwd.hpp
src/boost/mpl/assert.hpp

MANIFEST  view on Meta::CPAN

3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
src/boost/test/utils/runtime/env/variable.hpp
src/boost/test/utils/runtime/fwd.hpp
src/boost/test/utils/runtime/interpret_argument_value.hpp
src/boost/test/utils/runtime/parameter.hpp
src/boost/test/utils/runtime/trace.hpp
src/boost/test/utils/runtime/validation.hpp
src/boost/test/utils/trivial_singleton.hpp
src/boost/test/utils/wrap_stringstream.hpp
src/boost/test/utils/xml_printer.hpp
src/boost/throw_exception.hpp
src/boost/timer.hpp
src/boost/token_functions.hpp
src/boost/token_iterator.hpp
src/boost/tokenizer.hpp
src/boost/tr1/detail/config.hpp
src/boost/tr1/detail/config_all.hpp
src/boost/tr1/tuple.hpp
src/boost/tuple/detail/tuple_basic.hpp
src/boost/tuple/detail/tuple_basic_no_partial_spec.hpp
src/boost/tuple/tuple.hpp
src/boost/tuple/tuple_comparison.hpp

src/boost/geometry/algorithms/detail/overlay/assign_parents.hpp  view on Meta::CPAN

176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
    typedef model::box<point_type> box_type;
 
    typedef typename RingMap::iterator map_iterator_type;
 
    {
        typedef ring_info_helper<point_type> helper;
        typedef std::vector<helper> vector_type;
        typedef typename boost::range_iterator<vector_type const>::type vector_iterator_type;
 
#ifdef BOOST_GEOMETRY_TIME_OVERLAY
        boost::timer timer;
#endif
 
 
        std::size_t count_total = ring_map.size();
        std::size_t count_positive = 0;
        std::size_t index_positive = 0; // only used if count_positive>0
        std::size_t index = 0;
 
        // Copy to vector (with new approach this might be obsolete as well, using the map directly)
        vector_type vector(count_total);

src/boost/geometry/algorithms/detail/overlay/assign_parents.hpp  view on Meta::CPAN

216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
                    break;
            }
            if (item.real_area > 0)
            {
                count_positive++;
                index_positive = index;
            }
        }
 
#ifdef BOOST_GEOMETRY_TIME_OVERLAY
        std::cout << " ap: created helper vector: " << timer.elapsed() << std::endl;
#endif
 
        if (! check_for_orientation)
        {
            if (count_positive == count_total)
            {
                // Optimization for only positive rings
                // -> no assignment of parents or reversal necessary, ready here.
                return;
            }

src/boost/geometry/algorithms/detail/overlay/assign_parents.hpp  view on Meta::CPAN

263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
                Geometry1, Geometry2,
                RingCollection, RingMap
            > visitor(geometry1, geometry2, collection, ring_map, check_for_orientation);
 
        geometry::partition
            <
                box_type, ring_info_helper_get_box, ring_info_helper_ovelaps_box
            >::apply(vector, visitor);
 
#ifdef BOOST_GEOMETRY_TIME_OVERLAY
        std::cout << " ap: quadradic loop: " << timer.elapsed() << std::endl;
        std::cout << " ap: check_for_orientation " << check_for_orientation << std::endl;
#endif
    }
 
    if (check_for_orientation)
    {
        for (map_iterator_type it = boost::begin(ring_map);
            it != boost::end(ring_map); ++it)
        {
            if (geometry::math::equals(it->second.get_area(), 0))

src/boost/geometry/algorithms/detail/overlay/overlay.hpp  view on Meta::CPAN

165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
        typedef std::deque<turn_info> container_type;
 
        typedef std::deque
            <
                typename geometry::ring_type<GeometryOut>::type
            > ring_container_type;
 
        container_type turn_points;
 
#ifdef BOOST_GEOMETRY_TIME_OVERLAY
        boost::timer timer;
#endif
 
#ifdef BOOST_GEOMETRY_DEBUG_ASSEMBLE
std::cout << "get turns" << std::endl;
#endif
        detail::get_turns::no_interrupt_policy policy;
        geometry::get_turns
            <
                Reverse1, Reverse2,
                detail::overlay::calculate_distance_policy
            >(geometry1, geometry2, turn_points, policy);
 
#ifdef BOOST_GEOMETRY_TIME_OVERLAY
        std::cout << "get_turns: " << timer.elapsed() << std::endl;
#endif
 
#ifdef BOOST_GEOMETRY_DEBUG_ASSEMBLE
std::cout << "enrich" << std::endl;
#endif
        typename Strategy::side_strategy_type side_strategy;
        geometry::enrich_intersection_points<Reverse1, Reverse2>(turn_points,
                Direction == overlay_union
                    ? geometry::detail::overlay::operation_union
                    : geometry::detail::overlay::operation_intersection,
                    geometry1, geometry2,
                    side_strategy);
 
#ifdef BOOST_GEOMETRY_TIME_OVERLAY
        std::cout << "enrich_intersection_points: " << timer.elapsed() << std::endl;
#endif
 
 
#ifdef BOOST_GEOMETRY_DEBUG_ASSEMBLE
std::cout << "traverse" << std::endl;
#endif
        // Traverse through intersection/turn points and create rings of them.
        // Note that these rings are always in clockwise order, even in CCW polygons,
        // and are marked as "to be reversed" below
        ring_container_type rings;
        traverse<Reverse1, Reverse2, Geometry1, Geometry2>::apply
                (
                    geometry1, geometry2,
                    Direction == overlay_union
                        ? geometry::detail::overlay::operation_union
                        : geometry::detail::overlay::operation_intersection,
                    turn_points, rings
                );
 
#ifdef BOOST_GEOMETRY_TIME_OVERLAY
        std::cout << "traverse: " << timer.elapsed() << std::endl;
#endif
 
 
        std::map<ring_identifier, int> map;
        map_turns(map, turn_points);
 
#ifdef BOOST_GEOMETRY_TIME_OVERLAY
        std::cout << "map_turns: " << timer.elapsed() << std::endl;
#endif
 
        typedef ring_properties<typename geometry::point_type<GeometryOut>::type> properties;
 
        std::map<ring_identifier, properties> selected;
        select_rings<Direction>(geometry1, geometry2, map, selected, ! turn_points.empty());
 
#ifdef BOOST_GEOMETRY_TIME_OVERLAY
        std::cout << "select_rings: " << timer.elapsed() << std::endl;
#endif
 
 
        // Add rings created during traversal
        {
            ring_identifier id(2, 0, -1);
            for (typename boost::range_iterator<ring_container_type>::type
                    it = boost::begin(rings);
                    it != boost::end(rings);
                    ++it)
            {
                selected[id] = properties(*it, true);
                selected[id].reversed = ReverseOut;
                id.multi_index++;
            }
        }
 
#ifdef BOOST_GEOMETRY_TIME_OVERLAY
        std::cout << "add traversal rings: " << timer.elapsed() << std::endl;
#endif
 
 
        assign_parents(geometry1, geometry2, rings, selected);
 
#ifdef BOOST_GEOMETRY_TIME_OVERLAY
        std::cout << "assign_parents: " << timer.elapsed() << std::endl;
#endif
 
        return add_rings<GeometryOut>(selected, geometry1, geometry2, rings, out);
    }
};
 
 
// Metafunction helper for intersection and union
template <order_selector Selector, bool Reverse = false>
struct do_reverse {};

src/boost/mpi.hpp  view on Meta::CPAN

23
24
25
26
27
28
29
30
31
32
33
34
35
#include <boost/mpi/collectives.hpp>
#include <boost/mpi/communicator.hpp>
#include <boost/mpi/datatype.hpp>
#include <boost/mpi/environment.hpp>
#include <boost/mpi/graph_communicator.hpp>
#include <boost/mpi/group.hpp>
#include <boost/mpi/intercommunicator.hpp>
#include <boost/mpi/nonblocking.hpp>
#include <boost/mpi/operations.hpp>
#include <boost/mpi/skeleton_and_content.hpp>
#include <boost/mpi/timer.hpp>
 
#endif // BOOST_MPI_HPP

src/boost/mpi/timer.hpp  view on Meta::CPAN

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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
// Copyright (C) 2006 Douglas Gregor <doug.gregor -at- gmail.com>
 
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 
/** @file timer.hpp
 *
 *  This header provides the @c timer class, which provides access to
 *  the MPI timers.
 */
#ifndef BOOST_MPI_TIMER_HPP
#define BOOST_MPI_TIMER_HPP
 
#include <boost/mpi/config.hpp>
#include <boost/limits.hpp>
 
namespace boost { namespace mpi {
 
/** @brief A simple timer that provides access to the MPI timing
 * facilities.
 *
 *  The @c timer class is a simple wrapper around the MPI timing
 *  facilities that mimics the interface of the Boost Timer library.
 */
class BOOST_MPI_DECL timer {
public:
  /** Initializes the timer
   *
   * @post @c elapsed() == 0
   */
  timer();
 
  /** Restart the timer.
   *
   * @post @c elapsed() == 0
   */
  void restart();
 
  /** Return the amount of time that has elapsed since the last
   *  construction or reset, in seconds.
   */
  double elapsed() const;
 
  /** Return an estimate of the maximum possible value of
   *  elapsed(). Note that this routine may return too high a value on
   *  some systems.
   */
  double elapsed_max() const; 
 
  /** Returns the minimum non-zero value that @c elapsed() may
   return. This is the resolution of the timer.
   */
  double elapsed_min() const;
 
  /** Determines whether the elapsed time values are global times or
      local processor times. */
  static bool time_is_global();
 
private:
  double start_time;
}; // timer
 
inline timer::timer()
{
  restart();
}
 
inline void timer::restart()
{
  start_time = MPI_Wtime();
}
 
inline double timer::elapsed() const
{
  return MPI_Wtime() - start_time;
}
 
inline double timer::elapsed_max() const
{
  return (std::numeric_limits<double>::max)();
}
 
inline double timer::elapsed_min() const
{
  return MPI_Wtick();
}
 
} } // end namespace boost::mpi
 
#endif // BOOST_MPI_TIMER_HPP

src/boost/progress.hpp  view on Meta::CPAN

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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//  boost progress.hpp header file  ------------------------------------------//
 
//  Copyright Beman Dawes 1994-99.  Distributed under the Boost
//  Software License, Version 1.0. (See accompanying file
//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
//  See http://www.boost.org/libs/timer for documentation.
 
//  Revision History
//   1 Dec 01  Add leading progress display strings (suggested by Toon Knapen)
//  20 May 01  Introduce several static_casts<> to eliminate warning messages
//             (Fixed by Beman, reported by Herve Bronnimann)
//  12 Jan 01  Change to inline implementation to allow use without library
//             builds. See docs for more rationale. (Beman Dawes)
//  22 Jul 99  Name changed to .hpp
//  16 Jul 99  Second beta
//   6 Jul 99  Initial boost version
 
#ifndef BOOST_PROGRESS_HPP
#define BOOST_PROGRESS_HPP
 
#include <boost/timer.hpp>
#include <boost/utility.hpp>  // for noncopyable
#include <boost/cstdint.hpp>  // for uintmax_t
#include <iostream>           // for ostream, cout, etc
#include <string>             // for string
 
namespace boost {
 
//  progress_timer  ----------------------------------------------------------//
 
//  A progress_timer behaves like a timer except that the destructor displays
//  an elapsed time message at an appropriate place in an appropriate form.
 
class progress_timer : public timer, private noncopyable
{
   
 public:
  explicit progress_timer( std::ostream & os = std::cout )
     // os is hint; implementation may ignore, particularly in embedded systems
     : m_os(os) {}
  ~progress_timer()
  {
  //  A) Throwing an exception from a destructor is a Bad Thing.
  //  B) The progress_timer destructor does output which may throw.
  //  C) A progress_timer is usually not critical to the application.
  //  Therefore, wrap the I/O in a try block, catch and ignore all exceptions.
    try
    {
      // use istream instead of ios_base to workaround GNU problem (Greg Chicares)
      std::istream::fmtflags old_flags = m_os.setf( std::istream::fixed,
                                                   std::istream::floatfield );
      std::streamsize old_prec = m_os.precision( 2 );
      m_os << elapsed() << " s\n" // "s" is System International d'Unites std
                        << std::endl;
      m_os.flags( old_flags );
      m_os.precision( old_prec );
    }
 
    catch (...) {} // eat any exceptions
  } // ~progress_timer
 
 private:
  std::ostream & m_os;
};
 
 
//  progress_display  --------------------------------------------------------//
 
//  progress_display displays an appropriate indication of
//  progress at an appropriate place in an appropriate form.

src/boost/test/execution_monitor.hpp  view on Meta::CPAN

154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
// Public properties
 
//  The p_catch_system_errors parameter specifies whether the monitor should
//  try to catch system errors/exceptions that would cause program to crash
//  in regular case
unit_test::readwrite_property<bool> p_catch_system_errors;
//  The p_auto_start_dbg parameter specifies whether the monitor should
//  try to attach debugger in case of caught system error
unit_test::readwrite_property<bool> p_auto_start_dbg;
//  The p_timeout parameter specifies the seconds that elapse before
//  a timer_error occurs.  May be ignored on some platforms.
unit_test::readwrite_property<int>  p_timeout;
//  The p_use_alt_stack parameter specifies whether the monitor should
//  use alternative stack for the signal catching
unit_test::readwrite_property<bool> p_use_alt_stack;
//  The p_detect_fp_exceptions parameter specifies whether the monitor should
//  try to detect hardware floating point exceptions
unit_test::readwrite_property<bool> p_detect_fp_exceptions;
 
int         execute( unit_test::callback0<int> const& F );
//  Returns:  Value returned by function call F().

src/boost/test/impl/execution_monitor.ipp  view on Meta::CPAN

332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
    report_error( execution_exception::system_error,
                  "signal: generated by kill() (or family); uid=%d; pid=%d",
                  (int)m_sig_info->si_uid, (int)m_sig_info->si_pid );
    break;
case SI_QUEUE:
    report_error( execution_exception::system_error,
                  "signal: sent by sigqueue()" );
    break;
case SI_TIMER:
    report_error( execution_exception::system_error,
                  "signal: the expiration of a timer set by timer_settimer()" );
    break;
case SI_ASYNCIO:
    report_error( execution_exception::system_error,
                  "signal: generated by the completion of an asynchronous I/O request" );
    break;
case SI_MESGQ:
    report_error( execution_exception::system_error,
                  "signal: generated by the the arrival of a message on an empty message queue" );
    break;
default:

src/boost/test/impl/framework.ipp  view on Meta::CPAN

27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include <boost/test/progress_monitor.hpp>
#include <boost/test/results_reporter.hpp>
#include <boost/test/test_tools.hpp>
 
#include <boost/test/detail/unit_test_parameters.hpp>
#include <boost/test/detail/global_typedef.hpp>
 
#include <boost/test/utils/foreach.hpp>
 
// Boost
#include <boost/timer.hpp>
 
// STL
#include <map>
#include <set>
#include <cstdlib>
#include <ctime>
 
#ifdef BOOST_NO_STDC_NAMESPACE
namespace std { using ::time; using ::srand; }
#endif

src/boost/test/impl/framework.ipp  view on Meta::CPAN

143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
if( !tc.check_dependencies() ) {
    BOOST_TEST_FOREACH( test_observer*, to, m_observers )
        to->test_unit_skipped( tc );
 
    return;
}
 
BOOST_TEST_FOREACH( test_observer*, to, m_observers )
    to->test_unit_start( tc );
 
boost::timer tc_timer;
test_unit_id bkup = m_curr_test_case;
m_curr_test_case = tc.p_id;
unit_test_monitor_t::error_level run_result = unit_test_monitor.execute_and_translate( tc );
 
unsigned long elapsed = static_cast<unsigned long>( tc_timer.elapsed() * 1e6 );
 
if( unit_test_monitor.is_critical_error( run_result ) ) {
    BOOST_TEST_FOREACH( test_observer*, to, m_observers )
        to->test_aborted();
}
 
BOOST_TEST_FOREACH( test_observer*, to, m_observers )
    to->test_unit_finish( tc, elapsed );
 
m_curr_test_case = bkup;

src/boost/test/impl/unit_test_suite.ipp  view on Meta::CPAN

18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Boost.Test
#include <boost/detail/workaround.hpp>
#include <boost/test/unit_test_suite_impl.hpp>
#include <boost/test/framework.hpp>
#include <boost/test/utils/foreach.hpp>
#include <boost/test/results_collector.hpp>
#include <boost/test/detail/unit_test_parameters.hpp>
 
// Boost
#include <boost/timer.hpp>
 
// STL
#include <algorithm>
#include <vector>
 
#include <boost/test/detail/suppress_warnings.hpp>
 
#if BOOST_WORKAROUND(__BORLANDC__, < 0x600) && \
    BOOST_WORKAROUND(_STLPORT_VERSION, <= 0x450) \
    /**/

src/boost/timer.hpp  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//  boost timer.hpp header file  ---------------------------------------------//
 
//  Copyright Beman Dawes 1994-99.  Distributed under the Boost
//  Software License, Version 1.0. (See accompanying file
//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
//  See http://www.boost.org/libs/timer for documentation.
 
//  Revision History
//  01 Apr 01  Modified to use new <boost/limits.hpp> header. (JMaddock)
//  12 Jan 01  Change to inline implementation to allow use without library
//             builds. See docs for more rationale. (Beman Dawes)
//  25 Sep 99  elapsed_max() and elapsed_min() added (John Maddock)
//  16 Jul 99  Second beta
//   6 Jul 99  Initial boost version
 
#ifndef BOOST_TIMER_HPP

src/boost/timer.hpp  view on Meta::CPAN

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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#include <ctime>
#include <boost/limits.hpp>
 
# ifdef BOOST_NO_STDC_NAMESPACE
    namespace std { using ::clock_t; using ::clock; }
# endif
 
 
namespace boost {
 
//  timer  -------------------------------------------------------------------//
 
//  A timer object measures elapsed time.
 
//  It is recommended that implementations measure wall clock rather than CPU
//  time since the intended use is performance measurement on systems where
//  total elapsed time is more important than just process or CPU time.
 
//  Warnings: The maximum measurable elapsed time may well be only 596.5+ hours
//  due to implementation limitations.  The accuracy of timings depends on the
//  accuracy of timing information provided by the underlying platform, and
//  this varies a great deal from platform to platform.
 
class timer
{
 public:
         timer() { _start_time = std::clock(); } // postcondition: elapsed()==0
//         timer( const timer& src );      // post: elapsed()==src.elapsed()
//        ~timer(){}
//  timer& operator=( const timer& src );  // post: elapsed()==src.elapsed()
  void   restart() { _start_time = std::clock(); } // post: elapsed()==0
  double elapsed() const                  // return elapsed time in seconds
    { return  double(std::clock() - _start_time) / CLOCKS_PER_SEC; }
 
  double elapsed_max() const   // return estimated maximum value for elapsed()
  // Portability warning: elapsed_max() may return too high a value on systems
  // where std::clock_t overflows or resets at surprising values.
  {
    return (double((std::numeric_limits<std::clock_t>::max)())
       - double(_start_time)) / double(CLOCKS_PER_SEC);
  }
 
  double elapsed_min() const            // return minimum value for elapsed()
   { return double(1)/double(CLOCKS_PER_SEC); }
 
 private:
  std::clock_t _start_time;
}; // timer
 
} // namespace boost
 
#endif  // BOOST_TIMER_HPP



( run in 0.329 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )