Changeset dc093ce in git
- Timestamp:
- May 5, 2010, 4:35:03 PM (13 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- 3510a61a2a6264c7487502f0c82c410e2f92369f
- Parents:
- 3bc01c780d4a0447782ed11242b0f51f4fda6f5f
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2010-05-05 16:35:03+02:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 11:51:40+01:00
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
coeffs/Makefile.in
r3bc01c7 rdc093ce 1 #################################################################1 ################################################################# 2 2 ### 3 3 ### Makefile for Singular … … 35 35 CXXFLAGS = -O3 -w -fomit-frame-pointer --no-rtti ${PIPE} 36 36 CXXTEMPLFLAGS = -fno-implicit-templates --no-exceptions 37 CPPFLAGS = -I${srcdir} -I${includedir} 37 CPPFLAGS = -I${srcdir} -I${includedir} -I${srcdir}/../misc/ 38 38 DEFS = -DNDEBUG -DOM_NDEBUG -Dix86_Linux -DHAVE_CONFIG_H 39 39 -
coeffs/coeffs.h
r3bc01c7 rdc093ce 9 9 */ 10 10 11 #define TRUE 1 12 #define FALSE 0 13 14 #ifndef NULL 15 #define NULL (0) 16 #endif 17 18 // #ifdef _TRY 19 #ifndef ABS 20 #define ABS(x) ((x)<0?(-(x)):(x)) 21 #endif 22 // #endif 23 24 25 26 #if (SIZEOF_LONG == 8) 27 typedef int BOOLEAN; 28 /* testet on x86_64, gcc 3.4.6: 2 % */ 29 /* testet on IA64, gcc 3.4.6: 1 % */ 30 #else 31 /* testet on athlon, gcc 2.95.4: 1 % */ 32 typedef short BOOLEAN; 33 #endif 34 #define loop for(;;) 35 36 #if defined(SI_CPU_I386) || defined(SI_CPU_X86_64) 37 // the following settings seems to be better on i386 and x86_64 processors 38 // define if a*b is with mod instead of tables 39 #define HAVE_MULT_MOD 40 // #define HAVE_GENERIC_ADD 41 // #ifdef HAVE_MULT_MOD 42 // #define HAVE_DIV_MOD 43 // #endif 44 #elif defined(SI_CPU_IA64) 45 // the following settings seems to be better on itanium processors 46 // #define HAVE_MULT_MOD 47 #define HAVE_GENERIC_ADD 48 // #ifdef HAVE_MULT_MOD 49 // #define HAVE_DIV_MOD 50 // #endif 51 #elif defined(SI_CPU_SPARC) 52 // #define HAVE_GENERIC_ADD 53 #define HAVE_MULT_MOD 54 #ifdef HAVE_MULT_MOD 55 #define HAVE_DIV_MOD 56 #endif 57 #elif defined(SI_CPU_PPC) 58 // the following settings seems to be better on ppc processors 59 // testet on: ppc_Linux, 740/750 PowerMac G3, 512k L2 cache 60 #define HAVE_MULT_MOD 61 // #ifdef HAVE_MULT_MOD 62 // #define HAVE_DIV_MOD 63 // #endif 64 #endif 11 #include <aux.h> 65 12 66 13 enum n_coeffType … … 92 39 typedef number (*numberfunc)(number a, number b, const coeffs r); 93 40 94 /// maps "a" from aRing into r95 typedef number (*nMapFunc)(number a, const coeffs r, const coeffs aRing);41 /// maps "a", which lives in src, into dst 42 typedef number (*nMapFunc)(number a, const coeffs src, const coeffs dst); 96 43 97 44 // #define _TRY … … 209 156 }; 210 157 211 /// Returns the type of coeffs domain212 static inline n_coeffType getCoeffType(const coeffs r)213 {214 return r->type;215 }216 217 #define nInternalChar(r) ((r)->ch)218 219 158 #endif 220 159 -
coeffs/gnumpc.cc
r3bc01c7 rdc093ce 33 33 #endif 34 34 35 #ifndef assume36 # define assume(a) if(!(a)){ Werror( "Assumption: is wrong: %s\n", #a ); };37 #endif35 // #ifndef assume 36 // # define assume(a) if(!(a)){ Werror( "Assumption: is wrong: %s\n", #a ); }; 37 // #endif 38 38 39 39 static const n_coeffType ID = n_long_C; 40 40 41 number ngcMapQ(number from, const coeffs r, const coeffs aRing)41 number ngcMapQ(number from, const coeffs aRing, const coeffs r) 42 42 { 43 43 assume( getCoeffType(r) == ID ); … … 53 53 } 54 54 55 static number ngcMapLongR(number from, const coeffs r, const coeffs aRing)55 static number ngcMapLongR(number from, const coeffs aRing, const coeffs r) 56 56 { 57 57 assume( getCoeffType(r) == ID ); … … 67 67 } 68 68 69 static number ngcMapR(number from, const coeffs r, const coeffs aRing)69 static number ngcMapR(number from, const coeffs aRing, const coeffs r) 70 70 { 71 71 assume( getCoeffType(r) == ID ); … … 81 81 } 82 82 83 static number ngcMapP(number from, const coeffs r, const coeffs aRing)83 static number ngcMapP(number from, const coeffs aRing, const coeffs r) 84 84 { 85 85 assume( getCoeffType(r) == ID ); … … 94 94 95 95 96 static number ngcCopyMap(number from, const coeffs r, const coeffs aRing)96 static number ngcCopyMap(number from, const coeffs aRing, const coeffs r) 97 97 { 98 98 assume( getCoeffType(r) == ID ); -
coeffs/numbers.cc
r3bc01c7 rdc093ce 85 85 86 86 number ndCopy(number a, const coeffs) { return a; } 87 number ndCopyMap(number a, const coeffs r, const coeffs aRing)87 number ndCopyMap(number a, const coeffs aRing, const coeffs r) 88 88 { 89 89 assume( getCoeffType(r) == getCoeffType(aRing) ); -
coeffs/numbers.h
r3bc01c7 rdc093ce 9 9 */ 10 10 #include "coeffs.h" 11 12 /// Returns the type of coeffs domain 13 static inline n_coeffType getCoeffType(const coeffs r) 14 { 15 return r->type; 16 } 17 18 static inline int nInternalChar(const coeffs r) 19 { 20 return r->ch; 21 } 11 22 12 23 #define SHORT_REAL_LENGTH 6 // use short reals for real <= 6 digits … … 65 76 number ndGcd(number a, number b, const coeffs); 66 77 number ndCopy(number a, const coeffs r); 67 number ndCopyMap(number a, const coeffs r, const coeffs aRing);78 number ndCopyMap(number a, const coeffs src, const coeffs dst); 68 79 int ndSize(number a, const coeffs r); 69 80 char * ndName(number n, const coeffs r); … … 181 192 { return (nField_is_Q_a(r)) || (nField_is_Zp_a(r)); } /* Z/p(a) and Q(a)*/ 182 193 194 195 196 183 197 #endif -
coeffs/shortfl.cc
r3bc01c7 rdc093ce 17 17 #include "mpr_complex.h" 18 18 19 20 19 #include <mylimits.h> 21 20 // #include "limits.h" 22 #define MAX_INT_VAL INT_MAX 23 24 #ifndef assume 25 # define assume(a) if(!(a)){ Werror( "Assumption: is wrong: %s\n", #a ); }; 26 #endif 21 22 // #ifndef assume 23 // # define assume(a) if(!(a)){ Werror( "Assumption: is wrong: %s\n", #a ); }; 24 // #endif 27 25 28 26 … … 88 86 int i; 89 87 float f = nf(n).F(); 90 if (((float)INT_MIN <= f) || ((float) MAX_INT_VAL>= f))88 if (((float)INT_MIN <= f) || ((float)INT_MAX >= f)) 91 89 i = (int)f; 92 90 else … … 369 367 #endif 370 368 371 static number nrMapP(number from, const coeffs r, const coeffs aRing)369 static number nrMapP(number from, const coeffs aRing, const coeffs r) 372 370 { 373 371 assume( getCoeffType(r) == ID ); … … 379 377 } 380 378 381 static number nrMapLongR(number from, const coeffs r, const coeffs aRing)379 static number nrMapLongR(number from, const coeffs aRing, const coeffs r) 382 380 { 383 381 assume( getCoeffType(r) == ID ); … … 388 386 } 389 387 390 static number nrMapC(number from, const coeffs r, const coeffs aRing)388 static number nrMapC(number from, const coeffs aRing, const coeffs r) 391 389 { 392 390 assume( getCoeffType(r) == ID ); … … 399 397 400 398 401 number nrMapQ(number from, const coeffs r, const coeffs aRing)399 number nrMapQ(number from, const coeffs aRing, const coeffs r) 402 400 { 403 401 /* in longrat.h -
misc/aux.h
r3bc01c7 rdc093ce 1 /* -*-c++-*- */ 2 1 3 // MAX, MIN, BOOLEAN 4 5 /******************************************************************* 6 * File: aux.h 7 * Purpose: 8 * Author: 9 * Created: 10 * Version: $Id$ 11 *******************************************************************/ 12 13 #ifndef _MISC_AUX_H 14 15 16 #define TRUE 1 17 #define FALSE 0 18 19 #ifndef NULL 20 #define NULL (0) 21 #endif 22 23 // #ifdef _TRY 24 #ifndef ABS 25 #define ABS(x) ((x)<0?(-(x)):(x)) 26 #endif 27 // #endif 28 29 30 #if (SIZEOF_LONG == 8) 31 typedef int BOOLEAN; 32 /* testet on x86_64, gcc 3.4.6: 2 % */ 33 /* testet on IA64, gcc 3.4.6: 1 % */ 34 #else 35 /* testet on athlon, gcc 2.95.4: 1 % */ 36 typedef short BOOLEAN; 37 #endif 38 #define loop for(;;) 39 40 #if defined(SI_CPU_I386) || defined(SI_CPU_X86_64) 41 // the following settings seems to be better on i386 and x86_64 processors 42 // define if a*b is with mod instead of tables 43 #define HAVE_MULT_MOD 44 // #define HAVE_GENERIC_ADD 45 // #ifdef HAVE_MULT_MOD 46 // #define HAVE_DIV_MOD 47 // #endif 48 #elif defined(SI_CPU_IA64) 49 // the following settings seems to be better on itanium processors 50 // #define HAVE_MULT_MOD 51 #define HAVE_GENERIC_ADD 52 // #ifdef HAVE_MULT_MOD 53 // #define HAVE_DIV_MOD 54 // #endif 55 #elif defined(SI_CPU_SPARC) 56 // #define HAVE_GENERIC_ADD 57 #define HAVE_MULT_MOD 58 #ifdef HAVE_MULT_MOD 59 #define HAVE_DIV_MOD 60 #endif 61 #elif defined(SI_CPU_PPC) 62 // the following settings seems to be better on ppc processors 63 // testet on: ppc_Linux, 740/750 PowerMac G3, 512k L2 cache 64 #define HAVE_MULT_MOD 65 // #ifdef HAVE_MULT_MOD 66 // #define HAVE_DIV_MOD 67 // #endif 68 #endif 69 70 // static const int MAX_INT_VAL = ; 71 72 #endif /* _MISC_AUX_H */ 73
Note: See TracChangeset
for help on using the changeset viewer.