In this exercise you will learn how to create two separate queues and then split a task across two devices.
Get two devices. If only host device is available then both devices may be identical, that is the host device.
Then create a queue for each of the two devices.
Using either the application from the “Data Parallelism” exercise with the
buffer/accessor model or the application from the “Using USM” exercise with the
USM model, create an application where the work is distributed across two
devices using the two queues you created.
Remember to create separate buffers for the separate parts of the data being
computed.
Remember to wait on the work enqueued to bothqueues to complete and remember
to handle errors.
Also note that you will need to have different types defined to name each of the two kernel kernel functions.
Try playing around with the distribution of the work between the two devices by
changing the range and offset of the two buffers.
For DevCloud via JupiterLab follow these instructions.
For DPC++: instructions.
For AdaptiveCpp: instructions.