py4sci

Table Of Contents

Previous topic

atomic hedgehog

Next topic

2. ahh.cl.oquence

This Page

1. ahh.cl

ahh.cl is a collection of utilities for for OpenCL programming. It extends pyopencl with various additional conveniences, by which I mean the pyopencl classes are directly modified:

>>> import ahh.cl, pyopencl
>>> ahh.cl.Platform is pyopencl.Platform
True

ahh.cl can function as a drop-in replacement for pyopencl. All your programs should continue to work – none of the original functionality is discarded. Only the extended functionality is documented below. Refer to the pyopencl API documentation for additional capabilities.

1.1. Presentation

A presentation (PDF) I gave introducing OpenCL and GPU programming, and talking about ahh.cl and ahh.cl.oquence is useful as an introduction. For more details about OpenCL, see the documentation at the OpenCL website.

If you would like the source materials for the presentation, it is available in Keynote and Powerpoint format as well. Creative Commons licensed, but email me before using it please!

1.2. Example

Here is an ahh.cl version of the example provided on the pyopencl website:

import numpy
import numpy.linalg as la
from ahh.cl import Context

## Create an OpenCL context
ctx = Context.for_device(0,0)

## Initialize memory
a = numpy.random.rand(50000).astype(numpy.float32)
b = numpy.random.rand(50000).astype(numpy.float32)
c = numpy.empty_like(a)

## Compile a program
prg = ctx.compile('''
    __kernel void sum(__global const float *a,
                      __global const float *b,
                      __global float *c)
    {
      int gid = get_global_id(0);
      c[gid] = a[gid] + b[gid];
    }
''')

## Run a program (implicitly copying memory in or out, see also InOut)
prg.sum(a.shape, ctx.In(a), ctx.In(b), ctx.Out(c)).wait()

## Verify the results
print la.norm(c - (a+b))

See ahh.cl.oquence for an even more concise and readable version. If the In/Out stuff rubs you wrong, a version without those conveniences is gone through in detail in the presentation as well.

1.3. API

class ahh.cl.Platform[source]

Bases: pyopencl._cl.Platform

A Platform encompasses the compilers and other tools which implement the OpenCL spec. A platform can support one or more devices.

For example, on Snow Leopard, the Apple platform supports OpenCL. On other systems, NVidia, AMD and IBM provide platforms.

classmethod print_list()[source]

Prints a numbered list of available platforms on your system.

classmethod get(idx=None)[source]

If idx is

  • an integer: returns the Platform instance with that index.
  • None: returns a tuple of available Platforms.
  • a Platform instance: returns it

Raises an Error otherwise.

classmethod get_somehow(interactive=True)[source]

Returns a Platform instance somehow.

  • If interactive, prompts on stdin.
  • If not, returns a Platform in an implementation-defined manner (at the moment, just the 0th index Platform.)
classmethod get_idx_somehow(interactive=True)[source]

Returns a platform index somehow. See get_somehow().

devices[source]

A tuple of Devices available for this Platform, optionally constrained by device type.

class ahh.cl.Device[source]

Bases: pyopencl._cl.Device

Represents a single OpenCL-capable device.

classmethod print_list(platform=None)[source]

Prints a numbered list of available devices.

  • If platform is a platform index or Platform instance, prints only devices for that platform.
  • Otherwise, prints all devices for all platforms, grouped by Platform.
classmethod get(idx, platform)[source]

Returns the device with the provided index in the provided platform.

platform can be a platform index or Platform instance.

classmethod get_somehow(interactive=True, platform=None)[source]

Returns a Device instance somehow.

  • If interactive, prompts on stdin.
  • If not, returns a Device in a heuristic manner (at the moment, just the 0th index Device in the provided Platform, or in the default Platform if not specified.)
classmethod get_idx_somehow(interactive=True, platform=None)[source]

Returns a tuple (device index, Platform instance) somehow.

  • If interactive, prompts on stdin.
  • If not, returns indices in a heuristic manner (at the moment, just the 0th index of the provided platform, or the default Platform if not specified.)
max_work_items[source]

Returns the maximum number of work items that can be enqueued on this device.

class ahh.cl.Context(devices=None, properties=None, dev_type=None)[source]

