Data Types

OpenCL data types.

Description

These are the data types available in the OpenCL C programming language. Click on a category name in the table below to see information about specific data types.

Data type category Included data types
Scalar data types bool, char, cl_char, unsigned char, uchar, cl_uchar, short, cl_short, unsigned short, ushort, int, unsigned int, uint, long, unsigned long, ulong, float, half, size_t, ptrdiff_t, intptr_t, uintptr_t, void, and optional double precision and half floating point types.
Vector data types charn, ucharn, shortn, ushortn, intn, uintn, longn, ulongn, floatn, and optional doublen and halfn types.
Abstract data types cl_platform_id, cl_device_id, cl_context, cl_command_queue, cl_mem, cl_program, cl_kernel, cl_event, cl_sampler
Reserved Data Types booln, halfn, quad, quadn, complex half, complex halfn, imaginary half, imaginary halfn, complex float, complex floatn, imaginary float, imaginary floatn, complex double, complex doublen, imaginary double, imaginary doublen, complex quad, complex quadn, imaginary quad, imaginary quadn, floatnxm, doublenxm, long double, long doublen, long long, long longn, unsigned long long, ulong long, ulong longn, long
Other data types image2d_t, image3d_t, sampler_t, event_t

Specification

OpenCL Specification

Copyright © 2007-2010 The Khronos Group Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the condition that this copyright notice and permission notice shall be included in all copies or substantial portions of the Materials.