Changeset 79290f for pcp/src/init.h


Ignore:
Timestamp:
Jun 7, 2008, 1:13:29 PM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
02bc3c
Parents:
a97897
Message:

config.h is included in each and every file. After trying to compile on JUMP (with xlc).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pcp/src/init.h

    ra97897 r79290f  
    1717*/
    1818
    19 // Specifting whether a value in the parameter file must be specified or is optional
    20 enum necessity { optional,    //!< parameter is optional, if not given sensible value is chosen
    21                  critical     //!< parameter must be given or programme won't initiate
    22                };
    23 
    24 // Specifying the cast type to be read of a parameter, see ParseForParameter()
    25 enum value_type { string_type, double_type, int_type, row_int, row_double, grid, lower_trigrid, upper_trigrid};
     19#ifdef HAVE_CONFIG_H
     20#include <config.h>
     21#endif
    2622
    2723/* Bereite mainname vor: loescht von filename von rechts nach links bis zu erstem "/" oder ganz */
     
    3733void InitPsisValue(struct Problem *const P, int start, int end);
    3834
    39 /** Calculate the value \a x to the power of \a n.
    40  * \param x value
    41  * \param n power
    42  * \return \f$x^n\f$
    43  */
    44 static inline double tpow(double x, int n)
    45 {
    46   double y = 1;
    47   int neg = (n < 0);
    48 
    49   if (neg) n = -n;
    50 
    51   while (n) {   // go through every bit of the integer number n
    52     if (n & 1) y *= x;  // if bit set, multiply
    53     x *= x;   // go to next power of 2
    54     n >>= 1;   // and to the next bit
    55   }
    56   return neg ? 1.0/y : y; // if n was negative, return reciprocal value
    57 }
    5835#endif
    5936
Note: See TracChangeset for help on using the changeset viewer.