Bases: pyopencl._cl.Context

Represents the OpenCL context from which all commands are issued.

Note

Though a Context can be bound to multiple devices, all features will not be available. Use multiple Contexts instead.

classmethod get_somehow(interactive=True, platform=None)[source]

Creates an instance of Context bound to one device, somehow.

See Device.get_somehow().

classmethod for_device(device_idx, platform)[source]

Creates an instance of Context for the specified device and platform.

platform can be a Platform instance or a platform index.

queue[source]

Provides a default CommandQueue for this context.

If context is bound to more than one device, raises an :class:`Error`.

device[source]

Returns the device bound to this Context.

If multiple devices were specified, raises an :class:`Error`.

alloc(shape=None, cl_dtype=None, order=None, flags=1, like=None)[source]

Allocates an uninitialized Buffer with provided metadata.

shape, cl_dtype and order
See Buffer.shaped(). Inferred from like if it is specified. If not, shape must be specified. The default values of cl_dtype and order are cl_float and “C”, respectively.
flags
One or more mem_flags. Defaults to mem_flags.READ_WRITE.

Note

This isn’t named malloc to emphasize that the allocated buffer maintains type information, unlike malloc in C.

memcpy(dest, src, block=True, wait_for=None, queue=None)[source]

Copies the src buffer to the dest buffer.

Supports host-device, device-host and device-device copies.

wait_for can be specified as a list of Event instances to block on before copying.

If block is True, does not return until transfer completes. Otherwise, returns immediately. Returns an Event instance.

If queue is not provided, uses the default queue.

to_device(src, flags=1, wait_for=None, queue=None)[source]

Copies the src host buffer to a new Buffer, inferring metadata from src.

from_device(src, shape=None, dtype=None, order=None, like=None, wait_for=None, queue=None)[source]

Copies the src device buffer to a new numpy array synchronously.

If not explicitly specified, the shape, dtype and order of the resulting array are inferred from the src if possible, or like if not. The default order is “C”.

wait_for can be specified as a list of Event instances to block on before copying. Always blocks.

If queue is not specified, uses the default queue.

In(src)[source]

Copies the provided src host buffer to the device for read-only access.

Out(dest)[source]

Allocates an empty device buffer on the device for writing only, and copies the result into the provided host buffer dest after each kernel call to which it is passed.

InOut(src)[source]

In() and Out() combined.

compile(source, options='')[source]

Returns a Program built from the provided source.

The compiler options can be provided as a single string or an iterable of strings (with the “-” prefix still attached).

class ahh.cl.MemoryObject

Bases: Boost.Python.instance

class ahh.cl.Buffer(context, flags, size=0, hostbuf=None)[source]

Bases: pyopencl._cl.Buffer

Represents a buffer in global memory.

__init__(context, flags, size=0, hostbuf=None)[source]

Creates a Buffer without saving any metadata (pyopencl default.)

classmethod shaped(ctx, shape=None, cl_dtype=None, order=None, flags=1, hostbuf=None, constant=False)[source]

Creates a Buffer with shape, element type and order metadata.

  • If hostbuf is provided, it will be synchronously copied to the device.
  • If mem_flags.USE_HOST_PTR is not included and a hostbuf is specified, it will be added automatically.
  • Metadata will be inferred from hostbuf if not explicitly provided.
shape
If an int is provided, converted to a one-dimensional tuple. Dimensions be positive integers (arr).

It is highly recommended that you use the methods available in Context to create buffers rather than doing so explicitly.

classmethod infer_shape(src)[source]

Infers a shape from the provided Python object.

  • If src has a shape attribute, it is used.
  • If not, and it has a length, that is used.
  • Otherwise, an Error is raised.
classmethod infer_cl_dtype(src)[source]

Attempts to infer a cl_dtype for the source buffer.

If a cl_dtype attribute is defined, uses that. If not, but a dtype is defined, uses to_cl_type to look it up.

Raises an Error if not able to infer a cl_dtype.

classmethod infer_order(src)[source]

Attempts to infer an order corresponding to src.

Raises an Error if not able to infer an order.

class ahh.cl.LocalMemory[source]

Bases: pyopencl._cl.LocalMemory

