Ticket #11033 (closed: fixed)
Workspace2D::blocksize should only need to access the read-only Y array
Reported by: | Martyn Gigg | Owned by: | Martyn Gigg |
---|---|---|---|
Priority: | minor | Milestone: | Release 3.4 |
Component: | Framework | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Pete Peterson |
Description
The current implementation in Workspace2D accesses the non-const dataY method on ISpectrum and can cause cow_ptr to copy unnecessarily. I spotted this recently when the doc tests segfaulted in the debugger on RHEL6 and it was trying to copy the data in the vector.
Change History
comment:2 Changed 6 years ago by Martyn Gigg
- Status changed from assigned to inprogress
Call the const version of dataY to avoid copies
Blocksize should be a const call to dataY so that no attempt is made by cow_ptr to copy the data Refs #11033
Changeset: 0f680aafc4bc44b6b45d84d67486dec5db6077c7
comment:3 Changed 6 years ago by Martyn Gigg
- Status changed from inprogress to verify
- Resolution set to fixed
This is being verified as pull request #187.
comment:5 Changed 6 years ago by Pete Peterson
- Status changed from verify to closed
- Tester set to Pete Peterson
Merge pull request #187 from mantidproject/11033_fix_workspace2d_blocksize
Good looking one line change. I'm a little curious how you caught this.
Full changeset: 411ac1678a975015bfbc299ddcddd0c404138e91