From a55893e57ed4a66270ea402085de9c37e74507a6 Mon Sep 17 00:00:00 2001 From: myun2 Date: Sat, 23 Jun 2012 16:59:32 +0900 Subject: [PATCH] pp/pow.h Add --- roast/include/roast/pp/pow.h | 49 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 roast/include/roast/pp/pow.h diff --git a/roast/include/roast/pp/pow.h b/roast/include/roast/pp/pow.h new file mode 100644 index 00000000..62c43fee --- /dev/null +++ b/roast/include/roast/pp/pow.h @@ -0,0 +1,49 @@ +/* + Roast+ C++ Library + Copyright 2010-2012 myun2, Roast+ Project http://sourceforge.jp/projects/roast/ + + Distributed under the Roast+ License + See http://sourceforge.jp/projects/roast/wiki/License +*/ + +#ifndef __SFJP_ROAST__pp__pow_H__ +#define __SFJP_ROAST__pp__pow_H__ + +#define ROAST_PP_POW2__0 1 +#define ROAST_PP_POW2__1 2 +#define ROAST_PP_POW2__2 4 +#define ROAST_PP_POW2__3 8 +#define ROAST_PP_POW2__4 16 +#define ROAST_PP_POW2__5 32 +#define ROAST_PP_POW2__6 64 +#define ROAST_PP_POW2__7 128 +#define ROAST_PP_POW2__8 256 +#define ROAST_PP_POW2__9 512 +#define ROAST_PP_POW2__10 1024 +#define ROAST_PP_POW2__11 2048 +#define ROAST_PP_POW2__12 4096 +#define ROAST_PP_POW2__13 8192 +#define ROAST_PP_POW2__14 16384 +#define ROAST_PP_POW2__15 32768 +#define ROAST_PP_POW2__16 65536 +#define ROAST_PP_POW2__17 131072 +#define ROAST_PP_POW2__18 262144 +#define ROAST_PP_POW2__19 524288 +#define ROAST_PP_POW2__20 1048576 +#define ROAST_PP_POW2__21 2097152 +#define ROAST_PP_POW2__22 4194304 +#define ROAST_PP_POW2__23 8388608 +#define ROAST_PP_POW2__24 16777216 +#define ROAST_PP_POW2__25 33554432 +#define ROAST_PP_POW2__26 67108864 +#define ROAST_PP_POW2__27 134217728 +#define ROAST_PP_POW2__28 268435456 +#define ROAST_PP_POW2__29 536870912 +#define ROAST_PP_POW2__30 1073741824 +#define ROAST_PP_POW2__31 2147483648 +#define ROAST_PP_POW2__32 4294967296 + +#define ROAST_PP_POW2_(x) ROAST_PP_POW2__##x +#define ROAST_PP_POW2(x) ROAST_PP_POW2_(x) + +#endif//__SFJP_ROAST__pp__pow_H__ -- 2.11.0