Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
71ff88b4
Commit
71ff88b4
authored
6 years ago
by
Josh Borrow
Browse files
Options
Downloads
Patches
Plain Diff
Attempted to make exp10 compatible with clang compilers
parent
544ff121
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!763
Uninitialised Variable in EAGLE Cooling
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/cooling/EAGLE/cooling.c
+4
-1
4 additions, 1 deletion
src/cooling/EAGLE/cooling.c
src/exp10.h
+8
-1
8 additions, 1 deletion
src/exp10.h
with
12 additions
and
2 deletions
src/cooling/EAGLE/cooling.c
+
4
−
1
View file @
71ff88b4
...
@@ -48,6 +48,7 @@
...
@@ -48,6 +48,7 @@
#include
"space.h"
#include
"space.h"
#include
"units.h"
#include
"units.h"
/* Maximum number of iterations for newton
/* Maximum number of iterations for newton
* and bisection integration schemes */
* and bisection integration schemes */
static
const
int
newton_max_iterations
=
15
;
static
const
int
newton_max_iterations
=
15
;
...
@@ -559,7 +560,9 @@ void cooling_cool_part(const struct phys_const *phys_const,
...
@@ -559,7 +560,9 @@ void cooling_cool_part(const struct phys_const *phys_const,
Helium_reion_heat_cgs
/
(
dt_cgs
*
ratefact_cgs
);
Helium_reion_heat_cgs
/
(
dt_cgs
*
ratefact_cgs
);
/* Let's compute the internal energy at the end of the step */
/* Let's compute the internal energy at the end of the step */
double
u_final_cgs
;
/* Initialise to the initial energy to appease compiler; this will never not be
overwritten. */
double
u_final_cgs
=
u_0_cgs
;
/* First try an explicit integration (note we ignore the derivative) */
/* First try an explicit integration (note we ignore the derivative) */
const
double
LambdaNet_cgs
=
const
double
LambdaNet_cgs
=
...
...
This diff is collapsed.
Click to expand it.
src/exp10.h
+
8
−
1
View file @
71ff88b4
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
/* Some standard headers. */
/* Some standard headers. */
#include
<math.h>
#include
<math.h>
#if
n
def
__GNUC__
#if
!
def
ined(
__GNUC__
)
/* Local headers. */
/* Local headers. */
#include
"inline.h"
#include
"inline.h"
...
@@ -60,4 +60,11 @@ __attribute__((always_inline, const)) INLINE static float exp10f(
...
@@ -60,4 +60,11 @@ __attribute__((always_inline, const)) INLINE static float exp10f(
#endif
/* __GNUC__ */
#endif
/* __GNUC__ */
#if defined(__clang__)
#define exp10 __exp10
#define exp10f __exp10f
#endif
/* __clang__ */
#endif
/* SWIFT_EXP10_H */
#endif
/* SWIFT_EXP10_H */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment