Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further clarify stream class, and align better with C++ ostream in the process #58

Merged

Conversation

mkinsner
Copy link

@mkinsner mkinsner commented Nov 1, 2019

  • rename constructor members to be more descriptive
  • use flush instead of statement-based descriptions. Flush is the C++ approach to describe/define
  • endl implicitly flushes, like C++ convention
  • no OpenCL interop on stream, since no appropriate object to map
  • clarify synchronization and cross-WI guarantees
  • improve wording

…, also align it with C++ iostream semantics
@mkinsner mkinsner requested review from keryell and Ruyk November 1, 2019 01:31
Copy link
Collaborator

@AerialMantis AerialMantis left a comment

Choose a reason for hiding this comment

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

This looks good, thanks @mkinsner, I just have some minor clarifying comments.

latex/programming_interface.tex Show resolved Hide resolved
{
endl
}
{
Outputs a new-line character.
Outputs a new-line character and then generates a flush.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps we should define the flush operation outside of the table, and then we can reference that operation from endl and flush.

Copy link
Author

Choose a reason for hiding this comment

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

I've defined it near the beginning of the section, before the table, with the latest commit.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks good now thanks, though we can probably simplify the wording of the flush manipulator since it's defined earlier.

Copy link
Author

Choose a reason for hiding this comment

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

I did try simplifying the flush manipulator description, but then readded because I thought it was too hard to understand with the distributed wording. I don't really mind either way - do you want me to remove the description from the table?


/* -- common interface members -- */

size_t get_size() const;

size_t get_work_item_buffer_size() const;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is the intention here to deprecate get_work_item_buffer_size?

Copy link
Author

@mkinsner mkinsner Nov 5, 2019

Choose a reason for hiding this comment

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

No. Intent is to rename get_max_statement_size() to get_work_item_buffer_size() which is aligned with the constructor terminology. It still returns the value passed as the second constructor arg.

Copy link
Author

Choose a reason for hiding this comment

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

Perhaps that counts as deprecating, but in a weaker way than removal of a feature.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this makes sense, if by renaming it we at some point remove get_max_statement_size then I would consider this to be a deprecation, simply because it is available in SYCL 1.2.1 but would not be available in a later revision.

To clarify I am fine with this, but if we are deprecating an interface I think we should mark it as deprecated in the specification so our intentions are clear.

Copy link
Author

Choose a reason for hiding this comment

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

I think I clarified appropriately with the latest commit.

latex/programming_interface.tex Show resolved Hide resolved
latex/programming_interface.tex Outdated Show resolved Hide resolved
@mkinsner mkinsner changed the title WIP: Further clarify stream class, and align better with C++ ostream in the process Further clarify stream class, and align better with C++ ostream in the process Nov 5, 2019
Copy link
Member

@keryell keryell left a comment

Choose a reason for hiding this comment

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

That looks good.

Copy link
Collaborator

@AerialMantis AerialMantis left a comment

Choose a reason for hiding this comment

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

This looks good now, thanks!

@Ruyk Ruyk merged commit 99a9dcd into KhronosGroup:SYCL-1.2.1/master Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants