diff options
author | Thomas White <taw@physics.org> | 2010-03-10 15:34:15 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2010-03-10 15:34:15 +0100 |
commit | 45d7f9b0c71a5c2f36758a862e1f6cbd0d7e59ab (patch) | |
tree | 5b514253a76f3746073117c8e223996310d8dd80 /src/indexamajig.c | |
parent | d8245ab6f1bdf34c37c7d079496683272c181e54 (diff) |
Un-break stuff
Diffstat (limited to 'src/indexamajig.c')
-rw-r--r-- | src/indexamajig.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c index 93a95922..72276198 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -118,14 +118,14 @@ static void simulate_and_write(struct image *template, image.molecule->cell = template->indexed_cell; /* Set up GPU if necessary */ - if ( *gctx == NULL ) { + if ( (gctx != NULL) && (*gctx == NULL) ) { *gctx = setup_gpu(0, &image, image.molecule); } - if ( *gctx != NULL ) { - get_diffraction_gpu(*gctx, &image, 8, 8, 8); + if ( (gctx != NULL) && (*gctx != NULL) ) { + get_diffraction_gpu(*gctx, &image, 24, 24, 40); } else { - get_diffraction(&image, 8, 8, 8, 0, 0); + get_diffraction(&image, 24, 24, 40, 0, 0); } if ( image.molecule == NULL ) { ERROR("Couldn't open molecule.pdb\n"); @@ -307,7 +307,13 @@ int main(int argc, char *argv[]) } /* Simulate if requested */ - if ( config_simulate ) simulate_and_write(&image, &gctx); + if ( config_simulate ) { + if ( config_gpu ) { + simulate_and_write(&image, &gctx); + } else { + simulate_and_write(&image, NULL); + } + } done: free(image.data); |