Ticket #11033 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

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:1 Changed 6 years ago by Martyn Gigg

  • Status changed from new to assigned

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:4 Changed 6 years ago by Martyn Gigg

Jenkins, retest this please

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

comment:6 Changed 5 years ago by Nick Draper

Somehow these slipped through without a resolution. Set to Fixed.

comment:7 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 11872

Note: See TracTickets for help on using tickets.