[59176c] | 1 | /* auxiliary.h. Generated from auxiliary.h.in by configure. */ |
---|
| 2 | /*****************************************************************************\ |
---|
| 3 | * Computer Algebra System SINGULAR |
---|
| 4 | \*****************************************************************************/ |
---|
| 5 | /** @file auxiliary.h |
---|
| 6 | * |
---|
| 7 | * All the auxiliary stuff. |
---|
| 8 | * |
---|
| 9 | * ABSTRACT: we shall put here everything that does not have its own place. |
---|
| 10 | * |
---|
| 11 | * @author Oleksandr Motsak |
---|
| 12 | * |
---|
| 13 | * @internal @version \$Id$ |
---|
| 14 | * |
---|
| 15 | **/ |
---|
| 16 | /*****************************************************************************/ |
---|
| 17 | |
---|
| 18 | #ifndef MISC_AUXILIARY_H |
---|
| 19 | #define MISC_AUXILIARY_H |
---|
| 20 | |
---|
| 21 | // ----------------- configure stuff |
---|
| 22 | |
---|
| 23 | /* CPU type: i[3456]86: */ |
---|
| 24 | #define SI_CPU_I386 1 |
---|
| 25 | /* CPU type: sparc: */ |
---|
| 26 | /* #undef SI_CPU_SPARC */ |
---|
| 27 | /* CPU type: ppc: */ |
---|
| 28 | /* #undef SI_CPU_PPC */ |
---|
| 29 | /* CPU type: IA64: */ |
---|
| 30 | /* #undef SI_CPU_IA64 */ |
---|
| 31 | /* CPU type: x86_64: */ |
---|
| 32 | /* #undef SI_CPU_X86_64 */ |
---|
| 33 | |
---|
| 34 | // ----------------- end of configure stuff |
---|
[dc093ce] | 35 | |
---|
[e6262c] | 36 | // BOOLEAN |
---|
| 37 | |
---|
[72f476b] | 38 | #if (SIZEOF_LONG == 8) |
---|
| 39 | typedef int BOOLEAN; |
---|
| 40 | /* testet on x86_64, gcc 3.4.6: 2 % */ |
---|
| 41 | /* testet on IA64, gcc 3.4.6: 1 % */ |
---|
| 42 | #else |
---|
| 43 | /* testet on athlon, gcc 2.95.4: 1 % */ |
---|
| 44 | typedef short BOOLEAN; |
---|
| 45 | #endif |
---|
| 46 | |
---|
| 47 | #ifndef FALSE |
---|
| 48 | #define FALSE 0 |
---|
| 49 | #endif |
---|
| 50 | |
---|
| 51 | #ifndef TRUE |
---|
| 52 | #define TRUE 1 |
---|
| 53 | #endif |
---|
[dc093ce] | 54 | |
---|
| 55 | #ifndef NULL |
---|
[c08834] | 56 | #define NULL (0) |
---|
[dc093ce] | 57 | #endif |
---|
| 58 | |
---|
| 59 | // #ifdef _TRY |
---|
| 60 | #ifndef ABS |
---|
| 61 | #define ABS(x) ((x)<0?(-(x)):(x)) |
---|
| 62 | #endif |
---|
| 63 | // #endif |
---|
| 64 | |
---|
[0e23a08] | 65 | static const int MAX_INT_LEN= 11; |
---|
| 66 | typedef void* ADDRESS; |
---|
[dc093ce] | 67 | |
---|
| 68 | #define loop for(;;) |
---|
| 69 | |
---|
[fa31d2] | 70 | static inline int si_max(const int a, const int b) { return (a>b) ? a : b; } |
---|
| 71 | |
---|
| 72 | |
---|
[dc093ce] | 73 | #if defined(SI_CPU_I386) || defined(SI_CPU_X86_64) |
---|
| 74 | // the following settings seems to be better on i386 and x86_64 processors |
---|
| 75 | // define if a*b is with mod instead of tables |
---|
| 76 | #define HAVE_MULT_MOD |
---|
| 77 | // #define HAVE_GENERIC_ADD |
---|
| 78 | // #ifdef HAVE_MULT_MOD |
---|
| 79 | // #define HAVE_DIV_MOD |
---|
| 80 | // #endif |
---|
| 81 | #elif defined(SI_CPU_IA64) |
---|
| 82 | // the following settings seems to be better on itanium processors |
---|
| 83 | // #define HAVE_MULT_MOD |
---|
| 84 | #define HAVE_GENERIC_ADD |
---|
| 85 | // #ifdef HAVE_MULT_MOD |
---|
| 86 | // #define HAVE_DIV_MOD |
---|
| 87 | // #endif |
---|
| 88 | #elif defined(SI_CPU_SPARC) |
---|
| 89 | // #define HAVE_GENERIC_ADD |
---|
| 90 | #define HAVE_MULT_MOD |
---|
| 91 | #ifdef HAVE_MULT_MOD |
---|
| 92 | #define HAVE_DIV_MOD |
---|
| 93 | #endif |
---|
| 94 | #elif defined(SI_CPU_PPC) |
---|
| 95 | // the following settings seems to be better on ppc processors |
---|
| 96 | // testet on: ppc_Linux, 740/750 PowerMac G3, 512k L2 cache |
---|
| 97 | #define HAVE_MULT_MOD |
---|
| 98 | // #ifdef HAVE_MULT_MOD |
---|
| 99 | // #define HAVE_DIV_MOD |
---|
| 100 | // #endif |
---|
| 101 | #endif |
---|
| 102 | |
---|
[0e23a08] | 103 | |
---|
[59176c] | 104 | #endif |
---|
| 105 | /* _MISC_AUXILIARY_H */ |
---|
[dc093ce] | 106 | |
---|