Skip to content

Commit

Permalink
Added minor corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
kamil-goras-mobica committed May 23, 2024
1 parent ac87eda commit 4cccb1c
Showing 1 changed file with 0 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,6 @@ struct CommandBufferCopyBufferDifferentContexts
sizeof(cl_int) * num_elements, nullptr, &error);
test_error(error, "clCreateBuffer failed");

const cl_image_format formats = { CL_RGBA, CL_UNSIGNED_INT8 };
image_ctx = create_image_2d(context1, CL_MEM_READ_WRITE, &formats, 512,
512, 0, NULL, &error);
test_error(error, "create_image_2d failed");

buffer_ctx = clCreateBuffer(context1, CL_MEM_READ_WRITE, data_size(),
nullptr, &error);
test_error(error, "Unable to create buffer");

return CL_SUCCESS;
}

Expand Down Expand Up @@ -204,8 +195,6 @@ struct CommandBufferCopyBufferDifferentContexts
}
clMemWrapper in_mem_ctx = nullptr;
clMemWrapper out_mem_ctx = nullptr;
clMemWrapper image_ctx = nullptr;
clMemWrapper buffer_ctx = nullptr;
clContextWrapper context1 = nullptr;
};

Expand All @@ -224,16 +213,6 @@ struct CommandBufferCopyImageDifferentContexts
context1 = clCreateContext(0, 1, &device, nullptr, nullptr, &error);
test_error(error, "Failed to create context");

in_mem_ctx =
clCreateBuffer(context1, CL_MEM_READ_ONLY,
sizeof(cl_int) * num_elements, nullptr, &error);
test_error(error, "clCreateBuffer failed");

out_mem_ctx =
clCreateBuffer(context1, CL_MEM_WRITE_ONLY,
sizeof(cl_int) * num_elements, nullptr, &error);
test_error(error, "clCreateBuffer failed");

image_ctx = create_image_2d(context1, CL_MEM_READ_WRITE, &formats, 512,
512, 0, NULL, &error);
test_error(error, "create_image_2d failed");
Expand Down Expand Up @@ -270,8 +249,6 @@ struct CommandBufferCopyImageDifferentContexts

return CL_SUCCESS;
}
clMemWrapper in_mem_ctx = nullptr;
clMemWrapper out_mem_ctx = nullptr;
clMemWrapper image_ctx = nullptr;
clMemWrapper buffer_ctx = nullptr;
clContextWrapper context1 = nullptr;
Expand Down

0 comments on commit 4cccb1c

Please sign in to comment.