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
8b2993ea
Commit
8b2993ea
authored
Nov 29, 2016
by
James Willis
Browse files
Allocate particle cache in engine_init().
parent
fd702ff1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/engine.c
View file @
8b2993ea
...
...
@@ -84,6 +84,8 @@ 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
;
...
...
@@ -3357,6 +3359,10 @@ void engine_init(struct engine *e, struct space *s,
e
->
runners
[
k
].
cpuid
=
k
;
e
->
runners
[
k
].
qid
=
k
*
nr_queues
/
e
->
nr_threads
;
}
/* Allocate particle cache. */
cache_init
(
&
e
->
runners
[
k
].
par_cache
,
cache_size
);
if
(
verbose
)
{
if
(
with_aff
)
message
(
"runner %i on cpuid=%i with qid=%i."
,
e
->
runners
[
k
].
id
,
...
...
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