Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
200dcdb9
Commit
200dcdb9
authored
Dec 02, 2016
by
James Willis
Browse files
Make cache size a macro definition.
parent
74a8b948
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/engine.c
View file @
200dcdb9
...
...
@@ -69,6 +69,9 @@
#include
"units.h"
#include
"version.h"
/* Particle cache size. */
#define CACHE_SIZE 512
const
char
*
engine_policy_names
[
16
]
=
{
"none"
,
"rand"
,
"steal"
,
...
...
@@ -84,8 +87,6 @@ const char *engine_policy_names[16] = {"none",
"drift_all"
,
"cooling"
,
"sourceterms"
};
/* Particle cache size. */
const
int
cache_size
=
512
;
/** The rank of the engine as a global variable (for messages). */
int
engine_rank
;
...
...
@@ -3362,7 +3363,7 @@ void engine_init(struct engine *e, struct space *s,
/* Allocate particle cache. */
e
->
runners
[
k
].
par_cache
.
count
=
0
;
cache_init
(
&
e
->
runners
[
k
].
par_cache
,
cache_size
);
cache_init
(
&
e
->
runners
[
k
].
par_cache
,
CACHE_SIZE
);
if
(
verbose
)
{
if
(
with_aff
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment