A.1 About OpenCL data types

This appendix lists the data types available in OpenCL. Most of these types are all natively supported by the Mali™ GPU hardware.

The OpenCL types are used in OpenCL C. The API types are equivalents for use in your application. Use these to ensure that the correct data is used, and it is aligned on 128-bit or 16-byte boundaries.
Vector sizes of 128 bits are optimal. Vector sizes greater than 128 bits are broken into 128-bit parts and operated on separately. For example, adding two 256-bit vectors takes twice as long as adding two 128-bit vectors. You can use vector sizes less than 128 bits without issue.
The disadvantage of using vectors greater than 128 bits is that they can increase code size. Increased code size uses more instruction cache space and this can reduce performance.
Converting between vector types has a low performance cost on Mali GPUs. For example, converting a vector of 8-bit values to 16-bit values:
ushort8 a;  uchar8 b;
a = convert_ushort8(b);
Non-ConfidentialPDF file icon PDF versionARM 100614_0300_00_en
Copyright © 2012, 2013, 2015, 2016 ARM. All rights reserved.