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
Oleksii Turkot
CrystFEL
Commits
896c9305
Commit
896c9305
authored
Jul 13, 2012
by
Thomas White
Browse files
partial_sim: Don't start too many calculations by accident
parent
bb0cd5c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/partial_sim.c
View file @
896c9305
...
...
@@ -191,6 +191,7 @@ struct queue_args
pthread_mutex_t
full_lock
;
int
n_done
;
int
n_started
;
int
n_to_do
;
SymOpList
*
sym
;
...
...
@@ -227,11 +228,16 @@ static void *create_job(void *vqargs)
struct
worker_args
*
wargs
;
struct
queue_args
*
qargs
=
vqargs
;
/* All done already? */
if
(
qargs
->
n_started
==
qargs
->
n_to_do
)
return
NULL
;
wargs
=
malloc
(
sizeof
(
struct
worker_args
));
wargs
->
qargs
=
qargs
;
wargs
->
image
=
*
qargs
->
template_image
;
qargs
->
n_started
++
;
return
wargs
;
}
...
...
@@ -514,6 +520,7 @@ int main(int argc, char *argv[])
pthread_mutex_init
(
&
qargs
.
full_lock
,
NULL
);
qargs
.
n_to_do
=
n
;
qargs
.
n_done
=
0
;
qargs
.
n_started
=
0
;
qargs
.
sym
=
sym
;
qargs
.
random_intensities
=
random_intensities
;
qargs
.
cell
=
cell
;
...
...
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