diff options
author | Thomas White <taw@physics.org> | 2021-01-11 09:53:47 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-01-11 09:57:58 +0100 |
commit | 9d9e819bc535102ca52d6270b6a928e6e70539b6 (patch) | |
tree | 135655915dc6418356f72076b572fc1ed032159e /libcrystfel/src/stream.h | |
parent | 708590dd4bfac92bde90d9762f413c7496afbddf (diff) |
UnitCell: Store all representations once they're calculated
Previously, the "getter" functions would re-calculate the requested
representation every time they were called. This could mean doing a
matrix inversion in the middle of a tight loop, wasting loads of time.
Now, it stores the calculated values and returns them directly next
time. Setting the parameters invalidates the values for all
representations other than the one given.
The cost of doing this is that the cell can no longer be "const" in the
getter functions. This tracked through some other code, but nothing too
severe.
Diffstat (limited to 'libcrystfel/src/stream.h')
-rw-r--r-- | libcrystfel/src/stream.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcrystfel/src/stream.h b/libcrystfel/src/stream.h index 3d57c7b6..f503f391 100644 --- a/libcrystfel/src/stream.h +++ b/libcrystfel/src/stream.h @@ -98,7 +98,7 @@ extern void stream_close(Stream *st); extern void stream_write_geometry_file(Stream *st, const char *geom_filename); extern void stream_write_target_cell(Stream *st, - const UnitCell *cell); + UnitCell *cell); extern void stream_write_commandline_args(Stream *st, int argc, char *argv[]); extern void stream_write_indexing_methods(Stream *st, |