Skip to content

Commit

Permalink
fix for warning in svm test file
Browse files Browse the repository at this point in the history
  • Loading branch information
pwisniewskimobica committed Jun 19, 2023
1 parent 453ccf9 commit 282f4fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_openclhpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4194,14 +4194,14 @@ void testEnqueueReleaseExternalMemObjects(void) {}
#endif // cl_khr_external_memory

/****************************************************************************
* Tests for allocate and deallocate API (clSVMAlloc, clSVMFree, clEnqueueSVMMap)
* Tests for allocate and deallocate API (stubs for clSVMAlloc, clSVMFree, clEnqueueSVMMap)
****************************************************************************/
int *testMemory;
void *clSVMAllocARM_stubForMemoryAllocation(cl_context context,cl_svm_mem_flags flags,
size_t size, cl_uint alignment, int cmock_num_calls)
{
TEST_ASSERT_EQUAL_HEX(size, 3 * sizeof(int));
testMemory = new int[3];
testMemory = new int[size / sizeof(int)];
return testMemory;
}
cl_int clEnqueueSVMMap_stubForMemoryAllocation(cl_command_queue command_queue, cl_bool blocking_map, cl_map_flags flags, void* svm_ptr, size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event, int cmock_num_calls)
Expand All @@ -4214,10 +4214,10 @@ void clSVMFree_stubForMemoryAllocation(cl_context context, void *svm_pointer,
int cmock_num_calls)
{
TEST_ASSERT_EQUAL_PTR(svm_pointer, testMemory);
delete svm_pointer;
delete (int*) svm_pointer;
}
void testSVMMemoryAllocation()
{
{//

#if CL_HPP_TARGET_OPENCL_VERSION >= 200
cl::SVMAllocator<int, cl::SVMTraitCoarse<>> svmAllocator;
Expand Down

0 comments on commit 282f4fb

Please sign in to comment.