A.2.1 Built-in scalar data types

List of built-in scalar data types.

Table A-1 Built-in scalar data types

Types for OpenCL kernels Types for application Description
bool - true (1) or false (0)
char cl_char 8-bit signed
unsigned char, uchar cl_uchar 8-bit unsigned
short cl_short 16-bit signed
unsigned short, ushort cl_ushort 16-bit unsigned
int cl_int 32-bit signed
unsigned int, uint cl_uint 32-bit unsigned
long cl_long 64-bit signed
unsigned long, ulong cl_ulong 64-bit unsigned
float cl_float 32-bit float
half cl_half 16-bit float, for storage only
size_t - unsigned integer, with size matching CL_DEVICE_ADDRESS_BITS
ptrdiff_t - unsigned integer, with size matching CL_DEVICE_ADDRESS_BITS
intptr_t - signed integer, with size matching CL_DEVICE_ADDRESS_BITS
uintptr_t - unsigned integer, with size matching CL_DEVICE_ADDRESS_BITS
void void void

Note:

You can query CL_DEVICE_ADDRESS_BITS with clGetDeviceInfo(). The value returned might be different for 32-bit and 64-bit host applications, even on the same Mali™ GPU.

Non-ConfidentialPDF file icon PDF version101574_0301_00_en
Copyright © 2019 Arm Limited or its affiliates. All rights reserved.