view release on metacpan or search on metacpan
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
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
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
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
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
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
#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
// 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
// http://www.boost.org/LICENSE_1_0.txt)
/** @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
// 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
// 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
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
#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
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
// 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
// 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
#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