Represents an allocation in local memory.

classmethod shaped(ctx, shape, cl_dtype, order='C')[source]

Creates a LocalMemory instance with shape, type and order metadata.

See Buffer.shaped() for an explanation of the arguments.

class ahh.cl.Program(context, *args, **kwargs)[source]

Bases: pyopencl._cl.Program

Represents an OpenCL program.

class ahh.cl.Kernel(program, name)[source]

Bases: pyopencl._cl.Kernel

Represents an OpenCL kernel.

__init__(program, name)[source]

Extended to save program, name, context and the default queue as attributes.

__call__(*args, **kwargs)[source]

Extended to use the default queue if the first argument is not a CommandQueue and the shape of the first kernel argument as the global_size if not explicitly specified.

Also provides support for Context.Out() and Context.InOut().

Python ints and floats are converted to numpy ints and floats automatically. The default floating point data type is float, not double, which is only used if the number cannot fit into the range of the float. The default integer data type is int, with long being used if the number is out of range of int.

exception ahh.cl.Error[source]

Bases: pyopencl.Error

Base class for errors in ahh.cl.

Does NOT replace pyopencl.Error, but does extend it.

ahh.cl.ctx

The process-wide default context to use. None until set explicitly.

ahh.cl.OpenCL_1_0

A Version descriptor representing OpenCL version 1.0.

class ahh.cl.Extension(name)[source]

Bases: object

An OpenCL extension descriptor.

Note

The list of extensions defined below is not comprehensive. Feel free to add additional ones that you know about.

pragma_str[source]

Returns the pragma needed to enable this extension.

ahh.cl.cl_khr_fp64

Standard 64-bit floating point extension.

See section 9.3 in the spec.

ahh.cl.cl_khr_fp16

Standard extension supporting use of the half type as a full type.

See section 9.10 in the spec.

ahh.cl.cl_khr_global_int32_base_atomics

Standard 32-bit base atomic operations for global memory.

See section 9.5 in the spec.

ahh.cl.cl_khr_global_int32_extended_atomics

Standard 32-bit extended atomic operations for global memory.

See section 9.5 in the spec.

ahh.cl.cl_khr_local_int32_base_atomics

Standard 32-bit base atomic operations for local memory.

See section 9.6 in the spec.

ahh.cl.cl_khr_local_int32_extended_atomics

Standard 32-bit extended atomic operations for local memory.

See section 9.6 in the spec.

ahh.cl.int32_global_atomics_extensions

Tuple containing both the base and extended 32-bit base atomic extensions.

ahh.cl.int32_local_atomics_extensions

Tuple containing both the base and extended 32-bit base atomic extensions.

ahh.cl.int32_atomics_extensions

Tuple containing all 32-bit atomics extensions.

ahh.cl.cl_khr_int64_base_atomics

Standard 64-bit base atomic operations.

See section 9.7 in the spec.

ahh.cl.cl_khr_int64_extended_atomics

Standard 64-bit extended atomic operations.

See section 9.7 in the spec.

ahh.cl.int64_atomics_extensions

Tuple containing all 64-bit atomics extensions.

ahh.cl.cl_khr_byte_addressable_store

Standard extension to support byte addressable arrays.

See section 9.9 in the spec.

ahh.cl.cl_khr_3d_image_writes

Standard extension to support 3D image memory objects.

See section 9.8 in the spec.

ahh.cl.cl_APPLE_gl_sharing

Apple extension for OpenGL sharing.

ahh.cl.cl_APPLE_SetMemObjectDestructor

Apple SetMemObjectDestructor extension.

ahh.cl.cl_APPLE_ContextLoggingFunctions

Apple ContextLoggingFunctions extension.

ahh.cl.APPLE_extensions

Tuple containing all Apple extensions.

class ahh.cl.Type(name)[source]

Bases: object

Base class for descriptors for OpenCL data types.

Do not initialize this or any subclasses directly – singletons have already been defined below.

name

The name of the type.

version

The first OpenCL Version this type is available in.

min_sizeof

The minimum size, in bytes, of this type, independent of device.

max_sizeof

The maximum size, in bytes, of this type, independent of device.

sizeof_for(device)[source]

