Server IP : 104.21.38.3 / Your IP : 162.158.189.137 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/server/mysql/src/boost/boost_1_59_0/boost/numeric/odeint/util/ |
Upload File : |
/* [auto_generated] boost/numeric/odeint/util/unit_helper.hpp [begin_description] Get and set the value of a unit. [end_description] Copyright 2012-2013 Karsten Ahnert Copyright 2012-2013 Mario Mulansky 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) */ #ifndef BOOST_NUMERIC_ODEINT_UTIL_UNIT_HELPER_HPP_INCLUDED #define BOOST_NUMERIC_ODEINT_UTIL_UNIT_HELPER_HPP_INCLUDED #ifndef __CUDACC__ #include <boost/units/quantity.hpp> #include <boost/units/get_dimension.hpp> #include <boost/units/get_system.hpp> #endif namespace boost { namespace numeric { namespace odeint { namespace detail { template<class T , class Enabler = void > struct get_unit_value_impl { static T value(const T &t) { return t; } typedef T result_type; }; #ifndef __CUDACC__ template<class Unit , class T> struct get_unit_value_impl< boost::units::quantity< Unit , T> > { static T value( const boost::units::quantity< Unit , T> &t ) { return t.value(); } typedef T result_type; }; #endif template<class T , class V , class Enabler = void > struct set_unit_value_impl { static void set_value(T &t , const V &v) { t = v; } }; #ifndef __CUDACC__ template<class Unit , class T , class V> struct set_unit_value_impl<boost::units::quantity<Unit , T> , V> { static void set_value(boost::units::quantity<Unit , T> &t , const V &v) { t = boost::units::quantity<Unit , T>::from_value(v); } }; #endif } // namespace detail template<class T> typename detail::get_unit_value_impl<T>::result_type get_unit_value(const T &t) { return detail::get_unit_value_impl<T>::value(t); } template<class T , class V> void set_unit_value(T &t , const V &v) { return detail::set_unit_value_impl<T , V>::set_value(t , v); } template< class T > struct unit_value_type { typedef T type; }; #ifndef __CUDACC__ template< class Unit , class Y > struct unit_value_type< boost::units::quantity< Unit , Y > > { typedef Y type; }; #endif template< typename Time > struct inverse_time { typedef Time type; }; #ifndef __CUDACC__ template< typename Unit , typename Value > struct inverse_time< boost::units::quantity< Unit , Value > > { typedef boost::units::quantity< Unit , Value > time_type; typedef typename boost::units::get_dimension< time_type >::type dimension; typedef typename boost::units::get_system< time_type >::type system; typedef typename boost::mpl::divides< boost::units::dimensionless_type , dimension >::type inv_dimension; typedef boost::units::unit< inv_dimension , system > inv_unit; typedef boost::units::quantity< inv_unit , Value > type; }; #endif } // namespace odeint } // namespace numeric } // namespace boost #endif // BOOST_NUMERIC_ODEINT_UTIL_UNIT_HELPER_HPP_INCLUDED