| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
makes it much more convenient for C++, expecially when templates are
used.
The flesh functions for complex arithmetic are defined (not only
declared) by including Complex.c from the header file cctk_Complex.h.
They are declared "static inline", so the the compiler can inline
them, but does not have to create an out-of-line copy for every source
file. Complex.c is also compiled stand-alone without the "static
inline" prefix, so that out-of-line copies exist as well.
Add some new complex arithmetic functions, e.g. ComplexNeg to change
the sign.
Make some complex arithmetic functions more efficient by using
algorithms from glibc. These algorithms are LGPL. They should be
faster and/or more accurate than the existing implementations.
For C++, define the usual arithmetic operators (+-*/ etc.) as inline
functions calling the corresponding complex arithmetic functions.
This makes it possible to use complex numbers in the same way as real
numbers, which makes it possible to instantiate templates for both
CCTK_REAL and CCTK_COMPLEX. This leads to much code reduction in
Carpet.
The patch also appends a type postfix to the names of math functions
called in the inlined routines: 'f' for HAVE_CCTK_REAL4, nothing for
HAVE_CCTK_REAL8, and 'l' for HAVE_CCTK_REAL16. This avoids compiler
warnings about conversions from "double" to "float" which may lose
significant bits.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4418 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3966 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3795 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and similarly for other such #if tests, to avoid warnings from icc:
/afs/aei-potsdam.mpg.de/u/jthorn/cactus/Cactus/src/include/cctk_Types.h(32): rem
ark #193: zero used for undefined preprocessing identifier
#if CCTK_HAVE_REAL16
^
/afs/aei-potsdam.mpg.de/u/jthorn/cactus/Cactus/src/include/cctk_Complex.h(46): r
emark #193: zero used for undefined preprocessing identifier
#if CCTK_HAVE_REAL16
^
[N.b. Harbison & Steele: "C: A Reference Manual", section 3.5.1,
states that #if undefined_identifier is equivalent to #if 0 ,
so so long as we define the symbols with nonzero values when we do
define them, #if and #ifdef are equivalent here. But #ifdef is
cleaner because
* it avoids spurious compiler warnings such as the above
* it follows the standard convention for feature-test macros
(see, for example, the discussion in the first example of
Harbison & Steele's section 3.5.3) and so reduces
"programmer surprise" for future maintainence programmers]
[Note also that this change is orthogonal to the current discussion
on the developers mailing list of what the names of these feature-test
macros should be.]
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3787 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
CCTK_HAVE_REAL*. Ditto for CCTK_INT*.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3777 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3775 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3427 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3076 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3075 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
| |
This fixes known problems with cpp on some platforms (Solaris, Darwin) when
preprocessing source code which includes this header file.
This closes PR Cactus-1354 and CactusPUGH-1167.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3073 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2561 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
| |
Library.
This closes PR Cactus/335.
Also added complex exp(), sin(), cos(), and sqrt() routines according to GSL.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2499 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
This closes PR Cactus 411.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2032 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1262 17b73243-c579-4c4c-a9d2-2d5706c11dac
|