Changeset dc093ce in git


Ignore:
Timestamp:
May 5, 2010, 4:35:03 PM (13 years ago)
Author:
Oleksandr Motsak <motsak@…>
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
Message:
Switched aRing and r to "src, dst"
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • coeffs/Makefile.in

    r3bc01c7 rdc093ce  
    1 #################################################################
     1  #################################################################
    22###
    33### Makefile for Singular
     
    3535CXXFLAGS        = -O3 -w -fomit-frame-pointer --no-rtti ${PIPE}
    3636CXXTEMPLFLAGS   = -fno-implicit-templates --no-exceptions
    37 CPPFLAGS        = -I${srcdir} -I${includedir}
     37CPPFLAGS        = -I${srcdir} -I${includedir} -I${srcdir}/../misc/
    3838DEFS            = -DNDEBUG -DOM_NDEBUG -Dix86_Linux -DHAVE_CONFIG_H
    3939
  • coeffs/coeffs.h

    r3bc01c7 rdc093ce  
    99*/
    1010
    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>
    6512
    6613enum n_coeffType
     
    9239typedef number (*numberfunc)(number a, number b, const coeffs r);
    9340
    94 /// maps "a" from aRing into r
    95 typedef number (*nMapFunc)(number a, const coeffs r, const coeffs aRing);
     41/// maps "a", which lives in src, into dst
     42typedef number (*nMapFunc)(number a, const coeffs src, const coeffs dst);
    9643
    9744// #define _TRY
     
    209156};
    210157
    211 /// Returns the type of coeffs domain
    212 static inline n_coeffType getCoeffType(const coeffs r)
    213 {
    214   return r->type;
    215 }
    216 
    217 #define  nInternalChar(r) ((r)->ch)
    218 
    219158#endif
    220159
  • coeffs/gnumpc.cc

    r3bc01c7 rdc093ce  
    3333#endif
    3434
    35 #ifndef assume
    36 #  define assume(a) if(!(a)){ Werror( "Assumption: is wrong: %s\n", #a ); };
    37 #endif
     35// #ifndef assume
     36// #  define assume(a) if(!(a)){ Werror( "Assumption: is wrong: %s\n", #a ); };
     37// #endif
    3838
    3939static const n_coeffType ID = n_long_C;
    4040
    41 number ngcMapQ(number from, const coeffs r, const coeffs aRing)
     41number ngcMapQ(number from, const coeffs aRing, const coeffs r)
    4242{
    4343  assume( getCoeffType(r) == ID );
     
    5353}
    5454
    55 static number ngcMapLongR(number from, const coeffs r, const coeffs aRing)
     55static number ngcMapLongR(number from, const coeffs aRing, const coeffs r)
    5656{
    5757  assume( getCoeffType(r) == ID );
     
    6767}
    6868
    69 static number ngcMapR(number from, const coeffs r, const coeffs aRing)
     69static number ngcMapR(number from, const coeffs aRing, const coeffs r)
    7070{
    7171  assume( getCoeffType(r) == ID );
     
    8181}
    8282
    83 static number ngcMapP(number from, const coeffs r, const coeffs aRing)
     83static number ngcMapP(number from, const coeffs aRing, const coeffs r)
    8484{
    8585  assume( getCoeffType(r) == ID );
     
    9494
    9595
    96 static number ngcCopyMap(number from, const coeffs r, const coeffs aRing)
     96static number ngcCopyMap(number from, const coeffs aRing, const coeffs r)
    9797{
    9898  assume( getCoeffType(r) == ID );
  • coeffs/numbers.cc

    r3bc01c7 rdc093ce  
    8585
    8686number ndCopy(number a, const coeffs) { return a; }
    87 number ndCopyMap(number a, const coeffs r, const coeffs aRing)
     87number ndCopyMap(number a, const coeffs aRing, const coeffs r)
    8888{
    8989  assume( getCoeffType(r) == getCoeffType(aRing) );
  • coeffs/numbers.h

    r3bc01c7 rdc093ce  
    99*/
    1010#include "coeffs.h"
     11
     12/// Returns the type of coeffs domain
     13static inline n_coeffType getCoeffType(const coeffs r)
     14{
     15  return r->type;
     16}
     17
     18static inline int nInternalChar(const coeffs r)
     19{
     20  return r->ch;
     21}
    1122
    1223#define SHORT_REAL_LENGTH 6 // use short reals for real <= 6 digits
     
    6576number ndGcd(number a, number b, const coeffs);
    6677number ndCopy(number a, const coeffs r);
    67 number ndCopyMap(number a, const coeffs r, const coeffs aRing);
     78number ndCopyMap(number a, const coeffs src, const coeffs dst);
    6879int ndSize(number a, const coeffs r);
    6980char * ndName(number n, const coeffs r);
     
    181192{ return (nField_is_Q_a(r)) || (nField_is_Zp_a(r)); } /* Z/p(a) and Q(a)*/
    182193
     194
     195
     196
    183197#endif
  • coeffs/shortfl.cc

    r3bc01c7 rdc093ce  
    1717#include "mpr_complex.h"
    1818
    19 
    2019#include <mylimits.h>
    2120// #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
    2725
    2826
     
    8886  int i;
    8987  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))
    9189    i = (int)f;
    9290  else
     
    369367#endif
    370368
    371 static number nrMapP(number from, const coeffs r, const coeffs aRing)
     369static number nrMapP(number from, const coeffs aRing, const coeffs r)
    372370{
    373371  assume( getCoeffType(r) == ID );
     
    379377}
    380378
    381 static number nrMapLongR(number from, const coeffs r, const coeffs aRing)
     379static number nrMapLongR(number from, const coeffs aRing, const coeffs r)
    382380{
    383381  assume( getCoeffType(r) == ID );
     
    388386}
    389387
    390 static number nrMapC(number from, const coeffs r, const coeffs aRing)
     388static number nrMapC(number from, const coeffs aRing, const coeffs r)
    391389
    392390  assume( getCoeffType(r) == ID );
     
    399397
    400398
    401 number nrMapQ(number from, const coeffs r, const coeffs aRing)
     399number nrMapQ(number from, const coeffs aRing, const coeffs r)
    402400{
    403401/* in longrat.h
  • misc/aux.h

    r3bc01c7 rdc093ce  
     1/* -*-c++-*- */
     2
    13// 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)
     31typedef 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 % */
     36typedef 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.