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

UT for EnqueueMapBuffer #259

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

piotr-wozniak-mobica
Copy link
Contributor

No description provided.

TEST_ASSERT_EQUAL(sizeof(int) * 1024, size);
TEST_ASSERT_EQUAL(0, num_events_in_wait_list);
TEST_ASSERT_EQUAL_PTR(nullptr, event_wait_list);
TEST_ASSERT_NOT_NULL(event);
Copy link
Contributor

Choose a reason for hiding this comment

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

The event pointer is an optional output, so if the pointer is non-NULL then we should be writing a value to it (e.g. make_event(N), and checking that the expected value was written in the calling function.

See, for example:

Comment on lines 4551 to 4552
ret = enqueueMapBuffer(bufferPool[0], blocking, flags, offset, size, events,
event, err);
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't have a very strong opinion about this, but it would require less code to pass in some of these values directly vs. assigning them to a variable first.

Suggested change
ret = enqueueMapBuffer(bufferPool[0], blocking, flags, offset, size, events,
event, err);
ret = enqueueMapBuffer(bufferPool[0], CL_TRUE, CL_MAP_WRITE, 0, sizeof(int) * 1024, events,
event, err);

@kamil-goras-mobica
Copy link

@bashbaug Added corrections.

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.

3 participants