aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2023-09-23 17:57:20 +0200
committerThomas White <taw@physics.org>2023-09-23 19:37:40 +0200
commit1a0580e817a0f60505e38c8dd29f9e4eeeae0558 (patch)
tree4cb92f99fbf100bfab226ea94012da262d4bda77 /tests
parentcee7ee0b8a4cafa1f8f3c67518f86c895520f5a6 (diff)
indexamajig: Re-use the image data arrays
We noticed that constant freeing and re-allocating the (potentially quite large) arrays resulted in much lower performance. Since we know that all images have the same data layout, we can safely re-use the arrays. This gives a large speedup.
Diffstat (limited to 'tests')
-rw-r--r--tests/wavelength_geom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/wavelength_geom.c b/tests/wavelength_geom.c
index 8bf86a74..6c45c491 100644
--- a/tests/wavelength_geom.c
+++ b/tests/wavelength_geom.c
@@ -51,7 +51,7 @@ int main(int argc, char *argv[])
return 1;
}
- image = image_read(dtempl, image_filename, NULL, 0, 0);
+ image = image_read(dtempl, image_filename, NULL, 0, 0, NULL);
if ( image == NULL ) return 1;
printf("wavelength = %e\n", image->lambda);