Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:48:06

0001 # /* Copyright (C) 2001
0002 #  * Housemarque Oy
0003 #  * http://www.housemarque.com
0004 #  *
0005 #  * Distributed under the Boost Software License, Version 1.0. (See
0006 #  * accompanying file LICENSE_1_0.txt or copy at
0007 #  * http://www.boost.org/LICENSE_1_0.txt)
0008 #  */
0009 #
0010 # /* Revised by Paul Mensonides (2002) */
0011 #
0012 # /* See http://www.boost.org for most recent version. */
0013 #
0014 # ifndef BOOST_PREPROCESSOR_ARITHMETIC_DETAIL_DIV_BASE_HPP
0015 # define BOOST_PREPROCESSOR_ARITHMETIC_DETAIL_DIV_BASE_HPP
0016 #
0017 # include <boost/preprocessor/arithmetic/inc.hpp>
0018 # include <boost/preprocessor/arithmetic/sub.hpp>
0019 # include <boost/preprocessor/comparison/less_equal.hpp>
0020 # include <boost/preprocessor/config/config.hpp>
0021 # include <boost/preprocessor/control/while.hpp>
0022 # include <boost/preprocessor/tuple/elem.hpp>
0023 # include <boost/preprocessor/tuple/rem.hpp>
0024 #
0025 # /* BOOST_PP_DIV_BASE */
0026 #
0027 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0028 #    define BOOST_PP_DIV_BASE(x, y) BOOST_PP_WHILE(BOOST_PP_DIV_BASE_P, BOOST_PP_DIV_BASE_O, (0, x, y))
0029 # else
0030 #    define BOOST_PP_DIV_BASE(x, y) BOOST_PP_DIV_BASE_I(x, y)
0031 #    define BOOST_PP_DIV_BASE_I(x, y) BOOST_PP_WHILE(BOOST_PP_DIV_BASE_P, BOOST_PP_DIV_BASE_O, (0, x, y))
0032 # endif
0033 #
0034 # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
0035 #    define BOOST_PP_DIV_BASE_P(d, rxy) BOOST_PP_DIV_BASE_P_IM(d, BOOST_PP_TUPLE_REM_3 rxy)
0036 #    define BOOST_PP_DIV_BASE_P_IM(d, im) BOOST_PP_DIV_BASE_P_I(d, im)
0037 # else
0038 #    define BOOST_PP_DIV_BASE_P(d, rxy) BOOST_PP_DIV_BASE_P_I(d, BOOST_PP_TUPLE_ELEM(3, 0, rxy), BOOST_PP_TUPLE_ELEM(3, 1, rxy), BOOST_PP_TUPLE_ELEM(3, 2, rxy))
0039 # endif
0040 #
0041 # define BOOST_PP_DIV_BASE_P_I(d, r, x, y) BOOST_PP_LESS_EQUAL_D(d, y, x)
0042 #
0043 # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
0044 #    define BOOST_PP_DIV_BASE_O(d, rxy) BOOST_PP_DIV_BASE_O_IM(d, BOOST_PP_TUPLE_REM_3 rxy)
0045 #    define BOOST_PP_DIV_BASE_O_IM(d, im) BOOST_PP_DIV_BASE_O_I(d, im)
0046 # else
0047 #    define BOOST_PP_DIV_BASE_O(d, rxy) BOOST_PP_DIV_BASE_O_I(d, BOOST_PP_TUPLE_ELEM(3, 0, rxy), BOOST_PP_TUPLE_ELEM(3, 1, rxy), BOOST_PP_TUPLE_ELEM(3, 2, rxy))
0048 # endif
0049 #
0050 # define BOOST_PP_DIV_BASE_O_I(d, r, x, y) (BOOST_PP_INC(r), BOOST_PP_SUB_D(d, x, y), y)
0051 #
0052 # /* BOOST_PP_DIV_BASE_D */
0053 #
0054 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0055 #    define BOOST_PP_DIV_BASE_D(d, x, y) BOOST_PP_WHILE_ ## d(BOOST_PP_DIV_BASE_P, BOOST_PP_DIV_BASE_O, (0, x, y))
0056 # else
0057 #    define BOOST_PP_DIV_BASE_D(d, x, y) BOOST_PP_DIV_BASE_D_I(d, x, y)
0058 #    define BOOST_PP_DIV_BASE_D_I(d, x, y) BOOST_PP_WHILE_ ## d(BOOST_PP_DIV_BASE_P, BOOST_PP_DIV_BASE_O, (0, x, y))
0059 # endif
0060 #
0061 # endif