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

Avoid printing unprintable from memset_operation::dump #795

Merged
merged 1 commit into from
Aug 5, 2022

Conversation

al42and
Copy link
Contributor

@al42and al42and commented Aug 5, 2022

Since get_pattern returns unsigned char, it was printed as such.
So, for example, when zeroing an array, a NULL byte was printed to
stderr in debug mode. Nothing serious, but not very helpful either.

Since using memset to fill the buffer with repetitions of a printable
character is not the most common usecase, now we print the pattern as an
integer.

Since `get_pattern` returns `unsigned char`, it was printed as such.
So, for example, when zeroing an array, a NULL byte was printed to
stderr in debug mode. Nothing serious, but not very helpful either.

Since using `memset` to fill the buffer with repetitions of a printable
character is not the most common usecase, now we print the pattern as an
integer.
Copy link
Collaborator

@illuhad illuhad left a comment

Choose a reason for hiding this comment

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

Thanks!

@illuhad illuhad merged commit a8b95eb into AdaptiveCpp:develop Aug 5, 2022
DieGoldeneEnte pushed a commit to DieGoldeneEnte/hipSYCL that referenced this pull request Aug 8, 2022
Since `get_pattern` returns `unsigned char`, it was printed as such.
So, for example, when zeroing an array, a NULL byte was printed to
stderr in debug mode. Nothing serious, but not very helpful either.

Since using `memset` to fill the buffer with repetitions of a printable
character is not the most common usecase, now we print the pattern as an
integer.
@al42and al42and deleted the fix-memset-debug-output branch August 19, 2022 14:10
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.

None yet

2 participants