macros.h

00001 /*
00002 Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
00003 Copyright (C) 2005- The University of Notre Dame
00004 This software is distributed under the GNU General Public License.
00005 See the file COPYING for details.
00006 */
00007 
00008 #ifndef MACROS_H
00009 #define MACROS_H
00010 
00011 #ifndef MAX
00012 #define MAX(a,b) ( ((a)>(b)) ? (a) : (b) )
00013 #endif
00014 
00015 #ifndef MIN
00016 #define MIN(a,b) ( ((a)<(b)) ? (a) : (b) )
00017 #endif
00018 
00019 #ifndef ABS
00020 #define ABS(x) ( ((x)>=0) ? (x) : (-(x)) )
00021 #endif
00022 
00023 #define DIV_INT_ROUND_UP(a, b) (((a) + (b) - 1) / (b))
00024 
00025 #define KILO 1024
00026 #define MEGA (KILO*KILO)
00027 #define GIGA (KILO*MEGA)
00028 #define TERA (KILO*GIGA)
00029 #define PETA (KILO*TERA)
00030 
00031 #define KILOBYTE KILO
00032 #define MEGABYTE MEGA
00033 #define GIGABYTE GIGA
00034 #define TERABYTE TERA
00035 #define PETABYTE PETA
00036 
00037 #define USECOND 1000000
00038 
00039 #endif

Generated on 23 Mar 2016 for cctools by  doxygen 1.4.7