// This file is part of the Herezh++ application. // // The finite element software Herezh++ is dedicated to the field // of mechanics for large transformations of solid structures. // It is developed by Gérard Rio (APP: IDDN.FR.010.0106078.000.R.P.2006.035.20600) // INSTITUT DE RECHERCHE DUPUY DE LÔME (IRDL) . // // Herezh++ is distributed under GPL 3 license ou ultérieure. // // Copyright (C) 1997-2022 Université Bretagne Sud (France) // AUTHOR : Gérard Rio // E-MAIL : gerardrio56@free.fr // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, // or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. // See the GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // For more information, please consult: . /************************************************************************ * DATE: 01/02/2016 * * $ * * AUTEUR: G RIO (mailto:gerardrio56@free.fr) * * $ * * PROJET: Herezh++ * * $ * ************************************************************************ * BUT: une classe dédiée à la gestion des temps d'exécution. * * Il s'agit ici de la modification et de l'adaptation du fichier * * boost/chrono/process_cpu_clocks.hpp de la bibliothèque boost * * pour utiliser un chrono en microseconde plutôt que nano. * *** en fait pas utilisé !!!!!!!!!!! * $ * * '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' * * $ * ************************************************************************/ #ifndef CHRONO_GR_H #define CHRONO_GR_H /** @defgroup chrono_boost_modifié_GR chrono_boost_modifié_par_GR * * BUT: une classe dédiée à la gestion des temps d'exécution. * Il s'agit ici de la modification et de l'adaptation du fichier * boost/chrono/process_cpu_clocks.hpp de la bibliothèque boost * pour utiliser un chrono en microseconde plutôt que nano. * * * \author Gérard Rio * \version 1.0 * \date 01/02/2016 * \brief boost/chrono/process_cpu_clocks.hpp pour utiliser un chrono en microseconde plutôt que nano. * */ // modification et adaptation du fichier si dessous pour utiliser un chrono en microseconde plutôt quane nano // boost/chrono/process_cpu_clocks.hpp -----------------------------------------------------------// // Copyright 2009-2011 Vicente J. Botet Escriba // Copyright (c) Microsoft Corporation 2014 // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // See http://www.boost.org/libs/system for documentation. #include #if defined(BOOST_CHRONO_HAS_PROCESS_CLOCKS) #include #include #include #include #include #include #include #ifndef BOOST_CHRONO_HEADER_ONLY #include // must be the last #include #endif /// @addtogroup chrono_boost_modifié_GR /// @{ /// GR : ajout dans le namespace boost namespace boost { /// GR : ajout dans le namespace chrono namespace chrono { class BOOST_CHRONO_DECL process_real_cpu_clock_micro_GR ///< ajout de _micro_GR { public: typedef microseconds duration; ///< ici on a changé nano en micro typedef duration::rep rep; typedef duration::period period; typedef chrono::time_point time_point; ///< ici ajout de _micro_GR BOOST_STATIC_CONSTEXPR bool is_steady = true; static BOOST_CHRONO_INLINE time_point now() BOOST_NOEXCEPT; #if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING static BOOST_CHRONO_INLINE time_point now(system::error_code & ec ); #endif }; #if ! BOOST_OS_WINDOWS || BOOST_PLAT_WINDOWS_DESKTOP class BOOST_CHRONO_DECL process_user_cpu_clock_micro_GR ///< ajout de _micro_GR { public: typedef microseconds duration; ///< ici on a changé nano en micro typedef duration::rep rep; typedef duration::period period; typedef chrono::time_point time_point; ///< ici ajout de _micro_GR BOOST_STATIC_CONSTEXPR bool is_steady = true; static BOOST_CHRONO_INLINE time_point now() BOOST_NOEXCEPT; #if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING static BOOST_CHRONO_INLINE time_point now(system::error_code & ec ); #endif }; class BOOST_CHRONO_DECL process_system_cpu_clock_micro_GR ///< ajout de _micro_GR { public: typedef microseconds duration; ///< ici on a changé nano en micro typedef duration::rep rep; typedef duration::period period; typedef chrono::time_point time_point; ///< ici ajout de _micro_GR BOOST_STATIC_CONSTEXPR bool is_steady = true; static BOOST_CHRONO_INLINE time_point now() BOOST_NOEXCEPT; #if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING static BOOST_CHRONO_INLINE time_point now(system::error_code & ec ); #endif }; #endif } /// GR : ajout dans le namespace chrono namespace chrono { typedef process_times process_cpu_clock_times_micro_GR; ///< nano en micro et ajout de _micro_GR #if ! BOOST_OS_WINDOWS || BOOST_PLAT_WINDOWS_DESKTOP class BOOST_CHRONO_DECL process_cpu_clock_micro_GR ///< ajout de _micro_GR { public: typedef process_cpu_clock_times_micro_GR times; ///< ajout de _micro_GR typedef boost::chrono::duration duration; ///< nano en micro typedef duration::rep rep; typedef duration::period period; typedef chrono::time_point time_point; ///< ajout de _micro_GR BOOST_STATIC_CONSTEXPR bool is_steady = true; static BOOST_CHRONO_INLINE time_point now() BOOST_NOEXCEPT; #if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING static BOOST_CHRONO_INLINE time_point now(system::error_code & ec ); #endif }; #endif template struct clock_string ///< ajout de _micro_GR { static std::basic_string name() { static const CharT u[] = { 'p', 'r', 'o', 'c', 'e', 's', 's', '_', 'r', 'e', 'a', 'l', '_', 'c', 'l', 'o', 'c', 'k' }; static const std::basic_string str(u, u + sizeof(u) / sizeof(u[0])); return str; } static std::basic_string since() { const CharT u[] = { ' ', 's', 'i', 'n', 'c', 'e', ' ', 'p', 'r', 'o', 'c', 'e', 's', 's', ' ', 's', 't', 'a', 'r', 't', '-', 'u', 'p' }; const std::basic_string str(u, u + sizeof(u) / sizeof(u[0])); return str; } }; #if ! BOOST_OS_WINDOWS || BOOST_PLAT_WINDOWS_DESKTOP template struct clock_string ///< ajout de _micro_GR { static std::basic_string name() { static const CharT u[] = { 'p', 'r', 'o', 'c', 'e', 's', 's', '_', 'u', 's', 'e', 'r', '_', 'c', 'l', 'o', 'c', 'k' }; static const std::basic_string str(u, u + sizeof(u) / sizeof(u[0])); return str; } static std::basic_string since() { const CharT u[] = { ' ', 's', 'i', 'n', 'c', 'e', ' ', 'p', 'r', 'o', 'c', 'e', 's', 's', ' ', 's', 't', 'a', 'r', 't', '-', 'u', 'p' }; const std::basic_string str(u, u + sizeof(u) / sizeof(u[0])); return str; } }; template struct clock_string ///< ajout de _micro_GR { static std::basic_string name() { static const CharT u[] = { 'p', 'r', 'o', 'c', 'e', 's', 's', '_', 's', 'y', 's', 't', 't', 'e', 'm', '_', 'c', 'l', 'o', 'c', 'k' }; static const std::basic_string str(u, u + sizeof(u) / sizeof(u[0])); return str; } static std::basic_string since() { const CharT u[] = { ' ', 's', 'i', 'n', 'c', 'e', ' ', 'p', 'r', 'o', 'c', 'e', 's', 's', ' ', 's', 't', 'a', 'r', 't', '-', 'u', 'p' }; const std::basic_string str(u, u + sizeof(u) / sizeof(u[0])); return str; } }; template struct clock_string ///< ajout de _micro_GR { static std::basic_string name() { static const CharT u[] = { 'p', 'r', 'o', 'c', 'e', 's', 's', '_', 'c', 'l', 'o', 'c', 'k' }; static const std::basic_string str(u, u + sizeof(u) / sizeof(u[0])); return str; } static std::basic_string since() { const CharT u[] = { ' ', 's', 'i', 'n', 'c', 'e', ' ', 'p', 'r', 'o', 'c', 'e', 's', 's', ' ', 's', 't', 'a', 'r', 't', '-', 'u', 'p' }; const std::basic_string str(u, u + sizeof(u) / sizeof(u[0])); return str; } }; #endif } // namespace chrono } // namespace boost /// @} // end of group #ifndef BOOST_CHRONO_HEADER_ONLY #include // pops abi_prefix.hpp pragmas #else #include #endif #endif #endif // BOOST_CHRONO_PROCESS_CPU_CLOCKS_HPP