5.2 Finding the available compute devices

To set up OpenCL, you must choose compute devices. Call clGetDeviceIDs() to query the OpenCL driver for a list of devices on the machine that support OpenCL.

You can restrict your search to a particular type of device or to any combination of device types. You must also specify the maximum number of device IDs that you want returned.
If you have two or more devices, you can schedule different NDranges for processing on the devices.
If your Mali™ GPU has two shader core groups, the OpenCL driver treats each core group as a separate OpenCL device, each with its own cl_device_id. This means you can form separate queues and execute them independently of each other. Alternatively, you can choose one core group for OpenCL and leave the other core group for other GPU tasks.
The OpenCL driver returns the device arrays in core group ID order.


Some of the Midgard devices are asymmetric. One core group might contain four shader cores while another core group might contain two shader cores.
Non-ConfidentialPDF file icon PDF versionARM 100614_0300_00_en
Copyright © 2012, 2013, 2015, 2016 ARM. All rights reserved.