Returns the size of this type on the specified device.

global_ptr[source]

The GlobalPtrType corresponding to this type.

local_ptr[source]

The LocalPtrType corresponding to this type.

constant_ptr[source]

The ConstantPtrType corresponding to this type.

private_ptr[source]

The PrivatePtrType corresponding to this type.

class ahh.cl.BuiltinType(name)[source]

Bases: ahh.cl.Type

Base class for descriptors for OpenCL builtin types.

class ahh.cl.ScalarType(name)[source]

Bases: ahh.cl.BuiltinType

Base class for descriptors for OpenCL scalar types.

Calling a type descriptor will produce an appropriate numpy scalar suitable for calling into a kernel with:

>>> cl_int(10).__class__
<type 'numpy.int32'>
dtype_name

A string representing the unqualified name of the numpy dtype corresponding to this scalar type, or None if unsupported by numpy.

dtype

The numpy dtype corresponding to this scalar type.

None if unsupported by numpy.

min

The minimum value this type can take.

None if device-dependent.

max

The maximum value this type can take.

None if device-dependent.

make_literal(bare_literal)[source]

Converts a bare literal into an appropriately typed literal.

Adds a suffix, if one exists. If not, uses a cast.

literal_suffix

The suffix appended to literals for this type, or None.

(e.g. ‘f’ for float)

Note that either case can normally be used. The lowercase version is provided here.

Raw integer and floating point literals default to int and double, respectively, unless the integer exceeds the bounds for 32-bit integers in which case it is promoted to a long.

class ahh.cl.IntegerType(name)[source]

Bases: ahh.cl.ScalarType

Base class for descriptors for OpenCL scalar integer types.

unsigned

A boolean indicating whether this is an unsigned integer type.

signed_variant

If integer, this provides the signed variant of the type.

unsigned_variant

If integer, this provides the unsigned variant of the type.

class ahh.cl.FloatType(name)[source]

Bases: ahh.cl.ScalarType

Base class for descriptors for OpenCL scalar float types.

ahh.cl.to_cl_type

A map from numpy.dtype descriptors to ScalarType descriptors.

ahh.cl.cl_char

8-bit signed integer type.

ahh.cl.i8

Short name for cl_char.

Note

These short names are non-standard.

ahh.cl.cl_uchar

8-bit unsigned integer type.

ahh.cl.ui8

Short name for cl_uchar.

ahh.cl.cl_short

16-bit signed integer type.

ahh.cl.i16

Short name for cl_short.

ahh.cl.cl_ushort

16-bit unsigned integer type.

ahh.cl.ui16

Short name for cl_ushort.

ahh.cl.cl_int

32-bit signed integer type.

ahh.cl.i32

Short name for cl_int.

ahh.cl.cl_uint

32-bit unsigned integer type.

ahh.cl.ui32

Short name for cl_uint.

ahh.cl.cl_long

64-bit signed integer type.

ahh.cl.i64

Short name for cl_long.

ahh.cl.cl_ulong

64-bit unsigned integer type.

ahh.cl.ui64

Short name for cl_ulong.

ahh.cl.cl_half

16-bit floating point type.

See the spec if you intend to use this, its complicated.

ahh.cl.f16

Short name for cl_half.

ahh.cl.cl_float

32-bit floating point type.

ahh.cl.f32

Short name for cl_float.

ahh.cl.cl_double

64-bit floating point type.

ahh.cl.f64

Short name for cl_double.

ahh.cl.cl_bool

cl_bool is cl_int

ahh.cl.cl_void

The void type.

Can only be used as the return type of a function or the target type of a pointer.

ahh.cl.cl_intptr_t

Signed-integer type with size equal to Device.address_bits.

ahh.cl.iptr

Short name for cl_intptr_t.

ahh.cl.cl_uintptr_t

Unsigned integer type with size equal to Device.address_bits.

ahh.cl.uiptr

Short name for cl_uintptr_t.

ahh.cl.cl_ptrdiff_t

Signed integer type large enough to hold the result of subtracting pointers.

ahh.cl.ptrdiff_t

Short name for cl_ptrdiff_t.

ahh.cl.cl_size_t

Unsigned integer type large enough to hold the maximum length of a buffer.

