Skip to content

Adding parser for a set of data objects in consecutive memory pages - #585

Closed
matthiasrichter wants to merge 1 commit into
AliceO2Group:devfrom
matthiasrichter:dev-algorithm
Closed

Adding parser for a set of data objects in consecutive memory pages#585
matthiasrichter wants to merge 1 commit into
AliceO2Group:devfrom
matthiasrichter:dev-algorithm

Conversation

@matthiasrichter

Copy link
Copy Markdown
Collaborator

Memory pages have a fixed size and start with a page header. The parser
provides transparent iteration through data objects and handles page
boundaries.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't types start with a capital letter?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true, but as it is it's more in the style of std::iterator

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this. An iterator is defined via operators not via a standard name. In any case, such exceptions will make automatic code checks very hard (to be reliable) and probably we would need to introduce a way to annotate rule violations.

Memory pages have a fixed size and start with a page header. The parser
provides transparent iteration through data objects and handles page
boundaries.
@matthiasrichter

Copy link
Copy Markdown
Collaborator Author

@sawenzel I have corrected the type names and pushed a new commit

@alibuild

alibuild commented Oct 2, 2017

Copy link
Copy Markdown
Collaborator

Error while checking build/o2/macos for 9bb9ac8:

sw/BUILD/O2-latest/log
In file included from /build/macos_ci/build_o2_macos/sw/osx_x86-64/boost/v1.64.0-alice1_O2-2/include/boost/test/tools/fpc_op.hpp:19:
In file included from /build/macos_ci/build_o2_macos/sw/osx_x86-64/boost/v1.64.0-alice1_O2-2/include/boost/test/tools/fpc_tolerance.hpp:19:
In file included from /build/macos_ci/build_o2_macos/sw/osx_x86-64/boost/v1.64.0-alice1_O2-2/include/boost/test/tree/decorator.hpp:37:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:1967:21: error: object of type 'o2::algorithm::PageParser<PageHeader, 128, ClusterData, int>::Iterator' cannot be assigned because its copy assignment operator is implicitly deleted
                __m = __first;
                    ^
/build/macos_ci/build_o2_macos/sw/SOURCES/O2/585/0/Algorithm/test/pageparser.cxx:144:18: note: in instantiation of function template specialization 'std::__1::vector<ClusterData, std::__1::allocator<ClusterData> >::insert<o2::algorithm::PageParser<PageHeader, 128, ClusterData, int>::Iterator>' requested here

Full log here.

@matthiasrichter

Copy link
Copy Markdown
Collaborator Author

Concerning failing test on macos/xcode: The copy assignment operator has been implicitly deleted on purpose. I will check why the vector insert wants to make a copy and assign. Will take some time though, closing the PR for the moment.

sawenzel pushed a commit that referenced this pull request Oct 23, 2017
…follow up #585) (#629)

* Adding parser for a set of data objects in consecutive memory pages

Memory pages have a fixed size and start with a page header. The parser
provides transparent iteration through data objects and handles page
boundaries.

* Adding write functionality for parser iterator

- bidirectional copy function
- runtype check for the buffer const'ness
- supporting iterator and const_iterator
- fixing the assignment operator problem on xcode, now internally using
  pointer instead of reference. Using reference was resulting in making
  and assigning a copy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants