Changeset 152


Ignore:
Timestamp:
Aug 31, 2010 10:33:34 AM (10 years ago)
Author:
kulshres
Message:

define separate MIN/MAXDEC macros for real and int

MINDEC is used mostly for int so MINDECR for real
MAXDEC is used mostly for real so MAXDECI for int.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ADOL-C/src/common.h

    r148 r152  
    9898#endif
    9999
    100 #define MAXDEC(a,b) do { register typeof(a) __r; if ( __r = (b) > (a) ) (a) = __r; } while (0)
    101 #define MINDEC(a,b) do { register typeof(a) __r; if ( __r = (b) < (a) ) (a) = __r; } while (0)
     100#define MAXDEC(a,b) do { register revreal __r = (b); if ( __r > (a) ) (a) = __r; } while (0)
     101#define MAXDECI(a,b) do { register int __r = (b); if ( __r > (a) ) (a) = __r; } while (0)
     102#define MINDECR(a,b) do { register revreal __r = (b); if ( __r < (a) ) (a) = __r; } while (0)
     103#define MINDEC(a,b) do { register int __r = (b); if ( __r < (a) ) (a) = __r; } while (0)
    102104
    103105#define MAX_ADOLC(a,b) ( (a)<(b)? (b):(a) )
Note: See TracChangeset for help on using the changeset viewer.