ahh.cl.size_t

Short name for cl_size_t.

class ahh.cl.PtrType(name)[source]

Bases: ahh.cl.Type

Base class for descriptors for OpenCL pointer types.

address_space

The address space the pointer refers to, e.g. “__global”.

short_address_space

The short name of the address space, e.g. “global”.

suffix_name[source]
version[source]
class ahh.cl.GlobalPtrType(name)[source]

Bases: ahh.cl.PtrType

Base class for descriptors for OpenCL pointers to global memory.

class ahh.cl.LocalPtrType(name)[source]

Bases: ahh.cl.PtrType

Base class for descriptors for OpenCL pointers to local memory.

class ahh.cl.ConstantPtrType(name)[source]

Bases: ahh.cl.PtrType

Base class for descriptors for OpenCL pointers to constant memory.

class ahh.cl.PrivatePtrType(name)[source]

Bases: ahh.cl.PtrType

Base class for descriptors for OpenCL pointers to private memory.

ahh.cl.to_cl_string_literal(value)[source]

Produces an OpenCL string literal from a string value.

ahh.cl.to_cl_numeric_literal(value, unsigned=False, report_type=False)[source]

Produces an OpenCL numeric literal from a number-like value heuristically.

unsigned
If True, returns unsigned variant for integers. Ignored for floats.
report_type
If True, returns (OpenCL type descriptor, literal). If False, returns the literal aone.

See source for full algorithm.

>>> to_cl_numeric_literal(4)
"4"
>>> to_cl_numeric_literal(4.0)
"4.0f"
>>> to_cl_numeric_literal(4, report_type=True)
(<ahh.cl.Type <int>>, "4")
>>> to_cl_numeric_literal(4.0, report_type=True)
(<ahh.cl.Type <float>>, "4.0f")
>>> to_cl_numeric_literal(2**50, report_type=True)
(<ahh.cl.Type <long>>, "1125899906842624L")
>>> to_cl_numeric_literal(2**50, unsigned=True, report_type=True)
(<ahh.cl.Type <ulong>>, "1125899906842624uL")
>>> to_cl_numeric_literal(cl_double.max, report_type=True)
(<ahh.cl.Type <double>>, "1.79769313486e+308")

Non-numeric values will throw AssertionErrors.

See also: ScalarType.make_literal() to specify the type explicitly.

ahh.cl.to_cl_numeric_type(value, unsigned=False)[source]

Produces a Type descriptor from a number-like value heuristically.

See examples in to_cl_numeric_literal(), which calls this function.

ahh.cl.infer_cl_type(value)[source]

Infers a Type descriptor for the provided value heuristically.

class ahh.cl.BuiltinFn(name, return_type_fn)[source]

Bases: object

A stub for built-in functions avaiable to OpenCL kernels.

name

The name of the function.

return_type_fn

A function which, when provided the types of the input arguments, gives you the return type of the builtin function, or raises an Error if the types are invalid.

requires_extensions

If not None, returns a tuple of extensions required for arguments of the specified types.

class ahh.cl.BuiltinConstant(name, cl_type)[source]

Bases: object

A descriptor for builtin constants available to OpenCL kernels.

class ahh.cl.ReservedKeyword(name)[source]

Bases: object

A descriptor for OpenCL reserved keywords.

ahh.cl.builtins

A map from built-in and reserved names to their corresponding descriptor.

ahh.cl.get_work_dim

The get_work_dim builtin function.

ahh.cl.get_global_size

The get_global_size builtin function.

ahh.cl.get_global_id

The get_global_id builtin function.

ahh.cl.get_local_size

The get_local_size builtin function.

ahh.cl.get_local_id

The get_local_id builtin function.

ahh.cl.get_num_groups

The get_num_groups builtin function.

ahh.cl.get_group_id

The get_group_id builtin function.

ahh.cl.abs

The abs builtin function.

ahh.cl.abs_diff

The abs_diff builtin function.

ahh.cl.add_sat

The add_sat builtin function.

ahh.cl.hadd

The hadd builtin function.

ahh.cl.rhadd

The rhadd builtin function.

ahh.cl.clz

The clz builtin function.

ahh.cl.mad_hi

