Skip to content

Comments

UT for EnqueueMapBuffer#259

Open
piotr-wozniak-mobica wants to merge 3 commits intoKhronosGroup:mainfrom
Mobica:ut_enqueueMapBuffer
Open

UT for EnqueueMapBuffer#259
piotr-wozniak-mobica wants to merge 3 commits intoKhronosGroup:mainfrom
Mobica:ut_enqueueMapBuffer

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
Contributor

@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