macros.h

Go to the documentation of this file.
00001 /*
00002  * macros.h: this file is part of the FM project.
00003  *
00004  * FM, a fast and optimized C implementation of Fourier-Motzkin
00005  * projection algorithm.
00006  *
00007  * Copyright (C) 2006-2008 Louis-Noel Pouchet
00008  *
00009  * This program is free software; you can redistribute it and/or
00010  * modify it under the terms of the GNU Lesser General Public License
00011  * as published by the Free Software Foundation; either version 3
00012  * of the License, or (at your option) any later version.
00013  *
00014  * The complete GNU Lesser General Public Licence Notice can be found
00015  *  as the `COPYING.LESSER' file in the root directory.
00016  *
00017  * Author:
00018  * Louis-Noel Pouchet <Louis-Noel.Pouchet@inria.fr>
00019  *
00020  */
00021 
00022 
00023 #ifndef FM_MACROS_H
00024 # define FM_MACROS_H
00025 
00026 # include <stdlib.h>
00027 # include <fm/common.h>
00028 
00029 
00030 
00031 
00032 # define Z_INIT(v1) ( v1 = 0 )
00033 # define Z_CLEAR(v1)
00034 # define Z_ASSIGN(v, v1) ( v = v1 )
00035 # define Z_ASSIGN_SI(v, val) ( v = val )
00036 
00037 
00038 # define Z_CMP_SI(v1, op, v2) (v1 op v2)
00039 # define Z_CMP(v1, op, v2) (v1 op v2)
00040 
00041 
00042 # define Z_PRINT(out, v) fprintf(out, Z_STRING_MODIFIER, v)
00043 
00044 
00045 # define Z_INC(v, v1) ((v = v1 + 1))
00046 # define Z_INC_(v1) ((v1++))
00047 
00048 # define Z_DEC(v, v1) ((v = v1 - 1))
00049 # define Z_DEC_(v1) ((v1--))
00050 
00051 # define Z_ABS(v, v1) ( v = v1 > 0 ? v1 : -v1 )
00052 # define Z_ABS_(v1) (v1 > 0 ? v1 : -v1)
00053 
00054 # define Z_OPP(v, v1) ((v = -v1))
00055 # define Z_OPP_(v1) (-v1)
00056 
00057 
00058 # define Z_GCD(v, v1, v2) ( v = fm_z_gcd(v1, v2) )
00059 # define Z_GCD_(v1, v2) (fm_z_gcd(v1, v2))
00060 
00061 # define Z_LCM(v, v1, v2) ( v = fm_z_lcm(v1, v2) )
00062 # define Z_LCM_(v1, v2) (fm_z_lcm(v1, v2))
00063 
00064 
00065 # define Z_ADD(v, v1, v2) ( v = v1 + v2 )
00066 # define Z_ADD_(v1, v2) (v1 + v2)
00067 
00068 # define Z_SUB(v, v1, v2) ( v = v1 - v2 )
00069 # define Z_SUB_(v1, v2) (v1 - v2)
00070 
00071 # define Z_MUL(v, v1, v2) ( v = v1 * v2 )
00072 # define Z_MUL_(v1, v2) (v1 * v2)
00073 
00074 # define Z_DIV(v, v1, v2) ( v = v1 / v2 )
00075 # define Z_DIV_(v1, v2) (v1 / v2)
00076 
00077 # define Z_MOD(v, v1, v2) ( v = v1 % v2 )
00078 # define Z_MOD_(v1, v2) (v1 % v2)
00079 
00080 #endif // FM_MACROS_H

Generated on Fri Oct 31 00:49:13 2008 for FM by  doxygen 1.5.3