The mad_hi builtin function.

ahh.cl.mad24

The mad24 builtin function.

ahh.cl.mad_sat

The mad_sat builtin function.

ahh.cl.max

The max builtin function.

ahh.cl.min

The min builtin function.

ahh.cl.mul_hi

The mul_hi builtin function.

ahh.cl.mul24

The mul24 builtin function.

ahh.cl.rotate

The rotate builtin function.

ahh.cl.sub_sat

The sub_sat builtin function.

ahh.cl.upsample

The upsample builtin function.

ahh.cl.clamp

The clamp builtin function.

ahh.cl.degrees

The degrees builtin function.

ahh.cl.mix

The mix builtin function.

ahh.cl.radians

The radians builtin function.

ahh.cl.step

The step builtin function.

ahh.cl.smoothstep

The smoothstep builtin function.

ahh.cl.sign

The sign builtin function.

ahh.cl.acos

The acos builtin function.

ahh.cl.acosh

The acosh builtin function.

ahh.cl.acospi

The acospi builtin function.

ahh.cl.asin

The asin builtin function.

ahh.cl.asinh

The asinh builtin function.

ahh.cl.asinpi

The asinpi builtin function.

ahh.cl.atan

The atan builtin function.

ahh.cl.atan2

The atan2 builtin function.

ahh.cl.atanh

The atanh builtin function.

ahh.cl.atanpi

The atanpi builtin function.

ahh.cl.atan2pi

The atan2pi builtin function.

ahh.cl.cbrt

The cbrt builtin function.

ahh.cl.ceil

The ceil builtin function.

ahh.cl.copysign

The copysign builtin function.

ahh.cl.cos

The cos builtin function.

ahh.cl.enqueue_barrier()

enqueue_barrier( (CommandQueue)arg1) -> None :

C++ signature :
void enqueue_barrier(pyopencl::command_queue {lvalue})
ahh.cl.half_cos

The half_cos builtin function.

ahh.cl.native_cos

The native_cos builtin function.

ahh.cl.cosh

The cosh builtin function.

ahh.cl.cospi

The cospi builtin function.

ahh.cl.half_divide

The half_divide builtin function.

ahh.cl.native_divide

The native_divide builtin function.

ahh.cl.erfc

The erfc builtin function.

ahh.cl.erf

The erf builtin function.

ahh.cl.exp

The exp builtin function.

ahh.cl.half_exp

The half_exp builtin function.

ahh.cl.native_exp

The native_exp builtin function.

ahh.cl.exp2

The exp2 builtin function.

ahh.cl.half_exp2

The half_exp2 builtin function.

ahh.cl.native_exp2

The native_exp2 builtin function.

ahh.cl.exp10

The exp10 builtin function.

ahh.cl.half_exp10

The half_exp10 builtin function.

ahh.cl.native_exp10

The native_exp10 builtin function.

ahh.cl.expm1

The expm1 builtin function.

ahh.cl.fabs

The fabs builtin function.

ahh.cl.fdim

The fdim builtin function.

ahh.cl.floor

The floor builtin function.

ahh.cl.fma

The fma builtin function.

ahh.cl.fmax

The fmax builtin function.

ahh.cl.fmin

The fmin builtin function.

ahh.cl.fmod

The fmod builtin function.

ahh.cl.fract

The fract builtin function.

ahh.cl.frexp

The frexp builtin function.

ahh.cl.hypot

The hypot builtin function.

ahh.cl.ilogb

The ilogb builtin function.

ahh.cl.ldexp

The ldexp builtin function.

ahh.cl.lgamma

The lgamma builtin function.

ahh.cl.lgamma_r

The lgamma_r builtin function.

ahh.cl.log

The log builtin function.

ahh.cl.half_log

The half_log builtin function.

ahh.cl.native_log

The native_log builtin function.

ahh.cl.log2

The log2 builtin function.

ahh.cl.half_log2

The half_log2 builtin function.

ahh.cl.native_log2

The native_log2 builtin function.

ahh.cl.log10

The log10 builtin function.

ahh.cl.half_log10

The half_log10 builtin function.

ahh.cl.native_log10

The native_log10 builtin function.

ahh.cl.log1p

The log1p builtin function.

