OSDN Git Service

pp/pow.h Add
authormyun2 <myun2@nwhite.info>
Sat, 23 Jun 2012 07:59:32 +0000 (16:59 +0900)
committermyun2 <myun2@nwhite.info>
Sat, 23 Jun 2012 07:59:32 +0000 (16:59 +0900)
roast/include/roast/pp/pow.h [new file with mode: 0644]

diff --git a/roast/include/roast/pp/pow.h b/roast/include/roast/pp/pow.h
new file mode 100644 (file)
index 0000000..62c43fe
--- /dev/null
@@ -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__