ahh.cl.logb

The logb builtin function.

ahh.cl.mad

The mad builtin function.

ahh.cl.modf

The modf builtin function.

ahh.cl.nextafter

The nextafter builtin function.

ahh.cl.pow

The pow builtin function.

ahh.cl.pown

The pown builtin function.

ahh.cl.powr

The powr builtin function.

ahh.cl.half_powr

The half_powr builtin function.

ahh.cl.native_powr

The native_powr builtin function.

ahh.cl.half_recip

The half_recip builtin function.

ahh.cl.native_recip

The native_recip builtin function.

ahh.cl.remainder

The remainder builtin function.

ahh.cl.remquo

The remquo builtin function.

ahh.cl.rint

The rint builtin function.

ahh.cl.rootn

The rootn builtin function.

ahh.cl.round

The round builtin function.

ahh.cl.rsqrt

The rsqrt builtin function.

ahh.cl.native_rsqrt

The native_rsqrt builtin function.

ahh.cl.half_rsqrt

The half_rsqrt builtin function.

ahh.cl.sin

The sin builtin function.

ahh.cl.native_sin

The native_sin builtin function.

ahh.cl.half_sin

The half_sin builtin function.

ahh.cl.sincos

The sincos builtin function.

ahh.cl.sinh

The sinh builtin function.

ahh.cl.sinpi

The sinpi builtin function.

ahh.cl.sqrt

The sqrt builtin function.

ahh.cl.half_sqrt

The half_sqrt builtin function.

ahh.cl.native_sqrt

The native_sqrt builtin function.

ahh.cl.tan

The tan builtin function.

ahh.cl.half_tan

The half_tan builtin function.

ahh.cl.native_tan

The native_tan builtin function.

ahh.cl.tanh

The tanh builtin function.

ahh.cl.tanpi

The tanpi builtin function.

ahh.cl.tgamma

The tgamma builtin function.

ahh.cl.trunc

The trunc builtin function.

ahh.cl.dot

The dot builtin function.

ahh.cl.distance

The distance builtin function.

ahh.cl.length

The length builtin function.

ahh.cl.normalize

The normalize builtin function.

ahh.cl.fast_distance

The fast_distance builtin function.

ahh.cl.fast_length

The fast_length builtin function.

ahh.cl.fast_normalize

The fast_normalize builtin function.

ahh.cl.isequal

The isequal builtin function.

ahh.cl.isnotequal

The isnotequal builtin function.

ahh.cl.isgreater

The isgreater builtin function.

ahh.cl.isgreaterequal

The isgreaterequal builtin function.

ahh.cl.isless

The isless builtin function.

ahh.cl.islessequal

The islessequal builtin function.

ahh.cl.islessgreater

The islessgreater builtin function.

ahh.cl.isfinite

The isfinite builtin function.

ahh.cl.isinf

The isinf builtin function.

ahh.cl.isnan

The isnan builtin function.

ahh.cl.isnormal

The isnormal builtin function.

ahh.cl.isordered

The isordered builtin function.

ahh.cl.isunordered

The isunordered builtin function.

ahh.cl.signbit

The signbit builtin function.

ahh.cl.any

The any builtin function.

ahh.cl.all

The all builtin function.

ahh.cl.bitselect

The bitselect builtin function.

ahh.cl.select

The select builtin function.

ahh.cl.atom_add

The atom_add builtin function.

ahh.cl.atom_sub

The atom_sub builtin function.

ahh.cl.atom_xchg

The atom_xchg builtin function.

ahh.cl.atom_inc

The atom_inc builtin function.

ahh.cl.atom_dec

The atom_dec builtin function.

ahh.cl.atom_cmpxchg

The atom_cmpxchg builtin function.

ahh.cl.atom_min

The atom_min builtin function.

ahh.cl.atom_max

The atom_max builtin function.

ahh.cl.atom_and

The atom_and builtin function.

ahh.cl.atom_or

The atom_or builtin function.

ahh.cl.atom_xor

The atom_xor builtin function.

ahh.cl.vload_half

The vload_half builtin function.

ahh.cl.vstore_half

The vstore_half builtin function.

ahh.cl.sizeof

The sizeof builtin operator.