khronos-opencl-man-1.0~svn27110/0000755000175000017500000000000012350363105016254 5ustar mathieumathieukhronos-opencl-man-1.0~svn27110/clGetCommandQueueInfo.xml0000644000175000017500000002633411660441607023173 0ustar mathieumathieu clGetCommandQueueInfo clGetCommandQueueInfo 2007-2011 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. 3 clGetCommandQueueInfo Query information about a command-queue. cl_int clGetCommandQueueInfo cl_command_queue command_queue cl_command_queue_info param_name size_t param_value_size void *param_value size_t *param_value_size_ret Parameters command_queue Specifies the command-queue being queried. param_name Specifies the information to query. param_value_size Specifies the size in bytes of memory pointed to by param_value. This size must be ≥ size of return type as described in the table below. If param_value is NULL, it is ignored. param_value A pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored. param_value_size_ret Returns the actual size in bytes of data being queried by param_value. If param_value_size_ret is NULL, it is ignored The list of supported param_name values and the information returned in param_value by clGetCommandQueueInfo is described in the table below. cl_command_queue_info Return Type and Information returned in param_value CL_QUEUE_CONTEXT Return type: cl_context Return the context specified when the command-queue is created. CL_QUEUE_DEVICE Return type: cl_device_id Return the device specified when the command-queue is created. CL_QUEUE_REFERENCE_COUNT Return type: cl_uint Return the command-queue reference count. The reference count returned with CL_QUEUE_REFERENCE_COUNT should be considered immediately stale. It is unsuitable for general use in applications. This feature is provided for identifying memory leaks. CL_QUEUE_PROPERTIES Return type: cl_command_queue_properties Return the currently specified properties for the command-queue. These properties are specified by the properties argument in clCreateCommandQueue. Notes It is possible that a device(s) becomes unavailable after a context and command-queues that use this device(s) have been created and commands have been queued to command-queues. In this case the behavior of OpenCL API calls that use this context (and command-queues) are considered to be implementation-defined. The user callback function, if specified, when the context is created can be used to record appropriate information in the errinfo, private_info arguments passed to the callback function when the device becomes unavailable. Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns the following: Returns CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. Returns CL_INVALID_VALUE if param_name is not one of the supported values or if size in bytes specified by param_value_size is less than size of return type and param_value is not a NULL value. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clCreateCommandQueue, clReleaseCommandQueue, clRetainCommandQueue khronos-opencl-man-1.0~svn27110/clCreateContext.xml0000644000175000017500000010315511660441607022101 0ustar mathieumathieu clCreateContext clCreateContext 2007-2011 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. 3 clCreateContext Creates an OpenCL context. cl_context clCreateContext const cl_context_properties*properties cl_uintnum_devices const cl_device_id*devices (void CL_CALLBACK *pfn_notify) const char *errinfo, const void *private_info, size_t cb, void *user_data void*user_data cl_int*errcode_ret Description An OpenCL context is created with one or more devices. Contexts are used by the OpenCL runtime for managing objects such as command-queues, memory, program and kernel objects and for executing kernels on one or more devices specified in the context. Parameters properties Specifies a list of context property names and their corresponding values. Each property name is immediately followed by the corresponding desired value. The list is terminated with 0. properties can be NULL in which case the platform that is selected is implementation-defined. The list of supported properties is described in the table below. If the extension cl_khr_dx9_media_sharing is enabled, then properties specifies a list of context property names and their corresponding values. Each property is followed immediately by the corresponding desired value. The list is terminated with zero. If a property is not specified in properties, then its default value (listed in the table below) is used (it is said to be specified implicitly). If properties is NULL or empty (points to a list whose first value is zero), all attributes take on their default values. If the extension cl_khr_d3d10_sharing is enabled, then properties specifies a list of context property names and their corresponding values. Each property is followed immediately by the corresponding desired value. The list is terminated with zero. if a property is not specified in properties, then its default value is used (it is said to be specified implicitly). If properties is NULL or empty (points to a list whose first value is zero), all attributes take on their default value. If the extension cl_khr_gl_sharing is enabled, then properties points to an attribute list, which is a array of ordered <attribute name, value> pairs terminated with zero. If an attribute is not specified in properties, then its default value is used (it is said to be specified implicitly). If properties is NULL or empty (points to a list whose first value is zero), all attributes take on their default values.. cl_context_properties enum Property value Description CL_CONTEXT_PLATFORM cl_platform_id Specifies the platform to use. CL_CONTEXT_INTEROP_USER_SYNC cl_bool Specifies whether the user is responsible for synchronization between OpenCL and other APIs. Please refer to the specific sections in the OpenCL 1.2 extension specification that describe sharing with other APIs for restrictions on using this flag. If CL_CONTEXT_INTEROP_USER_ SYNC is not specified, a default of CL_FALSE is assumed. CL_CONTEXT_D3D10_DEVICE_KHR ID3D10Device* If the cl_khr_d3d10_sharing extension is enabled, specifies the ID3D10Device* to use for Direct3D 10 interoperability. The default value is NULL. CL_GL_CONTEXT_KHR 0, OpenGL context handle OpenGL context to associated the OpenCL context with (available if the cl_khr_gl_sharing extension is enabled) CL_EGL_DISPLAY_KHR EGL_NO_DISPLAY, EGLDisplay handle EGLDisplay an OpenGL context was created with respect to (available if the cl_khr_gl_sharing extension is enabled) CL_GLX_DISPLAY_KHR None, X handle X Display an OpenGL context was created with respect to (available if the cl_khr_gl_sharing extension is enabled) CL_CGL_SHAREGROUP_KHR 0, CGL share group handle CGL share group to associate the OpenCL context with (available if the cl_khr_gl_sharing extension is enabled) CL_WGL_HDC_KHR 0, HDC handle HDC an OpenGL context was created with respect to (available if the cl_khr_gl_sharing extension is enabled) CL_CONTEXT_ADAPTER_D3D9_KHR IDirect3DDevice9 * Specifies an IDirect3DDevice9 to use for D3D9 interop (if the cl_khr_dx9_media_sharing extension is supported). CL_CONTEXT_ADAPTER_D3D9EX_KHR IDirect3DDeviceEx* Specifies an IDirect3DDevice9Ex to use for D3D9 interop (if the cl_khr_dx9_media_sharing extension is supported). CL_CONTEXT_ADAPTER_DXVA_KHR IDXVAHD_Device * Specifies an IDXVAHD_Device to use for DXVA interop (if the cl_khr_dx9_media_sharing extension is supported). CL_CONTEXT_D3D11_DEVICE_KHR ID3D11Device * Specifies the ID3D11Device * to use for Direct3D 11 interoperability. The default value is NULL. num_devices The number of devices specified in the devices argument. devices A pointer to a list of unique devices returned by clGetDeviceIDs or sub-devices created by clCreateSubDevices for a platform. pfn_notify A callback function that can be registered by the application. This callback function will be used by the OpenCL implementation to report information on errors during context creation as well as errors that occur at runtime in this context. This callback function may be called asynchronously by the OpenCL implementation. It is the application's responsibility to ensure that the callback function is thread-safe. If pfn_notify is NULL, no callback function is registered. The parameters to this callback function are: errinfo is a pointer to an error string. private_info and cb represent a pointer to binary data that is returned by the OpenCL implementation that can be used to log additional information helpful in debugging the error. user_data is a pointer to user supplied data. NOTE: There are a number of cases where error notifications need to be delivered due to an error that occurs outside a context. Such notifications may not be delivered through the pfn_notify callback. Where these notifications go is implementation-defined. user_data Passed as the user_data argument when pfn_notify is called. user_data can be NULL. errcode_ret Returns an appropriate error code. If errcode_ret is NULL, no error code is returned. Notes clCreateContext and clCreateContextFromType perform an implicit retain. This is very helpful for 3rd party libraries, which typically get a context passed to them by the application. However, it is possible that the application may delete the context without informing the library. Allowing functions to attach to (i.e. retain) and release a context solves the problem of a context being used by a library no longer being valid. Errors clCreateContext returns a valid non-zero context and errcode_ret is set to CL_SUCCESS if the context is created successfully. Otherwise, it returns NULL value with the following error values returned in errcode_ret: CL_INVALID_PLATFORM if properties is NULL and no platform could be selected or if platform value specified in properties is not a valid platform. (If the extension cl_khr_gl_sharing is enabled, then this error is replaced with CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR; see below.) CL_INVALID_PROPERTY if context property name in properties is not a supported property name, if the value specified for a supported property name is not valid, or if the same property name is specified more than once. However if the extension cl_khr_gl_sharing is enabled, then CL_INVALID_PROPERTY is returned if an attribute name other than those listed in the table for properties above or if CL_CONTEXT_INTEROP_USER_SYNC is specified in properties. CL_INVALID_PROPERTY if an attribute name other than those specified in table 4.5 or if CL_CONTEXT_INTEROP_USER_SYNC is specified in properties. CL_INVALID_VALUE if devices is NULL; if num_devices is equal to zero; or if pfn_notify is NULL but user_data is not NULL. CL_INVALID_DEVICE if devices contains an invalid device. CL_INVALID_OPERATION if Direct3D 10 interoperability is specified by setting CL_INVALID_D3D10_DEVICE_KHR to a non-NULL value, and interoperability with another graphics API is also specified (if the cl_khr_d3d10_sharing extension is enabled). CL_DEVICE_NOT_AVAILABLE if a device in devices is currently not available even though the device was returned by clGetDeviceIDs. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. CL_INVALID_D3D10_DEVICE_KHR if the Direct3D 10 device specified for interoperability is not compatible with the devices against which the context is to be created (if the cl_khr_d3d10_sharing extension is enabled). CL_INVALID_D3D10_DEVICE_KHR if the value of the property CL_CONTEXT_D3D10_DEVICE_KHR is non-NULL and does not specify a valid Direct3D 10 device with which the cl_device_ids against which this context is to be created may interoperate (if the cl_khr_d3d10_sharing extension is enabled). CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR when an invalid OpenGL context or share group object handle is specified in properties (only if the cl_khr_gl_sharing extension is enabled). CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR if no OpenGL or OpenGL ES context or share group is specified in the attribute list given to clCreateContext and any of the commands in section 9.7 are called. (if the cl_khr_gl_sharing extension is enabled) CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR if the cl_khr_gl_sharing extension is enabled and if a context was specified by any of the following means: A context specified for an EGL-based OpenGL ES or OpenGL implementation by setting the attributes CL_GL_CONTEXT_KHR and CL_EGL_DISPLAY_KHR. A context was specified for a GLX-based OpenGL implementation by setting the attributes CL_GL_CONTEXT_KHR and CL_GLX_DISPLAY_KHR. A context was specified for a WGL-based OpenGL implementation by setting the attributes CL_GL_CONTEXT_KHR and CL_WGL_HDC_KHR. and any of the following conditions hold: The specified display and context attributes do not identify a valid OpenGL or OpenGL ES context. The specified context does not support buffer and renderbuffer objects. The specified context is not compatible with the OpenCL context being created (for example, it exists in a physically distinct address space, such as another hardware device, or does not support sharing data with OpenCL due to implementation restrictions). CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR if a share group was specified for a CGL-based OpenGL implementation by setting the attribute CL_CGL_SHAREGROUP_KHR, and the specified share group does not identify a valid CGL share group object (if the cl_khr_gl_sharing extension is enabled). CL_INVALID_OPERATION if a context was specified as described above and any of the following conditions hold: A context or share group object was specified for one of CGL, EGL, GLX, or WGL and the OpenGL implementation does not support that window-system binding API. More than one of the attributes CL_CGL_SHAREGROUP_KHR, CL_EGL_DISPLAY_KHR, CL_GLX_DISPLAY_KHR, and CL_WGL_HDC_KHR is set to a non-default value. Both of the attributes CL_CGL_SHAREGROUP_KHR and CL_GL_CONTEXT_KHR are set to non-default values. Any of the devices specified in the devices argument cannot support OpenCL objects which share the data store of an OpenGL object, as described in section 9.7. CL_INVALID_DX9_MEDIA_ADAPTER_KHR if the media adapter specified for interoperability is not compatible with the devices against which the context is to be created (only if the cl_khr_dx9_media_sharing extension is supported). CL_INVALID_ADAPTER_KHR if any of the values of the properties CL_CONTEXT_ADAPTER_D3D9_KHR, CL_CONTEXT_ADAPTER_D3D9EX_KHR or CL_CONTEXT_ADAPTER_DXVA_KHR is non-NULL and does not specify a valid media adapter with which the cl_device_ids against which this context is to be created may interoperate (only if the cl_khr_dx9_media_sharing extension is supported). CL_INVALID_OPERATION if interoperability is specified by setting CL_CONTEXT_ADAPTER_D3D9_KHR, CL_CONTEXT_ADAPTER_D3D9EX_KHR or CL_CONTEXT_ADAPTER_DXVA_KHR to a non-NULL value, and interoperability with another graphics API is also specified (only if the cl_khr_dx9_media_sharing extension is supported). CL_INVALID_OPERATION if Direct3D 11 interoperability is specified by setting CL_INVALID_D3D11_DEVICE_KHR to a non-NULL value, and interoperability with another graphics API is also specified (only if the cl_khr_d3d11_sharing extension is supported). CL_INVALID_D3D11_DEVICE_KHR if the value of the property CL_CONTEXT_D3D11_DEVICE_KHR is non-NULL and does not specify a valid Direct3D 11 device with which the cl_device_ids against which this context is to be created may interoperate (only if the cl_khr_d3d11_sharing extension is supported). CL_INVALID_D3D11_DEVICE_KHR if the Direct3D 11 device specified for interoperability is not compatible with the devices against which the context is to be created (only if the cl_khr_d3d11_sharing extension is supported). Specification OpenCL Specification Also see clGetDeviceIDs, clCreateContextFromType, clRetainContext, clReleaseContext, clGetContextInfo, Cardinality Diagram khronos-opencl-man-1.0~svn27110/recip.xml0000644000175000017500000001346211660441607020115 0ustar mathieumathieu half_recip, native_recip half_recip, native_recip 2007-2011 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. 3 half_recip, native_recip Floating point reciprocal. gentype half_recip gentypex gentype native_recip gentypex Description The half_recip computes reciprocal. native_recip computes reciprocal over an implementation-defined range. The maximum error is implementation-defined. Notes This built-in math function takes scalar or vector arguments. The generic type name gentype is used to indicate that the function can take float, float2, float4, float8, or float16 as the type for the arguments. For any specific use of these function, the actual type has to be the same for all arguments and the return type. Functions with the half_ prefix are implemented with a minimum of 10-bits of accuracy i.e. an ULP value less than or equal to 8192 ulp. Functions with the native__ prefix may map to one or more native device instructions and will typically have better performance compared to the corresponding functions (without the native__ prefix). The accuracy (and in some cases the input range(s)) of these functions is implementation-defined. The vector versions of the math functions operate component-wise. The description is per-component. The built-in math functions are not affected by the prevailing rounding mode in the calling environment, and always return the same value as they would if called with the round to nearest even rounding mode. Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/get_num_groups.xml0000644000175000017500000001107211660441607022043 0ustar mathieumathieu get_num_groups get_num_groups 2007-2011 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. 3 get_num_groups Returns the number of work-groups that will execute a kernel. size_t get_num_groups uintdimindx Description Returns the number of work-groups that will execute a kernel for dimension identified by dimindx. Valid values of dimindx are 0 to get_work_dim() - 1. For other values of dimindx, get_num_groups() returns 1. For clEnqueueTask, this always returns 1. Specification OpenCL Specification Also see Work-Item Functions, clEnqueueNDRangeKernel, clEnqueueTask khronos-opencl-man-1.0~svn27110/clamp.xml0000644000175000017500000001576011660441607020112 0ustar mathieumathieu ]> clamp clamp 2007-2011 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. 3 clamp Clamp x to range given by min, max gentype clamp gentypex gentypeminval gentypemaxval gentypef clamp gentypefx floatminval floatmaxval gentyped clamp gentypedx doubleminval doublemaxval gentype clamp (gentype x, gentype minval, gentype maxval) // if half extension enabled gentype clamp (gentype x, half minval, half maxval) // if half extension enabled Description Returns min(fmax(x, minval), maxval). Results are undefined if minval > maxval. Notes &commonFunctionsInc; If extended with cl_khr_fp16, generic type name gentype may indicate half and half{2|3|4|8|16} as arguments and return values. Specification OpenCL Specification Also see Common Functions khronos-opencl-man-1.0~svn27110/local.xml0000644000175000017500000001343411660441607020104 0ustar mathieumathieu [ ]> __local __local 2007-2011y 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. 3 __local Address Space Qualifier. __local local Description &qualifierInc; Notes The __local or local address space name is used to describe variables that need to be allocated in local memory and are shared by all work-items of a work-group. Pointers to the __local address space are allowed as arguments to functions (including __kernel functions). Variables allocated in the __local address space can also be defined inside a __kernel function scope. Example &qualifierExampleInc; // Examples of variables allocated in the __local address space // inside a __kernel function __kernel void my_func(...) { __local float a; // A single float allocated // in local address space __local float b[10]; // An array of 10 floats // allocated in local address space. if (...) { // example of variable in __local address space but not // declared at __kernel function scope. __local float c; // not allowed. } } Variables allocated in the __local address space inside a __kernel function cannot be initialized. __kernel void my_func(...) { local float a = 1; // not allowed __local float b; b = 1; // allowed } NOTE: Variables allocated in the __local address space inside a __kernel function are allocated for each work-group executing the kernel. Specification OpenCL Specification Also see __global, __constant, __private khronos-opencl-man-1.0~svn27110/atom_dec.xml0000644000175000017500000001722311660441607020565 0ustar mathieumathieu atom_dec atom_dec 2007-2011 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. 3 atom_dec 64-bit atom_dec functions. long atom_dec volatile __global long*p longval long atom_dec volatile __local long*p longval ulong atom_dec volatile __global ulong*p ulongval ulong atom_dec volatile __local ulong*p ulongval Description Read the 64-bit value (referred to as old) stored at location pointed by p. Compute (old - 1) and store result at location pointed by p. The function returns old. An application that wants to use this extension will need to include the #pragma OPENCL EXTENSION cl_khr_int64_base_atomics : enable in the OpenCL program source. This function is performed in one atomic transaction. These transactions are atomic for the device executing these atomic functions. There is no guarantee of atomicity if the atomic operations to the same memory location are being performed by kernels executing on multiple devices. Atomic operations on 64-bit integers and 32-bit integers (and float) are also atomic with regard to each other. Specification OpenCL Specification Also see Atomic Functions, atomic_dec, cl_khr_int64_base_atomics khronos-opencl-man-1.0~svn27110/gl_lifetimeInc.xml0000644000175000017500000000250611660441607021722 0ustar mathieumathieu Lifetime of Shared Objects An OpenCL memory object created from an OpenGL object (hereinafter refered to as a “shared CL/GL objectâ€) remains valid as long as the corresponding GL object has not been deleted. If the GL object is deleted through the GL API (e.g. glDeleteBuffers, glDeleteTextures, or glDeleteRenderbuffers), subsequent use of the CL buffer or image object will result in undefined behavior, including but not limited to possible CL errors and data corruption, but may not result in program termination. The CL context and corresponding command-queues are dependent on the existence of the GL share group object, or the share group associated with the GL context from which the CL context is created. If the GL share group object or all GL contexts in the share group are destroyed, any use of the CL context or command-queue(s) will result in undefined behavior, which may include program termination. Applications should destroy the CL command-queue(s) and CL context before destroying the corresponding GL share group or contexts. khronos-opencl-man-1.0~svn27110/write_image3d.xml0000644000175000017500000002523711660441607021541 0ustar mathieumathieu [ ]> write_image3d write_image (3D) 2007-2011 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. 3 write_image Write color value to location in a 3D image object. void write_imagef image3d_t image int4 coord float4 color void write_imagei image3d_t image int4 coord int4 color void write_imageui image3d_t image int4 coord uint4 color void write_imageh image3d_t image int4 coord half4 color Description Writes to a 3D image memory object are only supported when the cl_khr_3d_image_writes extension is implemented. Reads and writes to the same 3D image memory object are not allowed in a kernel. An application that wants to use this extension to write to 3D image memory objects will need to include the #pragma OPENCL EXTENSION cl_khr_3d_image_writes : enable directive in the OpenCL program source. These functions write color value to location specified by coordinate (x, y, z) in the 3D image object specified by image. Appropriate data format conversion to the specified image format is done before writing the color value. coord.x, coord.y and coord.z are considered to be unnormalized coordinates and must be in the range 0 ... image width - 1, 0 ... image height - 1 and 0 ... image depth - 1. write_imagef can only be used with image objects created with image_channel_data_type set to one of the pre-defined packed formats or set to CL_SNORM_INT8, CL_UNORM_INT8, CL_SNORM_INT16, CL_UNORM_INT16, CL_HALF_FLOAT or CL_FLOAT. Appropriate data format conversion will be done to convert channel data from a floating-point value to actual data format in which the channels are stored. write_imagei can only be used with image objects created with image_channel_data_type set to one of the following values: CL_SIGNED_INT8, CL_SIGNED_INT16, or CL_SIGNED_INT32. write_imageui can only be used with image objects created with image_channel_data_type set to one of the following values: CL_UNSIGNED_INT8, CL_UNSIGNED_INT16, or CL_UNSIGNED_INT32. The behavior of write_imagef, write_imagei and write_imageui for image objects with image_channel_data_type values not specified in the description above or with (x, y, z) coordinate values that are not in the range (0 ... image width - 1, 0 ... image height - 1, 0 ... image depth - 1), respectively, is undefined. write_imageh can only be used with image objects created with image_channel_data_type set to one of the pre-defined packed formats or set to CL_SNORM_INT8, CL_UNORM_INT8, CL_SNORM_INT16, CL_UNORM_INT16 or CL_HALF_FLOAT. The behavior of write_imageh for image objects created with image_channel_data_type values not specified in the description above or with (x, y, z) coordinate values that are not in the range (0 ... image width - 1, 0 ... image height - 1, 0 ... image depth - 1), respectively, is undefined. An application that wants to use half and halfn types will need to include the #pragma OPENCL EXTENSION cl_khr_fp16 : enable directive. Specification OpenCL Specification Also see Image Functions, cl_khr_3d_image_writes scalarDataTypes khronos-opencl-man-1.0~svn27110/get_image_array_size.xml0000644000175000017500000001060411660441607023157 0ustar mathieumathieu get_image_array_size get_image_array_size 2007-2011 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. 3 get_image_array_size Return the number of images in an image array. size_t get_image_array_size image2d_array_t image size_t get_image_array_size image1d_array_t image Description get_image_array_size with image2d_t returns the number of images in a 2D image array. get_image_array_size with image1d_t returns the number of images in a 1D image array. Specification OpenCL Specification Also see Image Functions khronos-opencl-man-1.0~svn27110/ldexp.xml0000644000175000017500000002554711660441607020136 0ustar mathieumathieu ldexp ldexp 2007-2011 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. 3 ldexp Multiply x by 2 to the power k. floatn ldexp floatn x intn k floatn ldexp floatn x int k float ldexp float x int k doublen ldexp doublen x intn k doublen ldexp doublen x int k double ldexp double x int n halfn ldexp halfn x intn k halfn ldexp halfn x int k half ldexp half x int k Description Multiply x by 2 to the power k. Notes The vector versions of the math functions operate component-wise. The description is per-component. The built-in math functions are not affected by the prevailing rounding mode in the calling environment, and always return the same value as they would if called with the round to nearest even rounding mode. The built-in math functions take scalar or vector arguments. The generic type name gentype is used to indicate that the function can take float, float2, float3, float4, float8, or float16 as the type for the arguments. For any specific use of these function, the actual type has to be the same for all arguments and the return type. If extended with cl_khr_fp16, generic type name gentype may indicate half and half{2|3|4|8|16} as arguments and return values. Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/clCreateContextFromType.xml0000644000175000017500000010510411660441607023563 0ustar mathieumathieu clCreateContextFromType clCreateContextFromType 2007-2011 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. 3 clCreateContextFromType Create an OpenCL context from a device type that identifies the specific device(s) to use. cl_context clCreateContextFromType const cl_context_properties *properties cl_device_type device_type void (CL_CALLBACK *pfn_notify) (const char *errinfo const void *private_info size_t cb void *user_data) void *user_data cl_int *errcode_ret Parameters properties Specifies a list of context property names and their corresponding values. Each property name is immediately followed by the corresponding desired value. The list of supported properties is described in the table below. properties can also be NULL in which case the platform that is selected is implementation-defined. If the cl_khr_gl_sharing extension is supported, properties points to an attribute list whose format and valid contents are identical to the properties argument of clCreateContext which is: properties specifies a list of context property names and their corresponding values. Each property name is immediately followed by the corresponding desired value. The list is terminated with 0. The list of supported properties is described in the table below. properties can be NULL in which case the platform that is selected is implementation-defined. cl_context_properties enum Property value Description CL_CONTEXT_PLATFORM cl_platform_id Specifies the platform to use. CL_CONTEXT_INTEROP_USER_SYNC cl_bool Specifies whether the user is responsible for synchronization between OpenCL and other APIs. Please refer to the specific sections in the OpenCL 1.2 extension specification that describe sharing with other APIs for restrictions on using this flag. If CL_CONTEXT_INTEROP_USER_SYNC is not specified, a default of CL_FALSE is assumed. CL_CONTEXT_D3D10_DEVICE_KHR ID3D10Device * Specifies the ID3D10Device * to use for Direct3D 10 interoperability. The default value is NULL (applies if the extension cl_khr_d3d10_sharing is supported) CL_CONTEXT_ADAPTER_D3D9_KHR IDirect3DDevice9 * Specifies an IDirect3DDevice9 to use for D3D9 intero (applies if the cl_khr_dx9_media_sharing extension is supported) CL_CONTEXT_ADAPTER_D3D9EX_KHR IDirect3DDeviceEx* Specifies an IDirect3DDevice9Ex to use for D3D9 interop (applies if the cl_khr_dx9_media_sharing extension is supported) CL_CONTEXT_ADAPTER_DXVA_KHR IDXVAHD_Device * Specifies an IDXVAHD_Device to use for DXVA interop (applies if the cl_khr_dx9_media_sharing extension is supported) CL_GL_CONTEXT_KHR 0, OpenGL context handle OpenGL context to associated the OpenCL context with (available if the cl_khr_gl_sharing extension is enabled) CL_CGL_SHAREGROUP_KHR 0, CGL share group handle CGL share group to associate the OpenCL context with (available if the cl_khr_gl_sharing extension is enabled) CL_EGL_DISPLAY_KHR EGL_NO_DISPLAY, EGLDisplay handle CGL share group to associate the OpenCL context with (available if the cl_khr_gl_sharing extension is enabled) CL_GLX_DISPLAY_KHR None, X handle X Display an OpenGL context was created with respect to (available if the cl_khr_gl_sharing extension is enabled) CL_WGL_HDC_KHR 0, HDC handle HDC an OpenGL context was created with respect to (available if the cl_khr_gl_sharing extension is enabled) CL_CONTEXT_D3D11_DEVICE_KHR ID3D11Device * Specifies the ID3D11Device * to use for Direct3D 11 interoperability. The default value is NULL * (applies if the cl_khr_d3d11_sharing extension is supported) device_type A bit-field that identifies the type of device and is described in the table below. cl_device_type Description CL_DEVICE_TYPE_CPU An OpenCL device that is the host processor. The host processor runs the OpenCL implementations and is a single or multi-core CPU. CL_DEVICE_TYPE_GPU An OpenCL device that is a GPU. By this we mean that the device can also be used to accelerate a 3D API such as OpenGL or DirectX. CL_DEVICE_TYPE_ACCELERATOR Dedicated OpenCL accelerators (for example the IBM CELL Blade). These devices communicate with the host processor using a peripheral interconnect such as PCIe. CL_DEVICE_TYPE_CUSTOM Dedicated accelerators that do not support programs written in OpenCL C. CL_DEVICE_TYPE_DEFAULT The default OpenCL device in the system. The default device cannot be a CL_DEVICE_TYPE_CUSTOM device. CL_DEVICE_TYPE_ALL All OpenCL devices available in the system except CL_DEVICE_TYPE_CUSTOM devices. pfn_notify A callback function that can be registered by the application. This callback function will be used by the OpenCL implementation to report information on errors that occur in this context. This callback function may be called asynchronously by the OpenCL implementation. It is the application's responsibility to ensure that the callback function is thread-safe. If pfn_notify is NULL, no callback function is registered. The parameters to this callback function are: errinfo is a pointer to an error string. private_info and cb represent a pointer to binary data that is returned by the OpenCL implementation that can be used to log additional information helpful in debugging the error. user_data is a pointer to user supplied data. There are a number of cases where error notifications need to be delivered due to an error that occurs outside a context. Such notifications may not be delivered through the pfn_notify callback. Where these notifications go is implementation-defined. user_data Passed as the user_data argument when pfn_notify is called. user_data can be NULL. errcode_ret Return an appropriate error code. If errcode_ret is NULL, no error code is returned. Description Only devices that are returned by clGetDeviceIDs for device_type are used to create the context. The context does not reference any sub-devices that may have been created from these devices. Notes clCreateContextFromType may return all or a subset of the actual physical devices present in the platform and that match device_type. clCreateContextFromType and clCreateContext perform an implicit retain. This is very helpful for 3rd party libraries, which typically get a context passed to them by the application. However, it is possible that the application may delete the context without informing the library. Allowing functions to attach to (i.e. retain) and release a context solves the problem of a context being used by a library no longer being valid. Errors clCreateContextFromType returns a valid non-zero context and errcode_ret is set to CL_SUCCESS if the context is created successfully. Otherwise, it returns a NULL value with the following error vlaues returned in errcode_ret: CL_INVALID_PLATFORM if properties is NULL and no platform could be selected or if platform value specified in properties is not a valid platform. If the cl_khr_gl_sharing extension is supported, this error is replaced (or not) by CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR and possibly CL_INVALID_OPERATION (see below and section 9.6.4 of the spec for clarification). CL_INVALID_PROPERTY if context property name in properties is not a supported property name, or if the value specified for a supported property name is not valid, or if the same property name is specified more than once. CL_INVALID_VALUE if pfn_notify is NULL but user_data is not NULL. CL_INVALID_DEVICE_TYPE if device_type is not a valid value. CL_DEVICE_NOT_AVAILABLE if no devices that match device_type and property values specified in properties are currently available. CL_DEVICE_NOT_FOUND if no devices that match device_type and property values specified in properties were found. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. CL_INVALID_D3D10_DEVICE_KHR if the Direct3D 10 device specified for interoperability is not compatible with the devices against which the context is to be created (if the cl_khr_d3d10_sharing extension is enabled). CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR when an invalid OpenGL context or share group object handle is specified in properties if the cl_khr_gl_sharing extension is enabled. CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR: If no OpenGL or OpenGL ES context or share group is specified in the attribute list, then memory objects may not be shared, and calling any of the commands in section 9.7 will result in this error (if the cl_khr_gl_sharing extension is enabled). CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR if the cl_khr_gl_sharing extension is enabled and if a context was specified by any of the following means: Context specified for an EGL-based OpenGL ES or OpenGL implementation by setting the attributes CL_GL_CONTEXT_KHR and CL_EGL_DISPLAY_KHR. Context was specified for a GLX-based OpenGL implementation by setting the attributes CL_GL_CONTEXT_KHR and CL_GLX_DISPLAY_KHR. Context was specified for a WGL-based OpenGL implementation by setting the attributes CL_GL_CONTEXT_KHR and CL_WGL_HDC_KHR. and any of the following conditions hold: The specified display and context attributes do not identify a valid OpenGL or OpenGL ES context. The specified context does not support buffer and renderbuffer objects. The specified context is not compatible with the OpenCL context being created (for example, it exists in a physically distinct address space, such as another hardware device, or does not support sharing data with OpenCL due to implementation restrictions). CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR if a share group was specified for a CGL-based OpenGL implementation by setting the attribute CL_CGL_SHAREGROUP_KHR, and the specified share group does not identify a valid CGL share group object (only if the cl_khr_gl_sharing extension is enabled). CL_INVALID_DX9_MEDIA_ADAPTER_KHR if the media adapter specified for interoperability is not compatible with the devices against which the context is to be created (only if the cl_khr_dx9_media_sharing extension is supported). CL_INVALID_ADAPTER_KHR if any of the values of the properties CL_CONTEXT_ADAPTER_D3D9_KHR, CL_CONTEXT_ADAPTER_D3D9EX_KHR or CL_CONTEXT_ADAPTER_DXVA_KHR is non-NULL and does not specify a valid media adapter with which the cl_device_ids against which this context is to be created may interoperate. (only if the cl_khr_dx9_media_sharing extension is supported). CL_INVALID_OPERATION if interoperability is specified by setting CL_CONTEXT_ADAPTER_D3D9_KHR, CL_CONTEXT_ADAPTER_D3D9EX_KHR or CL_CONTEXT_ADAPTER_DXVA_KHR to a non-NULL value, and interoperability with another graphics API is also specified. (only if the cl_khr_dx9_media_sharing extension is supported). CL_INVALID_D3D11_DEVICE_KHR if the Direct3D 11 device specified for interoperability is not compatible with the devices against which the context is to be created (only if the cl_khr_d3d11_sharing extension is supported). CL_INVALID_OPERATION if Direct3D 11 interoperability is specified by setting CL_INVALID_D3D11_DEVICE_KHR to a non-NULL value, and interoperability with another graphics API is also specified. (only if the cl_khr_d3d11_sharing extension is supported). CL_INVALID_D3D11_DEVICE_KHR if the value of the property CL_CONTEXT_D3D11_DEVICE_KHR is non-NULL and does not specify a valid Direct3D 11 device with which the cl_device_ids against which this context is to be created may interoperate. (only if the cl_khr_d3d11_sharing extension is supported). Specification OpenCL Specification Also see clCreateContext, clGetContextInfo, clReleaseContext, clRetainContext, clGetContextInfo, Cardinality Diagram khronos-opencl-man-1.0~svn27110/isless.xml0000644000175000017500000001745111660441607020317 0ustar mathieumathieu ]> isless isless 2007-2011 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. 3 isless Compare of x < y. int isless floatx floaty intn isless floatnx floatny int isless doublex doubley longn isless doublenx doubleny int isless (half x, half y) // if half extension enabled shortn isless (halfn x, halfn y) // if half extension enabled Description Returns the component-wise compare of x < y. Notes &relationalFunctionsInc1; &relationalFunctionsInc2; &relationalFunctionsInc3; Specification OpenCL Specification Also see Relational Functions khronos-opencl-man-1.0~svn27110/clGetEventProfilingInfo.xml0000644000175000017500000003113011660441607023531 0ustar mathieumathieu clGetEventProfilingInfo clGetEventProfilingInfo 2007-2011 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. 3 clGetEventProfilingInfo Returns profiling information for the command associated with event if profiling is enabled. cl_int clGetEventProfilingInfo cl_eventevent cl_profiling_infoparam_name size_tparam_value_size void*param_value size_t*param_value_size_ret Parameters event Specifies the event object. param_name Specifies the profiling data to query. The list of supported param_name types and the information returned in param_value by clGetEventProfilingInfo is described in the table of parameter queries below. param_value_size Specifies the size in bytes of memory pointed to by param_value. This size must be ≥ size of return type as described in the table below. param_value A pointer to memory where the appropriate result being queried is returned. if param_value is NULL, it is ignored. param_value_size_ret Returns the actual size in bytes of data copied to param_value. If param_value_size_ret is NULL, it is ignored. The following is a table of clGetEventProfilingInfo parameter queries cl_profiling_info Return Type Info. returned in param_value CL_PROFILING_COMMAND_QUEUED cl_ulong A 64-bit value that describes the current device time counter in nanoseconds when the command identified by event is enqueued in a command-queue by the host. CL_PROFILING_COMMAND_SUBMIT cl_ulong A 64-bit value that describes the current device time counter in nanoseconds when the command identified by event that has been enqueued is submitted by the host to the device associated with the command-queue. CL_PROFILING_COMMAND_START cl_ulong A 64-bit value that describes the current device time counter in nanoseconds when the command identified by event starts execution on the device. CL_PROFILING_COMMAND_END cl_ulong A 64-bit value that describes the current device time counter in nanoseconds when the command identified by event has finished execution on the device. Notes The unsigned 64-bit values returned can be used to measure the time in nano-seconds consumed by OpenCL commands. OpenCL devices are required to correctly track time across changes in device frequency and power states. The CL_DEVICE_PROFILING_TIMER_RESOLUTION specifies the resolution of the timer i.e. the number of nanoseconds elapsed before the timer is incremented. Event objects can be used to capture profiling information that measure execution time of a command. Profiling of OpenCL commands can be enabled either by using a command-queue created with CL_QUEUE_PROFILING_ENABLE flag set in properties argument to clCreateCommandQueue. Errors Returns CL_SUCCESS if the function is executed successfully and the profiling information has been recorded. Otherwise, it returns one of the following errors: CL_PROFILING_INFO_NOT_AVAILABLE if the CL_QUEUE_PROFILING_ENABLE flag is not set for the command-queue, if the execution status of the command identified by event is not CL_COMPLETE or if event is a user event object. CL_INVALID_VALUE if param_name is not valid, or if size in bytes specified by param_value_size is < size of return type as described in the above table and param_value is not NULL. CL_INVALID_EVENT if event is a not a valid event object. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clCreateCommandQueue khronos-opencl-man-1.0~svn27110/clSetMemObjectDestructorCallback.xml0000644000175000017500000002762511660441607025355 0ustar mathieumathieu clSetMemObjectDestructorCallback clSetMemObjectDestructorCallback 2007-2011 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. 3 clSetMemObjectDestructorCallback Registers a user callback function with a memory object. cl_int clSetMemObjectDestructorCallback cl_memmemobj void (CL_CALLBACK *pfn_notify) (cl_mem memobj void*user_data) void*user_data Parameters memobj A valid memory object. pfn_notify The callback function that can be registered by the application. This callback function may be called asynchronously by the OpenCL implementation. It is the application's responsibility to ensure that the callback function is thread-safe. The parameters to this callback function are: memobj: the memory object being deleted. When the user callback is called by the implementation, this memory object is no longer valid. memobj is only provided for reference purposes. user_data: a pointer to user supplied data. user_data Data which will be passed as the user_data argument when pfn_notify is called. user_data can be NULL. Notes Each call to clSetMemObjectDestructorCallback registers the specified user callback function on a callback stack associated with memobj. The registered user callback functions are called in the reverse order in which they were registered. The user callback functions are called and then the memory object's resources are freed and the memory object is deleted. This provides a mechanism for the application (and libraries) using memobj to be notified when the memory referenced by host_ptr, specified when the memory object is created and used as the storage bits for the memory object, can be reused or freed. When the user callback function is called by the implementation, the contents of the memory region pointed to by host_ptr (if the memory object is created with CL_MEM_USE_HOST_PTR) are undefined. The callback function is typically used by the application to either free or reuse the memory region pointed to by host_ptr. The behavior of calling expensive system routines, OpenCL API calls to create contexts or command-queues, or blocking OpenCL operations from the following list below, in a callback is undefined. clFinish clWaitForEvents blocking calls to clEnqueueReadBuffer, clEnqueueReadBufferRect, clEnqueueWriteBuffer, clEnqueueWriteBufferRect blocking calls to clEnqueueReadImage and clEnqueueWriteImage blocking calls to clEnqueueMapBuffer and clEnqueueMapImage blocking calls to clBuildProgram, clCompileProgram, or clLinkProgram If an application needs to wait for completion of a routine from the above list in a callback, please use the non-blocking form of the function, and assign a completion callback to it to do the remainder of your work. Note that when a callback (or other code) enqueues commands to a command-queue, the commands are not required to begin execution until the queue is flushed. In standard usage, blocking enqueue calls serve this role by implicitly flushing the queue. Since blocking calls are not permitted in callbacks, those callbacks that enqueue commands on a command queue should either call clFlush on the queue before returning or arrange for clFlush to be called later on another thread. The user callback function may not call OpenCL APIs with the memory object for which the callback function is invoked and for such cases the behavior of OpenCL APIs is considered to be undefined. Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_MEM_OBJECT if memobj is not a valid memory object. CL_INVALID_VALUE if pfn_notify is NULL. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clCreateCommandQueue, clGetCommandQueueInfo, clReleaseCommandQueue, clRetainCommandQueue khronos-opencl-man-1.0~svn27110/trunc.xml0000644000175000017500000000770111660441607020145 0ustar mathieumathieu ]> trunc trunc 2007-2011 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. 3 trunc Round to integer toward zero. gentype trunc gentype Description Round to integral value using the round to zero rounding mode. Notes &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/clGetDeviceIDsFromD3D11KHR.xml0000644000175000017500000003021511660441607023412 0ustar mathieumathieu ]> clGetDeviceIDsFromD3D11KHR clGetDeviceIDsFromD3D11KHR 2007-2011 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. 3 clGetDeviceIDsFromD3D11KHR Querying OpenCL Devices Corresponding to Direct3D 11 Devices. cl_int clGetDeviceIDsFromD3D11KHR cl_platform_idplatform cl_d3d11_device_source_khrd3d_device_source void*d3d_object cl_d3d11_device_set_khrd3d_device_set cl_uintnum_entries cl_device_id*devices cl_uint*num_devices Parameters platform Refers to the platform ID returned by clGetPlatformIDs. d3d_device_source Specifies the type of d3d_object and may be one of the following:. cl_d3d_device_source_khr Type of d3d_object CL_D3D11_DEVICE_KHR ID3D11Device * CL_D3D11_DXGI_ADAPTER_KHR IDXGIAdapter * d3d_object Specifies the object whose corresponding OpenCL devices are being queried. The type of d3d_object must be as specified in the table above. d3d_device_set Specifies the set of devices to return, and must be one of the following: cl_d3d_device_set_khr Devices returned in devices CL_PREFERRED_DEVICES_FOR_D3D11_KHR The OpenCL devices associated with the specified Direct3D object. CL_ALL_DEVICES_FOR_D3D11_KHR All OpenCL devices which may interoperate with the specified Direct3D object. Performance of sharing data on these devices may be considerably less than on the preferred devices. num_entries The number of cl_device_id entries that can be added to devices. If devices is not NULL, the num_entries must be greater than zero. devices Returns a list of OpenCL devices found. The cl_device_id values returned in devices can be used to identify a specific OpenCL device. If devices is NULL, this argument is ignored. The number of OpenCL devices returned is the mininum of the value specified by num_entries and the number of OpenCL devices corresponding to d3d_object. num_devices Returns the number of OpenCL devices available that correspond to d3d_object. If num_devices is NULL, this argument is ignored. Description The OpenCL devices corresponding to a Direct3D 11 device may be queried. The OpenCL devices corresponding to a DXGI adapter may also be queried. The OpenCL devices corresponding to a Direct3D 11 device will be a subset of the OpenCL devices corresponding to the DXGI adapter against which the Direct3D 11 device was created. Notes &sharingD3D11Inc; &accessMappedInc; Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise it may return: CL_INVALID_PLATFORM if platform is not a valid platform. CL_INVALID_VALUE if d3d_device_source is not a valid value, d3d_device_set is not a valid value, num_entries is equal to zero and devices is not NULL, or if both num_devices and devices are NULL. CL_DEVICE_NOT_FOUND if no OpenCL devices that correspond to d3d_object were found. Specification OpenCL Specification Also see cl_khr_d3d11_sharing, clCreateFromD3D11BufferKHR, clCreateFromD3D11Texture2DKHR, clCreateFromD3D11Texture3DKHR, clEnqueueAcquireD3D11ObjectsKHR, clEnqueueReleaseD3D11ObjectsKHR khronos-opencl-man-1.0~svn27110/attributes-types.xml0000644000175000017500000002610111660441607022335 0ustar mathieumathieu Attributes of Types Attributes of Types 2007-2011 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. 3 Attributes of Types Attributes of Types. __attribute__ ((aligned)) __attribute__ ((aligned (n))) __attribute__ ((packed)) Description The keyword __attribute__ allows you to specify special attributes of enum, struct and union types when you define such types. This keyword is followed by an attribute specification inside double parentheses. Two attributes are currently defined for types: aligned, and packed. You may specify type attributes in an enum, struct, or union type declaration or definition, or for other types in a typedef declaration. For an enum, struct, or union type, you may specify attributes either between the enum, struct or union tag and the name of the type, or just past the closing curly brace of the definition. The former syntax is preferred. aligned (<varname>alignment</varname>) This attribute specifies a minimum alignment (in bytes) for variables of the specified type. For example, the declarations: struct S { short f[3]; } __attribute__ ((aligned (8))); typedef int more_aligned_int __attribute__ ((aligned (8))); force the compiler to ensure (as far as it can) that each variable whose type is struct S or more_aligned_int will be allocated and aligned at least on a 8-byte boundary. Note that the alignment of any given struct or union type is required by the ISO C standard to be at least a perfect multiple of the lowest common multiple of the alignments of all of the members of the struct or union in question and must also be a power of two. This means that you can effectively adjust the alignment of a struct or union type by attaching an aligned attribute to any one of the members of such a type, but the notation illustrated in the example above is a more obvious, intuitive, and readable way to request the compiler to adjust the alignment of an entire struct or union type. As in the preceding example, you can explicitly specify the alignment (in bytes) that you wish the compiler to use for a given struct or union type. Alternatively, you can leave out the alignment factor and just ask the compiler to align a type to the maximum useful alignment for the target machine you are compiling for. For example, you could write: struct S { short f[3]; } __attribute__ ((aligned)); Whenever you leave out the alignment factor in an aligned attribute specification, the compiler automatically sets the alignment for the type to the largest alignment which is ever used for any data type on the target machine you are compiling for. In the example above, the size of each short is 2 bytes, and therefore the size of the entire struct S type is 6 bytes. The smallest power of two which is greater than or equal to that is 8, so the compiler sets the alignment for the entire struct S type to 8 bytes. Note that the effectiveness of aligned attributes may be limited by inherent limitations of the OpenCL device and compiler. For some devices, the OpenCL compiler may only be able to arrange for variables to be aligned up to a certain maximum alignment. If the OpenCL compiler is only able to align variables up to a maximum of 8 byte alignment, then specifying aligned(16) in an __attribute__ will still only provide you with 8 byte alignment. See your platform-specific documentation for further information. The aligned attribute can only increase the alignment; but you can decrease it by specifying packed as well. See below. packed The packed attribute, attached to the struct or union type definition, specifies that each member of the structure or union is placed to minimize the memory required. When attached to an enum definition, it indicates that the smallest integral type should be used. Specifying this attribute for struct and union types is equivalent to specifying the packed attribute on each of the structure or union members. In the following example struct my_packed_struct's members are packed closely together, but the internal layout of its s member is not packed. To do that, struct my_unpacked_struct would need to be packed, too. struct my_unpacked_struct { char c; int i; }; struct __attribute__ ((packed)) my_packed_struct { char c; int i; struct my_unpacked_struct s; }; You may only specify this attribute on the definition of a enum, struct, or union, not on a typedef which does not also define the enumerated type, structure or union. Specification OpenCL Specification Also see __attribute__, Blocks and Control-Flow Statement Attributes Attributes, Variable Attributes khronos-opencl-man-1.0~svn27110/mag.xml0000644000175000017500000001220511660441607017551 0ustar mathieumathieu ]> maxmag, minmag maxmag, minmag 2007-2011 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. 3 maxmag, minmag Returns the argument with the greatest (or least) magnitude. gentype maxmag gentypex gentypey gentype minmag gentypex gentypey Description maxmag Returns x if | x| > |y|, or y if |y| > |x|, otherwise fmax(x, y). minmag Returns x if |x| < |y|, or y if |y| < |x|, otherwise fmin(x, y). Notes &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/cl_khr_fp16.xml0000644000175000017500000003163011660441607021106 0ustar mathieumathieu cl_khr_fp16 cl_khr_fp16 2007-2011 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. 3 cl_khr_fp16 Optional half floating-point support. #pragma OPENCL EXTENSION cl_khr_fp16 : enable Description This extension adds support for half scalar and vector types as built-in types that can be used for arithmetic operations, conversions, etc. An application that wants to use half and halfn types will need to include the directive shown above. The list of built-in scalar and vector data types are extended to include the types in the table below. The built-in vector data types for halfn are also declared as appropriate types in the OpenCL API (and header files) that can be used by an application. The following table describes the built-in vector data types for halfn as defined in the OpenCL C programming language and the corresponding data type available to the application: Type in OpenCL Language Description API type for application half2 2-component half-precision floating-point vector cl_half2 half3 3-component half-precision floating-point vector cl_half3 half4 4-component half-precision floating-point vector cl_half4 half8 8-component half-precision floating-point vector cl_half8 half16 16-component half-precision floating-point vector cl_half16 The relational, equality, logical and logical unary operators can be used with half scalar and halfn vector types and shall produce a scalar int and vector shortn result respectively. The OpenCL compiler accepts an h and H suffix on floating point literals, indicating the literal is typed as a half. The macro names given in the following list must use the values specified. These constant expressions are suitable for use in #if preprocessing directives. The following table also describes the corresponding macro names available to the application. Macro in OpenCL Language value Macro for application #define HALF_DIG 3 HALF_DIG #define HALF_MANT_DIG 11 HALF_MANT_DIG #define HALF_MAX_10_EXP +4 HALF_MAX_10_EXP #define HALF_MAX_EXP +16 HALF_MAX_EXP #define HALF_MIN_10_EXP -4 HALF_MIN_10_EXP #define HALF_MIN_EXP -13 HALF_MIN_EXP #define HALF_RADIX 2 HALF_RADIX #define HALF_MAX 0x1.ffcp15h HALF_MAX #define HALF_MIN 0x1.0p-14h HALF_MIN #define HALF_EPSILON 0x1.0p-10h HALF_EPSILON The following constants are also available. They are of type half and are accurate within the precision of the half type. Constant Description M_E_H Value of e M_LOG2E_H Value of log2 e M_LOG10E_H Value of log10 e M_LN2_H Value of ln 2 M_LN10_H Value of ln 10 M_PI_H Value of Ï€ M_PI_2_H Value of Ï€ / 2 M_PI_4_H Value of Ï€ / 4 M_1_PI_H Value of 1 / Ï€ M_2_PI_H Value of 2 / Ï€ M_2_SQRTPI_HValue of 2 / √π M_SQRT2_H Value of √2 M_SQRT1_2_H Value of 1 / √2 Ann application may query the configuration information using the op-code CL_DEVICE_HALF_FP_CONFIG with clGetDeviceInfo for an OpenCL device that supports half precision floating-point. Specification OpenCL Specification Also see EXTENSION, clGetDeviceInfo, mathFunctions, commonFunctions, geometricFunctions, relationalFunctions, vectorDataLoadandStoreFunctions, asyncCopyFunctions, imageFunctions khronos-opencl-man-1.0~svn27110/attributes-variables.xml0000644000175000017500000002705211660441607023147 0ustar mathieumathieu Attributes of Variables Attributes of Variables 2007-2011 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. 3 Attributes of Variables Attributes of Variables. __attribute__ ((aligned)) __attribute__ ((aligned (n))) __attribute__ ((packed)) __attribute__ ((endian(host))) __attribute__ ((endian(device))) Description The keyword __attribute__ allows you to specify special attributes of variables or structure fields. This keyword is followed by an attribute specification inside double parentheses. The aligned, packed, and endian attribute qualifiers are defined below. aligned (<varname>alignment</varname>) This attribute specifies a minimum alignment for the variable or structure field, measured in bytes. For example, the declaration: int x __attribute__ ((aligned (16))) = 0; causes the compiler to allocate the global variable x on a 16-byte boundary. The alignment value specified must be a power of two. You can also specify the alignment of structure fields. For example, to create double-word aligned int pair, you could write: struct foo { int x[2] __attribute__ ((aligned (8))); }; This is an alternative to creating a union with a double member that forces the union to be double-word aligned. As in the preceding examples, you can explicitly specify the alignment (in bytes) that you wish the compiler to use for a given variable or structure field. Alternatively, you can leave out the alignment factor and just ask the compiler to align a variable or field to the maximum useful alignment for the target machine you are compiling for. For example, you could write: short array[3] __attribute__ ((aligned)); Whenever you leave out the alignment factor in an aligned attribute specification, the OpenCL compiler automatically sets the alignment for the declared variable or field to the largest alignment which is ever used for any data type on the target device you are compiling for. When used on a struct, or struct member, the aligned attribute can only increase the alignment; in order to decrease it, the packed attribute must be specified as well. When used as part of a typedef, the aligned attribute can both increase and decrease alignment, and specifying the packed attribute will generate a warning. Note that the effectiveness of aligned attributes may be limited by inherent limitations of the OpenCL device and compiler. For some devices, the OpenCL compiler may only be able to arrange for variables to be aligned up to a certain maximum alignment. If the OpenCL compiler is only able to align variables up to a maximum of 8 byte alignment, then specifying aligned(16) in an __attribute__ will still only provide you with 8 byte alignment. See your platform-specific documentation for further information. packed The packed attribute specifies that a variable or structure field should have the smallest possible alignment -- one byte for a variable, unless you specify a larger value with the aligned attribute. Here is a structure in which the field x is packed, so that it immediately follows a: struct foo { char a; int x[2] __attribute__ ((packed)); }; An attribute list placed at the beginning of a user-defined type applies to the variable of that type and not the type, while attributes following the type body apply to the type. For example: /* a has alignment of 128 */ __attribute__((aligned(128))) struct A {int i;} a; /* b has alignment of 16 */ __attribute__((aligned(16))) struct B {double d;} __attribute__((aligned(32))) b ; struct A a1; /* a1 has alignment of 4 */ struct B b1; /* b1 has alignment of 32 */ endian (<varname>endiantype</varname>) The endian attribute determines the byte ordering of a variable. endiantype can be set to host indicating the variable uses the endianness of the host processor or can be set to device indicating the variable uses the endianness of the device on which the kernel will be executed. The default is device. For example: float4 *p __attribute__ ((endian(host))); specifies that data stored in memory pointed to by p will be in the host endian format. Specification OpenCL Specification Also see __attribute__, Blocks and Control-Flow Statement Attributes Attributes, Types Attributes khronos-opencl-man-1.0~svn27110/clCreateProgramWithBuiltInKernels.xml0000644000175000017500000002103711660441607025531 0ustar mathieumathieu clCreateProgramWithBuiltInKernels clCreateProgramWithBuiltInKernels 2007-2011 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. 3 clCreateProgramWithBuiltInKernels Creates a program object for a context, and loads the information related to the built-in kernels into a program object. cl_program clCreateProgramWithBuiltInKernels cl_contextcontext cl_uintnum_devices const cl_device_id*device_list const char*kernel_names cl_int*errcode_ret Parameters context Must be a valid OpenCL context. num_devices The number of devices listed in device_list. device_list A pointer to a list of devices that are in context. device_list must be a non-NULL value. The built-in kernels are loaded for devices specified in this list. The devices associated with the program object will be the list of devices specified by device_list. The list of devices specified by device_list must be devices associated with context. kernel_names A semi-colon separated list of built-in kernel names. Errors Returns a valid non-zero program object and errcode_ret is set to CL_SUCCESS if the program object is created successfully. Otherwise, it returns a NULL value with one of the following error values returned in errcode_ret: CL_INVALID_CONTEXT if context is not a valid context. CL_INVALID_VALUE if device_list is NULL or num_devices is zero; CL_INVALID_VALUE if kernel_names is NULL or kernel_names contains a kernel name that is not supported by any of the devices in device_list. CL_INVALID_DEVICE if devices listed in device_list are not in the list of devices associated with context. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clCreateProgramWithSource, clReleaseProgram, clRetainProgram, Cardinality Diagram khronos-opencl-man-1.0~svn27110/relationalFunctionsIGEN.xml0000644000175000017500000000064511660441607023500 0ustar mathieumathieu The argument type igentype refers to signed integer types, i.e. char, charn, short, shortn, int, intn, long, and longn. khronos-opencl-man-1.0~svn27110/cl_khr_fp64.xml0000644000175000017500000001071611660441607021113 0ustar mathieumathieu cl_khr_fp64 cl_khr_fp64 2007-2011 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. 3 cl_khr_fp64 Provided for backward compatibility if double floating-point precision is supported. #pragma OPENCL EXTENSION cl_khr_fp64 : enable Description The 64-bit double scalar and corresponding vector types are optional types that are supported if CL_DEVICE_DOUBLE_FP_CONFIG in the table of allowed values for param_name for clGetDeviceInfo for a device is not zero. The double data type must confirm to the IEEE-754 double precision storage format. Specification OpenCL Specification Also see clGetDeviceInfo khronos-opencl-man-1.0~svn27110/atomic_min.xml0000644000175000017500000001636011660441607021132 0ustar mathieumathieu atomic_min atomic_min 2007-2011 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. 3 atomic_min atomic_min functions. int atomic_min volatile __global int*p intval unsigned int atomic_min volatile __global unsigned int*p unsigned intval int atomic_min volatile __local int*p intval unsigned int atomic_min volatile __local unsigned int*p unsigned intval Description Read the 32-bit value (referred to as old) stored at location pointed by p. Compute min (old, val) and store result at location pointed by p. The function returns old. A 64-bit version of this function, atom_min, is enabled by cl_khr_int64_extended_atomics. Specification OpenCL Specification Also see Atomic Functions, atom_min khronos-opencl-man-1.0~svn27110/clCreateImage.xml0000644000175000017500000004442112057236107021475 0ustar mathieumathieu ]> clCreateImage clCreateImage 2007-2011 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. 3 clCreateImage Creates a 1D image, 1D image buffer, 1D image array, 2D image, 2D image array or 3D image object. cl_mem clCreateImage cl_contextcontext cl_mem_flagsflags const cl_image_format*image_format const cl_image_desc*image_desc void*host_ptr cl_int*errcode_ret Parameters context A valid OpenCL context on which the image object is to be created. flags A bit-field that is used to specify allocation and usage information about the image memory object being created and is described in the table below. For all image types except CL_MEM_OBJECT_IMAGE1D_BUFFER, if value specified for flags is 0, the default is used which is CL_MEM_READ_WRITE. For CL_MEM_OBJECT_IMAGE1D_BUFFER image type, if the CL_MEM_READ_WRITE, CL_MEM_READ_ONLY or CL_MEM_WRITE_ONLY values are not specified in flags, they are inherited from the corresponding memory access qualifers associated with buffer. The CL_MEM_USE_HOST_PTR, CL_MEM_ALLOC_HOST_PTR and CL_MEM_COPY_HOST_PTR values cannot be specified in flags but are inherited from the corresponding memory access qualifiers associated with buffer. If CL_MEM_COPY_HOST_PTR is specified in the memory access qualifier values associated with buffer it does not imply any additional copies when the sub-buffer is created from buffer. If the CL_MEM_HOST_WRITE_ONLY, CL_MEM_HOST_READ_ONLY or CL_MEM_HOST_NO_ACCESS values are not specified in flags, they are inherited from the corresponding memory access qualifiers associated with buffer. &clCreate_memflagsInc; image_format A pointer to a structure that describes format properties of the image to be allocated. See cl_image_format for a detailed description of the image format descriptor. image_desc A pointer to a structure that describes type and dimensions of the image to be allocated. See imageDescriptor for more information. host_ptr A pointer to the image data that may already be allocated by the application. Refer to table below for a description of how large the buffer that host_ptr points to must be. Image Type Size of buffer that host_ptr points to CL_MEM_OBJECT_IMAGE1D ≥ image_row_pitch CL_MEM_OBJECT_IMAGE1D_BUFFER ≥ image_row_pitch CL_MEM_OBJECT_IMAGE2D ≥ image_row_pitch * image_height CL_MEM_OBJECT_IMAGE3D ≥ image_slice_pitch * image_depth CL_MEM_OBJECT_IMAGE1D_ARRAY ≥ image_slice_pitch * image_array_size CL_MEM_OBJECT_IMAGE2D_ARRAY ≥ image_slice_pitch * image_array_size For a 3D image or 2D image array, the image data specified by host_ptr is stored as a linear sequence of adjacent 2D image slices or 2D images respectively. Each 2D image is a linear sequence of adjacent scanlines. Each scanline is a linear sequence of image elements. For a 2D image, the image data specified by host_ptr is stored as a linear sequence of adjacent scanlines. Each scanline is a linear sequence of image elements. For a 1D image array, the image data specified by host_ptr is stored as a linear sequence of adjacent 1D images respectively. Each 1D image or 1D image buffer is a single scanline which is a linear sequence of adjacent elements. errcode_ret Will return an appropriate error code. If errcode_ret is NULL, no error code is returned. Errors clCreateImage returns a valid non-zero image object and errcode_ret is set to CL_SUCCESS if the image object is created successfully. Otherwise, it returns a NULL value with one of the following error values returned in errcode_ret: CL_INVALID_CONTEXT if context is not a valid context. CL_INVALID_VALUE if values specified in flags are not valid. CL_INVALID_IMAGE_FORMAT_DESCRIPTOR if values specified in image_format are not valid or if image_format is NULL. CL_INVALID_IMAGE_DESCRIPTOR if values specified in image_desc are not valid or if image_desc is NULL. CL_INVALID_IMAGE_SIZE if image dimensions specified in image_desc exceed the minimum maximum image dimensions described in the table of allowed values for param_name for clGetDeviceInfo for all devices in context. CL_INVALID_HOST_PTR if host_ptr in image_desc is NULL and CL_MEM_USE_HOST_PTR or CL_MEM_COPY_HOST_PTR are set in flags or if host_ptr is not NULL but CL_MEM_COPY_HOST_PTR or CL_MEM_USE_HOST_PTR are not set in flags. CL_INVALID_VALUE if a 1D image buffer is being created and the buffer object was created with CL_MEM_WRITE_ONLY and flags specifies CL_MEM_READ_WRITE or CL_MEM_READ_ONLY, or if the buffer object was created with CL_MEM_READ_ONLY and flags specifies CL_MEM_READ_WRITE or CL_MEM_WRITE_ONLY, or if flags specifies CL_MEM_USE_HOST_PTR or CL_MEM_ALLOC_HOST_PTR or CL_MEM_COPY_HOST_PTR. CL_INVALID_VALUE if a 1D image buffer is being created and the buffer object was created with CL_MEM_HOST_WRITE_ONLY and flags specifies CL_MEM_HOST_READ_ONLY, or if the buffer object was created with CL_MEM_HOST_READ_ONLY and flags specifies CL_MEM_HOST_WRITE_ONLY, or if the buffer object was created with CL_MEM_HOST_NO_ACCESS and flags specifies CL_MEM_HOST_READ_ONLY or CL_MEM_HOST_WRITE_ONLY. CL_IMAGE_FORMAT_NOT_SUPPORTED if the image_format is not supported. CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for image object. CL_INVALID_OPERATION if there are no devices in context that support images (i.e. CL_DEVICE_IMAGE_SUPPORT (specified in the table of OpenCL Device Queries for clGetDeviceInfo) is CL_FALSE). CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see cl_image_desc, cl_image_format, Cardinality Diagram khronos-opencl-man-1.0~svn27110/atomicFunctions.xml0000644000175000017500000002125611660441607022160 0ustar mathieumathieu Atomic Functions Atomic Functions 2007-2011 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. 3 Atomic Functions The atomic functions are shown below. Click an item in the table below for details about that function. atomic_add atomic_sub atomic_xchg atomic_inc atomic_dec atomic_cmpxchg atomic_min atomic_max atomic_and atomic_or atomic_xor The cl_khr_int64_base_atomics extension enables additional atomic functions using types long and unsigned long. An application that wants to use this extension will need to include the #pragma OPENCL EXTENSION cl_khr_int64_base_atomics : enable in the OpenCL program source. atom_add atom_sub atom_xchg atom_inc atom_dec atom_cmpxchg The cl_khr_int64_extended_atomics extension enables additional atomic functions using types long and unsigned long. An application that wants to use this extension will need to include the #pragma OPENCL EXTENSION cl_khr_int64_extended_atomics : enable in the OpenCL program source. atom_min atom_max atom_xor atom_and atom_or Description These functions provide atomic operations on 32-bit signed, unsigned integers and single precision floating-point to locations in __global or __local memory. Only the atomic_xchg operation is supported for single precision floating-point data type. The atomic built-in functions that use the atom_ prefix and are described in the OpenCL Extension Specification and are enabled by: cl_khr_global_int32_base_atomics, cl_khr_global_int32_extended_atomics, cl_khr_local_int32_base_atomics, and cl_khr_local_int32_extended_atomics in sections 9.5 and 9.6 of the OpenCL 1.0 specification are also supported. . The 64-bit transactions are atomic for the device executing these atomic functions. There is no guarantee of atomicity if the atomic operations to the same memory location are being performed by kernels executing on multiple devices. Specification OpenCL Specification khronos-opencl-man-1.0~svn27110/geometricFunctionsInc.xml0000644000175000017500000000164211660441607023311 0ustar mathieumathieu Built-in geometric functions operate component-wise. The description is per-component. floatn is float, float2, float3, or float4 and doublen is double, double2, double3, or double4. The built-in geometric functions are implemented using the round to nearest even rounding mode. The geometric functions can be implemented using contractions such as mad or fma. khronos-opencl-man-1.0~svn27110/get_work_dim.xml0000644000175000017500000001060111660441607021455 0ustar mathieumathieu get_work_dim get_work_dim 2007-2011 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. 3 get_work_dim Returns the number of dimensions in use. uint get_work_dim () Description This is the value given to the work_dim argument specified in clEnqueueNDRangeKernel. For clEnqueueTask, this returns one. Specification OpenCL Specification Also see Work-Item Functions, clEnqueueNDRangeKernel, clEnqueueTask khronos-opencl-man-1.0~svn27110/floor.xml0000644000175000017500000000777611660441607020147 0ustar mathieumathieu ]> floor floor 2007-2011 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. 3 floor Round to integer toward negative infinity. gentype floor gentype Description floor rounds to integral value using the round to negative infinity rounding mode. Notes &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/read_imageh2d.xml0000644000175000017500000002630711660441607021470 0ustar mathieumathieu [ ]> read_imageh (2D, Half) read_image (2D, Half) 2007-2011 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. 3 read_imageh (2D, Half) Do an element lookup in the 2D image object, returning half floating-point values. half4 read_imageh image2d_t image sampler_t sampler int2 coord half4 read_imageh image2d_t image sampler_t sampler float2 coord half4 read_imageh image2d_t image int2 coord half4 read_imageh image2d_array_t image int4 coord half4 read_imageh image2d_array_t image sampler_t sampler int4 coord half4 read_imageh image2d_array_t image sampler_t sampler float4 coord Description For the forms that take an image2d_t, use the coordinate (x, y) to do an element lookup in the 2D image object specified by image. For the forms that take an image2d_array_t, Use coord.xy to do an element lookup in the 2D image identified by coord.z in the 2D image array specified by image. The samplerless read image functions behave exactly as the corresponding read image functions that take integer coordinates and a sampler with filter mode set to CLK_FILTER_NEAREST, normalized coordinates set to CLK_NORMALIZED_COORDS_FALSE and addressing mode to CLK_ADDRESS_NONE. read_imageh returns half floating-point values in the range [0.0... 1.0] for image objects created with image_channel_data_type set to one of the predefined packed formats or CL_UNORM_INT8 or CL_UNORM_INT16. read_imageh returns half floating-point values in the range [-1.0... 1.0] for image objects created with image_channel_data_type set to CL_SNORM_INT8, or CL_SNORM_INT16. read_imageh returns half floating-point values for image objects created with image_channel_data_type set to CL_HALF_FLOAT. The read_imageh calls that take integer coordinates must use a sampler with filter mode set to CLK_FILTER_NEAREST, normalized coordinates set to CLK_NORMALIZED_COORDS_FALSE and addressing mode set to CLK_ADDRESS_CLAMP_TO_EDGE, CLK_ADDRESS_CLAMP or CLK_ADDRESS_NONE; otherwise the values returned are undefined. Values returned by read_imageh for image objects with image_channel_data_type values not specified in the description above are undefined. Notes General information about the read_image* functions follows. &imageFunctionsInc; &imageMappingInc; Specification OpenCL Specification Also see Image Functions khronos-opencl-man-1.0~svn27110/atan.xml0000644000175000017500000001416311660441607017735 0ustar mathieumathieu ]> atan, atan2, atanh, atanpi, atan2pi atan 2007-2011 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. 3 atan, atan2, atanh, atanpi, atan2pi Tangent functions. gentype atan gentypey_over_x gentype atan2 gentypey gentypex gentype atanh gentype gentype atanpi gentypex gentype atan2pi gentypey gentypex Description atan is the arc tangent function. atan2 is the arc tangent of y / x. atanh is the hyperbolic arc tangent function. atanpi computes atan (x) / π. atan2pi computes atan2 (y, x) / π. Notes &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/clEnqueueReadBuffer.xml0000644000175000017500000003773211660441607022675 0ustar mathieumathieu clEnqueueReadBuffer clEnqueueReadBuffer 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. 3 clEnqueueReadBuffer Enqueue commands to read from a buffer object to host memory. cl_int clEnqueueReadBuffer cl_command_queuecommand_queue cl_membuffer cl_boolblocking_read size_toffset size_tsize void*ptr cl_uintnum_events_in_wait_list const cl_event*event_wait_list cl_event*event Parameters command_queue Refers to the command-queue in which the read command will be queued. command_queue and buffer must be created with the same OpenCL context. buffer Refers to a valid buffer object. blocking_read Indicates if the read operations are blocking or non-blocking. If blocking_read is CL_TRUE i.e. the read command is blocking, clEnqueueReadBuffer does not return until the buffer data has been read and copied into memory pointed to by ptr. If blocking_read is CL_FALSE i.e. the read command is non-blocking, clEnqueueReadBuffer queues a non-blocking read command and returns. The contents of the buffer that ptr points to cannot be used until the read command has completed. The event argument returns an event object which can be used to query the execution status of the read command. When the read command has completed, the contents of the buffer that ptr points to can be used by the application. offset The offset in bytes in the buffer object to read from. size The size in bytes of data being read. ptr The pointer to buffer in host memory where data is to be read into. event_wait_list num_events_in_wait_list event_wait_list and num_events_in_wait_list specify events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event_wait_list act as synchronization points. The context associated with events in event_wait_list and command_queue must be the same. The memory associated with event_wait_list can be reused or freed after the function returns. event Returns an event object that identifies this particular read command and can be used to query or queue a wait for this particular command to complete. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the event_wait_list array. Notes Calling clEnqueueReadBuffer to read a region of the buffer object with the ptr argument value set to host_ptr + offset, where host_ptr is a pointer to the memory region specified when the buffer object being read is created with CL_MEM_USE_HOST_PTR, must meet the following requirements in order to avoid undefined behavior: All commands that use this buffer object or a memory object (buffer or image) created from this buffer object have finished execution before the read command begins execution. The buffer object or memory objects created from this buffer object are not mapped. The buffer object or memory objects created from this buffer object are not used by any command-queue until the read command has finished execution. Errors clEnqueueReadBuffer returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_CONTEXT if the context associated with command_queue and buffer are not the same or if the context associated with command_queue and events in event_wait_list are not the same. CL_INVALID_MEM_OBJECT if buffer is not a valid buffer object. CL_INVALID_VALUE if the region being read specified by (offset, size) is out of bounds or if ptr is a NULL value or if size is 0. CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list greater than 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_MISALIGNED_SUB_BUFFER_OFFSET if buffer is a sub-buffer object and offset specified when the sub-buffer object is created is not aligned to CL_DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue. CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the read and write operations are blocking and the execution status of any of the events in event_wait_list is a negative integer value. CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer. CL_INVALID_OPERATION if clEnqueueReadBuffer is called on buffer which has been created with CL_MEM_HOST_WRITE_ONLY or CL_MEM_HOST_NO_ACCESS. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clEnqueueCopyBuffer, clEnqueueWriteBuffer, clEnqueueWriteBufferRect, clEnqueueReadBufferRect khronos-opencl-man-1.0~svn27110/get_image_channel_order.xml0000644000175000017500000002503211660441607023613 0ustar mathieumathieu get_image_channel_order get_image_channel_order 2007-2011 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. 3 get_image_channel_order Return the image channel data order. int get_image_channel_order image1d_t image int get_image_channel_order image1d_buffer_t image int get_image_channel_order image2d_t image int get_image_channel_order image3d_t image int get_image_channel_order image1d_array_t image int get_image_channel_order image2d_array_t image Description Return the image channel order. Valid values are: CLK_A CLK_R CLK_Rx CLK_RG CLK_RGx CLK_RA CLK_RGB CLK_RGBx CLK_RGBA CLK_ARGB CLK_BGRA CLK_INTENSITY CLK_LUMINANCE Notes The values returned by get_image_channel_order as shown above with the CLK_ prefixes correspond to the CL_ prefixes used to describe the image channel order and data type in the table of supported names and values in clCreateSubBuffer and list of supported Image Channel Order Values for clCreateImage. For example, both CL_UNORM_INT8 and CLK_UNORM_INT8 refer to an image channel data type that is an unnormalized unsigned 8-bit integer. The following table describes the mapping of the number of channels of an image element to the appropriate components in the float4, int4 or uint4 vector data type for the color values returned by read_image{f|i|ui} or supplied to write_image{f|i|ui}. The unmapped components will be set to 0.0 for red, green and blue channels and will be set to 1.0 for the alpha channel. Channel Order float4, int4 or unsigned int4 components of channel data CL_R, CL_Rx (r, 0.0, 0.0, 1.0) CL_A (0.0, 0.0, 0.0, a) CL_RG, CL_RGx (r, g, 0.0, 1.0) CL_RA (r, 0.0, 0.0, a) CL_RGB, CL_RGBx (r, g, b, 1.0) CL_RGBA, CL_BGRA, CL_ARGB (r, g, b, a) CL_INTENSITY (I, I, I, I) CL_LUMINANCE (L, L, L, 1.0) A kernel that uses a sampler with the CL_ADDRESS_CLAMP addressing mode with multiple images may result in additional samplers being used internally by an implementation. If the same sampler is used with multiple images called via read_image{f|i|ui}, then it is possible that an implementation may need to allocate an additional sampler to handle the different border color values that may be needed depending on the image formats being used. These implementation allocated samplers will count against the maximum sampler values supported by the device and given by CL_DEVICE_MAX_SAMPLERS. Enqueuing a kernel that requires more samplers than the implementation can support will result in a CL_OUT_OF_RESOURCES error being returned. Specification OpenCL Specification Also see Image Functions khronos-opencl-man-1.0~svn27110/acos.xml0000644000175000017500000001147411660441607017741 0ustar mathieumathieu ]> acos, acosh, acospi acos 2007-2011 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. 3 acos, acosh, acospi Arc cosine functions. gentype acos gentype gentype acosh gentype gentype acospi gentypex Description acos is the arc cosine function. acosh is the inverse hyperbolic cosine function. acospi computes acos (x) / π. Notes &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/clCreateFromD3D10Texture2DKHR.xml0000644000175000017500000002414111660441607024125 0ustar mathieumathieu ]> clCreateFromD3D10Texture2DKHR clCreateFromD3D10Texture2DKHR 2007-2011 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. 3 clCreateFromD3D10Texture2DKHR Creates an OpenCL 2D image object from a subresource of a Direct3D 10 2D texture. cl_mem clCreateFromD3D10Texture2DKHR cl_contextcontext cl_mem_flagsflags ID3D10Texture2D*resource UINTsubresource cl_int *errcode_ret Parameters context A valid OpenCL context created from a Direct3D 10 device. flags A bit-field that is used to specify usage information. May be CL_MEM_READ_ONLY, CL_MEM_WRITE_ONLY, or CL_MEM_READ_WRITE. (See the table for clCreateBuffer for more information.) resource A pointer to the Direct3D 10 2D texture to share. subresource The subresource of resource to share. errcode_ret An appropriate error code. If errcode_ret is NULL, no error code is returned. Notes The width, height and depth of the returned OpenCL 2D image object are determined by the width, height and depth of subresource subresource of resource. The channel type and order of the returned OpenCL 2D image object is determined by the format of resource as shown in of Direct3D 10 and corresponding OpenCL image formats of resource in clCreateFromD3D10Texture3DKHR. This call will increment the internal Direct3D reference count on resource. The internal Direct3D reference count on resource will be decremented when the OpenCL reference count on the returned OpenCL memory object drops to zero. &sharingD3D10Inc; Errors Returns CL_SUCCESS returns a valid non-zero OpenCL image object and errcode_ret is set to CL_SUCCESS if the image object is created successfully. Otherwise, it returns a NULL value with one of the following error values returned in errcode_ret: CL_INVALID_CONTEXT if context is not a valid context. CL_INVALID_VALUE if values specified in flags are not valid or if subresource is not a valid subresource index for resource. CL_INVALID_D3D10_RESOURCE_KHR if resource is not a Direct3D 10 texture resource, if resource was created with the D3D10_USAGE flag D3D10_USAGE_IMMUTABLE, if a resource is a multisampled texture, if cl_mem from subresource subresource of resource has already been created using clCreateFromD3D10Texture2DKHR, or if context was not created against the same Direct3D 10 device from which resource was created. CL_INVALID_IMAGE_FORMAT_DESCRIPTOR if the Direct3D 10 texture format of resource is not a value listed in the table of Direct3D 10 and corresponding OpenCL image formats for clCreateFromD3D10Texture3DKHR, or if the Direct3D 10 texture format of resource does not map to a supported OpenCL image format. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see cl_khr_d3d10_sharing, clGetDeviceIDsFromD3D10KHR, clCreateFromD3D10BufferKHR, clCreateFromD3D10Texture3DKHR, clEnqueueAcquireD3D10ObjectsKHR, clEnqueueReleaseD3D10ObjectsKHR khronos-opencl-man-1.0~svn27110/normalize.xml0000644000175000017500000001316511660441607021013 0ustar mathieumathieu ]> normalize normalize 2007-2011 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. 3 normalize Normal vector length 1. floatn normalize floatnp doublen normalize doublenp gentype normalize (gentype p) // if half extension enabled Description Returns a vector in the same direction as p but with a length of 1. Notes &geometricFunctionsInc; If extended with cl_khr_fp16, generic type name gentype may indicate half and half{2|3|4} as arguments and return values. Specification OpenCL Specification Also see fast_normalize Geometric Functions khronos-opencl-man-1.0~svn27110/clEnqueueReadImage.xml0000644000175000017500000005204511660441607022500 0ustar mathieumathieu clEnqueueReadImage clEnqueueReadImage 2007-2011 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. 3 clEnqueueReadImage Enqueue commands to read from an image or image array object to host memory. cl_int clEnqueueReadImage cl_command_queue command_queue cl_mem image cl_bool blocking_read const size_t *origin const size_t *region size_t row_pitch size_t slice_pitch void *ptr cl_uint num_events_in_wait_list const cl_event *event_wait_list cl_event*event Parameters command_queue Refers to the command-queue in which the read command will be queued. command_queue and image must be created with the same OpenCL context. image Refers to a valid image or image array object. blocking_read Indicates if the read operations are blocking or non-blocking. If blocking_read is CL_TRUE i.e. the read command is blocking, clEnqueueReadImage does not return until the buffer data has been read and copied into memory pointed to by ptr. If blocking_read is CL_FALSE i.e. map operation is non-blocking, clEnqueueReadImage queues a non-blocking read command and returns. The contents of the buffer that ptr points to cannot be used until the read command has completed. The event argument returns an event object which can be used to query the execution status of the read command. When the read command has completed, the contents of the buffer that ptr points to can be used by the application. origin Defines the (x, y, z) offset in pixels in the 1D, 2D, or 3D image, the (x, y) offset and the image index in the image array or the (x) offset and the image index in the 1D image array. If image is a 2D image object, origin[2] must be 0. If image is a 1D image or 1D image buffer object, origin[1] and origin[2] must be 0. If image is a 1D image array object, origin[2] must be 0. If image is a 1D image array object, origin[1] describes the image index in the 1D image array. If image is a 2D image array object, origin[2] describes the image index in the 2D image array. region Defines the (width, height, depth) in pixels of the 1D, 2D or 3D rectangle, the (width, height) in pixels of the 2D rectangle and the number of images of a 2D image array or the (width) in pixels of the 1D rectangle and the number of images of a 1D image array. If image is a 2D image object, region[2] must be 1. If image is a 1D image or 1D image buffer object, region[1] and region[2] must be 1. If image is a 1D image array object, region[2] must be 1. row_pitch The length of each row in bytes. This value must be greater than or equal to the element size in bytes * width. If row_pitch is set to 0, the appropriate row pitch is calculated based on the size of each element in bytes multiplied by width. slice_pitch Size in bytes of the 2D slice of the 3D region of a 3D image or each image of a 1D or 2D image array being read. This must be 0 if image is a 1D or 2D image. This value must be greater than or equal to row_pitch * height. If slice_pitch is set to 0, the appropriate slice pitch is calculated based on the row_pitch * height. ptr The pointer to a buffer in host memory where image data is to be read from. event_wait_list , num_events_in_wait_list Specify events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event_wait_list act as synchronization points. The context associated with events in event_wait_list and command_queue must be the same. The memory associated with event_wait_list can be reused or freed after the function returns. event Returns an event object that identifies this particular read command and can be used to query or queue a wait for this particular command to complete. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the event_wait_list array. Notes Calling clEnqueueReadImage to read a region of the image with the ptr argument value set to host_ptr + (origin[2] * image slice pitch + origin[1] * image row pitch + origin[0] * bytes per pixel), where host_ptr is a pointer to the memory region specified when the image being read is created with CL_MEM_USE_HOST_PTR, must meet the following requirements in order to avoid undefined behavior: All commands that use this image object have finished execution before the read command begins execution. The row_pitch and slice_pitch argument values in clEnqueueReadImage must be set to the image row pitch and slice pitch. The image object is not mapped. The image object is not used by any command-queue until the read command has finished execution. Errors clEnqueueReadImage returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors. CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_CONTEXT if the context associated with command_queue and image are not the same or if the context associated with command_queue and events in event_wait_list are not the same. CL_INVALID_MEM_OBJECT if image is not a valid image object. CL_INVALID_VALUE if the region being read specified by origin and region is out of bounds or if ptr is a NULL value. CL_INVALID_VALUE if values in origin and region do not follow rules described in the argument description for origin and region. CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_INVALID_IMAGE_SIZE if image dimensions (image width, height, specified or compute row and/or slice pitch) for image are not supported by device associated with queue. CL_INVALID_IMAGE_FORMAT if image format (image channel order and data type) for image are not supported by device associated with queue. CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with image. CL_INVALID_OPERATION if the device associated with command_queue does not support images (i.e. CL_DEVICE_IMAGE_SUPPORT specified in the table of allowed values for param_name for clGetDeviceInfo is CL_FALSE). CL_INVALID_OPERATION if clEnqueueReadImage is called on image which has been created with CL_MEM_HOST_WRITE_ONLY or CL_MEM_HOST_NO_ACCESS CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the read and write operations are blocking and the execution status of any of the events in event_wait_list is a negative integer value. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clEnqueueWriteImage, clEnqueueCopyImage khronos-opencl-man-1.0~svn27110/clRetainSampler.xml0000644000175000017500000001277011660441607022101 0ustar mathieumathieu clRetainSampler clRetainSampler 2007-2011 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. 3 clRetainSampler Increments the sampler reference count. cl_int clRetainSampler cl_samplersampler Parameters sampler Specifies the sampler being retained. Notes clCreateSampler performs an implicit retain. Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_SAMPLER if sampler is not a valid sampler object. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clCreateSampler, clGetSamplerInfo, clReleaseSampler khronos-opencl-man-1.0~svn27110/islessequal.xml0000644000175000017500000001753511660441607021352 0ustar mathieumathieu ]> islessequal islessequal 2007-2011 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. 3 islessequal Compare of x <= y. int islessequal floatx floaty intn islessequal floatnx floatny int islessequal doublex doubley longn islessequal doublenx doubleny int islessequal (half x, half y) // if half extension enabled shortn islessequal (halfn x, halfn y) // if half extension enabled Description Returns the component-wise compare of x <= y. Notes &relationalFunctionsInc1; &relationalFunctionsInc2; &relationalFunctionsInc3; Specification OpenCL Specification Also see Relational Functions khronos-opencl-man-1.0~svn27110/vstore_halfn.xml0000644000175000017500000004360011660441607021502 0ustar mathieumathieu ]> vstore_halfn vstore_halfn 2007-2011 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. 3 vstore_halfn Convert float vector to half vector and write to a pointer to memory. void vstore_halfn floatndata size_toffset __global half*p void vstore_halfn_rte floatndata size_toffset __global half*p void vstore_halfn_rtz floatndata size_toffset __global half*p void vstore_halfn_rtp floatndata size_toffset __global half*p void vstore_halfn_rtn floatndata size_toffset __global half*p void vstore_halfn floatndata size_toffset __local half*p void vstore_halfn_rte floatndata size_toffset __local half*p void vstore_halfn_rtz floatndata size_toffset __local half*p void vstore_halfn_rtp floatndata size_toffset __local half*p void vstore_halfn_rtn floatndata size_toffset __local half*p void vstore_halfn floatndata size_toffset __private half*p void vstore_halfn_rte floatndata size_toffset __private half*p void vstore_halfn_rtz floatndata size_toffset __private half*p void vstore_halfn_rtp floatndata size_toffset __private half*p void vstore_halfn_rtn floatndata size_toffset __private half*p If the optional double is supported, you may use doublen instead of floatn. Description The floatn (or doublen if optional double is supported) value given by data is converted to a halfn value using the appropriate rounding mode. The halfn value is then written to address computed as (p + (offset * n)). The address computed as (p + (offset * n)) must be 16-bit aligned. vstore_halfn uses the default rounding mode. The default rounding mode is round to nearest even. Notes &vectorFunctionsInc; vload3 and vload_half3 read x, y, z components from address (p + (offset * 3)) into a 3-component vector. vstore3, and vstore_half3 write x, y, z components from a 3-component vector to address (p + (offset * 3)). In addition vloada_half3 reads x, y, z components from address (p + (offset * 4)) into a 3- component vector and vstorea_half3 writes x, y, z components from a 3-component vector to address (p + (offset * 4)). Specification OpenCL Specification Also see Vector Data Load and Store Functions khronos-opencl-man-1.0~svn27110/clEnqueueWriteImage.xml0000644000175000017500000005173611660441607022725 0ustar mathieumathieu clEnqueueWriteImage clEnqueueWriteImage 2007-2011 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. 3 clEnqueueWriteImage Enqueues a command to write to an image or image array object from host memory. cl_int clEnqueueWriteImage cl_command_queue command_queue cl_mem image cl_bool blocking_write const size_t *origin const size_t *region size_t input_row_pitch size_t input_slice_pitch const void * ptr cl_uint num_events_in_wait_list const cl_event *event_wait_list cl_event *event Parameters command_queue Refers to the command-queue in which the write command will be queued. command_queue and image must be created with the same OpenCL context. image Refers to a valid image or image array object. blocking_write Indicates if the write operation is blocking or non-blocking. If blocking_write is CL_TRUE the OpenCL implementation copies the data referred to by ptr and enqueues the write command in the command-queue. The memory pointed to by ptr can be reused by the application after the clEnqueueWriteImage call returns. If blocking_write is CL_FALSE the OpenCL implementation will use ptr to perform a nonblocking write. As the write is non-blocking the implementation can return immediately. The memory pointed to by ptr cannot be reused by the application after the call returns. The event argument returns an event object which can be used to query the execution status of the write command. When the write command has completed, the memory pointed to by ptr can then be reused by the application. origin Defines the (x, y, z) offset in pixels in the 1D, 2D, or 3D image, the (x, y) offset and the image index in the image array or the (x) offset and the image index in the 1D image array. If image is a 2D image object, origin[2] must be 0. If image is a 1D image or 1D image buffer object, origin[1] and origin[2] must be 0. If image is a 1D image array object, origin[2] must be 0. If image is a 1D image array object, origin[1] describes the image index in the 1D image array. If image is a 2D image array object, origin[2] describes the image index in the 2D image array. region Defines the (width, height, depth) in pixels of the 1D, 2D or 3D rectangle, the (width, height) in pixels of the 2D rectangle and the number of images of a 2D image array or the (width) in pixels of the 1D rectangle and the number of images of a 1D image array. If image is a 2D image object, region[2] must be 1. If image is a 1D image or 1D image buffer object, region[1] and region[2] must be 1. If image is a 1D image array object, region[2] must be 1. input_row_pitch The length of each row in bytes. This value must be greater than or equal to the element size in bytes * width. If row_pitch is set to 0, the appropriate row pitch is calculated based on the size of each element in bytes multiplied by width. input_slice_pitch Size in bytes of the 2D slice of the 3D region of a 3D image or each image of a 1D or 2D image array being written. This must be 0 if image is a 1D or 2D image. This value must be greater than or equal to row_pitch * height. If slice_pitch is set to 0, the appropriate slice pitch is calculated based on the row_pitch * height. ptr The pointer to a buffer in host memory where image data is to be written to. event_wait_list , num_events_in_wait_list Specify events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event_wait_list act as synchronization points. The context associated with events in event_wait_list and command_queue must be the same. The memory associated with event_wait_list can be reused or freed after the function returns. event Returns an event object that identifies this particular write command and can be used to query or queue a wait for this particular command to complete. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. Notes Calling clEnqueueWriteImage to update the latest bits in a region of the image with the ptr argument value set to host_ptr + (origin[2] * image slice pitch + origin[1] * image row pitch + origin[0] * bytes per pixel), where host_ptr is a pointer to the memory region specified when the image being written is created with CL_MEM_USE_HOST_PTR, must meet the following requirements in order to avoid undefined behavior: The host memory region being written contains the latest bits when the enqueued write command begins execution. The input_row_pitch and input_slice_pitch argument values in clEnqueueWriteImage must be set to the image row pitch and slice pitch. The image object is not mapped. The image object is not used by any command-queue until the write command has finished execution. Errors clEnqueueWriteImage return CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_CONTEXT if the context associated with command_queue and image are not the same or if the context associated with command_queue and events in event_wait_list are not the same. CL_INVALID_MEM_OBJECT if image is not a valid image object. CL_INVALID_VALUE if the region being written specified by origin and region is out of bounds or if ptr is a NULL value. CL_INVALID_VALUE if values in origin and region do not follow rules described in the argument description for origin and region. CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_INVALID_IMAGE_SIZE if image dimensions (image width, height, specified or compute row and/or slice pitch) for image are not supported by device associated with queue. CL_INVALID_IMAGE_FORMAT if image format (image channel order and data type) for image are not supported by device associated with queue. CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with image. CL_INVALID_OPERATION if the device associated with command_queue does not support images (i.e. CL_DEVICE_IMAGE_SUPPORT specified the table of allowed values for param_name for clGetDeviceInfo is CL_FALSE). CL_INVALID_OPERATION if clEnqueueWriteImage is called on image which has been created with CL_MEM_HOST_WRITE_ONLY or CL_MEM_HOST_NO_ACCESS. CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the write operations are blocking and the execution status of any of the events in event_wait_list is a negative integer value. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clEnqueueReadImage, clEnqueueCopyImage khronos-opencl-man-1.0~svn27110/write_mem_fence.xml0000644000175000017500000001057211660441607022142 0ustar mathieumathieu write_mem_fence write_mem_fence 2007-2011 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. 3 write_mem_fence Write memory barrier that orders only stores. void write_mem_fence cl_mem_fence_flagsflags Description Write memory barrier that orders only stores. The flags argument specifies the memory address space and can be set to a combination of the following literal values: CLK_LOCAL_MEM_FENCE, CLK_GLOBAL_MEM_FENCE. Specification OpenCL Specification Also see Explicit Memory Fence Functions khronos-opencl-man-1.0~svn27110/dataTypes.xml0000644000175000017500000003101511660441607020743 0ustar mathieumathieu Data Types Data Types 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. 3 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, double, and half floating point types. Vector data types charn, ucharn, shortn, ushortn, intn, uintn, longn, ulongn, floatn, doublen, and optional halfn types. Abstract data types cl_platform_id, cl_device_id, cl_context, cl_command_queue, cl_mem, cl_program, cl_kernel, cl_event, and 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, and ulong longn. Other data types image2d_t, image3d_t, image2d_array_t, image1d_t, image31_buffer_t, image1d_array_t, sampler_t, and event_t. Alignment of Types A data item declared to be a data type in memory is always aligned to the size of the data type in bytes. For example, a float4 variable will be aligned to a 16-byte boundary, and a char2 variable will be aligned to a 2-byte boundary. For 3-component vector data types, the size of the data type is 4 * sizeof(component). This means that a 3-component vector data type will be aligned to a 4 * sizeof(component) boundary. The vload3 and vstore3 built-in functions can be used to read and write, respectively, 3-component vector data types from an array of packed scalar data type. A built-in data type that is not a power of two bytes in size must be aligned to the next larger power of two. This rule applies to built-in types only, not structs or unions. The OpenCL compiler is responsible for aligning data items to the appropriate alignment as required by the data type. For arguments to a __kernel function declared to be a pointer to a data type, the OpenCL compiler can assume that the pointee is always appropriately aligned as required by the data type. The behavior of an unaligned load or store is undefined, except for the vloadn, vload_halfn, vstoren, and vstore_halfn functions. The vector load functions can read a vector from an address aligned to the element type of the vector. The vector store functions can write a vector to an address aligned to the element type of the vector. The user is responsible for ensuring that data passed into and out of OpenCL buffers are natively aligned relative to the start of the buffer as described above. This implies that OpenCL buffers created with CL_MEM_USE_HOST_PTR need to provide an appropriately aligned host memory pointer that is aligned to the data types used to access these buffers in a kernel(s). As well, the user is responsible to ensure that data passed into and out of OpenCL images are properly aligned to the granularity of the data representing a single pixel (e.g. image_num_channels * sizeof(image_channel_data_type)) except for CL_RGB and CL_RGBx images where the data must be aligned to the granularity of a single channel in a pixel (i.e. sizeof(image_channel_data_type)). OpenCL makes no requirement about the alignment of OpenCL application defined data types outside of buffers and images, except that the underlying vector primitives (e.g. __cl_float4) where defined shall be directly accessible as such using appropriate named fields in the cl_type union. Nevertheless, it is recommended that the cl_platform.h header should attempt to naturally align OpenCL defined application data types (e.g. cl_float4) according to their type. Specification OpenCL Specification khronos-opencl-man-1.0~svn27110/clCreateFromD3D11BufferKHR.xml0000644000175000017500000002121111660441607023504 0ustar mathieumathieu ]> clCreateFromD3D11BufferKHR clCreateFromD3D11BufferKHR 2007-2011 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. 3 clCreateFromD3D11BufferKHR Creates an OpenCL buffer object from a Direct3D 11 buffer. cl_mem clCreateFromD3D11BufferKHR cl_contextcontext cl_mem_flagsflags ID3D11Buffer*resource cl_int *errcode_ret Parameters context A valid OpenCL context created from a Direct3D 11 device. flags A bit-field that is used to specify usage information. May be CL_MEM_READ_ONLY, CL_MEM_WRITE_ONLY, or CL_MEM_READ_WRITE. (See the table for clCreateBuffer for more information.) resource A pointer to the Direct3D 11 buffer to share. errcode_ret An appropriate error code. If errcode_ret is NULL, no error code is returned. Notes The size of the returned OpenCL buffer object is the same as the size of resource. This call will increment the internal Direct3D reference count on resource. The internal Direct3D reference count on resource will be decremented when the OpenCL reference count on the returned OpenCL memory object drops to zero. &sharingD3D11Inc; &accessMappedInc; Errors Returns CL_SUCCESS returns a valid non-zero OpenCL buffer object and errcode_ret is set to CL_SUCCESS if the buffer object is created successfully. Otherwise, it returns a NULL value with one of the following error values returned in errcode_ret: CL_INVALID_CONTEXT if context is not a valid context. CL_INVALID_VALUE if values specified in flags are not valid. CL_INVALID_D3D11_RESOURCE_KHR if resource is not a Direct3D 11 buffer resource, if resource was created with the D3D11_USAGE flag D3D11_USAGE_IMMUTABLE, if a cl_mem from resource has already been created using clCreateFromD3D11BufferKHR, or if context was not created against the same Direct3D 11 device from which resource was created. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see cl_khr_d3d11_sharing, clGetDeviceIDsFromD3D11KHR, clCreateFromD3D11Texture2DKHR, clCreateFromD3D11Texture3DKHR, clEnqueueAcquireD3D11ObjectsKHR, clEnqueueReleaseD3D11ObjectsKHR khronos-opencl-man-1.0~svn27110/atom_inc.xml0000644000175000017500000001722311660441607020603 0ustar mathieumathieu atom_inc atom_inc 2007-2011 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. 3 atom_inc 64-bit atom_inc functions. long atom_inc volatile __global long*p longval long atom_inc volatile __local long*p longval ulong atom_inc volatile __global ulong*p ulongval ulong atom_inc volatile __local ulong*p ulongval Description Read the 64-bit value (referred to as old) stored at location pointed by p. Compute (old + 1) and store result at location pointed by p. The function returns old. An application that wants to use this extension will need to include the #pragma OPENCL EXTENSION cl_khr_int64_base_atomics : enable in the OpenCL program source. This function is performed in one atomic transaction. These transactions are atomic for the device executing these atomic functions. There is no guarantee of atomicity if the atomic operations to the same memory location are being performed by kernels executing on multiple devices. Atomic operations on 64-bit integers and 32-bit integers (and float) are also atomic with regard to each other. Specification OpenCL Specification Also see Atomic Functions, atomic_inc, cl_khr_int64_base_atomics khronos-opencl-man-1.0~svn27110/clGetPlatformIDs.xml0000644000175000017500000001465411660441607022162 0ustar mathieumathieu clGetPlatformIDs clGetPlatformIDs 2007-2011 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. 3 clGetPlatformIDs Obtain the list of platforms available. cl_int clGetPlatformIDs cl_uintnum_entries cl_platform_id*platforms cl_uint*num_platforms Parameters num_entries The number of cl_platform_id entries that can be added to platforms. If platforms is not NULL, the num_entries must be greater than zero. platforms Returns a list of OpenCL platforms found. The cl_platform_id values returned in platforms can be used to identify a specific OpenCL platform. If platforms argument is NULL, this argument is ignored. The number of OpenCL platforms returned is the mininum of the value specified by num_entries or the number of OpenCL platforms available. num_platforms Returns the number of OpenCL platforms available. If num_platforms is NULL, this argument is ignored. Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise it returns CL_INVALID_VALUE if num_entries is equal to zero and platforms is not NULL, or if both num_platforms and platforms are NULL. Returns CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clGetPlatformInfo, clGetDeviceInfo, Cardinality Diagram khronos-opencl-man-1.0~svn27110/vloadn.xml0000644000175000017500000001717211660441607020300 0ustar mathieumathieu ]> vloadn vloadn 2007-2011 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. 3 vloadn Read vectors from a pointer to memory. gentypen vloadn size_t offset const __global gentype *p gentypen vloadn size_t offset const __local gentype *p gentypen vloadn size_t offset const __constant gentype *p gentypen vloadn size_t offset const __private gentype *p Description Return sizeof (gentypen) bytes of data read from address (p + (offset * n)). The address computed as (p + (offset * n)) must be 8-bit aligned if gentype is char or uchar; 16-bit aligned if gentype is short or ushort; 32-bit aligned if gentype is int, uint, or float; 64-bit aligned if gentype is long or ulong. If the half extension is enabled, the address computed as (p + (offset * n)) must be 16-bit aligned. Notes &vectorFunctionsInc; &vectorHalfFunctionsInc; vload3 and vload_half3 read x, y, z components from address (p + (offset * 3)) into a 3-component vector. Specification OpenCL Specification Also see Vector Data Load and Store Functions khronos-opencl-man-1.0~svn27110/clEnqueueTask.xml0000644000175000017500000003222611660441607021563 0ustar mathieumathieu clEnqueueTask clEnqueueTask 2007-2011 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. 3 clEnqueueTask Enqueues a command to execute a kernel on a device. cl_int clEnqueueTask cl_command_queue command_queue cl_kernel kernel cl_uint num_events_in_wait_list const cl_event *event_wait_list cl_event *event Parameters command_queue A valid command-queue. The kernel will be queued for execution on the device associated with command_queue. kernel A valid kernel object. The OpenCL context associated with kernel and command_queue must be the same. num_events_in_wait_list , event_wait_list Sspecify events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event_wait_list act as synchronization points. The context associated with events in event_wait_list and command_queue must be the same. The memory associated with event_wait_list can be reused or freed after the function returns. event Returns an event object that identifies this particular kernel execution instance. Event objects are unique and can be used to identify a particular kernel execution instance later on. If event is NULL, no event will be created for this kernel execution instance and therefore it will not be possible for the application to query or queue a wait for this particular kernel execution instance. Notes The kernel is executed using a single work-item. clEnqueueTask is equivalent to calling clEnqueueNDRangeKernel with work_dim = 1, global_work_offset = NULL, global_work_size[0] set to 1, and local_work_size[0] set to 1. Errors Returns CL_SUCCESS if the kernel execution was successfully queued, or one of the errors below: CL_INVALID_PROGRAM_EXECUTABLE if there is no successfully built program executable available for device associated with command_queue. CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_KERNEL if kernel is not a valid kernel object. CL_INVALID_CONTEXT if context associated with command_queue and kernel is not the same or if the context associated with command_queue and events in event_wait_list are not the same. CL_INVALID_KERNEL_ARGS if the kernel argument values have not been specified. CL_INVALID_WORK_GROUP_SIZE if a work-group size is specified for kernel using the __attribute__ ((reqd_work_group_size(X, Y, Z))) qualifier in program source and is not (1, 1, 1). CL_MISALIGNED_SUB_BUFFER_OFFSET if a sub-buffer object is specified as the value for an argument that is a buffer object and the offset specified when the sub-buffer object is created is not aligned to CL_DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue. CL_INVALID_IMAGE_SIZE if an image object is specified as an argument value and the image dimensions (image width, height, specified or compute row and/or slice pitch) are not supported by device associated with queue. CL_INVALID_IMAGE_FORMAT if an image object is specified as an argument value and the image format (image channel order and data type) is not supported by device associated with queue. CL_OUT_OF_RESOURCES if there is a failure to queue the execution instance of kernel on the command-queue because of insufficient resources needed to execute the kernel. CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with image or buffer objects specified as arguments to kernel. CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clEnqueueNDRangeKernel, clEnqueueNativeKernel khronos-opencl-man-1.0~svn27110/printfFunction.xml0000644000175000017500000011241511660441607022021 0ustar mathieumathieu printf Function printf Function 2007-2011 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. 3 printf Function The OpenCL C programming language implements the printf function. int printf constant char * restrictformat, ... Description The printf built-in function writes output to an implementation-defined stream such as stdout under control of the string pointed to by format that specifies how subsequent arguments are converted for output. If there are insufficient arguments for the format, the behavior is undefined. If the format is exhausted while arguments remain, the excess arguments are evaluated (as always) but are otherwise ignored. The printf function returns when the end of the format string is encountered. Notes printf returns 0 if it was executed successfully and -1 otherwise. printf output synchronization When the event that is associated with a particular kernel invocation is completed, the output of all printf() calls executed by this kernel invocation is flushed to the implementation-defined output stream. Calling clFinish on a command queue flushes all pending output by printf in previously enqueued and completed commands to the implementation-defined output stream. In the case that printf is executed from multiple work-items concurrently, there is no guarantee of ordering with respect to written data. For example, it is valid for the output of a work-item with a global id (0,0,1) to appear intermixed with the output of a work-item with a global id (0,0,4) and so on. printf format string The format shall be a character sequence, beginning and ending in its initial shift state. The format is composed of zero or more directives: ordinary characters (not %), which are copied unchanged to the output stream; and conversion specifications, each of which results in fetching zero or more subsequent arguments, converting them, if applicable, according to the corresponding conversion specifier, and then writing the result to the output stream. As format is in the constant address space it must be resolvable at compile time and thus cannot be dynamically created by the executing program, itself. Each conversion specification is introduced by the character %. After the %, the following appear in sequence: Zero or more flags (in any order) that modify the meaning of the conversion specification. An optional minimum field width. If the converted value has fewer characters than the field width, it is padded with spaces (by default) on the left (or right, if the left adjustment flag, described later, has been given) to the field width. The field width takes the form of a nonnegative decimal integer.) Note that 0 is taken as a flag, not as the beginning of a field width. An optional precision that gives the minimum number of digits to appear for the d, i, o, u, x, and X conversions, the number of digits to appear after the decimal point character for a, A, e, E, f, and F conversions, the maximum number of significant digits for the g and G conversions, or the maximum number of bytes to be written for s conversions. The precision takes the form of a period (.) followed by an optional decimal integer; if only the period is specified, the precision is taken as zero. If a precision appears with any other conversion specifier, the behavior is undefined. An optional vector specifier. A length modifier that specifies the size of the argument. The length modifier is required with a vector specifier and together specifies the vector type. Implicit conversions between vector types are disallowed (as per section 6.2.1). If the vector specifier is not specified, the length modifier is optional. A conversion specifier character that specifies the type of conversion to be applied. The flag characters and their meanings are: - The result of the conversion is left-justified within the field. (It is right-justified if this flag is not specified.) + The result of a signed conversion always begins with a plus or minus sign. (It begins with a sign only when a negative value is converted if this flag is not specified.) The results of all floating conversions of a negative zero, and of negative values that round to zero, include a minus sign. space If the first character of a signed conversion is not a sign, or if a signed conversion results in no characters, a space is prefixed to the result. If the space and + flags both appear, the space flag is ignored. # The result is converted to an "alternative form". For o conversion, it increases the precision, if and only if necessary, to force the first digit of the result to be a zero (if the value and precision are both 0, a single 0 is printed). For x (or X) conversion, a nonzero result has 0x (or 0X) prefixed to it. For a, A, e, E, f, F, g, and G conversions, the result of converting a floating-point number always contains a decimal-point character, even if no digits follow it. (Normally, a decimal-point character appears in the result of these conversions only if a digit follows it.) For g and G conversions, trailing zeros are not removed from the result. For other conversions, the behavior is undefined. 0 For d, i, o, u, x, X, a, A, e, E, f, F, g, and G conversions, leading zeros (following any indication of sign or base) are used to pad to the field width rather than performing space padding, except when converting an infinity or NaN. If the 0 and - flags both appear, the 0 flag is ignored. For d, i, o, u, x, and X conversions, if a precision is specified, the 0 flag is ignored. For other conversions, the behavior is undefined. The vector specifier and its meaning is: vn Specifies that a following a, A, e, E, f, F, g, G, d, i, o, u, x, or X conversion specifier applies to a vector argument, where n is the size of the vector and must be 2, 3, 4, 8 or 16. The vector value is displayed in the following general form: value1 C value2 C ... C valuen where C is a separator character. The value for this separator character is a comma. If the vector specifier is not used, the length modifiers and their meanings are: hh Specifies that a following d, i, o, u, x, or X conversion specifier applies to a char or uchar argument (the argument will have been promoted according to the integer promotions, but its value shall be converted to char or uchar before printing). h Specifies that a following d, i, o, u, x, or X conversion specifier applies to a short or ushort argument (the argument will have been promoted according to the integer promotions, but its value shall be converted to short or unsigned short before printing). l (ell) Specifies that a following d, i, o, u, x, or X conversion specifier applies to a long or ulong argument. The l modifier is supported by the full profile. For the embedded profile, the l modifier is supported only if 64-bit integers are supported by the device. If the vector specifier is used, the length modifiers and their meanings are: hh Specifies that a following d, i, o, u, x, or X conversion specifier applies to a charn or ucharn argument (the argument will not be promoted). h Specifies that a following d, i, o, u, x, or X conversion specifier applies to a shortn or ushortn argument (the argument will not be promoted); that a following a, A, e, E, f, F, g, or G conversion specifier applies to a halfn argument if the cl_khr_fp16 extension is supported. hl This modifier can only be used with the vector specifier. Specifies that a following d, i, o, u, x, or X conversion specifier applies to a intn or uintn argument; that a following a, A, e, E, f, F, g, or G conversion specifier applies to a floatn argument. l (ell) Specifies that a following d, i, o, u, x, or X conversion specifier applies to a longn or ulongn argument; that a following a, A, e, E, f, F, g, or G conversion specifier applies to a doublen argument. The l modifier is supported by the full profile. For the embedded profile, the l modifier is supported only if 64-bit integers or double-precision floating-point are supported by the device. If a vector specifier appears without a length modifier, the behavior is undefined. The vector data type described by the vector specifier and length modifier must match the data type of the argument; otherwise the behavior is undefined. If a length modifier appears with any conversion specifier other than as specified above, the behavior is undefined The conversion specifiers and their meanings are: d,i The int, charn, shortn, intn or longn argument is converted to signed decimal in the style [−]dddd. The precision specifies the minimum number of digits to appear; if the value being converted can be represented in fewer digits, it is expanded with leading zeros. The default precision is 1. The result of converting a zero value with a precision of zero is no characters. o,u,x,X The unsigned int, ucharn, ushortn, uintn or ulongn argument is converted to unsigned octal (o), unsigned decimal (u), or unsigned hexadecimal notation (x or X) in the style dddd; the letters abcdef are used for x conversion and the letters ABCDEF for X conversion. The precision specifies the minimum number of digits to appear; if the value being converted can be represented in fewer digits, it is expanded with leading zeros. The default precision is 1. The result of converting a zero value with a precision of zero is no characters. f,F A double, halfn, floatn or doublen argument representing a floating-point number is converted to decimal notation in the style [−]ddd.ddd, where the number of digits after the decimal-point character is equal to the precision specification. If the precision is missing, it is taken as 6; if the precision is zero and the # flag is not specified, no decimal-point character appears. If a decimal-point character appears, at least one digit appears before it. The value is rounded to the appropriate number of digits. A double, halfn, floatn or doublen argument representing an infinity is converted in one of the styles [-]inf or [-]infinity — which style is implementation-defined. A double, halfn, floatn or doublen argument representing a NaN is converted in one of the styles [- ]nan or [-]nan(n-char-sequence) — which style, and the meaning of any n-charsequence, is implementation-defined. The F conversion specifier produces INF, INFINITY, or NAN instead of inf, infinity, or nan, respectively. When applied to infinite and NaN values, the -, +, and space flag characters have their usual meaning; the # and 0 flag characters have no effect. e,E A double, halfn, floatn or doublen argument representing a floating-point number is converted in the style [−]d.ddd e±dd, where there is one digit (which is nonzero if the argument is nonzero) before the decimal-point character and the number of digits after it is equal to the precision; if the precision is missing, it is taken as 6; if the precision is zero and the # flag is not specified, no decimal-point character appears. The value is rounded to the appropriate number of digits. The E conversion specifier produces a number with E instead of e introducing the exponent. The exponent always contains at least two digits, and only as many more digits as necessary to represent the exponent. If the value is zero, the exponent is zero. A double, halfn, floatn or doublen argument representing an infinity or NaN is converted in the style of an f or F conversion specifier g,G A double, halfn, floatn or doublen argument representing a floating-point number is converted in style f or e (or in style F or E in the case of a G conversion specifier), depending on the value converted and the precision. Let P equal the precision if nonzero, 6 if the precision is omitted, or 1 if the precision is zero. Then, if a conversion with style E would have an exponent of X: — if P > X ≥ −4, the conversion is with style f (or F) and precision P − (X + 1). — otherwise, the conversion is with style e (or E) and precision P − 1. Finally, unless the # flag is used, any trailing zeros are removed from the fractional portion of the result and the decimal-point character is removed if there is no fractional portion remaining. A double, halfn, floatn or doublen e argument representing an infinity or NaN is converted in the style of an f or F conversion specifier. a,A A double, halfn, floatn or doublen argument representing a floating-point number is converted in the style [−]0xh.hhhh p±d, where there is one hexadecimal digit (which is nonzero if the argument is a normalized floating-point number and is otherwise unspecified) before the decimal-point character) and the number of hexadecimal digits after it is equal to the precision; if the precision is missing, then the precision is sufficient for an exact representation of the value; if the precision is zero and the # flag is not specified, no decimal point character appears. The letters abcdef are used for a conversion and the letters ABCDEF for A conversion. The A conversion specifier produces a number with X and P instead of x and p. The exponent always contains at least one digit, and only as many more digits as necessary to represent the decimal exponent of 2. If the value is zero, the exponent is zero. A double, halfn, floatn or doublen argument representing an infinity or NaN is converted in the style of an f or F conversion specifier. Binary implementations can choose the hexadecimal digit to the left of the decimal-point character so that subsequent digits align to nibble (4-bit) boundaries. NOTE: The conversion specifiers e,E,g,G,a,A convert a float or half argument that is a scalar type to a double only if the double data type is supported. If the double data type is not supported, the argument will be a float instead of a double and the half type will be converted to a float. c The int argument is converted to an unsigned char, and the resulting character is written. s The argument shall be a literal string. No special provisions are made for multibyte characters. The behavior of printf with the s conversion specifier is undefined if the argument value is not a pointer to a literal string. Characters from the literal string array are written up to (but not including) the terminating null character. If the precision is specified, no more than that many bytes are written. If the precision is not specified or is greater than the size of the array, the array shall contain a null character. p The argument shall be a pointer to void. The pointer can refer to a memory region in the global, constant, local or private address space. The value of the pointer is converted to a sequence of printing characters in an implementation-defined manner. % A % character is written. No argument is converted. The complete conversion specification shall be %%. If a conversion specification is invalid, the behavior is undefined. If any argument is not the correct type for the corresponding conversion specification, the behavior is undefined. In no case does a nonexistent or small field width cause truncation of a field; if the result of a conversion is wider than the field width, the field is expanded to contain the conversion result. For a and A conversions, the value is correctly rounded to a hexadecimal floating number with the given precision. Differences between OpenCL C and C99 printf The l modifier followed by a c conversion specifier or s conversion specifier is not supported by OpenCL C. The ll, j, z, t, and L length modifiers are not supported by OpenCL C. The n conversion specifier is not supported by OpenCL C but is reserved. OpenCL C adds the optional vn vector specifier to support printing of vector types. The conversion specifiers f, F, e, E, g, G, a, A convert a float argument to a double only if the double data type is supported. Refer to the description of CL_DEVICE_DOUBLE_FP_CONFIG. If the double data type is not supported, the argument will be a float instead of a double. For the embedded profile, the l length modifier is supported only if 64-bit integers are supported. In OpenCL C, printf returns 0 if it was executed successfully and -1 otherwise vs. C99 where printf returns the number of characters printed or a negative value if an output or encoding error occurred. In OpenCL C, the conversion specifier s can only be used for arguments that are literal strings. Examples float4 f = (float4)(1.0f, 2.0f, 3.0f, 4.0f); uchar4 uc = (uchar4)(0xFA, 0xFB, 0xFC, 0xFD); printf("f4 = %2.2v4hlf\n", f); printf("uc = %#v4hhx\n", uc); // The above two calls print the following: f4 = 1.00,2.00,3.00,4.00 uc = 0xfa,0xfb,0xfc,0xfd A few examples of valid use cases of printf for the conversion specifier s are given below. The argument value must be a pointer to a literal string. kernel void my_kernel( ... ) { printf("%s\n", "this is a test string\n"); } A few examples of invalid use cases of printf for the conversion specifier s are given below: kernel void my_kernel(global char *s, ... ) { printf("%s\n", s); constant char *p = "this is a test string\n"; printf("%s\n", p); printf("%s\n", &p[3]); } A few examples of invalid use cases of printf where data types given by the vector specifier and length modifier do not match the argument type are given below: kernel void my_kernel(global char *s, … ) { uint2 ui = (uint2)(0x12345678, 0x87654321); printf("unsigned short value = (%#v2hx)\n", ui) printf("unsigned char value = (%#v2hhx)\n", ui) } Specification OpenCL Specification khronos-opencl-man-1.0~svn27110/write_image1d.xml0000644000175000017500000004300111660441607021524 0ustar mathieumathieu [ ]> write_image1d write_image (1D) 2007-2011 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. 3 write_image1d Write color value to location in a 1D image object. void write_imagef image1d_t image int coord float4 color void write_imagef image1d_buffer_t image int coord float4 color void write_imagef image1d_array_t image int2 coord float4 color void write_imagei image1d_t image int coord int4 color void write_imagei image1d_buffer_t image int coord int4 color void write_imagei image1d_array_t image int2 coord int4 color void write_imageui image1d_t image int coord uint4 color void write_imageui image1d_buffer_t image int coord uint4 color void write_imageui image1d_array_t image int2 coord uint4 color void write_imageh image1d_t image int coord half4 color void write_imageh image1d_buffer_t image int coord half4 color void write_imageh image1d_array_t image int2 coord half4 color Description write_imagef can only be used with image objects created with image_channel_data_type set to one of the pre-defined packed formats or set to CL_SNORM_INT8, CL_UNORM_INT8, CL_SNORM_INT16, CL_UNORM_INT16, CL_HALF_FLOAT, or CL_FLOAT. Appropriate data format conversion will be done to convert channel data from a floating-point value to actual data format in which the channels are stored. write_imagei functions can only be used with image objects created with image_channel_data_type set to one of the following values: CL_SIGNED_INT8, CL_SIGNED_INT16, or CL_SIGNED_INT32. write_imageui functions can only be used with image objects created with image_channel_data_type set to one of the following values: CL_UNSIGNED_INT8, CL_UNSIGNED_INT16, or CL_UNSIGNED_INT32. The write_imageh functions are enabled when the half type is supported and can only be used with image objects created with image_channel_data_type set to one of the pre-defined packed formats or set to CL_SNORM_INT8, CL_UNORM_INT8, CL_SNORM_INT16, CL_UNORM_INT16 or CL_HALF_FLOAT. Appropriate data format conversion will be done to convert channel data from a floating-point value to actual data format in which the channels are stored. Functions that take image1d_t or image1d_buffer_t The functions that take image1d_t or image1d_buffer_t write the color value to the location specified by coord in the 1D image or 1D image buffer object specified by image. Appropriate data format conversion to the specified image format is done before writing the color value. coord is considered to be unnormalized coordinates and must be in the range 0... image width - 1. for functions taking image1d_t or image1d_buffer_t, the behavior of write_imagef, write_imagei, write_imageui, and write_imageh for image objects created with image_channel_data_type values not specified in the description above or with coordinate values that are not in the range (0... image width - 1), is undefined. Functions that take image1d_array_t The functions that take image1d_array_t write the color value to the location specified by coord.x in the 1D image identified by coord.y in the 1D image array specified by image. Appropriate data format conversion to the specified image format is done before writing the color value. coord.x and coord.y are considered to be unnormalized coordinates and must be in the range 0 … image width - 1 and 0 … image number of layers - 1. For functions taking image1d_array_t, the behavior of write_imagef, write_imagei and write_imageui for image objects created with image_channel_data_type values not specified in the description above or with (x, y) coordinate values that are not in the range (0 … image width - 1, 0 …image number of layers - 1), respectively, is undefined. Notes &imageFunctionsInc; Specification OpenCL Specification Also see Image Functions khronos-opencl-man-1.0~svn27110/dot.xml0000644000175000017500000001334511660441607017601 0ustar mathieumathieu ]> dot dot 2007-2011 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. 3 dot Dot product. float dot floatnp0 floatnp1 double dot doublenp0 doublenp1 half dot (gentype p0, gentype p1) // if half extension enabled Description Computes the dot product. Notes &geometricFunctionsInc; If extended with cl_khr_fp16, generic type name gentype may indicate half and half{2|3|4} as arguments. Specification OpenCL Specification Also see Geometric Functions khronos-opencl-man-1.0~svn27110/clGetDeviceIDsFromD3D10KHR.xml0000644000175000017500000003006311660441607023412 0ustar mathieumathieu ]> clGetDeviceIDsFromD3D10KHR clGetDeviceIDsFromD3D10KHR 2007-2011 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. 3 clGetDeviceIDsFromD3D10KHR Querying OpenCL Devices Corresponding to Direct3D 10 Devices. cl_int clGetDeviceIDsFromD3D10KHR cl_platform_idplatform cl_d3d10_device_source_khrd3d_device_source void*d3d_object cl_d3d10_device_set_khrd3d_device_set cl_uintnum_entries cl_device_id*devices cl_uint*num_devices Parameters platform Refers to the platform ID returned by clGetPlatformIDs. d3d_device_source Specifies the type of d3d_object and may be one of the following:. cl_d3d_device_source_khr Type of d3d_object CL_D3D10_DEVICE_KHR ID3D10Device * CL_D3D10_DXGI_ADAPTER_KHR IDXGIAdapter * d3d_object Specifies the object whose corresponding OpenCL devices are being queried. The type of d3d_object must be as specified in the table above. d3d_device_set Specifies the set of devices to return, and must be one of the following: cl_d3d_device_set_khr Devices returned in devices CL_PREFERRED_DEVICES_FOR_D3D10_KHR The OpenCL devices associated with the specified Direct3D object. CL_ALL_DEVICES_FOR_D3D10_KHR All OpenCL devices which may interoperate with the specified Direct3D object. Performance of sharing data on these devices may be considerably less than on the preferred devices. num_entries The number of cl_device_id entries that can be added to devices. If devices is not NULL, the num_entries must be greater than zero. devices Returns a list of OpenCL devices found. The cl_device_id values returned in devices can be used to identify a specific OpenCL device. If devices is NULL, this argument is ignored. The number of OpenCL devices returned is the mininum of the value specified by num_entries and the number of OpenCL devices corresponding to d3d_object. num_devices Returns the number of OpenCL devices available that correspond to d3d_object. If num_devices is NULL, this argument is ignored. Description The OpenCL devices corresponding to a Direct3D 10 device may be queried. The OpenCL devices corresponding to a DXGI adapter may also be queried. The OpenCL devices corresponding to a Direct3D 10 device will be a subset of the OpenCL devices corresponding to the DXGI adapter against which the Direct3D 10 device was created. Notes &sharingD3D10Inc; Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise it may return: CL_INVALID_PLATFORM if platform is not a valid platform. CL_INVALID_VALUE if d3d_device_source is not a valid value, d3d_device_set is not a valid value, num_entries is equal to zero and devices is not NULL, or if both num_devices and devices are NULL. CL_DEVICE_NOT_FOUND if no OpenCL devices that correspond to d3d_object were found. Specification OpenCL Specification Also see cl_khr_d3d10_sharing, clCreateFromD3D10BufferKHR, clCreateFromD3D10Texture2DKHR, clCreateFromD3D10Texture3DKHR, clEnqueueAcquireD3D10ObjectsKHR, clEnqueueReleaseD3D10ObjectsKHR khronos-opencl-man-1.0~svn27110/get_image_channel_data_type.xml0000644000175000017500000002543411660441607024460 0ustar mathieumathieu get_image_channel_data_type get_image_channel_data_type 2007-2011 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. 3 get_image_channel_data_type Return the channel data type. int get_image_channel_data_type image1d_t image int get_image_channel_data_type image1d_buffer_t image int get_image_channel_data_type image2d_t image int get_image_channel_data_type image3d_t image int get_image_channel_data_type image1d_array_t image int get_image_channel_data_type image2d_array_t image Description Return the channel data type. Valid values are: CLK_SNORM_INT8 CLK_SNORM_INT16 CLK_UNORM_INT8 CLK_UNORM_INT16 CLK_UNORM_SHORT_565 CLK_UNORM_SHORT_555 CLK_UNORM_SHORT_101010 CLK_SIGNED_INT8 CLK_SIGNED_INT16 CLK_SIGNED_INT32 CLK_UNSIGNED_INT8 CLK_UNSIGNED_INT16 CLK_UNSIGNED_INT32 CLK_HALF_FLOAT CLK_FLOAT Notes The values returned by get_image_channel_order as shown above with the CLK_ prefixes correspond to the CL_ prefixes used to describe the image channel order and data type in the table of supported names and values in clCreateSubBuffer and list of supported Image Channel Order Values for clCreateImage. For example, both CL_UNORM_INT8 and CLK_UNORM_INT8 refer to an image channel data type that is an unnormalized unsigned 8-bit integer. The following table describes the mapping of the number of channels of an image element to the appropriate components in the float4, int4 or uint4 vector data type for the color values returned by read_image{f|i|ui} or supplied to write_image{f|i|ui}. The unmapped components will be set to 0.0 for red, green and blue channels and will be set to 1.0 for the alpha channel. Channel Order float4, int4 or unsigned int4 components of channel data CL_R, CL_Rx (r, 0.0, 0.0, 1.0) CL_A (0.0, 0.0, 0.0, a) CL_RG, CL_RGx (r, g, 0.0, 1.0) CL_RA (r, 0.0, 0.0, a) CL_RGB, CL_RGBx (r, g, b, 1.0) CL_RGBA, CL_BGRA, CL_ARGB (r, g, b, a) CL_INTENSITY (I, I, I, I) CL_LUMINANCE (L, L, L, 1.0) A kernel that uses a sampler with the CL_ADDRESS_CLAMP addressing mode with multiple images may result in additional samplers being used internally by an implementation. If the same sampler is used with multiple images called via read_image{f|i|ui}, then it is possible that an implementation may need to allocate an additional sampler to handle the different border color values that may be needed depending on the image formats being used. These implementation allocated samplers will count against the maximum sampler values supported by the device and given by CL_DEVICE_MAX_SAMPLERS. Enqueuing a kernel that requires more samplers than the implementation can support will result in a CL_OUT_OF_RESOURCES error being returned. Specification OpenCL Specification Also see Image Functions khronos-opencl-man-1.0~svn27110/commonFunctionsInc.xml0000644000175000017500000000250611660441607022623 0ustar mathieumathieu The generic type name gentype is used to indicate that the function can take float, float2, float3, float4, float8, float16, double, double2, double3, double4, double8, or double16 as the type for the arguments. The generic type name gentypef is used to indicate that the function can take float, float2, float3, float4, float8, or float16 as the type for the arguments. The generic type name gentyped is used to indicate that the function can take double, double2, double3, double4, double8, or double16 as the type for the arguments. The built-in common functions are implemented using the round to nearest even rounding mode. khronos-opencl-man-1.0~svn27110/get_local_id.xml0000644000175000017500000001106111660441607021411 0ustar mathieumathieu get_local_id get_local_id 2007-2011 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. 3 get_local_id Returns the unique local work-item ID. size_t get_local_id uintdimindx Description Returns the unique local work-item ID, i.e. a work-item within a specific work-group for dimension identified by dimindx. Valid values of dimindx are 0 to get_work_dim() - 1. For other values of dimindx, get_local_id() returns 0. For clEnqueueTask, this returns 0. Specification OpenCL Specification Also see Work-Item Functions, clEnqueueNDRangeKernel, clEnqueueTask khronos-opencl-man-1.0~svn27110/erf.xml0000644000175000017500000001064511660441607017567 0ustar mathieumathieu ]> erf, erfc acos 2007-2011 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. 3 erf, erfc Error functions. gentype erf gentype gentype erfc gentype Description erf is the error function encountered in integrating the normal distribution. erfc is the complementary error function. Notes &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/lgamma.xml0000644000175000017500000004422711660441607020254 0ustar mathieumathieu ]> lgamma, lgamma_r lgamma, lgamma_r 2007-2011 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. 3 lgamma, lgamma_r Log gamma functions. gentype lgamma gentypex floatn lgamma_r floatn x __global intn *signp floatn lgamma_r floatn x __local intn *signp floatn lgamma_r floatn x __private intn *signp float lgamma_r float x __global int *signp float lgamma_r float x __local int *signp float lgamma_r float x __private int *signp doublen lgamma_r doublen x __global intn *signp doublen lgamma_r doublen x __local intn *signp doublen lgamma_r doublen x __private intn *signp double lgamma_r double x __global int *signp double lgamma_r double x __local int *signp double lgamma_r double x __private int *signp halfn lgamma_r halfn x __global intn *signp halfn lgamma_r halfn x __local intn *signp halfn lgamma_r halfn x __private intn *signp half lgamma_r half x __global int *signp half lgamma_r half x __local int *signp half lgamma_r half x __private int *signp Description Returns the natural logarithm of the absolute value of the gamma function. The sign of the gamma function is returned in the signp argument of the lgamma_r. An application that wants to use half and halfn types will need to include the #pragma OPENCL EXTENSION cl_khr_fp16 : enable directive. If extended with cl_khr_fp16, generic type name gentype also includes half and half{2|3|4|8|16}. Notes &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/clEnqueueWriteBuffer.xml0000644000175000017500000004006411660441607023104 0ustar mathieumathieu clEnqueueWriteBuffer clEnqueueWriteBuffer 2007-2011 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. 3 clEnqueueWriteBuffer Enqueue commands to write to a buffer object from host memory. cl_int clEnqueueWriteBuffer cl_command_queuecommand_queue cl_membuffer cl_boolblocking_write size_toffset size_tsize const void*ptr cl_uintnum_events_in_wait_list const cl_event*event_wait_list cl_event*event Parameters command_queue Refers to the command-queue in which the write command will be queued. command_queue and buffer must be created with the same OpenCL context. buffer Refers to a valid buffer object. blocking_write Indicates if the write operations are blocking or nonblocking. If blocking_write is CL_TRUE, the OpenCL implementation copies the data referred to by ptr and enqueues the write operation in the command-queue. The memory pointed to by ptr can be reused by the application after the clEnqueueWriteBuffer call returns. If blocking_write is CL_FALSE, the OpenCL implementation will use ptr to perform a nonblocking write. As the write is non-blocking the implementation can return immediately. The memory pointed to by ptr cannot be reused by the application after the call returns. The event argument returns an event object which can be used to query the execution status of the write command. When the write command has completed, the memory pointed to by ptr can then be reused by the application. offset The offset in bytes in the buffer object to write to. size The size in bytes of data being written. ptr The pointer to buffer in host memory where data is to be written from. event_wait_list num_events_in_wait_list event_wait_list and num_events_in_wait_list specify events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event_wait_list act as synchronization points. The context associated with events in event_wait_list and command_queue must be the same. The memory associated with event_wait_list can be reused or freed after the function returns. event Returns an event object that identifies this particular write command and can be used to query or queue a wait for this particular command to complete. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. Notes Calling clEnqueueWriteBuffer to update the latest bits in a region of the buffer object with the ptr argument value set to host_ptr + offset, where host_ptr is a pointer to the memory region specified when the buffer object being written is created with CL_MEM_USE_HOST_PTR, must meet the following requirements in order to avoid undefined behavior: The host memory region given by (host_ptr + offset, cb) contains the latest bits when the enqueued write command begins execution. The buffer object or memory objects created from this buffer object are not mapped. The buffer object or memory objects created from this buffer object are not used by any command-queue until the read command has finished execution. Errors clEnqueueWriteBuffer returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_CONTEXT if the context associated with command_queue and buffer are not the same or if the context associated with command_queue and events in event_wait_list are not the same. CL_INVALID_MEM_OBJECT if buffer is not a valid buffer object. CL_INVALID_VALUE if the region being written specified by (offset, size) is out of bounds or if ptr is a NULL value or if size is 0. CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list greater than 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_MISALIGNED_SUB_BUFFER_OFFSET if buffer is a sub-buffer object and offset specified when the sub-buffer object is created is not aligned to CL_DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue. CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the read and write operations are blocking and the execution status of any of the events in event_wait_list is a negative integer value. CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer. CL_INVALID_OPERATION if clEnqueueWriteBuffer is called on buffer which has been created with CL_MEM_HOST_READ_ONLY or CL_MEM_HOST_NO_ACCESS. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clEnqueueCopyBuffer, clEnqueueReadBuffer, clEnqueueReadBufferRect, clEnqueueWriteBufferRect khronos-opencl-man-1.0~svn27110/clGetMemObjectInfo.xml0000644000175000017500000006065011660441607022454 0ustar mathieumathieu clGetMemObjectInfo clGetMemObjectInfo 2007-2011 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. 3 clGetMemObjectInfo Get information that is common to all memory objects (buffer and image objects). cl_int clGetMemObjectInfo cl_mem memobj cl_mem_info param_name size_t param_value_size void *param_value size_t *param_value_size_ret Parameters memobj Specifies the memory object being queried. param_name Specifies the information to query. The list of supported param_name types and the information returned in param_value by clGetMemObjectInfo is described in the table below. cl_mem_info Return Type Info. returned in param_value CL_MEM_TYPE cl_mem_object_type Returns one of the following values: CL_MEM_OBJECT_BUFFER if memobj is created with clCreateBuffer or clCreateSubBuffer. cl_image_desc.image_type argument value if memobj is created with clCreateImage. CL_MEM_FLAGS cl_mem_flags Returns the flags argument value specified when memobj is created with clCreateBuffer, clCreateSubBuffer, or clCreateImage. If memobj is a sub-buffer the memory access qualifiers inherited from parent buffer is also returned CL_MEM_SIZE size_t Return actual size of the data store associated with memobj in bytes. CL_MEM_HOST_PTR void * If memobj is created with clCreateBuffer or clCreateImage and CL_MEM_USE_HOST_PTR is specified in mem_flags, return the host_ptr argument value specified when memobj is created. Otherwise a NULL value is returned. If memobj is created with clCreateSubBuffer, return the host_ptr + origin value specified when memobj is created. host_ptr is the argument value specified to clCreateBuffer and CL_MEM_USE_HOST_PTR is specified in mem_flags for memory object from which memobj is created. Otherwise a NULL value is returned. CL_MEM_MAP_COUNT cl_uint Map count. The map count returned should be considered immediately stale. It is unsuitable for general use in applications. This feature is provided for debugging. CL_MEM_REFERENCE_COUNT cl_uint Return memobj reference count. The reference count returned should be considered immediately stale. It is unsuitable for general use in applications. This feature is provided for identifying memory leaks. CL_MEM_CONTEXT cl_context Return context specified when memory object is created. If memobj is created using clCreateSubBuffer, the context associated with the memory object specified as the buffer argument to clCreateSubBuffer is returned. CL_MEM_ASSOCIATED_- MEMOBJECT cl_mem Return memory object from which memobj is created. This returns the memory object specified as buffer argument to clCreateSubBuffer. Otherwise a NULL value is returned. CL_MEM_OFFSET size_t Return offset if memobj is a sub-buffer object created using clCreateSubBuffer. This returns 0 if memobj is not a subbuffer object. CL_MEM_D3D10_RESOURCE_KHR ID3D10Resource * The property being queried (if the cl_khr_d3d10_sharing extension is enabled). If memobj was created using clCreateFromD3D10BufferKHR, clCreateFromD3D10Texture2DKHR, or clCreateFromD3D10Texture3DKHR, returns the resource argument specified when memobj was created. CL_MEM_DX9_MEDIA_- ADAPTER_TYPE_KHR cl_dx9_media_- adapter_type_khr Returns the cl_dx9_media_adapter_type_khr argument value specified when memobj is created using clCreateFromDX9MediaSurfaceKHR (If the cl_khr_dx9_media_sharing extension is supported) CL_MEM_DX9_MEDIA_- SURFACE_INFO_KHR cl_dx9_- surface_info_khr Returns the cl_dx9_surface_info_khr argument value specified when memobj is created using clCreateFromDX9MediaSurfaceKHR (If the cl_khr_dx9_media_sharing extension is supported) CL_MEM_D3D11_RESOURCE_KHR ID3D11Resource * If the cl_khr_d3d11_sharing extension is supported, If memobj was created using clCreateFromD3D11BufferKHR, clCreateFromD3D11Texture2DKHR, or clCreateFromD3D11Texture3DKHR, returns the resource argument specified when memobj was created. param_value A pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored. param_value_size Used to specify the size in bytes of memory pointed to by param_value. This size must be ≥ size of return type as described in the table above. param_value_size_ret Returns the actual size in bytes of data being queried by param_value. If param_value_size_ret is NULL, it is ignored. Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_VALUE if param_name is not valid, or if size in bytes specified by param_value_size is < the size of return type as described in the table above and param_value is not NULL. CL_INVALID_MEM_OBJECT if memobj is a not a valid memory object. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. CL_INVALID_D3D10_RESOURCE_KHR If the cl_khr_d3d10_sharing extension is enabled and if param_name is CL_MEM_D3D10_RESOURCE_KHR and memobj was not created by the function clCreateFromD3D10BufferKHR, clCreateFromD3D10Texture2DKHR, or clCreateFromD3D10Texture3DKHR. CL_INVALID_DX9_MEDIA_SURFACE_KHR if param_name is CL_MEM_DX9_MEDIA_SURFACE_INFO_KHR and memobj was not created by the function clCreateFromDX9MediaSurfaceKHR from a Direct3D9 surface. (If the cl_khr_dx9_media_sharing extension is supported) CL_INVALID_D3D11_RESOURCE_KHR If the cl_khr_d3d11_sharing extension is supported, if param_name is CL_MEM_D3D11_RESOURCE_KHR and memobj was not created by the function clCreateFromD3D11BufferKHR, clCreateFromD3D11Texture2DKHR, or clCreateFromD3D11Texture3DKHR." Specification OpenCL Specification Also see clGetImageInfo khronos-opencl-man-1.0~svn27110/clBuildProgram.xml0000644000175000017500000003355211660441607021723 0ustar mathieumathieu ]> clBuildProgram clBuildProgram 2007-2011 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. 3 clBuildProgram Builds (compiles and links) a program executable from the program source or binary. cl_int clBuildProgram cl_programprogram cl_uintnum_devices const cl_device_id*device_list const char*options void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data) void*user_data Parameters program The program object. device_list A pointer to a list of devices associated with program. If device_list is NULL value, the program executable is built for all devices associated with program for which a source or binary has been loaded. If device_list is a non-NULL value, the program executable is built for devices specified in this list for which a source or binary has been loaded. num_devices The number of devices listed in device_list. options A pointer to a null-terminated string of characters that describes the build options to be used for building the program executable. The list of supported options is described below. pfn_notify A function pointer to a notification routine. The notification routine is a callback function that an application can register and which will be called when the program executable has been built (successfully or unsuccessfully). If pfn_notify is not NULL, clBuildProgram does not need to wait for the build to complete and can return immediately once the build operation can begin. The build operation can begin if the context, program whose sources are being compiled and linked, list of devices and build options specified are all valid and appropriate host and device resources needed to perform the build are available. If pfn_notify is NULL, clBuildProgram does not return until the build has completed. This callback function may be called asynchronously by the OpenCL implementation. It is the application’s responsibility to ensure that the callback function is thread-safe. user_data Passed as an argument when pfn_notify is called. user_data can be NULL. Notes Builds (compiles & links) a program executable from the program source or binary for all the devices or a specific device(s) in the OpenCL context associated with program. OpenCL allows program executables to be built using the source or the binary. clBuildProgram must be called for program created using either clCreateProgramWithSource or clCreateProgramWithBinary to build the program executable for one or more devices associated with program. If program is created with clCreateProgramWithBinary, then the program binary must be an executable binary (not a compiled binary or library). The executable binary can be queried using clGetProgramInfo(program, CL_PROGRAM_BINARIES, ...) and can be specified to clCreateProgramWithBinary to create a new program object. &buildOptionsInc; Errors clBuildProgram returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_PROGRAM if program is not a valid program object. CL_INVALID_VALUE if device_list is NULL and num_devices is greater than zero, or if device_list is not NULL and num_devices is zero. CL_INVALID_VALUE if pfn_notify is NULL but user_data is not NULL. CL_INVALID_DEVICE if OpenCL devices listed in device_list are not in the list of devices associated with program. CL_INVALID_BINARY if program is created with clCreateProgramWithBinary and devices listed in device_list do not have a valid program binary loaded. CL_INVALID_BUILD_OPTIONS if the build options specified by options are invalid. CL_INVALID_OPERATION if the build of a program executable for any of the devices listed in device_list by a previous call to clBuildProgram for program has not completed. CL_COMPILER_NOT_AVAILABLE if program is created with clCreateProgramWithSource and a compiler is not available i.e. CL_DEVICE_COMPILER_AVAILABLE specified in the table of OpenCL Device Queries for clGetDeviceInfo is set to CL_FALSE. CL_BUILD_PROGRAM_FAILURE if there is a failure to build the program executable. This error will be returned if clBuildProgram does not return until the build has completed. CL_INVALID_OPERATION if there are kernel objects attached to program. CL_INVALID_OPERATION if program was not created with clCreateProgramWithSource or clCreateProgramWithBinary. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clGetDeviceInfo khronos-opencl-man-1.0~svn27110/sharingD3D11Inc.xml0000644000175000017500000001001711660441607021526 0ustar mathieumathieu General information about sharing memory objects with Direct3D 11 follows. The goal of this extension is to provide interoperability between OpenCL and Direct3D 11. This is designed to function analogously to the OpenGL interoperability. If this extension is supported by an implementation, the string cl_khr_d3d11_sharing will be present in the CL_PLATFORM_EXTENSIONS or CL_DEVICE_EXTENSIONS string described in the table of allowed values for param_name for clGetDeviceInfo. As currently proposed the interfaces for this extension would be provided in cl_d3d11.h. This section discusses OpenCL functions that allow applications to use Direct3D 11 resources as OpenCL memory objects. This allows efficient sharing of data between OpenCL and Direct3D 11. The OpenCL API may be used to execute kernels that read and/or write memory objects that are also Direct3D 11 resources. An OpenCL image object may be created from a Direct3D 11 texture resource. An OpenCL buffer object may be created from a Direct3D 11 buffer resource. OpenCL memory objects may be created from Direct3D 11 objects if and only if the OpenCL context has been created from a Direct3D 11 device. An OpenCL memory object created from a Direct3D 11 resource remains valid as long as the corresponding Direct3D 11 resource has not been deleted. If the Direct3D 11 resource is deleted through the Direct3D 11 API, subsequent use of the OpenCL memory object will result in undefined behavior, including but not limited to possible OpenCL errors, data corruption, and program termination. The successful creation of a cl_context against a Direct3D 11 device specified via the context create parameter CL_CONTEXT_D3D11_DEVICE_KHR will increment the internal Direct3D reference count on the specified Direct3D 11 device. The internal Direct3D reference count on that Direct3D 11 device will be decremented when the OpenCL reference count on the returned OpenCL context drops to zero. The OpenCL context and corresponding command-queues are dependent on the existence of the Direct3D 11 device from which the OpenCL context was created. If the Direct3D 11 device is deleted through the Direct3D 11 API, subsequent use of the OpenCL context will result in undefined behavior, including but not limited to possible OpenCL errors, data corruption, and program termination. Properties of Direct3D 11 objects may be queried using clGetMemObjectInfo and clGetImageInfo with param_name CL_MEM_D3D11_RESOURCE_KHR and CL_IMAGE_D3D11_SUBRESOURCE_KHR as described for clGetImageInfo and in the information below about accessing mapped regions of a memory object. khronos-opencl-man-1.0~svn27110/vectorDataLoadandStoreFunctions.xml0000644000175000017500000001127611660441607025301 0ustar mathieumathieu ]> Vector Data Load and Store Functions Vector Data Load and Store Functions 2007-2011 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. 3 Vector Data Load and Store Functions Click an item in the table below for details about that function. vloadn Read vectors from a pointer to memory. vstoren Write a vector to a pointer to memory. vload_half Read a half float from a pointer to memory. vload_halfn Read a half float vector from a pointer to memory. vstore_half Convert float to half and write to a pointer to memory. vstore_halfn Convert float vector to half vector and write to a pointer to memory. vloada_halfn Read half float vector from a pointer to memory. vstorea_halfn Convert float vector to half vector and write to a pointer to memory. Specification OpenCL Specification khronos-opencl-man-1.0~svn27110/clCreateKernel.xml0000644000175000017500000002131511660441607021672 0ustar mathieumathieu clCreateKernel clCreateKernel 2007-2011 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. 3 clCreateKernel Creates a kernel object. cl_kernel clCreateKernel cl_program program const char*kernel_name cl_int*errcode_ret Parameters program A program object with a successfully built executable. kernel_name A function name in the program declared with the __kernel qualifier errcode_ret Returns an appropriate error code. If errcode_ret is NULL, no error code is returned. Notes A kernel is a function declared in a program. A kernel is identified by the __kernel qualifier applied to any function in a program. A kernel object encapsulates the specific __kernel function declared in a program and the argument values to be used when executing this __kernel function. Errors clCreateKernel returns a valid non-zero kernel object and errcode_ret is set to CL_SUCCESS if the kernel object is created successfully. Otherwise, it returns a NULL value with one of the following error values returned in errcode_ret: CL_INVALID_PROGRAM if program is not a valid program object. CL_INVALID_PROGRAM_EXECUTABLE if there is no successfully built executable for program. CL_INVALID_KERNEL_NAME if kernel_name is not found in program. CL_INVALID_KERNEL_DEFINITION if the function definition for __kernel function given by kernel_name such as the number of arguments, the argument types are not the same for all devices for which the program executable has been built. CL_INVALID_VALUE if kernel_name is NULL. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clCreateKernelsInProgram, clRetainKernel, clReleaseKernel, clSetKernelArg, clGetKernelInfo, clGetKernelWorkGroupInfo, Cardinality Diagram khronos-opencl-man-1.0~svn27110/log.xml0000644000175000017500000002266011660441607017574 0ustar mathieumathieu ]> log, log2, log10, log1p, logb log, log2, log10, log1p, logb 2007-2011 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. 3 log, log2, log10, log1p, logb Logarithm functions. gentype log gentype gentype log2 gentype gentype log10 gentype gentype log1p gentypex gentype logb gentypex gentype half_log gentypex gentype half_log2 gentypex gentype half_log10 gentypex gentype native_log gentypex gentype native_log2 gentypex gentype native_log10 gentypex Description log computes natural logarithm. log2 computes a base 2 logarithm. log10 computes a base 10 logarithm. log1p computes loge(1.0 + x). logb computes the exponent of x, which is the integral part of logr |x|. half_log computes natural logarithm. half_log2 computes a base 2 logarithm. half_log10 computes a base 10 logarithm. native_log computes natural logarithm over an implementation-defined range. The maximum error is implementation-defined. native_log2 computes a base 2 logarithm over an implementation-defined range. The maximum error is implementation-defined. native_log10 computes a base 10 logarithm over an implementation-defined range. The maximum error is implementation-defined. Notes &mathFunctionsInc; Functions with the half_ prefix are implemented with a minimum of 10-bits of accuracy i.e. an ULP value less than or equal to 8192 ulp. Functions with the native__ prefix may map to one or more native device instructions and will typically have better performance compared to the corresponding functions (without the native__ prefix). The accuracy (and in some cases the input range(s)) of these functions is implementation-defined. Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/vectorDataTypes.xml0000644000175000017500000003021511660441607022127 0ustar mathieumathieu Vector Data Types Vector Data Types 2007-2020 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. 3 Vector Data Types Built-in vector data types. Description The char, unsigned char, short, unsigned short, integer, unsigned integer, long, unsigned long, and float vector data types are supported. The vector data type is defined with the type name i.e. char, uchar, short, ushort, int, uint, float, long, or ulong followed by a literal value n that defines the number of elements in the vector. Supported values of n are 2, 3, 4, 8, and 16 for all vector data types. The built-in vector data types are also declared as appropriate types in the OpenCL API (and header files) that can be used by an application. The following table describes the built-in vector data type in the OpenCL C programming language and the corresponding data type available to the application: Type in OpenCL Language Description API type for application charn A vector of n 8-bit signed two's complement integer values. cl_charn ucharn A vector of n 8-bit unsigned integer values. cl_ucharn shortn A vector of n 16-bit signed two's complement integer values. cl_shortn ushortn A vector of n 16-bit unsigned integer values. cl_ushortn intn A vector of n 32-bit signed two's complement integer values. cl_intn uintn A vector of n 32-bit unsigned integer values. cl_uintn longn A vector of n 64-bit signed two's complement integer values. cl_longn ulongn A vector of n 64-bit unsigned integer values. cl_ulongn floatn A vector of n 32-bit floating-point values. cl_floatn doublen A vector of n 64-bit floating-point values. cl_doublen Notes Built-in vector data types are supported by the OpenCL implementation even if the underlying compute device does not support any or all of the vector data types. These are to be converted by the device compiler to appropriate instructions that use underlying built-in types supported natively by the compute device. The double vector type is an optional type that is supported if CL_DEVICE_DOUBLE_FP_CONFIG for a device is not zero. See clGetDeviceInfo. Optional Half Floating Point The half floating-point is supported as an optional extension. An application that wants to use half and halfn will need to include the #pragma OPENCL EXTENSION cl_khr_fp16 : enable directive. This will extended the list of built-in vector and scalar data types to include the following: Type in OpenCL Language Description API type for application half2 A 2-component half-precision floating-point vector. cl_half2 half3 A 3-component half-precision floating-point vector. cl_half3 half4 A 4-component half-precision floating-point vector. cl_half4 half8 An 8-component half-precision floating-point vector. cl_half8 half16 A 16-component half-precision floating-point vector. cl_half16 The relational, equality, logical and logical unary operators can be used with half scalar and halfn vector types and shall produce a scalar int and vector shortn result respectively. The OpenCL compiler accepts an h and H suffix on floating point literals, indicating the literal is typed as a half. Specification OpenCL Specification Also see Scalar Data Types, Reserved Data Types, Other Data Types, Abstract Data Types, Enumerated Data Types, cl_khr_fp16, cl_khr_fp64 khronos-opencl-man-1.0~svn27110/geometricFunctions.xml0000644000175000017500000001041511660441607022655 0ustar mathieumathieu ]> Geometric Built-In Functions Geometric Built-In Functions 2007-2011 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. 3 Geometric Built-In Functions Click an item in the table below for details about that function. cross Cross product dot Dot product distance Vector distance length Vector length normalize Normal vector length 1 fast_distance Vector distance fast_length Vector length fast_normalize Normal vector length 1 Specification OpenCL Specification khronos-opencl-man-1.0~svn27110/atomic_xor.xml0000644000175000017500000001622411660441607021156 0ustar mathieumathieu atomic_xor atomic_xor 2007-2011 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. 3 atomic_xor atomic_xor functions. int atomic_xor volatile __global int*p intval unsigned int atomic_xor volatile __global unsigned int*p unsigned intval int atomic_xor volatile __local int*p intval unsigned int atomic_xor volatile __local unsigned int*p unsigned intval Description Read the 32-bit value (referred to as old) stored at location pointed by p. Compute (old ^ val) and store result at location pointed by p. The function returns old. A 64-bit version of this function, atom_xor, is enabled by cl_khr_int64_extended_atomics. Specification OpenCL Specification Also see Atomic Functions, atom_xor khronos-opencl-man-1.0~svn27110/integerMax.xml0000644000175000017500000001273711660441607021122 0ustar mathieumathieu ]> max, min max, min (integer) 2007-2011 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. 3 max, min Returns the greater or lesser of x or y. gentype max gentypex gentypey gentype max gentypex sgentypey gentype min gentypex gentypey gentype min gentypex sgentypey Description max returns the greater of x or y. min returns the lesser of x or y. Notes &integerFunctionsInc; Specification OpenCL Specification Also see Integer Functions khronos-opencl-man-1.0~svn27110/abstractDataTypes.xml0000644000175000017500000001257011660441607022434 0ustar mathieumathieu Abstract Data Types Abstract Built-in Data Types 2007-2011 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. 3 Abstract Data Types Abstract Built-in Data Types Description The following table describes abstract data types supported by OpenCL: Type Description API Type _cl_platform_id * The ID for a platform. cl_platform_id _cl_device_id * The ID for a device. cl_device_id _cl_context * A context. cl_context _cl_command_queue * A command queue. cl_command_queue _cl_mem * A memory object. cl_mem _cl_program * A program. cl_program _cl_kernel * A kernel. cl_kernel _cl_event * An event. Also see event_t. cl_event _cl_sampler * A sampler. Also see sampler_t. cl_sampler Also see Macros and Limits, Scalar Data Types, Vector Data Types, Other Data Types, Reserved Data Types khronos-opencl-man-1.0~svn27110/clEnqueueMapImage.xml0000644000175000017500000007030611660441607022342 0ustar mathieumathieu clEnqueueMapImage clEnqueueMapImage 2007-2011 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. 3 clEnqueueMapImage Enqueues a command to map a region of an image object into the host address space and returns a pointer to this mapped region. void * clEnqueueMapImage cl_command_queue command_queue cl_mem image cl_bool blocking_map cl_map_flags map_flags const size_t * origin const size_t * region size_t *image_row_pitch size_t *image_slice_pitch cl_uint num_events_in_wait_list const cl_event *event_wait_list cl_event *event cl_int *errcode_ret Parameters command_queue Must be a valid command-queue. image A valid image object. The OpenCL context associated with command_queue and image must be the same. blocking_map Indicates if the map operation is blocking or non-blocking. If blocking_map is CL_TRUE, clEnqueueMapImage does not return until the specified region in image is mapped into the host address space and the application can access the contents of the mapped region using the pointer returned by clEnqueueMapImage. If blocking_map is CL_FALSE i.e. map operation is non-blocking, the pointer to the mapped region returned by clEnqueueMapImage cannot be used until the map command has completed. The event argument returns an event object which can be used to query the execution status of the map command. When the map command is completed, the application can access the contents of the mapped region using the pointer returned by clEnqueueMapImage. map_flags A bit-bield with the following supported values. cl_map_flags Description CL_MAP_READ This flag specifies that the region being mapped in the memory object is being mapped for reading. The pointer returned by clEnqueueMapBuffer or clEnqueueMapImage is guaranteed to contain the latest bits in the region being mapped when the clEnqueueMapBuffer or clEnqueueMapImage command has completed CL_MAP_WRITE This flag specifies that the region being mapped in the memory object is being mapped for writing. The pointer returned by clEnqueueMapBuffer or clEnqueueMapImage is guaranteed to contain the latest bits in the region being mapped when the clEnqueueMapBuffer or clEnqueueMapImage command has completed. CL_MAP_WRITE_INVALIDATE_REGION This flag specifies that the region being mapped in the memory object is being mapped for writing. The contents of the region being mapped are to be discarded. This is typically the case when the region being mapped is overwritten by the host. This flag allows the implementation to no longer guarantee that the pointer returned by clEnqueueMapBuffer or clEnqueueMapImage contains the latest bits in the region being mapped which can be a significant performance enhancement. CL_MAP_READ or CL_MAP_WRITE and CL_MAP_WRITE_INVALIDATE_REGION are mutually exclusive. origin Defines the (x, y, z) offset in pixels in the 1D, 2D or 3D image, the (x, y) offset and the image index in the 2D image array or the (x) offset and the image index in the 1D image array. If image is a 2D image object, origin[2] must be 0. If image is a 1D image or 1D image buffer object, origin[1] and origin[2] must be 0. If image is a 1D image array object, origin[2] must be 0. If image is a 1D image array object, origin[1] describes the image index in the 1D image array. If image is a 2D image array object, origin[2] describes the image index in the 2D image array. region Defines the (width, height, depth) in pixels of the 1D, 2D or 3D rectangle, the (width, height) in pixels of the 2D rectangle and the number of images of a 2D image array or the (width) in pixels of the 1D rectangle and the number of images of a 1D image array. If image is a 2D image object, region[2] must be 1. If image is a 1D image or 1D image buffer object, region[1] and region[2] must be 1. If image is a 1D image array object, region[2] must be 1. image_row_pitch Returns the scan-line pitch in bytes for the mapped region. This must be a non-NULL value. image_slice_pitch Returns the size in bytes of each 2D slice of a 3D image or the size of each 1D or 2D image in a 1D or 2D image array for the mapped region. For a 1D and 2D image, zero is returned if this argument is not NULL. For a 3D image, 1D, and 2D image array, image_slice_pitch must be a non-NULL value. event_wait_list , num_events_in_wait_list Specify events that need to complete before clEnqueueMapImage can be executed. If event_wait_list is NULL, then clEnqueueMapImage does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event_wait_list act as synchronization points. The context associated with events in event_wait_list and command_queue must be the same. The memory associated with event_wait_list can be reused or freed after the function returns. event Returns an event object that identifies this particular copy command and can be used to query or queue a wait for this particular command to complete. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the event_wait_list array. errcode_ret Returns an appropriate error code. If errcode_ret is NULL, no error code is returned. Notes The pointer returned maps a 1D, 2D or 3D region starting at origin and is at least region[0] pixels in size for a 1D image, 1D image buffer or 1D image array, (image_row_pitch * region[1]) pixels in size for a 2D image or 2D image array, and (image_slice_pitch * region[2]) pixels in size for a 3D image. The result of a memory access outside this region is undefined. If the image object is created with CL_MEM_USE_HOST_PTR set in mem_flags, the following will be true: The host_ptr specified in clCreateImage is guaranteed to contain the latest bits in the region being mapped when the clEnqueueMapImage command has completed. The pointer value returned by clEnqueueMapImage will be derived from the host_ptr specified when the image object is created. Mapped image objects are unmapped using clEnqueueUnmapMemObject. clEnqueueMapBuffer and clEnqueueMapImage increment the mapped count of the memory object. The initial mapped count value of a memory object is zero. Multiple calls to clEnqueueMapBuffer or clEnqueueMapImage on the same memory object will increment this mapped count by appropriate number of calls. clEnqueueUnmapMemObject decrements the mapped count of the memory object. clEnqueueMapBuffer and clEnqueueMapImage act as synchronization points for a region of the buffer object being mapped. Errors clEnqueueMapImage will return a pointer to the mapped region if the function is executed successfully. The errcode_ret is set to CL_SUCCESS. A NULL pointer is returned otherwise with one of the following error values returned in errcode_ret: CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_CONTEXT if the context associated with command_queue and image are not the same or if the context associated with command_queue and events in event_wait_list are not the same. CL_INVALID_MEM_OBJECT if image is not a valid image object. CL_INVALID_VALUE if region being mapped given by (origin, origin+region) is out of bounds or if values specified in map_flags are not valid. CL_INVALID_VALUE if values in origin and region do not follow rules described in the argument description for origin and region. CL_INVALID_VALUE if image_row_pitch is NULL. CL_INVALID_VALUE if image is a 3D image, 1D or 2D image array object and image_slice_pitch is NULL. CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_INVALID_IMAGE_SIZE if image dimensions (image width, height, specified or compute row and/or slice pitch) for image are not supported by device associated with queue. CL_INVALID_IMAGE_FORMAT if image format (image channel order and data type) for image are not supported by device associated with queue. CL_MAP_FAILURE if there is a failure to map the requested region into the host address space. This error cannot occur for image objects created with CL_MEM_USE_HOST_PTR or CL_MEM_ALLOC_HOST_PTR. CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the map operation is blocking and the execution status of any of the events in event_wait_list is a negative integer value. CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer. CL_INVALID_OPERATION if the device associated with command_queue does not support images (i.e. CL_DEVICE_IMAGE_SUPPORT specified in the table of OpenCL Device Queries for clGetDeviceInfo is CL_FALSE. CL_INVALID_OPERATION if image has been created with CL_MEM_HOST_WRITE_ONLY or CL_MEM_HOST_NO_ACCESS and CL_MAP_READ is set in map_flags or if image has been created with CL_MEM_HOST_READ_ONLY or CL_MEM_HOST_NO_ACCESS and CL_MAP_WRITE or CL_MAP_WRITE_INVALIDATE_REGION is set in map_flags. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clEnqueueMapBuffer, clEnqueueUnmapMemObject khronos-opencl-man-1.0~svn27110/enums.xml0000644000175000017500000007354311660441607020150 0ustar mathieumathieu Enumerated Types Enumerated Types 2007-2011 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. 3 Enumerated Types Following are the enumerated types and their permitted values. Enumerated Type Permitted Values cl_addressing_mode CL_ADDRESS_NONE CL_ADDRESS_CLAMP_TO_EDGE CL_ADDRESS_CLAMP CL_ADDRESS_REPEAT CL_ADDRESS_MIRRORED_REPEAT cl_bool CL_FALSE CL_TRUE CL_BLOCKING = CL_TRUE CL_NON_BLOCKING = CL_FALSE Note: Unlike cl_ types in cl_platform.h, cl_bool is not guaranteed to be the same size as the bool in kernels. cl_buffer_create_type CL_BUFFER_CREATE_TYPE_REGION cl_build_status CL_BUILD_SUCCESS CL_BUILD_NONE CL_BUILD_ERROR CL_BUILD_IN_PROGRESS cl_channel_order CL_A CL_R CL_RG CL_RA CL_RGB CL_RGBA CL_BGRA CL_ARGB CL_INTENSITY CL_LUMINANCE CL_Rx CL_RGx CL_RGBx cl_channel_type CL_SNORM_INT8 CL_SNORM_INT16 CL_UNORM_INT8 CL_UNORM_INT16 CL_UNORM_SHORT_565 CL_UNORM_SHORT_555 CL_UNORM_INT_101010 CL_SIGNED_INT8 CL_SIGNED_INT16 CL_SIGNED_INT32 CL_UNSIGNED_INT8 CL_UNSIGNED_INT16 CL_UNSIGNED_INT32 CL_HALF_FLOAT CL_FLOAT cl_command_queue_info CL_QUEUE_CONTEXT CL_QUEUE_DEVICE CL_QUEUE_REFERENCE_COUNT CL_QUEUE_PROPERTIES cl_command_queue_properties CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE CL_QUEUE_PROFILING_ENABLE cl_command_type CL_COMMAND_NDRANGE_KERNEL CL_COMMAND_TASK CL_COMMAND_NATIVE_KERNEL CL_COMMAND_READ_BUFFER CL_COMMAND_WRITE_BUFFER CL_COMMAND_COPY_BUFFER CL_COMMAND_READ_IMAGE CL_COMMAND_WRITE_IMAGE CL_COMMAND_COPY_IMAGE CL_COMMAND_COPY_IMAGE_TO_BUFFER CL_COMMAND_COPY_BUFFER_TO_IMAGE CL_COMMAND_MAP_BUFFER CL_COMMAND_MAP_IMAGE CL_COMMAND_UNMAP_MEM_OBJECT CL_COMMAND_MARKER CL_COMMAND_ACQUIRE_GL_OBJECTS CL_COMMAND_RELEASE_GL_OBJECTS CL_COMMAND_READ_BUFFER_RECT CL_COMMAND_WRITE_BUFFER_RECT CL_COMMAND_COPY_BUFFER_RECT CL_COMMAND_USER CL_COMMAND_BARRIER CL_COMMAND_MIGRATE_MEM_OBJECTS CL_COMMAND_FILL_BUFFER CL_COMMAND_FILL_IMAGE CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR CL_COMMAND_ACQUIRE_D3D11_OBJECTS_KHR CL_COMMAND_RELEASE_D3D11_OBJECTS_KHR CL_COMMAND_ACQUIRE_DX9_MEDIA_SURFACES_KHR CL_COMMAND_RELEASE_DX9_MEDIA_SURFACES_KHR cl_context_info CL_CONTEXT_REFERENCE_COUNT CL_CONTEXT_DEVICES CL_CONTEXT_PROPERTIES CL_CONTEXT_NUM_DEVICES CL_CONTEXT_D3D10_DEVICE_KHR CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR CL_CONTEXT_D3D11_DEVICE_KHR CL_CONTEXT_D3D11_PREFER_SHARED_RESOURCES_KHR CL_CONTEXT_D3D9_DEVICE_KHR CL_CONTEXT_D3D9EX_DEVICE_KHR CL_CONTEXT_DXVA_DEVICE_KHR CL_GL_CONTEXT_KHR CL_EGL_DISPLAY_KHR CL_GLX_DISPLAY_KHR CL_WGL_HDC_KHR CL_CGL_SHAREGROUP_KHR cl_context_properties CL_CONTEXT_PLATFORM CL_CONTEXT_INTEROP_USER_SYNC CL_GL_CONTEXT_KHR CL_EGL_DISPLAY_KHR CL_GLX_DISPLAY_KHR CL_WGL_HDC_KHR CL_CGL_SHAREGROUP_KHR cl_d3d10_device_set_khr // cl_d3d10_device_set_nv CL_PREFERRED_DEVICES_FOR_D3D10_KHR CL_ALL_DEVICES_FOR_D3D10_KHR cl_d3d10_device_source_khr // cl_d3d10_device_source_nv CL_D3D10_DEVICE_KHR CL_D3D10_DXGI_ADAPTER_KHR cl_d3d11_device_set_khr CL_PREFERRED_DEVICES_FOR_D3D10_KHR CL_ALL_DEVICES_FOR_D3D10_KHR cl_d3d11_device_source_khr CL_D3D11_DEVICE_KHR CL_D3D11_DXGI_ADAPTER_KHR cl_device_affinity_domain CL_DEVICE_AFFINITY_DOMAIN_NUMA CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE cl_device_exec_capabilities CL_EXEC_KERNEL CL_EXEC_NATIVE_KERNEL cl_device_fp_config CL_FP_DENORM CL_FP_INF_NAN CL_FP_ROUND_TO_NEAREST CL_FP_ROUND_TO_ZERO CL_FP_ROUND_TO_INF CL_FP_FMA CL_FP_SOFT_FLOAT CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT cl_device_info CL_DEVICE_TYPE CL_DEVICE_VENDOR_ID CL_DEVICE_MAX_COMPUTE_UNITS CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS CL_DEVICE_MAX_WORK_GROUP_SIZE CL_DEVICE_MAX_WORK_ITEM_SIZES CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE CL_DEVICE_MAX_CLOCK_FREQUENCY CL_DEVICE_ADDRESS_BITS CL_DEVICE_MAX_READ_IMAGE_ARGS CL_DEVICE_MAX_WRITE_IMAGE_ARGS CL_DEVICE_MAX_MEM_ALLOC_SIZE CL_DEVICE_IMAGE2D_MAX_WIDTH CL_DEVICE_IMAGE2D_MAX_HEIGHT CL_DEVICE_IMAGE3D_MAX_WIDTH CL_DEVICE_IMAGE3D_MAX_HEIGHT CL_DEVICE_IMAGE3D_MAX_DEPTH CL_DEVICE_IMAGE_SUPPORT CL_DEVICE_MAX_PARAMETER_SIZE CL_DEVICE_MAX_SAMPLERS CL_DEVICE_MEM_BASE_ADDR_ALIGN CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE CL_DEVICE_SINGLE_FP_CONFIG CL_DEVICE_GLOBAL_MEM_CACHE_TYPE CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE CL_DEVICE_GLOBAL_MEM_CACHE_SIZE CL_DEVICE_GLOBAL_MEM_SIZE CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE CL_DEVICE_MAX_CONSTANT_ARGS CL_DEVICE_LOCAL_MEM_TYPE CL_DEVICE_LOCAL_MEM_SIZE CL_DEVICE_ERROR_CORRECTION_SUPPORT CL_DEVICE_PROFILING_TIMER_RESOLUTION CL_DEVICE_ENDIAN_LITTLE CL_DEVICE_AVAILABLE CL_DEVICE_COMPILER_AVAILABLE CL_DEVICE_EXECUTION_CAPABILITIES CL_DEVICE_QUEUE_PROPERTIES CL_DEVICE_NAME CL_DEVICE_VENDOR CL_DRIVER_VERSION CL_DEVICE_PROFILE CL_DEVICE_VERSION CL_DEVICE_EXTENSIONS CL_DEVICE_PLATFORM CL_DEVICE_DOUBLE_FP_CONFIG CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF CL_DEVICE_HOST_UNIFIED_MEMORY CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT CL_DEVICE_NATIVE_VECTOR_WIDTH_INT CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF CL_DEVICE_OPENCL_C_VERSION CL_DEVICE_LINKER_AVAILABLE CL_DEVICE_BUILT_IN_KERNELS CL_DEVICE_IMAGE_MAX_BUFFER_SIZE CL_DEVICE_IMAGE_MAX_ARRAY_SIZE CL_DEVICE_PARENT_DEVICE CL_DEVICE_PARTITION_MAX_SUB_DEVICES CL_DEVICE_PARTITION_PROPERTIES CL_DEVICE_PARTITION_AFFINITY_DOMAIN CL_DEVICE_PARTITION_TYPE CL_DEVICE_REFERENCE_COUNT CL_DEVICE_PREFERRED_INTEROP_USER_SYNC CL_DEVICE_PRINTF_BUFFER_SIZE cl_device_local_mem_type CL_GLOBAL CL_LOCAL CL_NONE cl_device_mem_cache_type CL_NONE CL_READ_ONLY_CACHE CL_READ_WRITE_CACHE cl_device_partition_property CL_DEVICE_PARTITION_EQUALLY CL_DEVICE_PARTITION_BY_COUNTS CL_DEVICE_PARTITION_BY_COUNTS_LIST_END CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN 0 cl_device_type CL_DEVICE_TYPE_DEFAULT CL_DEVICE_TYPE_CPU CL_DEVICE_TYPE_GPU CL_DEVICE_TYPE_ACCELERATOR CL_DEVICE_TYPE_CUSTOM CL_DEVICE_TYPE_ALL cl_event_info CL_EVENT_COMMAND_QUEUE CL_EVENT_COMMAND_TYPE CL_EVENT_REFERENCE_COUNT CL_EVENT_COMMAND_EXECUTION_STATUS CL_EVENT_CONTEXT cl_filter_mode CL_FILTER_NEAREST CL_FILTER_LINEAR cl_gl_context_info CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR CL_DEVICES_FOR_GL_CONTEXT_KHR cl_gl_object_type CL_GL_OBJECT_BUFFER CL_GL_OBJECT_TEXTURE2D CL_GL_OBJECT_TEXTURE3D CL_GL_OBJECT_RENDERBUFFER CL_GL_OBJECT_TEXTURE2D_ARRAY CL_GL_OBJECT_TEXTURE1D CL_GL_OBJECT_TEXTURE1D_ARRAY CL_GL_OBJECT_TEXTURE_BUFFER cl_gl_texture_info CL_GL_TEXTURE_TARGET CL_GL_MIPMAP_LEVEL cl_image_info CL_IMAGE_FORMAT CL_IMAGE_ELEMENT_SIZE CL_IMAGE_ROW_PITCH CL_IMAGE_SLICE_PITCH CL_IMAGE_WIDTH CL_IMAGE_HEIGHT CL_IMAGE_DEPTH CL_IMAGE_ARRAY_SIZE CL_IMAGE_BUFFER CL_IMAGE_NUM_MIP_LEVELS CL_IMAGE_NUM_SAMPLES CL_IMAGE_D3D10_SUBRESOURCE_KHR CL_IMAGE_D3D11_SUBRESOURCE_KHR CL_IMAGE_DX9_MEDIA_PLANE_KHR cl_kernel_arg_address_qualifier CL_KERNEL_ARG_ADDRESS_GLOBAL CL_KERNEL_ARG_ADDRESS_LOCAL CL_KERNEL_ARG_ADDRESS_CONSTANT CL_KERNEL_ARG_ADDRESS_PRIVATE cl_kernel_arg_access_qualifier CL_KERNEL_ARG_ACCESS_READ_ONLY CL_KERNEL_ARG_ACCESS_WRITE_ONLY CL_KERNEL_ARG_ACCESS_READ_WRITE CL_KERNEL_ARG_ACCESS_NONE cl_kernel_arg_info CL_KERNEL_ARG_ADDRESS_QUALIFIER CL_KERNEL_ARG_ACCESS_QUALIFIER CL_KERNEL_ARG_TYPE_NAME CL_KERNEL_ARG_NAME cl_kernel_info CL_KERNEL_FUNCTION_NAME CL_KERNEL_NUM_ARGS CL_KERNEL_REFERENCE_COUNT CL_KERNEL_CONTEXT CL_KERNEL_PROGRAM CL_KERNEL_ATTRIBUTES cl_kernel_work_group_info CL_KERNEL_WORK_GROUP_SIZE CL_KERNEL_COMPILE_WORK_GROUP_SIZE CL_KERNEL_LOCAL_MEM_SIZE CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE CL_KERNEL_PRIVATE_MEM_SIZE CL_KERNEL_GLOBAL_WORK_SIZE cl_map_flags CL_MAP_READ CL_MAP_WRITE CL_MAP_WRITE_INVALIDATE_REGION // cl_media_adapter_set_khr CL_PREFERRED_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR CL_ALL_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR // cl_media_adapter_type_khr CL_D3D9_DEVICE_KHR CL_D3D9EX_DEVICE_KHR CL_DXVA_DEVICE_KHR cl_mem_flags CL_MEM_READ_WRITE CL_MEM_WRITE_ONLY CL_MEM_READ_ONLY CL_MEM_USE_HOST_PTR CL_MEM_ALLOC_HOST_PTR CL_MEM_COPY_HOST_PTR cl_mem_info CL_MEM_TYPE CL_MEM_FLAGS CL_MEM_SIZE CL_MEM_HOST_PTR CL_MEM_MAP_COUNT CL_MEM_REFERENCE_COUNT CL_MEM_CONTEXT CL_MEM_ASSOCIATED_MEMOBJECT CL_MEM_OFFSET CL_MEM_D3D10_RESOURCE_KHR CL_MEM_D3D11_RESOURCE_KHR CL_MEM_DX9_MEDIA_ADAPTER_TYPE_KHR CL_MEM_DX9_MEDIA_SURFACE_INFO_KHR cl_mem_migration_flags CL_MIGRATE_MEM_OBJECT_HOST CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED cl_mem_object_type CL_MEM_OBJECT_BUFFER CL_MEM_OBJECT_IMAGE2D CL_MEM_OBJECT_IMAGE3D CL_MEM_OBJECT_IMAGE2D_ARRAY CL_MEM_OBJECT_IMAGE1D CL_MEM_OBJECT_IMAGE1D_ARRAY CL_MEM_OBJECT_IMAGE1D_BUFFER cl_platform_info CL_PLATFORM_PROFILE CL_PLATFORM_VERSION CL_PLATFORM_NAME CL_PLATFORM_VENDOR CL_PLATFORM_EXTENSIONS CL_PLATFORM_ICD_SUFFIX_KHR cl_profiling_info CL_PROFILING_COMMAND_QUEUED CL_PROFILING_COMMAND_SUBMIT CL_PROFILING_COMMAND_START CL_PROFILING_COMMAND_END cl_program_binary_type CL_PROGRAM_BINARY_TYPE_NONE CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT CL_PROGRAM_BINARY_TYPE_LIBRARY CL_PROGRAM_BINARY_TYPE_EXECUTABLE cl_program_build_info CL_PROGRAM_BUILD_STATUS CL_PROGRAM_BUILD_OPTIONS CL_PROGRAM_BUILD_LOG CL_PROGRAM_BINARY_TYPE cl_program_info CL_PROGRAM_REFERENCE_COUNT CL_PROGRAM_CONTEXT CL_PROGRAM_NUM_DEVICES CL_PROGRAM_DEVICES CL_PROGRAM_SOURCE CL_PROGRAM_BINARY_SIZES CL_PROGRAM_BINARIES CL_PROGRAM_NUM_KERNELS CL_PROGRAM_KERNEL_NAMES cl_sampler_info CL_SAMPLER_REFERENCE_COUNT CL_SAMPLER_CONTEXT CL_SAMPLER_NORMALIZED_COORDS CL_SAMPLER_ADDRESSING_MODE CL_SAMPLER_FILTER_MODE khronos-opencl-man-1.0~svn27110/clEnqueueAcquireD3D11ObjectsKHR.xml0000644000175000017500000003156211660441607024570 0ustar mathieumathieu ]> clEnqueueAcquireD3D11ObjectsKHR clEnqueueAcquireD3D11ObjectsKHR 2007-2011 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. 3 clEnqueueAcquireD3D11ObjectsKHR Acquire OpenCL memory objects that have been created from Direct3D 11 resources cl_int clEnqueueAcquireD3D11ObjectsKHR cl_command_queue command_queue cl_uint num_objects const cl_mem*mem_objects cl_uintnum_events_in_wait_list const cl_event *event_wait_list cl_event*event Parameters command_queue A valid command-queue. num_objects The number of memory objects to be acquired in mem_objects. mem_objects A pointer to a list of OpenCL memory objects that were created from Direct3D 11 resources. num_events_in_wait_list, event_wait_list Specify events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event_wait_list act as synchronization points. event Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the event_wait_list array. Notes The Direct3D 11 objects are acquired by the OpenCL context associated with command-queue and can therefore be used by all command-queues associated with the OpenCL context. OpenCL memory objects created from Direct3D 11 resources must be acquired before they can be used by any OpenCL commands queued to a command-queue. If an OpenCL memory object created from a Direct3D 11 resource is used while it is not currently acquired by OpenCL, the call attempting to use that OpenCL memory object will return CL_D3D11_RESOURCE_NOT_ACQUIRED_KHR. If CL_CONTEXT_INTEROP_USER_SYNC is not specified as CL_TRUE during context creation, clEnqueueAcquireD3D11ObjectsKHR provides the synchronization guarantee that any Direct3D 11 calls involving the interop device(s) used in the OpenCL context made before clEnqueueAcquireD3D11ObjectsKHR is called will complete executing before event reports completion and before the execution of any subsequent OpenCL work issued in command_queue begins. If the context was created with properties specifying CL_CONTEXT_INTEROP_USER_SYNC as CL_TRUE, the user is responsible for guaranteeing that any Direct3D 11 calls involving the interop device(s) used in the OpenCL context made before clEnqueueAcquireD3D11ObjectsKHR is called have completed before calling clEnqueueAcquireD3D11ObjectsKHR. &sharingD3D11Inc; &accessMappedInc; Errors Returns CL_SUCCESS returns CL_SUCCESS if the function is executed successfully. If num_objects is 0 and mem_objects is NULL then the function does nothing and returns CL_SUCCESS. Otherwise it returns one of the following errors: CL_INVALID_VALUE if num_objects is zero and mem_objects is not a NULL value or if num_objects > 0 and mem_objects is NULL. CL_INVALID_MEM_OBJECT if memory objects in mem_objects are not valid OpenCL memory objects or if memory objects in mem_objects have not been created from Direct3D 11 resources. CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_CONTEXT if context associated with command_queue was not created from a Direct3D 11 context. CL_D3D11_RESOURCE_ALREADY_ACQUIRED_KHR if memory objects in mem_objects have previously been acquired using clEnqueueAcquireD3D11ObjectsKHR but have not been released using clEnqueueReleaseD3D11ObjectsKHR. CL_D3D11_RESOURCE_ALREADY_ACQUIRED_KHR when any of mem_objectsare currently acquired by OpenCL. CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_event_in_wait_list > 0, or event_wait_list is not NULL and num_event_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see cl_khr_d3d11_sharing, clGetDeviceIDsFromD3D11KHR, clCreateFromD3D11BufferKHR, clCreateFromD3D11Texture2DKHR, clCreateFromD3D11Texture3DKHR, clEnqueueReleaseD3D11ObjectsKHR khronos-opencl-man-1.0~svn27110/qualifierInc.xml0000644000175000017500000000524611660441607021427 0ustar mathieumathieu OpenCL implements the following disjoint address spaces: __global, __local, __constant, and __private The address space qualifier may be used in variable declarations to specify the region of memory that is used to allocate the object. The C syntax for type qualifiers is extended in OpenCL to include an address space name as a valid type qualifier. If the type of an object is qualified by an address space name, the object is allocated in the specified address name; otherwise, the object is allocated in the generic address space. The address space names without the __prefix i.e. global, local, constant and private may be substituted for the corresponding address space names with the __prefix. The generic address space name for arguments to a function in a program, or local variables of a function is __private. All function arguments shall be in the __private address space. __kernel function arguments declared to be a pointer of a type can point to one of the following address spaces only: __global, __local or __constant. A pointer to address space A can only be assigned to a pointer to the same address space A. Casting a pointer to address space A to a pointer to address space B is illegal. Function arguments of type image2d_t, image3d_t, image2d_array_t, image1d_t, image1d_buffer_t, and image1d_array_t refer to image memory objects allocated in the __global address space. khronos-opencl-man-1.0~svn27110/preprocessorDirectives.xml0000644000175000017500000002516711660441607023570 0ustar mathieumathieu Preprocessor Directives and Macros Preprocessor Directives and Macros 2007-2011 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. 3 Preprocessor Directives and Macros Preprocessor Directives and Macros. # pragma pp-tokensopt new-line Description The preprocessing directives defined by the C99 specification are supported. A # pragma directive where the preprocessing token OPENCL (used instead of STDC) does not immediately follow pragma in the directive (prior to any macro replacement) causes the implementation to behave in an implementation-defined manner. The behavior might cause translation to fail or cause the translator or the resulting program to behave in a non-conforming manner. Any such pragma that is not recognized by the implementation is ignored. If the preprocessing token OPENCL does immediately follow pragma in the directive (prior to any macro replacement), then no macro replacement is performed on the directive, and the directive shall have one of the following forms whose meanings are described elsewhere: #pragma OPENCL FP_CONTRACT on-off-switch on-off-switch: one of ON OFF DEFAULT #pragma OPENCL EXTENSION extensionname : behavior #pragma OPENCL EXTENSION all : behavior The following predefined macro names are available. __FILE__ The presumed name of the current source file (a character string literal). __LINE__ The presumed line number (within the current source file) of the current source line (an integer constant). __OPENCL_VERSION__ substitutes an integer reflecting the version number of the OpenCL supported by the OpenCL device. The version of OpenCL described in this document will have __OPENCL_VERSION__ substitute the integer 120. CL_VERSION_1_0 substitutes the integer 100 reflecting the OpenCL 1.0 version. CL_VERSION_1_1 substitutes the integer 110 reflecting the OpenCL 1.1 version. CL_VERSION_1_2 substitutes the integer 120 reflecting the OpenCL 1.2 version. __OPENCL_C_VERSION__ substitutes an integer reflecting the OpenCL C version specified by the -cl-std build option to clBuildProgram or clCompileProgram. If the -cl-std build option is not specified, the OpenCL C version supported by the compiler for this OpenCL device will be used. The version of OpenCL C described in this document will have __OPENCL_C_VERSION__ substitute the integer 120. __ENDIAN_LITTLE__ is used to determine if the OpenCL device is a little endian architecture or a big endian architecture (an integer constant of 1 if device is little endian and is undefined otherwise). Also refer to CL_DEVICE_ENDIAN_LITTLE specified in the table of OpenCL Device Queries for clGetDeviceInfo. __kernel_exec(X, typen) (and kernel_exec(X, typen)) is defined as follows: __kernel __attribute__((work_group_size_hint(X, 1, 1))) \ __attribute__((vec_type_hint(typen))) __IMAGE_SUPPORT__ is used to determine if the OpenCL device supports images. This is an integer constant of 1 if images are supported and is undefined otherwise. Also refer to CL_DEVICE_IMAGE_SUPPORT specified in the table of OpenCL Device Queries for clGetDeviceInfo. __FAST_RELAXED_MATH__ is used to determine if the cl-fast-relaxed-math optimization option is specified in build options given to clBuildProgram or clCompileProgram. This is an integer constant of 1 if the cl-fast-relaxed-math build option is specified and is undefined otherwise. The macro names defined by the C99 specification but not currently supported by OpenCL are reserved for future use. __EMBEDDED_PROFILE__ will be the integer constant 1 for OpenCL devices that implement the embedded profile and is undefined otherwise. CL_PLATFORM_PROFILE defined in table 4.1 (see clGetPlatformInfo) will return the string EMBEDDED_PROFILE if the OpenCL implementation supports the embedded profile only. Specification OpenCL Specification Also see Symbolic Math Constants clBuildProgram, FP_CONTRACT, EXTENSION khronos-opencl-man-1.0~svn27110/vstorea_halfn.xml0000644000175000017500000004354111660441607021647 0ustar mathieumathieu ]> vstorea_halfn vstorea_halfn 2007-2011 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. 3 vstorea_halfn Convert float vector to half vector and write to a pointer to memory. void vstorea_halfn floatndata size_toffset __global half*p void vstorea_halfn_rte floatndata size_toffset __global half*p void vstorea_halfn_rtz floatndata size_toffset __global half*p void vstorea_halfn_rtp floatndata size_toffset __global half*p void vstorea_halfn_rtn floatndata size_toffset __global half*p void vstorea_halfn floatndata size_toffset __local half*p void vstorea_halfn_rte floatndata size_toffset __local half*p void vstorea_halfn_rtz floatndata size_toffset __local half*p void vstorea_halfn_rtp floatndata size_toffset __local half*p void vstorea_halfn_rtn floatndata size_toffset __local half*p void vstorea_halfn floatndata size_toffset __private half*p void vstorea_halfn_rte floatndata size_toffset __private half*p void vstorea_halfn_rtz floatndata size_toffset __private half*p void vstorea_halfn_rtp floatndata size_toffset __private half*p void vstorea_halfn_rtn floatndata size_toffset __private half*p If the optional double is supported, you may use doublen instead of floatn. Description The floatn (or doublen if optional double is supported) value igiven by data is converted to a halfn value using the appropriate rounding mode. For n = 1, 2, 4, 8 and 16, the halfn value is written to the address computed as (p + (offset * n)). The address computed as (p + (offset * n)) must be aligned to sizeof (halfn) bytes. For n = 3, the half3 value is written to the address computed as (p + (offset * 4)). The address computed as (p + (offset * 4)) must be aligned to sizeof (half) * 4 bytes. vstorea_halfn uses the default rounding mode. The default rounding mode is round to the nearest even. An application that wants to use half and halfn types will need to include the #pragma OPENCL EXTENSION cl_khr_fp16 : enable directive. Notes &vectorFunctionsInc; vstorea_half3 writes x, y, z components from a 3-component vector to address (p + (offset * 4)). Specification OpenCL Specification Also see Vector Data Load and Store Functions khronos-opencl-man-1.0~svn27110/relationalFunctions.xml0000644000175000017500000002065111660441607023034 0ustar mathieumathieu ]> Relational Built-In Functions Relational Built-In Functions 2007-2011 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. 3 Relational Built-In Functions Click an item in the table below for details about that function. isequal Component-wise compare of x == y. isnotequal Component-wise compare of x != y. isgreater Component-wise compare of x > y. isgreaterequal Component-wise compare of x >= y. isless Component-wise compare of x < y. islessequal Component-wise compare of x <= y. islessgreater Component-wise compare of (x < y) || (x > y). isfinite Test for finite value. isinf Test for positive or negative infinity. isnan Test for a NaN. isnormal Test for a normal value. isordered Test if arguments are ordered. isunordered Test if arguments are unordered. signbit Test for sign bit. any 1 if MSB in any component of x is set; else 0. all 1 if MSB in all components of x is set; else 0. bitselect Each bit of result is corresponding bit of a if corresponding bit of c is 0. select For each component of a vector type, result[i] = if MSB of c[i] is set ? b[i] : a[i] For scalar type, result = c ? b : a. Description If an implementation extends this specification to support IEEE-754 flags or exceptions, then all built-in relational functions shall proceed without raising the invalid floating-point exception when one or more of the operands are NaNs. Specification OpenCL Specification khronos-opencl-man-1.0~svn27110/commonMax.xml0000644000175000017500000001417711660441607020755 0ustar mathieumathieu ]> max max 2007-2011 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. 3 max Returns the greater of two values. gentype max gentypex gentypey gentypef max gentypefx floaty gentyped max gentypedx doubley gentype max (gentype x, half y) // if half extension enabled Description max returns y if x < y, otherwise it returns x. If x and y are infinite or NaN, the return values are undefined. Notes &commonFunctionsInc; If extended with cl_khr_fp16, generic type name gentype may indicate half and half{2|3|4|8|16} as arguments and return values. Specification OpenCL Specification Also see Common Functions khronos-opencl-man-1.0~svn27110/async_work_group_copy.xml0000644000175000017500000002033011660441607023430 0ustar mathieumathieu async_work_group_copy async_work_group_copy 2007-2011 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. 3 async_work_group_copy Perform an async copy. event_t async_work_group_copy __local gentype*dst const __global gentype*src size_t num_gentypes event_tevent event_t async_work_group_copy __global gentype*dst const __local gentype*src size_tnum_gentypes event_tevent Description The OpenCL C programming language implements these functions that provide asynchronous copies between global and local memory and a prefetch from global memory. Perform an async copy of num_gentypes elements from src to dst. The async copy is performed by all work-items in a work-group and this built-in function must therefore be encountered by all work-items in a work-group executing the kernel with the same argument values; otherwise the results are undefined. Returns an event object that can be used by wait_group_events to wait for the async copy to finish. The event argument can also be used to associate the async_work_group_copy with a previous async copy allowing an event to be shared by multiple async copies; otherwise event should be zero. If event argument is non-zero, the event object supplied in event argument will be returned. This function does not perform any implicit synchronization of source data such as using a barrier before performing the copy. Notes The generic type name gentype indicates the built-in data types char, char{2|3|4|8|16}, uchar, uchar{2|3|4|8|16}, short, short{2|3|4|8|16}, ushort, ushort{2|3|4|8|16}, int, int{2|3|4|8|16}, uint, uint{2|3|4|8|16}, long, long{2|3|4|8|16}, ulong, ulong{2|3|4|8|16} or float, float{2|3|4|8|16} as the type for the arguments unless otherwise stated. Optionally, generic type name gentype may indicate double and double{2|3|4|8|16} as arguments and return values. If extended with cl_khr_fp16, generic type name gentype may indicate half and half{2|3|4|8|16} as arguments and return values. async_work_group_copy and async_work_group_strided_copy for 3-component vector types behave as async_work_group_copy and async_work_group_strided_copy respectively for 4-component vector types. Specification OpenCL Specification Also see Async Copy and Prefetch Functions, wait_group_events khronos-opencl-man-1.0~svn27110/clRetainCommandQueue.xml0000644000175000017500000001340311660441607023053 0ustar mathieumathieu clRetainCommandQueue clRetainCommandQueue 2007-2011 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. 3 clRetainCommandQueue Increments the command_queue reference count. cl_int clRetainCommandQueue cl_command_queuecommand_queue Parameters command_queue Specifies the command-queue to retain. Notes clCreateCommandQueue performs an implicit retain. This is very helpful for 3rd party libraries, which typically get a command-queue passed to them by the application. However, it is possible that the application may delete the command-queue without informing the library. Allowing functions to attach to (i.e. retain) and release a command-queue solves the problem of a command-queue being used by a library no longer being valid. Errors Returns CL_SUCCESS if the function executed successfully, or one of the errors below: CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clCreateCommandQueue, clGetCommandQueueInfo, clReleaseCommandQueue khronos-opencl-man-1.0~svn27110/clEnqueueReleaseDX9MediaSurfacesKHR.xml0000644000175000017500000003074411660441607025572 0ustar mathieumathieu ]> clEnqueueReleaseDX9MediaSurfacesKHR clEnqueueReleaseDX9MediaSurfacesKHR 2007-2011 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. 3 clEnqueueReleaseDX9MediaSurfacesKHR Release OpenCL memory objects that have been created from media surfaces. cl_int clEnqueueReleaseDX9MediaSurfacesKHR cl_command_queue command_queue cl_uint num_objects const cl_mem*mem_objects cl_uintnum_events_in_wait_list const cl_event *event_wait_list cl_event*event Parameters command_queue A valid command-queue. num_objects The number of memory objects to be released in mem_objects. mem_objects A pointer to a list of OpenCL memory objects that were created from media surfaces. num_events_in_wait_list, event_wait_list Specify events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the event_wait_list array. Notes Used to release OpenCL memory objects that have been created from media surfaces. The media surfaces are released by the OpenCL context associated with command_queue. OpenCL memory objects created from media surfaces which have been acquired by OpenCL must be released by OpenCL before they may be accessed by the media adapter API. Accessing a media surface while its corresponding OpenCL memory object is acquired is in error and will result in undefined behavior, including but not limited to possible OpenCL errors, data corruption, and program termination. If CL_CONTEXT_INTEROP_USER_SYNC is not specified as CL_TRUE during context creation, clEnqueueReleaseDX9MediaSurfacesKHR provides the synchronization guarantee that any calls to media adapter APIs involving the interop device(s) used in the OpenCL context made after the call to clEnqueueReleaseDX9MediaSurfacesKHR will not start executing until after all events in event_wait_list are complete and all work already submitted to command_queue completes execution. If the context was created with properties specifying CL_CONTEXT_INTEROP_USER_SYNC as CL_TRUE, the user is responsible for guaranteeing that any media adapter API calls involving the interop device(s) used in the OpenCL context made after clEnqueueReleaseDX9MediaSurfacesKHR will not start executing until after event returned by clEnqueueReleaseDX9MediaSurfacesKHR reports completion. &mediaSurfaceFormatsInc; &accessMappedInc; Errors Returns CL_SUCCESS returns CL_SUCCESS if the function is executed successfully. If num_objects is 0 and <mem_objects> is NULL then the function does nothing and returns CL_SUCCESS. Otherwise it returns one of the following errors: CL_INVALID_VALUE if num_objects is zero and mem_objects is not a NULL value or if num_objects > 0 and mem_objects is NULL. CL_INVALID_MEM_OBJECT if memory objects in mem_objects are not valid OpenCL memory objects or if memory objects in mem_objects have not been created from media surfaces. CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_CONTEXT if context associated with command_queue was not created from a media object. CL_DX9_MEDIA_SURFACE_NOT_ACQUIRED_KHR if memory objects in mem_objects have not been previously been acquired using clEnqueueAcquireDX9MediaSurfacesKHR or have been released using clEnqueueReleaseDX9MediaSurfacesKHR since the last time that they were acquired. CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_event_in_wait_list > 0, or event_wait_list is not NULL and num_event_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see cl_khr_dx9_media_sharing, clGetDeviceIDsFromDX9MediaAdapterKHR, clCreateFromDX9MediaSurfaceKHR, clEnqueueAcquireDX9MediaSurfacesKHR, clEnqueueReleaseDX9MediaSurfacesKHR khronos-opencl-man-1.0~svn27110/cos.xml0000644000175000017500000001463211660441607017577 0ustar mathieumathieu ]> cos, cosh, cospi cos 2007-2011 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. 3 cos, cosh, cospi, half_cos, native_cos Cosine functions. gentype cos gentype gentype cosh gentype gentype cospi gentypex gentype half_cos gentypex gentype native_cos gentypex Description cos is the cosine function. cosh is the hyperbolic cosine function. cospi computes cos (x * pi). half_cos computes cosine. x must be in the range -216... +216. This function is implemented with a minimum of 10-bits of accuracy i.e. an ULP value less than or equal to 8192 ulp. native_cos computes cosine over an implementation-defined range. The maximum error is implementation-defined. Functions with the native__ prefix may map to one or more native device instructions and will typically have better performance compared to the corresponding functions (without the native__ prefix). The accuracy (and in some cases the input range(s)) of these functions is implementation-defined. Notes &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/islessgreater.xml0000644000175000017500000001737511660441607021676 0ustar mathieumathieu ]> islessgreater islessgreater 2007-2011 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. 3 islessgreater Compare of (x < y) || (x > y). int islessgreater floatx floaty intn islessgreater floatnx floatny int islessgreater doublex doubley longn islessgreater doublenx doubleny int islessgreater (half x, half y) // if half extension enabled shortn islessgreater (halfn x, halfn y) // if half extension enabled Description Returns the component-wise compare of (x < y) || (x > y). Notes &relationalFunctionsInc1; &relationalFunctionsInc2; &relationalFunctionsInc3; Specification OpenCL Specification Also see Relational Functions khronos-opencl-man-1.0~svn27110/buildOptionsInc.xml0000644000175000017500000004132411660441607022116 0ustar mathieumathieu Compiler Options The compiler options are categorized as pre-processor options, options for math intrinsics, options that control optimization and miscellaneous options. This specification defines a standard set of options that must be supported by the OpenCL C compiler when building program executables online or offline. These may be extended by a set of vendor- or platform specific options. Preprocessor Options These options control the OpenCL C preprocessor which is run on each program source before actual compilation. -D options are processed in the order they are given in the options argument to clBuildProgram or or clCompileProgram. -D name Predefine name as a macro, with definition 1. -D name=definition The contents of definition are tokenized and processed as if they appeared during translation phase three in a `#define' directive. In particular, the definition will be truncated by embedded newline characters. -I dir Add the directory dir to the list of directories to be searched for header files. Math Intrinsics Options These options control compiler behavior regarding floating-point arithmetic. These options trade off between speed and correctness. -cl-single-precision-constant Treat double precision floating-point constant as single precision constant. -cl-denorms-are-zero This option controls how single precision and double precision denormalized numbers are handled. If specified as a build option, the single precision denormalized numbers may be flushed to zero; double precision denormalized numbers may also be flushed to zero if the optional extension for double precsion is supported. This is intended to be a performance hint and the OpenCL compiler can choose not to flush denorms to zero if the device supports single precision (or double precision) denormalized numbers. This option is ignored for single precision numbers if the device does not support single precision denormalized numbers i.e. CL_FP_DENORM bit is not set in CL_DEVICE_SINGLE_FP_CONFIG. This option is ignored for double precision numbers if the device does not support double precision or if it does support double precison but CL_FP_DENORM bit is not set in CL_DEVICE_DOUBLE_FP_CONFIG. This flag only applies for scalar and vector single precision floating-point variables and computations on these floating-point variables inside a program. It does not apply to reading from or writing to image objects. -cl-fp32-correctly-rounded-divide-sqrt The -cl-fp32-correctly-rounded-divide-sqrt build option to clBuildProgram or clCompileProgram allows an application to specify that single precision floating-point divide (x/y and 1/x) and sqrt used in the program source are correctly rounded. If this build option is not specified, the minimum numerical accuracy of single precision floating-point divide and sqrt are as defined in section 7.4 of the OpenCL specification. This build option can only be specified if the CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT is set in CL_DEVICE_SINGLE_FP_CONFIG (as defined in in the table of allowed values for param_name for clGetDeviceInfo) for devices that the program is being build. clBuildProgram or clCompileProgram will fail to compile the program for a device if the -cl-fp32-correctly-rounded-divide-sqrt option is specified and CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT is not set for the device. Optimization Options These options control various sorts of optimizations. Turning on optimization flags makes the compiler attempt to improve the performance and/or code size at the expense of compilation time and possibly the ability to debug the program. -cl-opt-disable This option disables all optimizations. The default is optimizations are enabled. The following options control compiler behavior regarding floating-point arithmetic. These options trade off between performance and correctness and must be specifically enabled. These options are not turned on by default since it can result in incorrect output for programs which depend on an exact implementation of IEEE 754 rules/specifications for math functions. -cl-mad-enable Allow a * b + c to be replaced by a mad. The mad computes a * b + c with reduced accuracy. For example, some OpenCL devices implement mad as truncate the result of a * b before adding it to c. -cl-no-signed-zeros Allow optimizations for floating-point arithmetic that ignore the signedness of zero. IEEE 754 arithmetic specifies the distinct behavior of +0.0 and -0.0 values, which then prohibits simplification of expressions such as x+0.0 or 0.0*x (even with -clfinite-math only). This option implies that the sign of a zero result isn't significant. -cl-unsafe-math-optimizations Allow optimizations for floating-point arithmetic that (a) assume that arguments and results are valid, (b) may violate IEEE 754 standard and (c) may violate the OpenCL numerical compliance requirements as defined in section 7.4 for single precision and double precision floating-point, and edge case behavior in section 7.5. This option includes the -cl-no-signed-zeros and -cl-mad-enable options. -cl-finite-math-only Allow optimizations for floating-point arithmetic that assume that arguments and results are not NaNs or ±∞. This option may violate the OpenCL numerical compliance requirements defined in section 7.4 for single precision and double precision floating point, and edge case behavior in section 7.5. -cl-fast-relaxed-math Sets the optimization options -cl-finite-math-only and -cl-unsafe-math-optimizations. This allows optimizations for floating-point arithmetic that may violate the IEEE 754 standard and the OpenCL numerical compliance requirements defined in the specification in section 7.4 for single-precision and double precision floating-point, and edge case behavior in section 7.5. This option causes the preprocessor macro __FAST_RELAXED_MATH__ to be defined in the OpenCL program. Options to Request or Suppress Warnings Warnings are diagnostic messages that report constructions which are not inherently erroneous but which are risky or suggest there may have been an error. The following languageindependent options do not enable specific warnings but control the kinds of diagnostics produced by the OpenCL compiler. -w Inhibit all warning messages. -Werror Make all warnings into errors. Options Controlling the OpenCL C Version The following option controls the version of OpenCL C that the compiler accepts. -cl-std= Determine the OpenCL C language version to use. A value for this option must be provided. Valid values are: CL1.1 - Support all OpenCL C programs that use the OpenCL C language features defined in section 6 of the OpenCL 1.1 specification. CL1.2 – Support all OpenCL C programs that use the OpenCL C language features defined in section 6 of the OpenCL 1.2 specification. Calls to clBuildProgram or clCompileProgram with the -cl-std=CL1.1 option will fail to compile the program for any devices with CL_DEVICE_OPENCL_C_VERSION = OpenCL C 1.0. Calls to clBuildProgram or clCompileProgram with the -cl-std=CL1.2 option will fail to compile the program for any devices with CL_DEVICE_OPENCL_C_VERSION = OpenCL C 1.0 or OpenCL C 1.1. If the -cl-std build option is not specified, the CL_DEVICE_OPENCL_C_VERSION is used to select the version of OpenCL C to be used when compiling the program for each device. Options for Querying Kernel Argument Information -cl-kernel-arg-info This option allows the compiler to store information about the arguments of a kernel(s) in the program executable. The argument information stored includes the argument name, its type, the address and access qualifiers used. Refer to description of clGetKernelArgInfo on how to query this information. Linker Options This specification defines a standard set of linker options that must be supported by the OpenCL C compiler when linking compiled programs online or offline. These linker options are categorized as library linking options and program linking options. These may be extended by a set of vendor- or platform-specific options. Library Linking Options The following options can be specified when creating a library of compiled binaries. -create-library Create a library of compiled binaries specified in input_programs argument to clLinkProgram. -enable-link-options Allows the linker to modify the library behavior based on one or more link options (described in Program Linking Options, below) when this library is linked with a program executable. This option must be specified with the –create-library option. Program Linking Options The following options can be specified when linking a program executable. -cl-denorms-are-zero -cl-no-signed-zeroes -cl-unsafe-math-optimizations -cl-finite-math-only -cl-fast-relaxed-mat The linker may apply these options to all compiled program objects specified to clLinkProgram. The linker may apply these options only to libraries which were created with the –enable-link-option. Separate Compilation and Linking of Programs OpenCL 1.2 extends how programs are compiled and linked to support the following: Separate compilation and link stages. Program sources can be compiled to generate a compiled binary object and linked in a separate stage with other compiled program objects to the program exectuable. Embedded headers. In OpenCL 1.0 and 1.1, the –I build option could be used to specify the list of directories to be searched for headers files that are included by a program source(s). OpenCL 1.2 extends this by allowing the header sources to come from program objects instead of just header files. Libraries. The linker can be used to link compiled objects and libraries into a program executable or to create a library of compiled binarie khronos-opencl-man-1.0~svn27110/clGetProgramBuildInfo.xml0000644000175000017500000005122311660441607023172 0ustar mathieumathieu clGetProgramBuildInfo clGetProgramBuildInfo 2007-2011 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. 3 clGetProgramBuildInfo Returns build information for each device in the program object. cl_int clGetProgramBuildInfo cl_program program, cl_device_id device, cl_program_build_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret Parameters program Specifies the program object being queried. device Specifies the device for which build information is being queried. device must be a valid device associated with program. param_name Specifies the information to query. The list of supported param_name types and the information returned in param_value by clGetProgramBuildInfo is described in the table below. cl_program_buid_info Return Type and Info. returned in param_value CL_PROGRAM_BUILD_STATUS Return type: cl_build_status Returns the build, compile or link status, whichever was performed last on program for device. This can be one of the following: CL_BUILD_NONE. The build status returned if no clBuildProgram, clCompileProgram or clLinkProgram has been performed on the specified program object for device. CL_BUILD_ERROR. The build status returned if clBuildProgram, clCompileProgram or clLinkProgram whichever was performed last on the specified program object for device generated an error. CL_BUILD_SUCCESS. The build status returned if clBuildProgram, clCompileProgram or clLinkProgram whichever was performed last on the specified program object for device was successful. CL_BUILD_IN_PROGRESS. The build status returned if clBuildProgram, clCompileProgram or clLinkProgram whichever was performed last on the specified program object for device has not finished. CL_PROGRAM_BUILD_OPTIONS Return type: char[] Return the build, compile or link options specified by the options argument in clBuildProgram, clCompileProgram or clLinkProgram, whichever was performed last on program for device. If build status of program for device is CL_BUILD_NONE, an empty string is returned. CL_PROGRAM_BUILD_LOG Return type: char[] Return the build, compile or link log for clBuildProgram, clCompileProgram or clLinkProgram whichever was performed last on program for device. If build status of program for device is CL_BUILD_NONE, an empty string is returned. CL_PROGRAM_BINARY_TYPE Return type: cl_program_binary_type Return the program binary type for device. This can be one of the following values: CL_PROGRAM_BINARY_TYPE_NONE. There is no binary associated with device. CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT. A compiled binary is associated with device. This is the case if program was created using clCreateProgramWithSource and compiled using clCompileProgram or a compiled binary is loaded using clCreateProgramWithBinary. CL_PROGRAM_BINARY_TYPE_LIBRARY. A library binary is associated with device. This is the case if program was created by clLinkProgram which is called with the –createlibrary link option or if a library binary is loaded using clCreateProgramWithBinary. CL_PROGRAM_BINARY_TYPE_EXECUTABLE. An executable binary is associated with device. This is the case if program was created by clLinkProgram without the –createlibrary link option or program was created by clBuildProgram or an executable binary is loaded using clCreateProgramWithBinary. param_value A pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored. param_value_size Specifies the size in bytes of memory pointed to by param_value. This size must be ≥ size of return type as described in the table above. param_value_size_ret Returns the actual size in bytes of data copied to param_value. If param_value_size_ret is NULL, it is ignored. Notes A program binary (compiled binary, library binary or executable binary) built for a parent device can be used by all its sub-devices. If a program binary has not been built for a sub-device, the program binary associated with the parent device will be used. A program binary for a device specified with clCreateProgramWithBinary or queried using clGetProgramInfo can be used as the binary for the associated root device, and all sub-devices created from the root-level device or sub-devices thereof. Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise it returns the following: Returns CL_INVALID_DEVICE if device is not in the list of devices associated with program. Returns CL_INVALID_VALUE if param_name is not valid, or if size in bytes specified by param_value_size is < size of return type as described in the table above and param_value is not NULL. Returns CL_INVALID_PROGRAM if program is a not a valid program object. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clGetProgramInfo khronos-opencl-man-1.0~svn27110/convert_T.xml0000644000175000017500000003470111660441607020755 0ustar mathieumathieu Explicit conversions with convert_T() Explicit conversions with convert_T() 2007-2011 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. 3 Explicit conversions with convert_T() Explicit type conversions using convert_T() convert_destType(sourceType) destType convert_destType<_sat><roundingMode> (sourceType) destTypen convert_destTypen<_sat><roundingMode> (sourceType) Description Explicit conversions may be performed using the convert_destType(sourceType) suite of functions. These provide a full set of type conversions between supported types (see Scalar Data Types) except for the following types: bool, half, size_t, ptrdiff_t, intptr_t, uintptr_t, and void. The number of elements in the source and destination vectors must match. The behavior of the conversion may be modified by one or two optional modifiers that specify saturation for out-of-range inputs and rounding behavior. The full form of the scalar convert function is: destType convert_destType<_sat><_roundingMode>(sourceType) The full form of the vector convert function is: destTypen convert_destTypen<_sat><_roundingMode>(sourceTypen) Data Types Conversions are available for the following scalar types: char, uchar, short, ushort, int, uint, long, ulong, float, and built-in vector types derived therefrom. The operand and result type must have the same number of elements. The operand and result type may be the same type in which case the conversion has no effect on the type or value of an expression. Conversions between integer types follow the conversion rules specified in sections 6.3.1.1 and 6.3.1.3 of the C99 specification except for out-of-range behavior and saturated conversions which are described in section 6.2.3.3 below. Rounding Modes Conversions to and from floating-point type shall conform to IEEE-754 rounding rules. Conversions may have an optional rounding mode modifier described in the table below. Modifier Rounding Mode Description _rte Round to nearest even _rtz Round towards zero _rtp Round toward positive infinity _rtn Round toward negative infinity no modifier specified Use the default rounding mode for this destination type, _rtz for conversion to integers or the default rounding mode for conversion to floating-point types. By default, conversions to integer type use the _rtz (round toward zero) rounding mode and conversions to floating-point type use the default rounding mode. The only default floating-point rounding mode supported is round to nearest even, i.e the default rounding mode will be _rte for floating-point types. For conversions to floating-point format, when a finite source value exceeds the maximum representable finite floating-point destination value, the rounding mode will affect whether the result is the maximum finite floating point value or infinity of same sign as the source value, per IEEE-754 rules for rounding. Out-of-Range Behavior and Saturated Conversions When the conversion operand is either greater than the greatest representable destination value or less than the least representable destination value, it is said to be out-of-range. The result of out-of-range conversion is determined by the conversion rules specified by the C99 specification in section 6.3. When converting from a floating-point type to integer type, the behavior is implementation-defined. Conversions to integer type may opt to convert using the optional saturated mode by appending the _sat modifier to the conversion function name. When in saturated mode, values that are outside the representable range shall clamp to the nearest representable value in the destination format. (NaN should be converted to 0). Conversions to floating-point type shall conform to IEEE-754 rounding rules. The _sat modifier may not be used for conversions to floating-point formats. Examples In the following example, convert_int4 converts a uchar4 vector u to an int4 vector c: uchar4 u; int4 c = convert_int4(u); In the following example, convert_int converts a float scalar f to an int scalar i: float f; int i = convert_int(f); Example: short4 s; // negative values clamped to 0 ushort4 u = convert_ushort4_sat( s ); // values > CHAR_MAX converted to CHAR_MAX // values < CHAR_MIN converted to CHAR_MIN char4 c = convert_char4_sat( s ); Example: float4 f; // values implementation defined for // f > INT_MAX, f < INT_MIN or NaN int4 i = convert_int4( f ); // values > INT_MAX clamp to INT_MAX, values < INT_MIN clamp // to INT_MIN. NaN should produce 0. // The _rtz rounding mode is // used to produce the integer values. int4 i2 = convert_int4_sat( f ); // similar to convert_int4, except that // floating-point values are rounded to the nearest // integer instead of truncated int4 i3 = convert_int4_rte( f ); // similar to convert_int4_sat, except that // floating-point values are rounded to the // nearest integer instead of truncated int4 i4 = convert_int4_sat_rte( f ); Example: int4 i; // convert ints to floats using the default rounding mode. float4 f = convert_float4( i ); // convert ints to floats. integer values that cannot // be exactly represented as floats should round up to the // next representable float. float4 f = convert_float4_rtp( i ); Specification OpenCL Specification Also see Scalar Data Types, Vector Data Types khronos-opencl-man-1.0~svn27110/commonMin.xml0000644000175000017500000001417611660441607020752 0ustar mathieumathieu ]> min min 2007-2011 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. 3 min Returns the lesser of two values. gentype min gentypex gentypey gentypef min gentypefx floaty gentyped min gentypedx doubley gentype min (gentype x, half y) // if half extension enabled Description min returns y if y < x, otherwise it returns x. If x and y are infinite or NaN, the return values are undefined. Notes &commonFunctionsInc; If extended with cl_khr_fp16, generic type name gentype may indicate half and half{2|3|4|8|16} as arguments and return values. Specification OpenCL Specification Also see Common Functions khronos-opencl-man-1.0~svn27110/exp.xml0000644000175000017500000002174711660441607017614 0ustar mathieumathieu ]> exp, exp2, exp10, expm1,half_exp, half_exp2, half_exp10, native_exp, native_exp2, native_exp10 exp, exp2, exp10, expm1,half_exp, half_exp2, half_exp10, native_exp, native_exp2, native_exp10 2007-2011 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. 3 exp, exp2, exp10, expm1 (including half_ and native_) Exponent functions. gentype exp gentypex gentype exp2 gentype gentype exp10 gentype gentype expm1 gentypex gentype half_exp gentypex gentype half_exp2 gentypex gentype half_exp10 gentypex gentype native_exp gentypex gentype native_exp2 gentypex gentype native_exp10 gentypex Description exp computes the base- e exponential of x. exp2 is the exponential base 2 function. exp10 is the exponential base 10 function. expm1 computes ex - 1.0. half_exp computes the base- e exponential of x. half_exp2 computes the base- 2 exponential of x. half_exp10 computes the base- 10 exponential of x. native_exp computes the base- e exponential of x over an implementation-defined range. The maximum error is implementation-defined. native_exp2 computes the base- 2 exponential of x over an implementation-defined range. The maximum error is implementation-defined. native_exp10 computes the base- 10 exponential of x over an implementation-defined range. The maximum error is implementation-defined. Notes &mathFunctionsInc; Functions with the half_ prefix are implemented with a minimum of 10-bits of accuracy i.e. an ULP value less than or equal to 8192 ulp. Functions with the native_ prefix may map to one or more native device instructions and will typically have better performance compared to the corresponding functions (without the native_ prefix). The accuracy (and in some cases the input range(s)) of these functions is implementation-defined. Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/clCompileProgram.xml0000644000175000017500000004174712003060462022245 0ustar mathieumathieu ]> clCompileProgram clCompileProgram 2007-2011 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. 3 clCompileProgram Compiles a program’s source for all the devices or a specific device(s) in the OpenCL context associated with program. cl_int clCompileProgram cl_programprogram cl_uintnum_devices const cl_device_id*device_list const char*options cl_uintnum_input_headers const cl_program*input_headers const char**header_include_names void(CL_CALLBACK *pfn_notify)( cl_program program, void *user_data) void*user_data Parameters program The program object that is the compilation target. device_list A pointer to a list of devices associated with program. If device_list is a NULL value, the compile is performed for all devices associated with program. If device_list is a non-NULL value, the compile is performed for devices specified in this list. num_devices The number of devices listed in device_list. options A pointer to a null-terminated string of characters that describes the compilation options to be used for building the program executable. The list of supported options is as described below. num_input_headers Specifies the number of programs that describe headers in the array referenced by input_headers. input_headers An array of program embedded headers created with clCreateProgramWithSource. header_include_names An array that has a one to one correspondence with input_headers. Each entry in header_include_names specifies the include name used by source in program that comes from an embedded header. The corresponding entry in input_headers identifies the program object which contains the header source to be used. The embedded headers are first searched before the headers in the list of directories specified by the –I compile option (as described in section 5.6.4.1). If multiple entries in header_include_names refer to the same header name, the first one encountered will be used. pfn_notify A function pointer to a notification routine. The notification routine is a callback function that an application can register and which will be called when the program executable has been built (successfully or unsuccessfully). If pfn_notify is not NULL, clCompileProgram does not need to wait for the compiler to complete and can return immediately once the compilation can begin. The compilation can begin if the context, program whose sources are being compiled, list of devices, input headers, programs that describe input headers and compiler options specified are all valid and appropriate host and device resources needed to perform the compile are available. If pfn_notify is NULL, clCompileProgram does not return until the compiler has completed. This callback function may be called asynchronously by the OpenCL implementation. It is the application’s responsibility to ensure that the callback function is thread-safe. user_data Passed as an argument when pfn_notify is called. user_data can be NULL. Notes Compiles a program’s source for all the devices or a specific device(s) in the OpenCL context associated with program. The pre-processor runs before the program sources are compiled. The compiled binary is built for all devices associated with program or the list of devices specified. The compiled binary can be queried using clGetProgramInfo(program, CL_PROGRAM_BINARIES, ...) and can be specified to clCreateProgramWithBinary to create a new program object. &buildOptionsInc; Errors clCompileProgram returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_PROGRAM if program is not a valid program object. CL_INVALID_VALUE if device_list is NULL and num_devices is greater than zero, or if device_list is not NULL and num_devices is zero. CL_INVALID_VALUE if num_input_headers is zero and header_include_names or input_headers are not NULL or if num_input_headers is not zero and header_include_names or input_headers are NULL. CL_INVALID_VALUE if pfn_notify is NULL but user_data is not NULL. CL_INVALID_DEVICE if OpenCL devices listed in device_list are not in the list of devices associated with program. CL_INVALID_COMPILER_OPTIONS if the compiler options specified by options are invalid. CL_INVALID_OPERATION if the compilation or build of a program executable for any of the devices listed in device_list by a previous call to clCompileProgram or clBuildProgram for program has not completed. CL_COMPILER_NOT_AVAILABLE if a compiler is not available i.e. CL_DEVICE_COMPILER_AVAILABLE specified in in the table of allowed values for param_name for clGetDeviceInfo is set to CL_FALSE. CL_COMPILE_PROGRAM_FAILURE if there is a failure to compile the program source. This error will be returned if clCompileProgram does not return until the compile has completed. CL_INVALID_OPERATION if there are kernel objects attached to program. CL_INVALID_OPERATION if program has no source i.e. it has not been created with clCreateProgramWithSource. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Example For example, consider the following program source: #include <foo.h> #include <mydir/myinc.h> __kernel void image_filter (int n, int m, __constant float *filter_weights, __read_only image2d_t src_image, __write_only image2d_t dst_image) { ... } This kernel includes two headers foo.h and mydir/myinc.h. The following describes how these headers can be passed as embedded headers in program objects: cl_program foo_pg = clCreateProgramWithSource(context, 1, &foo_header_src, NULL, &err); cl_program myinc_pg = clCreateProgramWithSource(context, 1, &myinc_header_src, NULL, &err); // let’s assume the program source described above is given // by program_A and is loaded via clCreateProgramWithSource cl_program input_headers[2] = { foo_pg, myinc_pg }; char * input_header_names[2] = { “foo.hâ€, “mydir/myinc.h†}; clCompileProgram(program_A, 0, NULL, // num_devices & device_list NULL, // compile_options 2, // num_input_headers input_headers, input_header_names, NULL, NULL); // pfn_notify & user_data Specification OpenCL Specification Also see clGetDeviceInfo khronos-opencl-man-1.0~svn27110/clGetKernelInfo.xml0000644000175000017500000003267611660441607022036 0ustar mathieumathieu clGetKernelInfo clGetKernelInfo 2007-2011 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. 3 clGetKernelInfo Returns information about the kernel object. cl_int clGetKernelInfo cl_kernel kernel cl_kernel_info param_name size_t param_value_size void *param_value size_t *param_value_size_ret Parameters kernel Specifies the kernel object being queried. param_name Specifies the information to query. The list of supported param_name types and the information returned in param_value by clGetKernelInfo is described in the table below. param_value A pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored. param_value_size Used to specify the size in bytes of memory pointed to by param_value. This size must be ≥ size of return type as described in the table below. cl_kernel_info Return Type Info. returned in param_value CL_KERNEL_FUNCTION_NAME char[] Return the kernel function name. CL_KERNEL_NUM_ARGS cl_uint Return the number of arguments to kernel. CL_KERNEL_REFERENCE_COUNT cl_uint Return the kernel reference count. The reference count returned should be considered immediately stale. It is unsuitable for general use in applications. This feature is provided for identifying memory leaks. CL_KERNEL_CONTEXT cl_context Return the context associated with kernel. CL_KERNEL_PROGRAM cl_program Return the program object associated with kernel. CL_KERNEL_ATTRIBUTES char[] Returns any attributes specified using the __attribute__ qualifier with the kernel function declaration in the program source. These attributes include those on the __attribute__ page and other attributes supported by an implementation. Attributes are returned as they were declared inside __attribute__((...)), with any surrounding whitespace and embedded newlines removed. When multiple attributes are present, they are returned as a single, space delimited string. param_value_size_ret the actual size in bytes of data copied to param_value. If param_value_size_ret is NULL, it is ignored. Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_VALUE if param_name is not valid, or if size in bytes specified by param_value_size is < size of return type as described in the table above and param_value is not NULL. CL_INVALID_KERNEL if kernel is not a valid kernel object. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clCreateKernel, clCreateKernelsInProgram, clGetKernelArgInfo, clRetainKernel, clReleaseKernel, clSetKernelArg, clGetKernelWorkGroupInfo khronos-opencl-man-1.0~svn27110/cl_khr_gl_event.xml0000644000175000017500000002001211660441607022125 0ustar mathieumathieu cl_khr_gl_event cl_khr_gl_event 2007-2011 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. 3 cl_khr_gl_event Create an OpenCL event object from a GL sync object. cl_khr_gl_event Description This extension enables the function clCreateEventFromGLsyncKHR. This extension allows creating OpenCL event objects linked to OpenGL fence sync objects, potentially improving efficiency of sharing images and buffers between the two APIs. The companion GL_ARB_cl_event OpenGL extension provides the complementary functionality of creating an OpenGL sync object from an OpenCL event object. In addition, this extension modifies the behavior of clEnqueueAcquireGLObjects and clEnqueueReleaseGLObjects to implicitly guarantee synchronization with an OpenGL context bound in the same thread as the OpenCL context. If this extension is supported by an implementation, the string cl_khr_gl_event will be present in the CL_PLATFORM_EXTENSIONS or CL_DEVICE_EXTENSIONS string described in the table of param_name values for clGetDeviceInfo. Notes Event objects can also be used to reflect the status of an OpenGL sync object. The sync object in turn refers to a fence command executing in an OpenGL command stream. This provides another method of coordinating sharing of buffers and images between OpenGL and OpenCL (see section 9.7.6.1). If the cl_khr_gl_event extension is supported, then the OpenCL implementation will ensure that any such pending OpenGL operations are complete for an OpenGL context bound to the same thread as the OpenCL context. This is referred to as implicit synchronization. If the cl_khr_gl_event extension is supported and the OpenGL context in question supports fence sync objects, completion of OpenGL commands may also be determined by placing a GL fence command after those commands using glFenceSync, creating an event from the resulting GL sync object using clCreateEventFromGLsyncKHR, and determining completion of that event object via clEnqueueAcquireGLObjects. This method may be considerably more efficient than calling glFinish, and is referred to as explicit synchronization. Explicit synchronization is most useful when an OpenGL context bound to another thread is accessing the memory objects. If the cl_khr_gl_event extension is not supported, completion of OpenGL commands may be determined by issuing and waiting for completion of a glFinish command on all OpenGL contexts with pending references to these objects. Some implementations may offer other efficient synchronization methods. If such methods exist they will be described in platform-specific documentation. Note that no synchronization method other than glFinish is portable between all OpenGL implementations and all OpenCL implementations. While this is the only way to ensure completion that is portable to all platforms, glFinish is an expensive operation and its use should be avoided if the cl_khr_gl_event extension is supported on a platform. Specification OpenCL Specification Also see EXTENSION, clCreateEventFromGLsyncKHR khronos-opencl-man-1.0~svn27110/mediaSurfaceFormatsInc.xml0000644000175000017500000001745211660441607023374 0ustar mathieumathieu The goal of this extension is to allow applications to use media surfaces as OpenCL memory objects. This allows efficient sharing of data between OpenCL and selected adapter APIs (only DX9 for now). If this extension is supported, an OpenCL image object can be created from a media surface and the OpenCL API can be used to execute kernels that read and/or write memory objects that are media surfaces. Note that OpenCL memory objects may be created from the adapter media surface if and only if the OpenCL context has been created from that adapter. If this extension is supported by an implementation, the string "cl_khr_media_sharing" will be present in the CL_PLATFORM_EXTENSIONS or CL_DEVICE_EXTENSIONS string described in the table of allowed values for param_name for clGetDeviceInfo. As currently proposed the interfaces for this extension would be provided in cl_dx9_media_sharing.h. This section includes the D3D surface formats that are supported when the adapter type is one of the Direct 3D lineage . Using a D3D surface format not listed here is an error. To extend the use of this extension to support media adapters beyond DirectX9 tables similar to the ones in this section will need to be defined for the surface formats supported by the new media adapter. All implementations that support this extension are required to support the NV12 surface format, the other surface formats supported are the same surface formats that the adapter you are sharing with supports as long as they are listed in the two tables below. FOUR CC code CL image format (channel order, channel data type) FOURCC('N', 'V', '1', '2'), Plane 0 CL_R, CL_UNORM_INT8 FOURCC('N', 'V', '1', '2'), Plane 1 CL_RG, CL_UNORM_INT8 FOURCC('Y', 'V', '1', '2'), Plane 0 CL_R, CL_UNORM_INT8 FOURCC('Y', 'V', '1', '2'), Plane 1 CL_R, CL_UNORM_INT8 FOURCC('Y', 'V', '1', '2'), Plane 2 CL_R, CL_UNORM_INT8 In the table above, NV12 Plane 0 corresponds to the luminance (Y) channel and Plane 1 corresponds to the UV channels. The YV12 Plane 0 corresponds to the Y channel, Plane 1 to the U channel and Plane 2 to the V channel. Note that the YUV formats map to CL_R and CL_RG but do not perform any YUV to RGB conversion and vice-versa. D3D format CL image format (channel order, channel data type) D3DFMT_R32F CL_R, CL_FLOAT D3DFMT_R16F CL_R, CL_HALF_FLOAT D3DFMT_L16 CL_R, CL_UNORM_INT16 D3DFMT_A8 CL_A, CL_UNORM_INT8 D3DFMT_L8 CL_R, CL_UNORM_INT8 D3DFMT_G32R32F CL_RG, CL_FLOAT D3DFMT_G16R16F CL_RG, CL_HALF_FLOAT D3DFMT_G16R16 CL_RG, CL_UNORM_INT16 D3DFMT_A8L8 CL_RG, CL_UNORM_INT8 D3DFMT_A32B32G32R32F CL_RGBA, CL_FLOAT D3DFMT_A16B16G16R16F CL_RGBA, CL_HALF_FLOAT D3DFMT_A16B16G16R16 CL_RGBA, CL_UNORM_INT16 D3DFMT_A8B8G8R8 CL_RGBA, CL_UNORM_INT8 D3DFMT_X8B8G8R8 CL_RGBA, CL_UNORM_INT8 D3DFMT_A8R8G8B8 CL_BGRA, CL_UNORM_INT8 D3DFMT_X8R8G8B8 CL_BGRA, CL_UNORM_INT8 Note that D3D9 format names seem to imply that the order of the color channels are switched relative to OpenCL but this is not the case. For example, layout of channels for each pixel for D3DFMT_A32FB32FG32FR32F is the same as CL_RGBA, CL_FLOAT. Properties of media surface objects may be queried using clGetMemObjectInfo and clGetImageInfo with param_name CL_MEM_MEDIA_ADAPTER_TYPE_KHR, CL_MEM_MEDIA_SURFACE_INFO_KHR and CL_IMAGE_MEDIA_SURFACE_PLANE_KHR as described for clGetImageInfo and in the information below about accessing mapped regions of a memory object. khronos-opencl-man-1.0~svn27110/clReleaseSampler.xml0000644000175000017500000001314411660441607022233 0ustar mathieumathieu clReleaseSampler clReleaseSampler 2007-2011 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. 3 clReleaseSampler Decrements the sampler reference count. cl_int clReleaseSampler cl_samplersampler Parameters sampler Specifies the sampler being retained. Notes The sampler object is deleted after the reference count becomes zero and commands queued for execution on a command-queue(s) that use sampler have finished. Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_SAMPLER if sampler is not a valid sampler object. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clCreateSampler, clRetainSampler, clGetSamplerInfo khronos-opencl-man-1.0~svn27110/prefetch.xml0000644000175000017500000001203111660441607020602 0ustar mathieumathieu prefetch prefetch 2007-2011 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. 3 prefetch Prefetch bytes into the global cache. void prefetch const __global gentype*p size_tnum_gentypes Description Prefetch num_gentypes * sizeof(gentype) bytes into the global cache. The prefetch instruction is applied to a work-item in a work-group and does not affect the functional behavior of the kernel. Notes The generic type name gentype indicates the built-in data types char, char{2|3|4|8|16}, uchar, uchar{2|3|4|8|16}, short, short{2|3|4|8|16}, ushort, ushort{2|3|4|8|16}, int, int{2|3|4|8|16}, uint, uint{2|3|4|8|16}, long, long{2|3|4|8|16}, ulong, ulong{2|3|4|8|16}, float, float{2|3|4|8|16}, or double, double{2|3|4|8|16} as the type for the arguments unless otherwise stated. Specification OpenCL Specification Also see Async Copy and Prefetch Functions khronos-opencl-man-1.0~svn27110/cl_khr_gl_sharing.xml0000644000175000017500000002425411663317370022455 0ustar mathieumathieu ]> cl_khr_gl_sharing cl_khr_gl_sharing 2007-2011 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. 3 cl_khr_gl_sharing Allow applications to use OpenGL buffer, texture and renderbuffer objects as OpenCL memory objects. cl_khr_gl_sharing Description This is a Kronos-approved extension name. If this extension is supported, "cl_khr_gl_sharing" will be returned for CL_DEVICE_EXTENSIONS using clGetDeviceInfo. The OpenCL specification in section 9.7 defines how to share data with texture and buffer objects in a parallel OpenGL implementation, but does not define how the association between an OpenCL context and an OpenGL context or share group is established. This extension defines optional attributes to OpenCL context creation routines which associate a GL context or share group object with a newly created OpenCL context. If this extension is supported by an implementation, the string cl_khr_gl_sharing will be present in the CL_PLATFORM_EXTENSIONS or CL_DEVICE_EXTENSIONS string described in the table of allowed values for param_name for clGetDeviceInfo An OpenGL implementation supporting buffer objects and sharing of texture and buffer object images with OpenCL is required by this extension. This section discusses OpenCL functions that allow applications to use OpenGL buffer, texture, and renderbuffer objects as OpenCL memory objects. This allows efficient sharing of data between OpenCL and OpenGL. The OpenCL API may be used to execute kernels that read and/or write memory objects that are also OpenGL objects. An OpenCL image object may be created from an OpenGL texture or renderbuffer object. An OpenCL buffer object may be created from an OpenGL buffer object. OpenCL memory objects may be created from OpenGL objects if and only if the OpenCL context has been created from an OpenGL share group object or context. OpenGL share groups and contexts are created using platform specific APIs such as EGL, CGL, WGL, and GLX. On MacOS X, an OpenCL context may be created from an OpenGL share group object using the OpenCL platform extension cl_apple_gl_sharing. On other platforms including Microsoft Windows, Linux/Unix and others, an OpenCL context may be created from an OpenGL context using the Khronos platform extension cl_khr_gl_sharing. Refer to the platform documentation for your OpenCL implementation, or visit the Khronos Registry at http://www.khronos.org/registry/cl/ for more information. Any supported OpenGL object defined within the GL share group object, or the share group associated with the GL context from which the CL context is created, may be shared, with the exception of the default OpenGL objects (i.e. objects named zero), which may not be shared. &gl_formatsInc; &gl_syncInc; &gl_lifetimeInc; OpenCL Functions That Allow Sharing Click an item in the table for details about that function. clGetGLContextInfoKHR Query the device. clCreateFromGLBuffer Creates an OpenCL buffer object from an OpenGL buffer object. clCreateFromGLTexture Creates an OpenCL image object, image array object, or image buffer object from an OpenGL texture object, texture array object, texture buffer object, or a single face of an OpenGL cubemap texture object. clCreateFromGLRenderbuffer Creates an OpenCL 2D image object from an OpenGL renderbuffer object. clGetGLObjectInfo Query an OpenGL memory object used to create an OpenCL memory object. clGetGLTextureInfo Get additional information about the GL texture object associated with a memory object. clEnqueueAcquireGLObjects Acquire OpenCL memory objects that have been created from OpenGL objects. clEnqueueReleaseGLObjects Release OpenCL memory objects that have been created from OpenGL objects. Specification OpenCL Specification Also see EXTENSION, clGetGLContextInfoKHR khronos-opencl-man-1.0~svn27110/clEnqueueFillBuffer.xml0000644000175000017500000003573411660441607022710 0ustar mathieumathieu clEnqueueFillBuffer clEnqueueFillBuffer 2007-2011 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. 3 clEnqueueFillBuffer Enqueues a command to fill a buffer object with a pattern of a given pattern size. cl_int clEnqueueFillBuffer cl_command_queue command_queue cl_mem buffer const void *pattern size_t pattern_size size_t offset size_t size cl_uint num_events_in_wait_list const cl_event *event_wait_list cl_event *event Parameters command_queue Refers to the command-queue in which the fill command will be queued. The OpenCL context associated with command_queue and buffer must be the same. buffer A valid buffer object. pattern A pointer to the data pattern of size pattern_size in bytes. pattern will be used to fill a region in buffer starting at offset and is size bytes in size. The data pattern must be a scalar or vector integer or floating-point data type. For example, if buffer is to be filled with a pattern of float4 values, then pattern will be a pointer to a cl_float4 value and pattern_size will be sizeof(cl_float4). The maximum value of pattern_size is the size of the largest integer or floating-point vector data type supported by the OpenCL device. The memory associated with pattern can be reused or freed after the function returns. offset The location in bytes of the region being filled in buffer and must be a multiple of pattern_size. size The size in bytes of region being filled in buffer and must be a multiple of pattern_size. event_wait_list , num_events_in_wait_list Specify events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event_wait_list act as synchronization points. The context associated with events in event_wait_list and command_queue must be the same. The memory associated with event_wait_list can be reused or freed after the function returns. event Returns an event object that identifies this particular write command and can be used to query or queue a wait for this particular command to complete. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. clEnqueueBarrierWithWaitList can be used instead. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the event_wait_list array. Notes Enqueues a command to fill a buffer object with a pattern of a given pattern size. The usage information which indicates whether the memory object can be read or written by a kernel and/or the host and is given by the cl_mem_flags argument value specified when buffer is created is ignored by clEnqueueFillBuffer. Errors clEnqueueFillBuffer returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors. CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_CONTEXT if the context associated with command_queue and buffer are not the same or if the context associated with command_queue and events in event_wait_list are not the same. CL_INVALID_MEM_OBJECT if buffer is not a valid buffer object. CL_INVALID_VALUE if offset or offset + size require accessing elements outside the buffer buffer object respectively. CL_INVALID_VALUE if pattern is NULL or if pattern_size is 0 or if pattern_size is not one of {1, 2, 4, 8, 16, 32, 64, 128}. CL_INVALID_VALUE if offset and size are not a multiple of pattern_size. CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_MISALIGNED_SUB_BUFFER_OFFSET if buffer is a sub-buffer object and offset specified when the sub-buffer object is created is not aligned to CL_DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue. CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clEnqueueBarrierWithWaitList khronos-opencl-man-1.0~svn27110/clReleaseMemObject.xml0000644000175000017500000001312411660441607022473 0ustar mathieumathieu clReleaseMemObject clReleaseMemObject 2007-2011 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. 3 clReleaseMemObject Decrements the memory object reference count. cl_int clReleaseMemObject cl_memmemobj Notes After the memobj reference count becomes zero and commands queued for execution on a command-queue(s) that use memobj have finished, the memory object is deleted. If memobj is a buffer object, memobj cannot be deleted until all sub-buffer objects associated with memobj are deleted. Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_MEM_OBJECT if memobj is a not a valid memory object. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clCreateBuffer, clEnqueueCopyBuffer, clEnqueueReadBuffer, clEnqueueWriteBuffer, clRetainMemObject khronos-opencl-man-1.0~svn27110/clReleaseEvent.xml0000644000175000017500000001570111660441607021712 0ustar mathieumathieu clReleaseEvent clReleaseEvent 2007-2011 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. 3 clReleaseEvent Decrements the event reference count. cl_int clReleaseEvent cl_eventevent Parameters event Event object being released. Notes Decrements the event reference count. The event object is deleted once the reference count becomes zero, the specific command identified by this event has completed (or terminated) and there are no commands in the command-queues of a context that require a wait for this event to complete. Developers should be careful when releasing their last reference count on events created by clCreateUserEvent that have not yet been set to status of CL_COMPLETE or an error. If the user event was used in the event_wait_list argument passed to a clEnqueue*** API or another application host thread is waiting for it in clWaitForEvents, those commands and host threads will continue to wait for the event status to reach CL_COMPLETE or error, even after the user has released the object. Since in this scenario the developer has released his last reference count to the user event, it would be in principle no longer valid for him to change the status of the event to unblock all the other machinery. As a result the waiting tasks will wait forever, and associated events, cl_mem objects, command queues and contexts are likely to leak. In-order command queues caught up in this deadlock may cease to do any work. Errors Returns CL_SUCCESS if the function executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_EVENT if event is not a valid event object. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clGetEventInfo, clRetainEvent, clWaitForEvents khronos-opencl-man-1.0~svn27110/clEnqueueReleaseD3D10ObjectsKHR.xml0000644000175000017500000002772411660441607024563 0ustar mathieumathieu ]> clEnqueueReleaseD3D10ObjectsKHR clEnqueueReleaseD3D10ObjectsKHR 2007-2011 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. 3 clEnqueueReleaseD3D10ObjectsKHR Release OpenCL memory objects that have been created from Direct3D 10 resources. cl_int clEnqueueReleaseD3D10ObjectsKHR cl_command_queue command_queue cl_uint num_objects const cl_mem*mem_objects cl_uintnum_events_in_wait_list const cl_event*event_wait_list cl_event*event Parameters num_objects The number of memory objects to be released in mem_objects. mem_objects A pointer to a list of OpenCL memory objects that were created from Direct3D 10 resources. num_events_in_wait_list, event_wait_list Specify events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the event_wait_list array. Notes The Direct3D 10 objects are released by the OpenCL context associated with command_queue. OpenCL memory objects created from Direct3D 10 resources which have been acquired by OpenCL must be released by OpenCL before they may be accessed by Direct3D 10. Accessing a Direct3D 10 resource while its corresponding OpenCL memory object is acquired is in error and will result in undefined behavior, including but not limited to possible OpenCL errors, data corruption, and program termination. If CL_CONTEXT_INTEROP_USER_SYNC is not specified as CL_TRUE during context creation, clEnqueueReleaseD3D10ObjectsKHR provides the synchronization guarantee that any calls to Direct3D 10 calls involving the interop device(s) used in the OpenCL context made after the call to clEnqueueReleaseD3D10ObjectsKHR will not start executing until after all events in event_wait_list are complete and all work already submitted to command_queue completes execution. If the context was created with properties specifying CL_CONTEXT_INTEROP_USER_SYNC as CL_TRUE, the user is responsible for guaranteeing that any Direct3D 10 calls involving the interop device(s) used in the OpenCL context made after clEnqueueReleaseD3D10ObjectsKHR will not start executing until after event returned by clEnqueueReleaseD3D10ObjectsKHR reports completion. &sharingD3D10Inc; Errors Returns CL_SUCCESS returns CL_SUCCESS if the function is executed successfully. If <num_objects> is 0 and <mem_objects> is NULL then the function does nothing and returns CL_SUCCESS. Otherwise it returns one of the following errors: CL_INVALID_VALUE if num_objects is zero and mem_objects is not a NULL value or if num_objects > 0 and mem_objects is NULL. CL_INVALID_MEM_OBJECT if memory objects in mem_objects are not valid OpenCL memory objects or if memory objects in mem_objects have not been created from Direct3D 10 resources. CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_CONTEXT if context associated with command_queue was not created from an Direct3D 10 context. CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR if memory objects in mem_objects have not previously been acquired using clEnqueueAcquireD3D10ObjectsKHR, or have been released using clEnqueueReleaseD3D10ObjectsKHR since the last time that they were acquired. CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_event_in_wait_list > 0, or event_wait_list is not NULL and num_event_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see cl_khr_d3d10_sharing, clGetDeviceIDsFromD3D10KHR, clCreateFromD3D10BufferKHR, clCreateFromD3D10Texture2DKHR, clCreateFromD3D10Texture3DKHR, clEnqueueAcquireD3D10ObjectsKHR khronos-opencl-man-1.0~svn27110/imageDescriptor.xml0000644000175000017500000002664212200737321022130 0ustar mathieumathieu imageDescriptor imageDescriptor 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. 3 imageDescriptor The image descriptor structure describes the type and dimensions of the image or image array and is defined as: typedef struct _cl_image_desc { cl_mem_object_type image_type; size_t image_width; size_t image_height; size_t image_depth; size_t image_array_size; size_t image_row_pitch; size_t image_slice_pitch; cl_uint num_mip_levels; cl_uint num_samples; cl_mem buffer; } cl_image_desc; Members image_type Describes the image type and must be either CL_MEM_OBJECT_IMAGE1D, CL_MEM_OBJECT_IMAGE1D_BUFFER, CL_MEM_OBJECT_IMAGE1D_ARRAY, CL_MEM_OBJECT_IMAGE2D, CL_MEM_OBJECT_IMAGE2D_ARRAY, or CL_MEM_OBJECT_IMAGE3D. image_width The width of the image in pixels. For a 2D image and image array, the image width must be ≤ CL_DEVICE_IMAGE2D_MAX_WIDTH. For a 3D image, the image width must be ≤ CL_DEVICE_IMAGE3D_MAX_WIDTH. For a 1D image buffer, the image width must be ≤ CL_DEVICE_IMAGE_MAX_BUFFER_SIZE. For a 1D image and 1D image array, the image width must be ≤ CL_DEVICE_IMAGE2D_MAX_WIDTH. image_height The height of the image in pixels. This is only used if the image is a 2D, 3D or 2D image array. For a 2D image or image array, the image height must be ≤ CL_DEVICE_IMAGE2D_MAX_HEIGHT. For a 3D image, the image height must be ≤ CL_DEVICE_IMAGE3D_MAX_HEIGHT. image_depth The depth of the image in pixels. This is only used if the image is a 3D image and must be a value ≥ 1 and ≤ CL_DEVICE_IMAGE3D_MAX_DEPTH. image_array_size The number of images in the image array. This is only used if the image is a 1D or 2D image array. The values for image_array_size, if specified, must be a value ≥ 1 and ≤ CL_DEVICE_IMAGE_MAX_ARRAY_SIZE. Note that reading and writing 2D image arrays from a kernel with image_array_size = 1 may be lower performance than 2D images. image_row_pitch The scan-line pitch in bytes. This must be 0 if host_ptr is NULL and can be either 0 or ≥ image_width * size of element in bytes if host_ptr is not NULL. If host_ptr is not NULL and image_row_pitch = 0, image_row_pitch is calculated as image_width * size of element in bytes. If image_row_pitch is not 0, it must be a multiple of the image element size in bytes. image_slice_pitch The size in bytes of each 2D slice in the 3D image or the size in bytes of each image in a 1D or 2D image array. This must be 0 if host_ptr is NULL. If host_ptr is not NULL, image_slice_pitch can be either 0 or ≥ image_row_pitch * image_height for a 2D image array or 3D image and can be either 0 or ≥ image_row_pitch for a 1D image array. If host_ptr is not NULL and image_slice_pitch = 0, image_slice_pitch is calculated as image_row_pitch * image_height for a 2D image array or 3D image and image_row_pitch for a 1D image array. If image_slice_pitch is not 0, it must be a multiple of the image_row_pitch. num_mip_level, num_samples Must be 0. buffer Refers to a valid buffer memory object if image_type is CL_MEM_OBJECT_IMAGE1D_BUFFER. Otherwise it must be NULL. For a 1D image buffer object, the image pixels are taken from the buffer object's data store. When the contents of a buffer object's data store are modified, those changes are reflected in the contents of the 1D image buffer object and vice-versa at corresponding sychronization points. The image_width * size of element in bytes must be ≤ size of buffer object data store. Note Concurrent reading from, writing to and copying between both a buffer object and 1D image buffer object associated with the buffer object is undefined. Only reading from both a buffer object and 1D image buffer object associated with the buffer object is defined. Specification OpenCL Specification Also see cl_image_format khronos-opencl-man-1.0~svn27110/functionQualifiers.xml0000644000175000017500000003250011660441607022657 0ustar mathieumathieu Function Qualifiers Function Qualifiers 2007-2011 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. 3 Function Qualifiers Qualifiers for kernel functions. __kernel kernel __attribute__((vec_type_hint(<typen>))) __attribute__((work_group_size_hint(X, Y, Z))) __attribute__((reqd_work_group_size(X, Y, Z))) Description The __kernel (or kernel) qualifier declares a function to be a kernel that can be executed by an application on an OpenCL device(s). The following rules apply to functions that are declared with this qualifier: It can be executed on the device only It can be called by the host It is just a regular function call if a __kernel function is called by another kernel function. Kernel functions with variables declared inside the function with the __local or local qualifier can be called by the host using appropriate APIs such as clEnqueueNDRangeKernel, and clEnqueueTask. The behavior of calling kernel functions with variables declared inside the function with the __local or local qualifier from other kernel functions is implementation-defined. The __kernel and kernel names are reserved for use as functions qualifiers and shall not be used otherwise. Optional Attribute Qualifiers The __kernel qualifier can be used with the keyword __attribute__ to declare additional information about the kernel function as described below. The optional __attribute__((vec_type_hint(<type>))) is a hint to the compiler and is intended to be a representation of the computational width of the __kernel, and should serve as the basis for calculating processor bandwidth utilization when the compiler is looking to autovectorize the code. In the __attribute__((vec_type_hint(<type>))) qualifier <type> is one of the built-in vector types or the constituent scalar element types. If vec_type_hint (<type>) is not specified, the kernel is assumed to have the __attribute__((vec_type_hint(int))) qualifier. Implicit in autovectorization is the assumption that any libraries called from the __kernel must be recompilable at run time to handle cases where the compiler decides to merge or separate workitems. This probably means that such libraries can never be hard coded binaries or that hard coded binaries must be accompanied either by source or some retargetable intermediate representation. This may be a code security question for some. For example, where the developer specified a width of float4, the compiler should assume that the computation usually uses up 4 lanes of a float vector, and would decide to merge work-items or possibly even separate one work-item into many threads to better match the hardware capabilities. A conforming implementation is not required to autovectorize code, but shall support the hint. A compiler may autovectorize, even if no hint is provided. If an implementation merges N work-items into one thread, it is responsible for correctly handling cases where the number of global or local work-items in any dimension modulo N is not zero. If for example, a __kernel function is declared with __attribute__(( vec_type_hint (float4))) (meaning that most operations in the __kernel are explicitly vectorized using float4) and the kernel is running using Intel® Advanced Vector Instructions (Intel® AVX) which implements a 8-float-wide vector unit, the autovectorizer might choose to merge two work-items to one thread, running a second work-item in the high half of the 256-bit AVX register. As another example, a Power4 machine has two scalar double precision floating-point units with an 6-cycle deep pipe. An autovectorizer for the Power4 machine might choose to interleave six kernels declared with the __attribute__(( vec_type_hint (double2))) qualifier into one hardware thread, to ensure that there is always 12-way parallelism available to saturate the FPUs. It might also choose to merge 4 or 8 work-items (or some other number) if it concludes that these are better choices, due to resource utilization concerns or some preference for divisibility by 2. The optional __attribute__((work_group_size_hint(X, Y, Z))) is a hint to the compiler and is intended to specify the work-group size that may be used i.e. value most likely to be specified by the local_work_size argument to clEnqueueNDRangeKernel. For example the __attribute__((work_group_size_hint(1, 1, 1))) is a hint to the compiler that the kernel will most likely be executed with a work-group size of 1. The optional __attribute__((reqd_work_group_size(X, Y, Z))) is the work-group size that must be used as the local_work_size argument to clEnqueueNDRangeKernel. This allows the compiler to optimize the generated code appropriately for this kernel. The optional __attribute__((reqd_work_group_size(X, Y, Z))), if specified, must be (1, 1, 1) if the kernel is executed via clEnqueueTask. If Z is one, the work_dim argument to clEnqueueNDRangeKernel can be 2 or 3. If Y and Z are one, the work_dim argument to clEnqueueNDRangeKernel can be 1, 2 or 3. Notes Kernel functions with variables declared inside the function with the __local or local qualifier can be called by the host using appropriate APIs such as clEnqueueNDRangeKernel, and clEnqueueTask. The behavior of calling kernel functions with variables declared inside the function with the __local and local qualifier from other kernel functions is implementation-defined. The __kernel and kernel names are reserved for use as functions qualifiers and shall not be used otherwise. Example // autovectorize assuming float4 as the // basic computation width __kernel __attribute__((vec_type_hint(float4))) void foo( __global float4 *p ) { .... // autovectorize assuming double as the // basic computation width __kernel __attribute__((vec_type_hint(double))) void foo( __global float4 *p ){ .... // autovectorize assuming int (default) // as the basic computation width __kernel void foo( __global float4 *p ){ .... Specification OpenCL Specification Also see __attribute__, clEnqueueNDRangeKernel, clEnqueueTask khronos-opencl-man-1.0~svn27110/imageFunctionsInc.xml0000644000175000017500000000357611660441607022425 0ustar mathieumathieu The built-in functions defined in this section can only be used with image memory objects. An image memory object can be accessed by specific function calls that read from and/or write to specific locations in the image. Image memory objects that are being read by a kernel should be declared with the __read_only qualifier. write_image calls to image memory objects declared with the __read_only qualifier will generate a compilation error. Image memory objects that are being written to by a kernel should be declared with the __write_only qualifier. read_image calls to image memory objects declared with the __write_only qualifier will generate a compilation error. read_image and write_image calls to the same image memory object in a kernel are not supported. The read_image calls returns a four component floating-point, integer or unsigned integer color value. The color values returned by read_image are identified as x, y, z, w where x refers to the red component, y refers to the green component, z refers to the blue component and w refers to the alpha component. khronos-opencl-man-1.0~svn27110/vload_half.xml0000644000175000017500000001543511660441607021114 0ustar mathieumathieu ]> vload_half vload_half 2007-2011 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. 3 vload_half Read a half float from a pointer to memory. float vload_half size_toffset const __global half*p float vload_half size_toffset const __local half*p float vload_half size_toffset const __constant half*p float vload_half size_toffset const __private half*p Description Read sizeof(half) bytes of data from address (p + offset). The data read is interpreted as a half value. The half value is converted to a float value and the float value is returned. The read address computed as (p + offset) must be 16-bit aligned. An application that wants to use half and halfn types will need to include the #pragma OPENCL EXTENSION cl_khr_fp16 : enable directive. Notes &vectorFunctionsInc; Specification OpenCL Specification Also see Vector Data Load and Store Functions khronos-opencl-man-1.0~svn27110/clCreateSubDevices.xml0000644000175000017500000004746411660441607022523 0ustar mathieumathieu ]> clCreateSubDevices clCreateSubDevices 2007-2011 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. 3 clCreateSubDevices Creates an array of sub-devices that each reference a non-intersecting set of compute units within in_device. cl_int clCreateSubDevices cl_device_id in_device const cl_device_partition_property *properties cl_uint num_devices cl_device_id *out_devices cl_uint *num_devices_ret Parameters in_device The device to be partitioned. properties Specifies how in_device is to be partition described by a partition name and its corresponding value. Each partition name is immediately followed by the corresponding desired value. The list is terminated with 0. The list of supported partitioning schemes is described in the table below. Only one of the listed partitioning schemes can be specified in properties. cl_device_partition_ property enum (Partition value) Description CL_DEVICE_PARTITION_EQUALLY (unsigned int) Split the aggregate device into as many smaller aggregate devices as can be created, each containing n compute units. The value n is passed as the value accompanying this property. If n does not divide evenly into CL_DEVICE_PARTITION_MAX_COMPUTE_UNITS, then the remaining compute units are not used. CL_DEVICE_PARTITION_BY_COUNTS (unsigned int) This property is followed by a CL_DEVICE_PARTITION_BY_COUNTS_LIST_END terminated list of compute unit counts. For each nonzero count m in the list, a sub-device is created with m compute units in it. CL_DEVICE_PARTITION_BY_COUNTS_LIST_END is defined to be 0. The number of non-zero count entries in the list may not exceed CL_DEVICE_PARTITION_MAX_SUB_DEVICES. The total number of compute units specified may not exceed CL_DEVICE_PARTITION_MAX_COMPUTE_UNITS. CL_DEVICE_PARTITION_BY_- AFFINITY_DOMAIN (cl_device_affinity_domain) Split the device into smaller aggregate devices containing one or more compute units that all share part of a cache hierarchy. The value accompanying this property may be drawn from the following list: CL_DEVICE_AFFINITY_DOMAIN_NUMA - Split the device into sub-devices comprised of compute units that share a NUMA node. CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE - Split the device into sub-devices comprised of compute units that share a level 4 data cache. CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE - Split the device into sub-devices comprised of compute units that share a level 3 data cache. CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE - Split the device into sub-devices comprised of compute units that share a level 2 data cache. CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE - Split the device into sub-devices comprised of compute units that share a level 1 data cache. CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE - Split the device along the next partitionable affinity domain. The implementation shall find the first level along which the device or sub-device may be further subdivided in the order NUMA, L4, L3, L2, L1, and partition the device into sub-devices comprised of compute units that share memory subsystems at this level. The user may determine what happened by calling clGetDeviceInfo (CL_DEVICE_PARTITION_TYPE) on the sub-devices. num_devices Size of memory pointed to by out_devices specified as the number of cl_device_id entries. out_devices The buffer where the OpenCL sub-devices will be returned. If out_devices is NULL, this argument is ignored. If out_devices is not NULL, num_devices must be greater than or equal to the number of sub-devices that device may be partitioned into according to the partitioning scheme specified in properties. num_devices_ret Returns the number of sub-devices that device may be partitioned into according to the partitioning scheme specified in properties. If num_devices_ret is NULL, it is ignored. Notes Creates an array of sub-devices that each reference a non-intersecting set of compute units within in_device, according to a partition scheme given by properties. The output sub-devices may be used in every way that the root (or parent) device can be used, including creating contexts, building programs, further calls to clCreateSubDevices and creating command-queues. When a command-queue is created against a sub-device, the commands enqueued on the queue are executed only on the sub-device. Errors Returns CL_SUCCESS if the partition is created successfully. Otherwise, it returns a null value with the following error values returned in errcode_ret: CL_INVALID_DEVICE if in_device is not valid. CL_INVALID_VALUE if values specified in properties are not valid or if values specified in properties are valid but not supported by the device. CL_INVALID_VALUE if out_devices is not NULL and num_devices is less than the number of sub-devices created by the partition scheme. CL_DEVICE_PARTITION_FAILED if the partition name is supported by the implementation but in_device could not be further partitioned. CL_INVALID_DEVICE_PARTITION_COUNT if the partition name specified in properties is CL_DEVICE_PARTITION_BY_COUNTS and the number of sub-devices requested exceeds CL_DEVICE_PARTITION_MAX_SUB_DEVICES or the total number of compute units requested exceeds CL_DEVICE_PARTITION_MAX_COMPUTE_UNITS for in_device, or the number of compute units requested for one or more sub-devices is less than zero or the number of sub-devices requested exceeds CL_DEVICE_PARTITION_MAX_COMPUTE_UNITS for in_device. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Example A few examples that describe how to specify partition properties in properties argument to clCreateSubDevices are given below. To partition a device containing 16 compute units into two sub-devices, each containing 8 compute units, pass the following in properties: { CL_DEVICE_PARTITION_EQUALLY, 8, 0 } To partition a device with four compute units into two sub-devices with one sub-device containing 3 compute units and the other sub-device 1 compute unit, pass the following in properties argument: { CL_DEVICE_PARTITION_BY_COUNTS, 3, 1, CL_DEVICE_PARTITION_BY_COUNTS_LIST_END, 0 } To split a device along the outermost cache line (if any), pass the following in properties argument: { CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN, CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE, 0 } Specification OpenCL Specification Also see clGetDeviceInfo khronos-opencl-man-1.0~svn27110/clSetUserEventStatus.xml0000644000175000017500000002012611660441607023125 0ustar mathieumathieu clSetUserEventStatus clSetUserEventStatus clSetUserEventStatus 2007-2011 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. 3 clSetUserEventStatus Sets the execution status of a user event object. cl_int clSetUserEventStatus cl_eventevent cl_intexecution_status Parameters event A user event object created using clCreateUserEvent. execution_status Specifies the new execution status to be set and can be CL_COMPLETE or a negative integer value to indicate an error. A negative integer value causes all enqueued commands that wait on this user event to be terminated. clSetUserEventStatus can only be called once to change the execution status of event. Notes Enqueued commands that specify user events in the event_wait_list argument of clEnqueue*** commands must ensure that the status of these user events being waited on are set using clSetUserEventStatus before any OpenCL APIs that release OpenCL objects except for event objects are called; otherwise the behavior is undefined. Errors Returns CL_SUCCESS if the function was executed successfully. Otherwise, it returns one of the following errors CL_INVALID_EVENT if event is not a valid user event. CL_INVALID_VALUE if the execution_status is not CL_COMPLETE or a negative integer value. CL_INVALID_OPERATION if the execution_status for event has already been changed by a previous call to clSetUserEventStatus. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Example For example, the following code sequence will result in undefined behavior of clReleaseMemObject. ev1 = clCreateUserEvent(ctx, NULL); clEnqueueWriteBuffer(cq, buf1, CL_FALSE, ..., 1, &ev1, NULL; clEnqueueWriteBuffer(cq, buf2, CL_FALSE,...); clReleaseMemObject(buf2); clSetUserEventStatus(ev1, CL_COMPLETE); The following code sequence, however, works correctly. ev1 = clCreateUserEvent(ctx, NULL); clEnqueueWriteBuffer(cq, buf1, CL_FALSE, ..., 1, &ev1, NULL; clEnqueueWriteBuffer(cq, buf2, CL_FALSE,...); clSetUserEventStatus(ev1, CL_COMPLETE); clReleaseMemObject(buf2); Specification OpenCL Specification Also see clCreateUserEvent khronos-opencl-man-1.0~svn27110/clEnqueueMapBuffer.xml0000644000175000017500000005673511660441607022543 0ustar mathieumathieu clEnqueueMapBuffer clEnqueueMapBuffer 2007-2011 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. 3 clEnqueueMapBuffer Enqueues a command to map a region of the buffer object given by buffer into the host address space and returns a pointer to this mapped region. void * clEnqueueMapBuffer cl_command_queuecommand_queue cl_membuffer cl_boolblocking_map cl_map_flagsmap_flags size_toffset size_tsize cl_uintnum_events_in_wait_list const cl_event*event_wait_list cl_event*event cl_int*errcode_ret Parameters command_queue Must be a valid command-queue. blocking_map Indicates if the map operation is blocking or non-blocking. If blocking_map is CL_TRUE, clEnqueueMapBuffer does not return until the specified region in buffer is mapped into the host address space and the application can access the contents of the mapped region using the pointer returned by clEnqueueMapBuffer. If blocking_map is CL_FALSE i.e. map operation is non-blocking, the pointer to the mapped region returned by clEnqueueMapBuffer cannot be used until the map command has completed. The event argument returns an event object which can be used to query the execution status of the map command. When the map command is completed, the application can access the contents of the mapped region using the pointer returned by clEnqueueMapBuffer. map_flags A bit-bield with the following supported values. cl_map_flags Description CL_MAP_READ This flag specifies that the region being mapped in the memory object is being mapped for reading. The pointer returned by clEnqueueMapBuffer or clEnqueueMapImage is guaranteed to contain the latest bits in the region being mapped when the clEnqueueMapBuffer or clEnqueueMapImage command has completed. CL_MAP_WRITE This flag specifies that the region being mapped in the memory object is being mapped for writing. The pointer returned by clEnqueueMapBuffer or clEnqueueMapImage is guaranteed to contain the latest bits in the region being mapped when the clEnqueueMapBuffer or clEnqueueMapImage command has completed. CL_MAP_WRITE_INVALIDATE_REGION This flag specifies that the region being mapped in the memory object is being mapped for writing. The contents of the region being mapped are to be discarded. This is typically the case when the region being mapped is overwritten by the host. This flag allows the implementation to no longer guarantee that the pointer returned by clEnqueueMapBuffer or clEnqueueMapImage contains the latest bits in the region being mapped which can be a significant performance enhancement. CL_MAP_READ or CL_MAP_WRITE and CL_MAP_WRITE_INVALIDATE_REGION are mutually exclusive. buffer A valid buffer object. The OpenCL context associated with command_queue and buffer must be the same. offset, size The offset in bytes and the size of the region in the buffer object that is being mapped. event_wait_list, num_events_in_wait_list Specify events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event_wait_list act as synchronization points. The context associated with events in event_wait_list and command_queue must be the same. The memory associated with event_wait_list can be reused or freed after the function returns. event Returns an event object that identifies this particular copy command and can be used to query or queue a wait for this particular command to complete. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the event_wait_list array. errcode_ret Returns an appropriate error code. If errcode_ret is NULL, no error code is returned. Notes The returned pointer maps a region starting at offset and is at least size bytes in size. The result of a memory access outside this region is undefined. If the buffer object is created with CL_MEM_USE_HOST_PTR set in mem_flags, the following will be true: The host_ptr specified in clCreateBuffer is guaranteed to contain the latest bits in the region being mapped when the clEnqueueMapBuffer command has completed. The pointer value returned by clEnqueueMapBuffer will be derived from the host_ptr specified when the buffer object is created. Mapped buffer objects are unmapped using clEnqueueUnmapMemObject. clEnqueueMapBuffer and clEnqueueMapImage increment the mapped count of the memory object. The initial mapped count value of a memory object is zero. Multiple calls to clEnqueueMapBuffer or clEnqueueMapImage on the same memory object will increment this mapped count by appropriate number of calls. clEnqueueUnmapMemObject decrements the mapped count of the memory object. clEnqueueMapBuffer and clEnqueueMapImage act as synchronization points for a region of the buffer object being mapped. Errors clEnqueueMapBuffer will return a pointer to the mapped region if the function is executed successfully. The errcode_ret is set to CL_SUCCESS. A NULL pointer is returned otherwise with one of the following error values returned in errcode_ret: CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_CONTEXT if the context associated with command_queue and image are not the same or if the context associated with command_queue and events in event_wait_list are not the same. CL_INVALID_MEM_OBJECT if image is not a valid image object. CL_INVALID_VALUE if region being mapped given by (offset, size) is out of bounds or if size is 0 or values specified in map_flags are not valid. CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_MISALIGNED_SUB_BUFFER_OFFSET if buffer is a sub-buffer object and offset specified when the sub-buffer object is created is not aligned to CL_DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue. CL_MAP_FAILURE if there is a failure to map the requested region into the host address space. This error cannot occur for image objects created with CL_MEM_USE_HOST_PTR or CL_MEM_ALLOC_HOST_PTR. CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the map operation is blocking and the execution status of any of the events in event_wait_list is a negative integer value. CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer. CL_INVALID_OPERATION if buffer has been created with CL_MEM_HOST_WRITE_ONLY or CL_MEM_HOST_NO_ACCESS and CL_MAP_READ is set in map_flags or if buffer has been created with CL_MEM_HOST_READ_ONL or CL_MEM_HOST_NO_ACCESS and CL_MAP_WRITE or CL_MAP_WRITE_INVALIDATE_REGION is set in map_flags. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clEnqueueMapImage, clEnqueueUnmapMemObject khronos-opencl-man-1.0~svn27110/cl_khr_dx9_media_sharing.xml0000644000175000017500000002764011660441607023716 0ustar mathieumathieu cl_khr_dx9_media_sharing cl_khr_dx9_media_sharing 2007-2011 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. 3 cl_khr_dx9_media_sharing Provide interoperability between OpenCL and selecgted adapter APIs (only DX9 at this time). #pragma OPENCL EXTENSION cl_khr_dx9_media_sharing : enable Description The interfaces for this extension are provided in the header file cl_dx9_media_sharing.h. If the cl_khr_dx9_media_sharing extension is supported, then the following functions are enabled: clGetDeviceIDsFromDX9MediaAdapterKHR clCreateFromDX9MediaSurfaceKHR clEnqueueAcquireDX9MediaSurfacesKHR clEnqueueReleaseDX9MediaSurfacesKHR The OpenCL functions enabled by the cl_khr_dx9_media_sharing extension allow applications to use media surfaces as OpenCL memory objects. This allows efficient sharing of data between OpenCL and selected adapter APIs (only DX9 for now). If this extension is supported, an OpenCL image object can be created from a media surface and the OpenCL API can be used to execute kernels that read and/or write memory objects that are media surfaces. Note that OpenCL memory objects may be created from the adapter media surface if and only if the OpenCL context has been created from that adapter. If this extension is supported by an implementation, the string "cl_khr_dx9_media_sharing" will be present in the CL_PLATFORM_EXTENSIONS or CL_DEVICE_EXTENSIONS string described in the table of allowed values for param_name for clGetDeviceInfo As currently proposed the interfaces for this extension would be provided in cl_dx9_media_sharing.h. Specification OpenCL Specification Also see EXTENSION, clGetDeviceIDsFromDX9MediaAdapterKHR, clCreateFromDX9MediaSurfaceKHR, clEnqueueAcquireDX9MediaSurfacesKHR, clEnqueueReleaseDX9MediaSurfacesKHR khronos-opencl-man-1.0~svn27110/isnormal.xml0000644000175000017500000001475711660441607020647 0ustar mathieumathieu ]> isnormal isnormal 2007-2011 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. 3 isnormal Test for a normal value. int isnormal float intn isnormal floatn int isnormal double longn isnormal doublen int isnormal (half) // if half extension enabled shortn isnormal (halfn) // if half extension enabled Description Test for a normal value. Notes &relationalFunctionsInc1; &relationalFunctionsInc2; Specification OpenCL Specification Also see Relational Functions khronos-opencl-man-1.0~svn27110/get_image_dim.xml0000644000175000017500000001374011660441607021564 0ustar mathieumathieu get_image_dim get_image_dim 2007-2011 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. 3 get_image_dim Return the image dimensions. int2 get_image_dim image2d_t image int2 get_image_dim image2d_array_t image int4 get_image_dim image3d_t image Description get_image_dim with image2d_t and image2d_array_t returns the 2D image width and height as an int2 type. The width is returned in the x component, and the height in the y component. get_image_dim with image3d_t returns the 3D image width, height, and depth as an int4 type. The width is returned in the x component, height in the y component, depth in the z component and the w component is 0. Specification OpenCL Specification Also see Image Functions khronos-opencl-man-1.0~svn27110/sharingD3D10Inc.xml0000644000175000017500000000614611660441607021535 0ustar mathieumathieu General information about sharing memory objects with Direct3D 10 follows. The goal of this extension is to provide interoperability between OpenCL and Direct3D 10. This is designed to function analogously to the OpenGL interoperability. If this extension is supported by an implementation, the string "cl_khr_d3d10_sharing" will be present in the CL_PLATFORM_EXTENSIONS or CL_DEVICE_EXTENSIONS string described in the table of allowed values for param_name for clGetDeviceInfo. As currently proposed, the interfaces for this extension would be provided in cl_d3d10.h. This section discusses OpenCL functions that allow applications to use Direct3D 10 resources as OpenCL memory objects. This allows efficient sharing of data between OpenCL and Direct3D 10. The OpenCL API may be used to execute kernels that read and/or write memory objects that are also Direct3D 10 resources. An OpenCL image object may be created from a Direct3D 10 texture resource. An OpenCL buffer object may be created from a Direct3D 10 buffer resource. OpenCL memory objects may be created from Direct3D 10 objects if and only if the OpenCL context has been created from a Direct3D 10 device. Lifetime of Shared Objects An OpenCL memory object created from a Direct3D 10 resource remains valid as long as the corresponding Direct3D 10 resource has not been deleted. If the Direct3D 10 resource is deleted through the Direct3D 10 API, subsequent use of the OpenCL memory object will result in undefined behavior, including but not limited to possible OpenCL errors, data corruption, and program termination. The successful creation of a cl_context against a Direct3D 10 device specified via the context create parameter CL_CONTEXT_D3D10_DEVICE_KHR will increment the internal Direct3D reference count on the specified Direct3D 10 device. The internal Direct3D reference count on that Direct3D 10 device will be decremented when the OpenCL reference count on the returned OpenCL context drops to zero. The OpenCL context and corresponding command-queues are dependent on the existence of the Direct3D 10 device from which the OpenCL context was created. If the Direct3D 10 device is deleted through the Direct3D 10 API, subsequent use of the OpenCL context will result in undefined behavior, including but not limited to possible OpenCL errors, data corruption, and program termination. khronos-opencl-man-1.0~svn27110/clGetImageInfo.xml0000644000175000017500000005104511660441607021627 0ustar mathieumathieu clGetImageInfo clGetImageInfo 2007-2011 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. 3 clGetImageInfo Get information specific to an image object created with clCreateImage. cl_intclGetImageInfo cl_mem image cl_image_info param_name size_t param_value_size void *param_value size_t *param_value_size_ret Parameters image Specifies the image object being queried. param_name Specifies the information to query. The list of supported param_name types and the information returned in param_value by clGetImageInfo is described in the table below. param_value A pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored. param_value_size Used to specify the size in bytes of memory pointed to by param_value. This size must be ≥ size of return type as described in the table below. cl_image_info Return Type Info. returned in param_value CL_IMAGE_FORMAT cl_image_format Return image format descriptor specified when image is created with clCreateImage. CL_IMAGE_ELEMENT_SIZE size_t Return size of each element of the image memory object given by image. An element is made up of n channels. The value of n is given in cl_image_format descriptor. CL_IMAGE_ROW_PITCH size_t Return size in bytes of a row of elements of the image object given by image. CL_IMAGE_SLICE_PITCH size_t Return calculated slice pitch in bytes of a 2D slice for the 3D image object or size of each image in a 1D or 2D image array given by image. For a 1D image, 1D image buffer and 2D image object return 0. CL_IMAGE_WIDTH size_t Return width of image in pixels. CL_IMAGE_HEIGHT size_t Return height of image in pixels. For a 1D image, 1D image buffer and 1D image array object, height = 0. CL_IMAGE_DEPTH size_t Return depth of the image in pixels. For a 1D image, 1D image buffer, 2D image or 1D and 2D image array object, depth = 0. CL_IMAGE_ARRAY_SIZE size_t Return number of images in the image array. If image is not an image array, 0 is returned. CL_IMAGE_BUFFER cl_mem Return buffer object associated with image. CL_IMAGE_NUM_MIP_LEVELS cl_uint Return num_mip_levels associated with image. CL_IMAGE_NUM_SAMPLES cl_uint Return num_samples associated with image. CL_IMAGE_D3D10_SUBRESOURCE_KHR ID3D10Resource * (if the cl_khr_d3d10_sharing extension is enabled) If image was created using clCreateFromD3D10Texture2DKHR or clCreateFromD3D10Texture3DKHR, returns the subresource argument specified when image was created. CL_IMAGE_DX9_MEDIA_PLANE_KHR cl_uint Returns the plane argument value specified when memobj is created using clCreateFromDX9MediaSurfaceKHR. (If the cl_khr_dx9_media_sharing extension is supported) CL_IMAGE_DX9_MEDIA_- SURFACE_PLANE_KHR cl_uint Returns the plane argument value specified when memobj is created using clCreateFromDX9MediaSurfaceKHR. (If the cl_khr_dx9_media_sharing extension is supported) CL_IMAGE_D3D11_- SUBRESOURCE_KHR ID3D11Resource * If the cl_khr_d3d11_sharing extension is suported, If image was created using clCreateFromD3D11Texture2DKHR, or clCreateFromD3D11Texture3DKHR, returns the subresource argument specified when image was created. param_value_size_ret Returns the actual size in bytes of data being queried by param_value. If param_value_size_ret is NULL, it is ignored. Notes To get information that is common to all memory objects (buffer and image objects), use the clGetMemObjectInfo function. Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_VALUE if param_name is not valid, or if size in bytes specified by param_value_size is < size of return type as described in the table above and param_value is not NULL. CL_INVALID_MEM_OBJECT if image is a not a valid image object. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. CL_INVALID_DX9_MEDIA_SURFACE_KHR if param_name is CL_IMAGE_DX9_MEDIA_PLANE_KHR and image was not created by the function clCreateFromDX9MediaSurfaceKHR. (If the cl_khr_dx9_media_sharing extension is supported) CL_INVALID_D3D10_RESOURCE_KHR if param_name is CL_MEM_D3D10_SUBRESOURCE_KHR and image was not created by the function clCreateFromD3D10Texture2DKHR or clCreateFromD3D10Texture3DKHR. (If the cl_khr_d3d10_sharing extension is supported) CL_INVALID_D3D11_RESOURCE_KHR if param_name is CL_MEM_D3D11_SUBRESOURCE_KHR and image was not created by the function clCreateFromD3D11Texture2DKHR or clCreateFromD3D11Texture3DKHR. (If the cl_khr_d3d11_sharing extension is supported) Specification OpenCL Specification Also see clGetMemObjectInfo khronos-opencl-man-1.0~svn27110/vectorHalfFunctionsInc.xml0000644000175000017500000000064411660441607023431 0ustar mathieumathieu When extended by the cl_khr_fp16 extension, the generic type gentypen is extended to include half, half2, half3, half4, half8, and half16. khronos-opencl-man-1.0~svn27110/mathFunctions.xml0000644000175000017500000003243711660441607021640 0ustar mathieumathieu ]> Math Built-In Functions Math Built-In Functions 2007-2011 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. 3 Math Built-In Functions The table below describes the list of built-in math functions. These functions can take scalar or vector arguments. Click an item in the table for details about that function. acos acosh acospi asin asinh asinpi atan atan2 atanh atanpi atan2pi cbrt ceil copysign cos cosh cospi erfc erf exp exp2 exp10 expm1 fabs fdim floor fma fmax fmin fmod fract frexp hypot ilogb ldexp lgamma lgamma_r log log2 log10 log1p logb mad maxmag minmag modf nan nextafter pow pown powr remainder remquo rint rootn round rsqrt sin sincos sinh sinpi sqrt tan tanh tanpi tgamma trunc The table below describes the list of built-in math functions that are defined with the half_ or native_ prefix (half | native)_ cos (half | native)_ divide (half | native)_ exp (half | native)_ exp2 (half | native)_exp10 (half | native)_ log (half | native)_ log2 (half | native)_ log10 (half | native)_ powr (half | native)_ recip (half | native)_ rsqrt (half | native)_ sin (half | native)_ sqrt (half | native)_ tan Description &mathFunctionsInc; The math functions that are defined with the half_ prefix are implemented with a minimum of 10-bits of accuracy i.e. an ULP value <= 8192 ulp. The math functions that are defined with the native_ prefix may map to one or more native device instructions and will typically have better performance compared to the corresponding functions (without the native_ prefix) described. The accuracy (and in some cases the input range(s)) of these functions is implementation-defined. Specification OpenCL Specification Also see Symbolic Math Constants, Floating Point Pragma, Macros and Limits khronos-opencl-man-1.0~svn27110/clEnqueueReadBufferRect.xml0000644000175000017500000005714411660441607023512 0ustar mathieumathieu clEnqueueReadBufferRect clEnqueueReadBufferRect 2007-2011 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. 3 clEnqueueReadBufferRect Enqueue commands to read from a rectangular region from a buffer object to host memory. cl_int clEnqueueReadBufferRect cl_command_queue command_queue cl_mem buffer cl_bool blocking_read const size_t *buffer_origin const size_t *host_origin const size_t *region size_t buffer_row_pitch size_t buffer_slice_pitch size_t host_row_pitch size_t host_slice_pitch void *ptr cl_uint num_events_in_wait_list const cl_event *event_wait_list cl_event *event Parameters command_queue Refers to the command-queue in which the read command will be queued. command_queue and buffer must be created with the same OpenCL context. buffer Refers to a valid buffer object. blocking_read Indicates if the read operations are blocking or non-blocking. If blocking_read is CL_TRUE i.e. the read command is blocking, clEnqueueReadBufferRect does not return until the buffer data has been read and copied into memory pointed to by ptr. If blocking_read is CL_FALSE i.e. the read command is non-blocking, clEnqueueReadBufferRect queues a non-blocking read command and returns. The contents of the buffer that ptr points to cannot be used until the read command has completed. The event argument argument returns an event object which can be used to query the execution status of the read command. When the read command has completed, the contents of the buffer that ptr points to can be used by the application. buffer_origin The (x, y, z) offset in the memory region associated with buffer. For a 2D rectangle region, the z value given by buffer_origin[2] should be 0. The offset in bytes is computed as buffer_origin[2] * buffer_slice_pitch + buffer_origin[1] * buffer_row_pitch + buffer_origin[0]. host_origin The (x, y, z) offset in the memory region pointed to by ptr. For a 2D rectangle region, the z value given by host_origin[2] should be 0. The offset in bytes is computed as host_origin[2] * host_slice_pitch + host_origin[1] * host_row_pitch + host_origin[0]. region The (width, height, depth) in bytes of the 2D or 3D rectangle being read or written. For a 2D rectangle copy, the depth value given by region[2] should be 1. buffer_row_pitch The length of each row in bytes to be used for the memory region associated with buffer. If buffer_row_pitch is 0, buffer_row_pitch is computed as region[0]. buffer_slice_pitch The length of each 2D slice in bytes to be used for the memory region associated with buffer. If buffer_slice_pitch is 0, buffer_slice_pitch is computed as region[1] * buffer_row_pitch. host_row_pitch The length of each row in bytes to be used for the memory region pointed to by ptr. If host_row_pitch is 0, host_row_pitch is computed as region[0]. host_slice_pitch The length of each 2D slice in bytes to be used for the memory region pointed to by ptr. If host_slice_pitch is 0, host_slice_pitch is computed as region[1] * host_row_pitch. ptr The pointer to buffer in host memory where data is to be read into. event_wait_list num_events_in_wait_list event_wait_list and num_events_in_wait_list specify events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event_wait_list act as synchronization points. The context associated with events in event_wait_list and command_queue must be the same. The memory associated with event_wait_list can be reused or freed after the function returns. event Returns an event object that identifies this particular read command and can be used to query or queue a wait for this particular command to complete. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the event_wait_list array. Notes Calling clEnqueueReadBufferRect to read a region of the buffer object with the ptr argument value set to host_ptr and host_origin, buffer_origin values are the same, where host_ptr is a pointer to the memory region specified when the buffer object being read is created with CL_MEM_USE_HOST_PTR, must meet the same requirements given for clEnqueueReadBuffer. Calling clEnqueueWriteBufferRect to update the latest bits in a region of the buffer object with the ptr argument value set to host_ptr and host_origin, buffer_origin values are the same, where host_ptr is a pointer to the memory region specified when the buffer object being written is created with CL_MEM_USE_HOST_PTR, must meet the following requirements in order to avoid undefined behavior: The host memory region given by (buffer_origin region) contains the latest bits when the enqueued write command begins execution. The buffer object or memory objects created from this buffer object are not mapped. The buffer object or memory objects created from this buffer object are not used by any command-queue until the write command has finished execution. Errors clEnqueueReadBufferRect returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_CONTEXT if the context associated with command_queue and buffer are not the same or if the context associated with command_queue and events in event_wait_list are not the same. CL_INVALID_MEM_OBJECT if buffer is not a valid buffer object. CL_INVALID_VALUE if the region being read specified by (buffer_origin, region, buffer_row_pitch, buffer_slice_pitch) is out of bounds. CL_INVALID_VALUE if ptr is a NULL value. CL_INVALID_VALUE if any region array element is 0. CL_INVALID_VALUE if buffer_row_pitch is not 0 and is less than region[0]. CL_INVALID_VALUE if host_row_pitch is not 0 and is less than region[0]. CL_INVALID_VALUE if buffer_slice_pitch is not 0 and is less than region[1] * buffer_row_pitch and not a multiple of buffer_row_pitch. CL_INVALID_VALUE if host_slice_pitch is not 0 and is less than region[1] * host_row_pitch and not a multiple of host_row_pitch. CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_MISALIGNED_SUB_BUFFER_OFFSET if buffer is a sub-buffer object and offset specified when the sub-buffer object is created is not aligned to CL_DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue. CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the read and write operations are blocking and the execution status of any of the events in event_wait_list is a negative integer value. CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer. CL_INVALID_OPERATION if clEnqueueReadBufferRect is called on buffer which has been created with CL_MEM_HOST_WRITE_ONLY or CL_MEM_HOST_NO_ACCESS. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clEnqueueCopyBuffer, clEnqueueCopyBufferRect, clEnqueueWriteBuffer, clEnqueueWriteBufferRect, clEnqueueReadBuffer khronos-opencl-man-1.0~svn27110/select.xml0000644000175000017500000001633111660441607020270 0ustar mathieumathieu ]> select select 2007-2011 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. 3 select For each component of a vector type, result[i] = if MSB of c[i] is set ? b[i] : a[i]. For scalar type, result = c ? b : a. gentype select gentypea gentypeb igentypec gentype select gentypea gentypeb ugentypec halfn select (halfn a, halfn b, shortn c) // if half extension enabled halfn select (halfn a, halfn b, ushortn c) // if half extension enabled Description For each component of a vector type, result[i] = if MSB of c[i] is set ? b[i] : a[i]. For scalar type, result = c ? b : a. igentype and ugentype must have the same number of elements and bits as gentype. Notes &relationalFunctionsGEN; &relationalFunctionsIGEN; &relationalFunctionsUGEN; &relationalFunctionsInc1; Specification OpenCL Specification Also see Relational Functions khronos-opencl-man-1.0~svn27110/cl_khr_int64_extended_atomics.xml0000644000175000017500000001643011660441607024676 0ustar mathieumathieu cl_khr_int64_extended_atomics cl_khr_int64_extended_atomics 2007-2011 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. 3 cl_khr_int64_extended_atomics Optional extensions that implement atomic operations on 64-bit signed and unsigned integers to locations in __global and __local memory. #pragma OPENCL EXTENSION cl_khr_int64_extended_atomics : enable Description An application that wants to use this extension will need to include the #pragma OPENCL EXTENSION cl_khr_int64_extended_atomics : enable directive in the OpenCL program source. The atomic functions supported by the cl_khr_int64_extended_atomics extension are described in the following table. All of the functions listed in the following table are performed in one atomic transaction. These transactions are atomic for the device executing these atomic functions. There is no guarantee of atomicity if the atomic operations to the same memory location are being performed by kernels executing on multiple devices. Atomic operations on 64-bit integers and 32-bit integers (and float) are also atomic w.r.t. each other. Function Description atom_min Compute min (old, val) atom_max Compute max (old, val)> atom_and Compute (old & val) atom_or Compute (old | val) atom_xor Compute (old ^ val) Specification OpenCL Specification Also see EXTENSION, cl_khr_int64_base_atomics, Atomic Functions khronos-opencl-man-1.0~svn27110/vloada_halfn.xml0000644000175000017500000001741011660441607021426 0ustar mathieumathieu ]> vloada_halfn vloada_halfn 2007-2011 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. 3 vloada_halfn Read half float vector from a pointer to memory. floatn vloada_halfn size_toffset const __global half*p floatn vloada_halfn size_toffset const __local half*p floatn vloada_halfn size_toffset const __constant half*p floatn vloada_halfn size_toffset const __private half*p Description For n = 1, 2, 4, 8 and 16 read sizeof(halfn) bytes of data from address (p + (offset * n)). The data read is interpreted as a halfn value. The halfn value read is converted to a floatn value and the floatn value is returned. The address computed as (p + (offset * n)) must be aligned to sizeof(halfn) bytes. For n = 3, vloada_half3 reads a half3 from address (p + (offset * 4)) and returns a float3. The address computed as (p + (offset * 4)) must be aligned to sizeof (half) * 4 bytes. Notes &vectorFunctionsInc; In addition vloada_half3 reads x, y, z components from address (p + (offset * 4)) into a 3- component vector. Specification OpenCL Specification Also see Vector Data Load and Store Functions khronos-opencl-man-1.0~svn27110/atom_xor.xml0000644000175000017500000001725711660441607020651 0ustar mathieumathieu atom_xor atom_xor 2007-2011 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. 3 atom_xor 64-bit atom_xor functions. long atom_xor volatile __global long*p longval long atom_xor volatile __local long*p longval ulong atom_xor volatile __global ulong*p ulongval ulong atom_xor volatile __local ulong*p ulongval Description Read the 64-bit value (referred to as old) stored at location pointed by p. Compute (old ^ val) and store result at location pointed by p. The function returns old. An application that wants to use this extension will need to include the #pragma OPENCL EXTENSION cl_khr_int64_extended_atomics : enable in the OpenCL program source. This function is performed in one atomic transaction. These transactions are atomic for the device executing these atomic functions. There is no guarantee of atomicity if the atomic operations to the same memory location are being performed by kernels executing on multiple devices. Atomic operations on 64-bit integers and 32-bit integers (and float) are also atomic with regard to each other. Specification OpenCL Specification Also see Atomic Functions, atomic_xor, cl_khr_int64_extended_atomics khronos-opencl-man-1.0~svn27110/isnotequal.xml0000644000175000017500000001714511660441607021201 0ustar mathieumathieu ]> isnotequal isnotequal 2007-2011 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. 3 isnotequal Compare of x != y. int isnotequal floatx floaty intn isnotequal floatnx floatny int isnotequal doublex doubley longn isnotequal doublenx doubleny int isnotequal (half x, half y) // if half extension enabled shortn isnotequal (halfn x, halfn y) // if half extension enabled Description Returns the component-wise compare of x != y. Notes &relationalFunctionsInc1; &relationalFunctionsInc2; &relationalFunctionsInc3; Specification OpenCL Specification Also see Relational Functions khronos-opencl-man-1.0~svn27110/get_local_size.xml0000644000175000017500000001164011660441607021772 0ustar mathieumathieu get_local_size get_local_size 2007-2011 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. 3 get_local_size Returns the number of local work-items. size_t get_local_size uintdimindx Description Returns the number of local work-items specified in dimension identified by dimindx. This value is given by the local_work_size argument to clEnqueueNDRangeKernel if local_work_size is not NULL; otherwise the OpenCL implementation chooses an appropriate local_work_size value which is returned by this function. Valid values of dimindx are 0 to get_work_dim() - 1. For other values of dimindx, get_local_size() returns 1. For clEnqueueTask, this always returns 1. Specification OpenCL Specification Also see Work-Item Functions, clEnqueueNDRangeKernel, clEnqueueTask khronos-opencl-man-1.0~svn27110/clCreate_memflagsInc.xml0000644000175000017500000001502612105016264023030 0ustar mathieumathieu cl_mem_flags Description CL_MEM_READ_WRITE This flag specifies that the memory object will be read and written by a kernel. This is the default. CL_MEM_WRITE_ONLY This flags specifies that the memory object will be written but not read by a kernel. Reading from a buffer or image object created with CL_MEM_WRITE_ONLY inside a kernel is undefined. CL_MEM_READ_WRITE and CL_MEM_WRITE_ONLY are mutually exclusive. CL_MEM_READ_ONLY This flag specifies that the memory object is a read-only memory object when used inside a kernel. Writing to a buffer or image object created with CL_MEM_READ_ONLY inside a kernel is undefined. CL_MEM_READ_WRITE or CL_MEM_WRITE_ONLY and CL_MEM_READ_ONLY are mutually exclusive. CL_MEM_USE_HOST_PTR This flag is valid only if host_ptr is not NULL. If specified, it indicates that the application wants the OpenCL implementation to use memory referenced by host_ptr as the storage bits for the memory object. OpenCL implementations are allowed to cache the buffer contents pointed to by host_ptr in device memory. This cached copy can be used when kernels are executed on a device. The result of OpenCL commands that operate on multiple buffer objects created with the same host_ptr or overlapping host regions is considered to be undefined. Refer to the description of the alignment rules for host_ptr for memory objects (buffer and images) created using CL_MEM_USE_HOST_PTR. CL_MEM_ALLOC_HOST_PTR This flag specifies that the application wants the OpenCL implementation to allocate memory from host accessible memory. CL_MEM_ALLOC_HOST_PTR and CL_MEM_USE_HOST_PTR are mutually exclusive. CL_MEM_COPY_HOST_PTR This flag is valid only if host_ptr is not NULL. If specified, it indicates that the application wants the OpenCL implementation to allocate memory for the memory object and copy the data from memory referenced by host_ptr. CL_MEM_COPY_HOST_PTR and CL_MEM_USE_HOST_PTR are mutually exclusive. CL_MEM_COPY_HOST_PTR can be used with CL_MEM_ALLOC_HOST_PTR to initialize the contents of the cl_mem object allocated using host-accessible (e.g. PCIe) memory. CL_MEM_HOST_WRITE_ONLY This flag specifies that the host will only write to the memory object (using OpenCL APIs that enqueue a write or a map for write). This can be used to optimize write access from the host (e.g. enable write combined allocations for memory objects for devices that communicate with the host over a system bus such as PCIe). CL_MEM_HOST_READ_ONLY This flag specifies that the host will only read the memory object (using OpenCL APIs that enqueue a read or a map for read). CL_MEM_HOST_WRITE_ONLY and CL_MEM_HOST_READ_ONLY are mutually exclusive. CL_MEM_HOST_NO_ACCESS This flag specifies that the host will not read or write the memory object. CL_MEM_HOST_WRITE_ONLY or CL_MEM_HOST_READ_ONLY and CL_MEM_HOST_NO_ACCESS are mutually exclusive. khronos-opencl-man-1.0~svn27110/rootn.xml0000644000175000017500000001747411660441607020163 0ustar mathieumathieu ]> rootn rootn 2007-2011 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. 3 rootn Compute x to the power 1/y. floatn rootn floatn x intn y float rootn float x int y doublen rootn doublen x intn y double rootn double x int y halfn rootn halfn x intn y half rootn half x int y Description Compute x to the power 1/y. Notes &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/clCreateFromGLRenderbuffer.xml0000644000175000017500000002435211660441607024136 0ustar mathieumathieu ]> clCreateFromGLRenderbuffer clCreateFromGLRenderbuffer 2007-2011 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. 3 clCreateFromGLRenderbuffer Creates an OpenCL 2D image object from an OpenGL renderbuffer object. cl_mem clCreateFromGLRenderbuffer cl_contextcontext cl_mem_flagsflags GLuintrenderbuffer cl_int* errcode_ret Parameters context A valid OpenCL context created from an OpenGL context. flags A bit-field that is used to specify usage information. Refer to the table at clCreateBuffer for a description of flags. Only CL_MEM_READ_ONLY, CL_MEM_WRITE_ONLY, and CL_MEM_READ_WRITE values specified in the table at clCreateBuffer can be used. renderbuffer The name of a GL renderbuffer object. The renderbuffer storage must be specified before the image object can be created. The renderbuffer format and dimensions defined by OpenGL will be used to create the 2D image object. Only GL renderbuffers with internal formats that map to appropriate image channel order and data type specified in the table of supported Image Channel Order Values and the table of supported Image Channel Data Types for cl_image_format can be used to create the 2D image object. errcode_ret Returns an appropriate error code as described below. If errcode_ret is NULL, no error code is returned. Description If the state of a GL renderbuffer object is modified through the GL API (i.e. changes to the dimensions or format used to represent pixels of the GL renderbuffer using appropriate GL API calls such as glRenderbufferStorage) while there exists a corresponding CL image object, subsequent use of the CL image object will result in undefined behavior. The clRetainMemObject and clReleaseMemObject functions can be used to retain and release the image objects. &gl_formatsInc; Errors Returns a valid non-zero OpenCL image object and errcode_ret is set to CL_SUCCESS if the image object is created successfully. Otherwise, it returns a NULL value with one of the following error values returned in errcode_ret: CL_INVALID_CONTEXT if context is not a valid context or was not created from a GL context. CL_INVALID_VALUE if values specified in flags are not valid. CL_INVALID_GL_OBJECT if renderbuffer is not a GL renderbuffer object or if the width or height of renderbuffer is zero. CL_INVALID_IMAGE_FORMAT_DESCRIPTOR if the OpenGL renderbuffer internal format does not map to a supported OpenCL image format. CL_INVALID_OPERATION if renderbuffer is a multi-sample GL renderbuffer object. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see cl_khr_gl_sharing, clCreateBuffer, cl_image_format, clRetainMemObject, clReleaseMemObject khronos-opencl-man-1.0~svn27110/clGetKernelWorkGroupInfo.xml0000644000175000017500000004321011660441607023700 0ustar mathieumathieu clGetKernelWorkGroupInfo clGetKernelWorkGroupInfo 2007-2011 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. 3 clGetKernelWorkGroupInfo Returns information about the kernel object that may be specific to a device. cl_int clGetKernelWorkGroupInfo cl_kernel kernel cl_device_id device cl_kernel_work_group_info param_name size_t param_value_size void *param_value size_t *param_value_size_ret Parameters kernel Specifies the kernel object being queried. device Identifies a specific device in the list of devices associated with kernel. The list of devices is the list of devices in the OpenCL context that is associated with kernel. If the list of devices associated with kernel is a single device, device can be a NULL value. param_name Specifies the information to query. The list of supported param_name types and the information returned in param_value by clGetKernelWorkGroupInfo is described in the table below. param_value A pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored. param_value_size Used to specify the size in bytes of memory pointed to by param_value. This size must be ≥ size of return type as described in the table below. cl_kernel_work_group_info Return Type Info. returned in param_value CL_KERNEL_GLOBAL_WORK_SIZE size_t[3] This provides a mechanism for the application to query the maximum global size that can be used to execute a kernel (i.e. global_work_size argument to clEnqueueNDRangeKernel) on a custom device given by device or a built-in kernel on an OpenCL device given by device. If device is not a custom device or kernel is not a built-in kernel, clGetKernelArgInfo returns the error CL_INVALID_VALUE. CL_KERNEL_WORK_GROUP_SIZE size_t This provides a mechanism for the application to query the maximum work-group size that can be used to execute a kernel on a specific device given by device. The OpenCL implementation uses the resource requirements of the kernel (register usage etc.) to determine what this work-group size should be. CL_KERNEL_COMPILE_- WORK_GROUP_SIZE size_t[3] Returns the work-group size specified by the __attribute__((reqd_work_group_size(X, Y, Z))) qualifier. See Function Qualifiers. If the work-group size is not specified using the above attribute qualifier (0, 0, 0) is returned. CL_KERNEL_LOCAL_MEM_SIZE cl_ulong Returns the amount of local memory in bytes being used by a kernel. This includes local memory that may be needed by an implementation to execute the kernel, variables declared inside the kernel with the __local address qualifier and local memory to be allocated for arguments to the kernel declared as pointers with the __local address qualifier and whose size is specified with clSetKernelArg. If the local memory size, for any pointer argument to the kernel declared with the __local address qualifier, is not specified, its size is assumed to be 0. CL_KERNEL_PREFERRED_WORK_- GROUP_SIZE_MULTIPLE size_t Returns the preferred multiple of workgroup size for launch. This is a performance hint. Specifying a workgroup size that is not a multiple of the value returned by this query as the value of the local work size argument to clEnqueueNDRangeKernelwill not fail to enqueue the kernel for execution unless the work-group size specified is larger than the device maximum. CL_KERNEL_PRIVATE_MEM_SIZE cl_ulong Returns the minimum amount of private memory, in bytes, used by each workitem in the kernel. This value may include any private memory needed by an implementation to execute the kernel, including that used by the language built-ins and variable declared inside the kernel with the __private qualifier. param_value_size_ret Returns the actual size in bytes of data copied to param_value. If param_value_size_ret is NULL, it is ignored. Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_DEVICE if device is not in the list of devices associated with kernel or if device is NULL but there is more than one device associated with kernel. CL_INVALID_VALUE if param_name is not valid, or if size in bytes specified by param_value_size is < size of return type as described in the table above and param_value is not NULL. CL_INVALID_VALUE if param_name is CL_KERNEL_GLOBAL_WORK_SIZE and device is not a custom device or kernel is not a built-in kernel. CL_INVALID_KERNEL if kernel is a not a valid kernel object. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clCreateKernel, clCreateKernelsInProgram, clReleaseKernel, clRetainKernel, clSetKernelArg, clGetKernelInfo khronos-opencl-man-1.0~svn27110/clGetContextInfo.xml0000644000175000017500000004033311660441607022227 0ustar mathieumathieu clGetContextInfo clGetContextInfo 2007-2011 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. 3 clGetContextInfo Query information about a context. cl_int clGetContextInfo cl_context context cl_context_info param_name size_t param_value_size void *param_value size_t *param_value_size_ret Parameters context Specifies the OpenCL context being queried. param_name An enumeration constant that specifies the information to query. The valid values for param_name are: cl_context_info Return Type Information returned in param_value CL_CONTEXT_REFERENCE_COUNT cl_uint Return the context reference count. The reference count returned should be considered immediately stale. It is unsuitable for general use in applications. This feature is provided for identifying memory leaks. CL_CONTEXT_NUM_DEVICES cl_uint Return the number of devices in context. CL_CONTEXT_DEVICES cl_device_id[] Return the list of devices in context. CL_CONTEXT_PROPERTIES cl_context_- properties[] Return the properties argument specified in clCreateContext or clCreateContextFromType. If the properties argument specified in clCreateContext or clCreateContextFromType used to create context is not NULL, the implementation must return the values specified in the properties argument. If the properties argument specified in clCreateContext or clCreateContextFromType used to create context is NULL, the implementation may return either a param_value_size_ret of 0, i.e. there is no context property value to be returned or can return a context property value of 0 (where 0 is used to terminate the context properties list) in the memory that param_value points to. CL_CONTEXT_D3D10_PREFER_- SHARED_RESOURCES_KHR cl_bool If the cl_khr_d3d10_sharing extension is enabled, returns CL_TRUE if Direct3D 10 resources created as shared by setting MiscFlags to include D3D10_RESOURCE_MISC_SHARED will perform faster when shared with OpenCL, compared with resources which have not set this flag. Otherwise returns CL_FALSE. CL_CONTEXT_D3D11_PREFER_- SHARED_RESOURCES_KHR cl_bool If the cl_khr_d3d11_sharing extension is supported, Returns CL_TRUE if Direct3D 11 resources created as shared by setting MiscFlags to include D3D11_RESOURCE_MISC_SHARED will perform faster when shared with OpenCL, compared with resources which have not set this flag. Otherwise returns CL_FALSE. param_value A pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored. param_value_size Specifies the size in bytes of memory pointed to by param_value. This size must be greater than or equal to the size of return type as described in the table above. param_value_size_ret Returns the actual size in bytes of data being queried by param_value. If param_value_size_ret is NULL, it is ignored. Errors Returns CL_SUCCESS if the function executed successfully, or one of the errors below: CL_INVALID_CONTEXT if context is not a valid context. CL_INVALID_VALUE if param_name is not one of the supported values or if size in bytes specified by param_value_size is < size of return type as specified in the table above and param_value is not a NULL value. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clGetDeviceInfo khronos-opencl-man-1.0~svn27110/hadd.xml0000644000175000017500000001213311660441607017705 0ustar mathieumathieu ]> hadd, rhadd hadd, rhadd 2007-2011 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. 3 hadd, rhadd Returns (x + y) >> 1, or (x + y + 1) >> 1 gentype hadd gentypex gentypey gentype rhadd gentypex gentypey Description hadd returns (x+y) >> 1. The intermediate sum does not modulo overflow. rhadd returns (x+y+1) >> 1. The intermediate sum does not modulo overflow. Notes Frequently vector operations need n + 1 bits temporarily to calculate a result. The rhadd instruction gives you an extra bit without needing to upsample and downsample. This can be a profound performance win. &integerFunctionsInc; Specification OpenCL Specification Also see Integer Functions khronos-opencl-man-1.0~svn27110/isordered.xml0000644000175000017500000001735011660441607020773 0ustar mathieumathieu ]> isordered isordered 2007-2011 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. 3 isordered Test if arguments are ordered. int isordered floatx floaty intn isordered floatnx floatny int isordered doublex doubley longn isordered doublenx doubleny int isordered (half x, half y) // if half extension enabled shortn isordered (halfn x, halfn y) // if half extension enabled Description Test if arguments are ordered. isordered() takes arguments x and y, and returns the result isequal(x, x) && isequal(y, y). Notes &relationalFunctionsInc1; &relationalFunctionsInc2; Specification OpenCL Specification Also see Relational Functions khronos-opencl-man-1.0~svn27110/clGetSamplerInfo.xml0000644000175000017500000002476611660441607022222 0ustar mathieumathieu clGetSamplerInfo clGetSamplerInfo 2007-2011 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. 3 clGetSamplerInfo Returns information about the sampler object. cl_int clGetSamplerInfo cl_samplersampler cl_sampler_infoparam_name size_tparam_value_size void*param_value size_t*param_value_size_ret Parameters sampler Specifies the sampler being queried. param_name Specifies the information to query. The list of supported param_name types and the information returned in param_value by clGetSamplerInfo is described in the table below. cl_sampler_info Return Type and Info. returned in param_value CL_SAMPLER_REFERENCE_COUNT Return type: cl_uint Return the sampler reference count. The reference count returned should be considered immediately stale. It is unsuitable for general use in applications. This feature is provided for identifying memory leaks. CL_SAMPLER_CONTEXT Return type: cl_context Return the context specified when the sampler is created. CL_SAMPLER_NORMALIZED_COORDS Return type: cl_bool Return the normalized coords value associated with sampler. CL_SAMPLER_ADDRESSING_MODE Return type: cl_addressing_mode Return the addressing mode value associated with sampler. CL_SAMPLER_FILTER_MODE Return type: cl_filter_mode Return the filter mode value associated with sampler. param_value A pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored. param_value_size Specifies the size in bytes of memory pointed to by param_value. This size must be ≥ size of return type as described in the table above. param_value_size_ret Returns the actual size in bytes of data copied to param_value. If param_value_size_ret is NULL, it is ignored. Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_VALUE if param_name is not valid, or if size in bytes specified by param_value_size is < size of return type as described in the table above and param_value is not NULL CL_INVALID_SAMPLER if sampler is a not a valid sampler object. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clCreateSampler, clRetainSampler, clReleaseSampler khronos-opencl-man-1.0~svn27110/read_mem_fence.xml0000644000175000017500000001055111660441607021720 0ustar mathieumathieu read_mem_fence read_mem_fence 2007-2011 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. 3 read_mem_fence Read memory barrier that orders only loads. void read_mem_fence cl_mem_fence_flagsflags Description Read memory barrier that orders only loads. The flags argument specifies the memory address space and can be set to a combination of the following literal values: CLK_LOCAL_MEM_FENCE, CLK_GLOBAL_MEM_FENCE. Specification OpenCL Specification Also see Explicit Memory Fence Functions khronos-opencl-man-1.0~svn27110/clCreateEventFromGLsyncKHR.xml0000644000175000017500000002115011660441607024041 0ustar mathieumathieu clCreateEventFromGLsyncKHR clCreateEventFromGLsyncKHR 2007-2011 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. 3 clCreateEventFromGLsyncKHR Creates an event object linked to an OpenGL sync object. cl_event clCreateEventFromGLsyncKHR cl_contextcontext GLsyncsync cl_int*errcode_ret Parameters context A valid OpenCL context created from an OpenGL context or share group, using the cl_khr_gl_sharing extension. sync The name of a sync object in the GL share group associated with context. Description An event object may be created by linking to an OpenGL sync object. Completion of such an event object is equivalent to waiting for completion of the fence command associated with the linked GL sync object. Notes The parameters of an event object linked to a GL sync object will return the following values when queried with clGetEventInfo: The CL_EVENT_COMMAND_QUEUE of a linked event is NULL, because the event is not associated with any OpenCL command queue. The CL_EVENT_COMMAND_TYPE of a linked event is CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR, indicating that the event is associated with a GL sync object, rather than an OpenCL command. The CL_EVENT_COMMAND_EXECUTION_STATUS of a linked event is either CL_SUBMITTED, indicating that the fence command associated with the sync object has not yet completed, or CL_COMPLETE, indicating that the fence command has completed. clCreateEventFromGLsyncKHR performs an implicit clRetainEvent on the returned event object. Creating a linked event object also places a reference on the linked GL sync object. When the event object is deleted, the reference will be removed from the GL sync object. Events returned from clCreateEventFromGLsyncKHR may only be consumed by clEnqueueAcquireGLObjects. Passing such events to any other CL API will generate a CL_INVALID_EVENT error. Errors Returns a valid OpenCL event object and errcode_ret is set to CL_SUCCESS if the event object is created successfully. Otherwise, it returns a NULL value with one of the following error values returned in errcode_ret: CL_INVALID_CONTEXT if context is not a valid context or was not created from a GL context. CL_INVALID_GL_OBJECT if sync is not the name of a sync object in the GL share group associated with context. Specification OpenCL Specification Also see cl_khr_gl_event, clEnqueueAcquireGLObjects, clRetainEvent khronos-opencl-man-1.0~svn27110/atomic_and.xml0000644000175000017500000001623011660441607021105 0ustar mathieumathieu atomic_and atomic_and 2007-2011 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. 3 atomic_and atomic_and functions. int atomic_and volatile __global int*p intval unsigned int atomic_and volatile __global unsigned int*p unsigned intval int atomic_and volatile __local int*p intval unsigned int atomic_and volatile __local unsigned int*p unsigned intval Description Read the 32-bit value (referred to as old) stored at location pointed by p. Compute (old & val) and store result at location pointed by p. The function returns old. A 64-bit version of this function, atom_and, is enabled by cl_khr_int64_extended_atomics. Specification OpenCL Specification Also see Atomic Functions, atom_and khronos-opencl-man-1.0~svn27110/as_typen.xml0000644000175000017500000002174311660441607020636 0ustar mathieumathieu Reinterpreting Types, as_typen(), as_type() Reinterpreting Types Using as_type() and as_typen() 2007-2011 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. 3 Reinterpreting Types Using as_type() and as_typen() as_type() as_typen() Description All data types described in Scalar Data Types and Vector Data Types (except bool, half (unless the cl_khr_fp16 extension is supported), and void) may be also reinterpreted as another data type of the same size using the as_type() operator for scalar data types and the as_typen() operator for vector data types. When the operand and result type contain the same number of elements, the bits in the operand shall be returned directly without modification as the new type. The usual type promotion for function arguments shall not be performed. For example, as_float(0x3f800000) returns 1.0f, which is the value that the bit pattern 0x3f800000 has if viewed as an IEEE-754 single precision value. When the operand and result type contain a different number of elements, the result shall be implementation-defined except if the operand is a 4-component vector and the result is a 3-component vector. In this case, the bits in the operand shall be returned directly without modification as the new type. That is, a conforming implementation shall explicitly define a behavior, but two conforming implementations need not have the same behavior when the number of elements in the result and operand types does not match. The implementation may define the result to contain all, some or none of the original bits in whatever order it chooses. It is an error to use the as_type() or as_typen() operators to reinterpret data to a type of a different number of bytes. Notes While the union is intended to reflect the organization of data in memory, the as_type() and as_typen() constructs are intended to reflect the organization of data in register. The as_type() and as_typen() constructs are intended to compile to no instructions on devices that use a shared register file designed to operate on both the operand and result types. Note that while differences in memory organization are expected to largely be limited to those arising from endianness, the register based representation may also differ due to size of the element in register. (For example, an architecture may load a char into a 32-bit register, or a char vector into a SIMD vector register with fixed 32-bit element size.) If the element count does not match, then the implementation should pick a data representation that most closely matches what would happen if an appropriate result type operator was applied to a register containing data of the source type. If the number of elements matches, then the as_typen() should faithfully reproduce the behavior expected from a similar data type reinterpretation using memory/unions. So, for example if an implementation stores all single precision data as double in register, it should implement as_int( float ) by first downconverting the double to single precision and then (if necessary) moving the single precision bits to a register suitable for operating on integer data. If data stored in different address spaces do not have the same endianness, then the "dominant endianness" of the device should prevail. Example float f = 1.0f; uint u = as_uint(f); // Legal. Contains: 0x3f800000 float4 f = (float4)(1.0f, 2.0f, 3.0f, 4.0f); // Legal. Contains: (int4) // (0x3f800000, 0x40000000, 0x40400000, 0x40800000) int4 i = as_int4(f); float4 f, g; int4 is_less = f < g; // Legal. f[i] = f[i] < g[i] ? f[i] : 0.0f f = as_float4(as_int4(f) & is_less); int i; // Legal. Result is implementation-defined. short2 j = as_short2(i); int4 i; // Legal. Result is implementation-defined. short8 j = as_short8(i); float4 f; //Error. result and operand have different size double4 g = as_double4(f); // Only if double is supported. float4 f; // Legal. g.xyz will have same values as f.xyz. g.w is undefined float3 g = as_float3(f); Specification OpenCL Specification Also see Scalar Data Types, Vector Data Types khronos-opencl-man-1.0~svn27110/remainder.xml0000644000175000017500000001071011660441607020752 0ustar mathieumathieu ]> remainder remainder 2007-2011 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. 3 remainder Floating point remainder function. gentype remainder gentypex gentypey Description Computes the value r such that r = x - n*y, where n is the integer nearest the exact value of x/y. If there are two integers closest to x/y, n shall be the even one. If r is zero, it is given the same sign as x. Notes &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/mad_sat.xml0000644000175000017500000001035711660441607020423 0ustar mathieumathieu ]> mad_sat mad_sat 2007-2011 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. 3 mad_sat Returns a*b+c and saturates the result. gentype mad_sat gentypea gentypeb gentypec Description mad_sat returns a*b+c and saturates the result. Notes &integerFunctionsInc; Specification OpenCL Specification Also see Integer Functions khronos-opencl-man-1.0~svn27110/fmax.xml0000644000175000017500000001441511660441607017745 0ustar mathieumathieu ]> fmax fmax 2007-2011 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. 3 fmax Returns the greater of either x or y. gentype fmax gentypex gentypey gentypef fmax gentypefx floaty gentyped fmax gentypedx doubley gentype fmax (gentype x, half y) // if half extension enabled Description Returns y if x is less than y, otherwise it returns x. If one argument is a NaN, fmax() returns the other argument. If both arguments are NaNs, fmax() returns a NaN. Notes fmin and fmax behave as defined by C99 and may not match the IEEE 754-2008 definition for minNum and maxNum with regard to signaling NaNs. Specifically, signaling NaNs may behave as quiet NaNs. &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/clCreateFromDX9MediaSurfaceKHR.xml0000644000175000017500000003135511660441607024525 0ustar mathieumathieu ]> clCreateFromDX9MediaSurfaceKHR clCreateFromDX9MediaSurfaceKHR 2007-2011 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. 3 clCreateFromDX9MediaSurfaceKHR Creates an OpenCL image object from a media surface. cl_mem clCreateFromDX9MediaSurfaceKHR cl_contextcontext cl_mem_flagsflags cl_dx9_media_adapter_type_khradapter_type void*surface_info cl_uintplane cl_int *errcode_ret Parameters context A valid OpenCL context created from a media adapter. flags A bit-field that is used to specify usage information. Refer to the table of allowed values for flags for clCreateBuffer. Only CL_MEM_READ_ONLY, CL_MEM_WRITE_ONLY, and CL_MEM_READ_WRITE values specified in the table of allowed values for flags for clCreateBuffer can be used. adapter_type A value from enumeration of supported adapters described in the table of cl_dx9_media_adapter_type_khr values for clGetDeviceIDsFromDX9MediaAdapterKHR. The type of surface_info is determined by the adapter type. The implementation does not need to support all adapter types. This approach provides flexibility to support additional adapter types in the future. Supported adapter types are CL_ADAPTER_D3D9_KHR, CL_ADAPTER_D3D9EX_KHR, and CL_ADAPTER_DXVA_KHR. If adapter_type is CL_ADAPTER_D3D9_KHR, CL_ADAPTER_D3D9EX_KHR, or CL_ADAPTER_DXVA_KHR, the surface_info points to the following structure: typedef struct _cl_dx9_surface_info_khr { IDirect3DSurface9 *resource; HANDLE shared_handle; } cl_dx9_surface_info_khr; For D3D9 surfaces, we need both the handle to the resource and the resource itself to have a sufficient amount of information to eliminate a copy of the surface for sharing in cases where this is possible. Elimination of the copy is driver dependent. shared_handle may be NULL and this may result in sub-optimal performance. surface_info A pointer to one of the structures defined in the adapter_type description above passed in as a void *. plane The plane of resource to share for planar surface formats. For planar formats, we use the plane parameter to obtain a handle to thie specific plane (Y, U or V for example). For nonplanar formats used by media, plane must be 0. errcode_ret An appropriate error code. If errcode_ret is NULL, no error code is returned. Notes The width and height of the returned OpenCL 2D image object are determined by the width and height of the plane of resource. The channel type and order of the returned image object is determined by the format and plane of resource and are described in tables 9.10.3 and 9.10.4. This call will increment the internal media surface count on resource. The internal media surface reference count on resource will be decremented when the OpenCL reference count on the returned OpenCL memory object drops to zero. DX9 Media Surface Sharing &mediaSurfaceFormatsInc; &accessMappedInc; Errors Returns CL_SUCCESS returns a valid non-zero 2D image object and errcode_ret is set to CL_SUCCESS if the 2D image object is created successfully. Otherwise, it returns a NULL value with one of the following error values returned in errcode_ret: CL_INVALID_CONTEXT if context is not a valid context. CL_INVALID_VALUE if values specified in flags are not valid or if plane is not a valid plane of resource specified in surface_info.. CL_INVALID_DX9_MEDIA_SURFACE_KHR if resource specified in surface_info is not a valid resource or is not associated with adapter_type (e.g., adapter_type is set to CL_ADAPTER_D3D9_KHR and resource is not a Direct3D 9 surface created in D3DPOOL_DEFAULT). CL_INVALID_DX9_MEDIA_SURFACE_KHR if shared_handle specified in surface_info is not NULL or a valid handle value. CL_INVALID_IMAGE_FORMAT_DESCRIPTOR if the texture format of resource is not listed in tables 9.10.3 and 9.10.4. CL_INVALID_OPERATION if there are no devices in context that support adapter_type. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see cl_khr_dx9_media_sharing, clGetDeviceIDsFromDX9MediaAdapterKHR, clEnqueueAcquireDX9MediaSurfacesKHR, clEnqueueReleaseDX9MediaSurfacesKHR khronos-opencl-man-1.0~svn27110/qualifiers.xml0000644000175000017500000001617411660441607021162 0ustar mathieumathieu Qualifiers Qualifiers 2007-2011 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. 3 Qualifiers OpenCL qualifiers. Description These are the qualifiers available in the OpenCL C programming language. Click on a category name in the table below to see information about specific qualifiers. Access Qualifiers __read_only, read_only __write_only, write_only __read_write, read_write Address Space Qualifiers __local, local __global, global __constant, constant __private, private Function Qualifiers __kernel, kernel __attribute__ with work_group_size_hint, reqd_work_group_size, vec_type_hint Attribute Qualifiers for Type __attribute__ with aligned, packed Attribute Qualifiers for Variables __attribute__ with aligned, packed, endian Attribute Qualifiers for Blocks and Control Flow Statements __attribute__ Storage-class Qualifiers typedef, extern, static C99 Type Qualifiers const, restrict, volatile The type qualifiers const, restrict and volatile as defined by the C99 specification are supported. These qualifiers cannot be used with image2d_t, image3d_t, image2d_array_t, image1d_t, image1d_buffer_t and image1d_array_t types. Types other than pointer types shall not use the restrict qualifier. Specification OpenCL Specification khronos-opencl-man-1.0~svn27110/nan.xml0000644000175000017500000001465611660441607017575 0ustar mathieumathieu ]> nan nan 2007-2011 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. 3 nan Quiet NaN floatn nan uintn nancode float nan uint nancode doublen nan ulongn nancode double nan ulong nancode halfn nan (ushortn nancode) // if half extension enabled Description nan returns a quiet NaN. The nancode may be placed in the significand of the resulting NaN. Notes &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/clSetKernelArg.xml0000644000175000017500000004574311660441607021667 0ustar mathieumathieu clSetKernelArg clSetKernelArg 2007-2011 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. 3 clSetKernelArg Used to set the argument value for a specific argument of a kernel. cl_int clSetKernelArg cl_kernelkernel cl_uintarg_index size_targ_size const void*arg_value Parameters kernel A valid kernel object. arg_index The argument index. Arguments to the kernel are referred by indices that go from 0 for the leftmost argument to n - 1, where n is the total number of arguments declared by a kernel. arg_value A pointer to data that should be used as the argument value for argument specified by arg_index. The argument data pointed to by arg_value is copied and the arg_value pointer can therefore be reused by the application after clSetKernelArg returns. The argument value specified is the value used by all API calls that enqueue kernel (clEnqueueNDRangeKernel and clEnqueueTask) until the argument value is changed by a call to clSetKernelArg for kernel. If the argument is a memory object (buffer, image or image array), the arg_value entry will be a pointer to the appropriate buffer, image or image array object. The memory object must be created with the context associated with the kernel object. If the argument is a buffer object, the arg_value pointer can be NULL or point to a NULL value in which case a NULL value will be used as the value for the argument declared as a pointer to __global or __constant memory in the kernel. If the argument is declared with the __local qualifier, the arg_value entry must be NULL. If the argument is of type sampler_t, the arg_value entry must be a pointer to the sampler object. If the argument is declared to be a pointer of a built-in scalar or vector type, or a user defined structure type in the global or constant address space, the memory object specified as argument value must be a buffer object (or NULL). If the argument is declared with the __constant qualifier, the size in bytes of the memory object cannot exceed CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE and the number of arguments declared as pointers to __constant memory cannot exceed CL_DEVICE_MAX_CONSTANT_ARGS. The memory object specified as argument value must be a 2D image object if the argument is declared to be of type image2d_t. The memory object specified as argument value must be a 3D image object if argument is declared to be of type image3d_t. The memory object specified as argument value must be a 1D image object if the argument is declared to be of type image1d_t. The memory object specified as argument value must be a 1D image buffer object if the argument is declared to be of type image1d_buffer_t. The memory object specified as argument value must be a 1D image array object if argument is declared to be of type image1d_array_t. The memory object specified as argument value must be a 2D image array object if argument is declared to be of type image2d_array_t. For all other kernel arguments, the arg_value entry must be a pointer to the actual data to be used as argument value. arg_size Specifies the size of the argument value. If the argument is a memory object, the size is the size of the buffer or image object type. For arguments declared with the __local qualifier, the size specified will be the size in bytes of the buffer that must be allocated for the __local argument. If the argument is of type sampler_t, the arg_size value must be equal to sizeof(cl_sampler). For all other arguments, the size will be the size of argument type. Notes A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values by clSetKernelArg. Users may not rely on a kernel object to retain objects specified as argument values to the kernel. Implementations shall not allow cl_kernel objects to hold reference counts to cl_kernel arguments, because no mechanism is provided for the user to tell the kernel to release that ownership right. If the kernel holds ownership rights on kernel args, that would make it impossible for the user to tell with certainty when he may safely release user allocated resources associated with OpenCL objects such as the cl_mem backing store used with CL_MEM_USE_HOST_PTR. An OpenCL API call is considered to be thread-safe if the internal state as managed by OpenCL remains consistent when called simultaneously by multiple host threads. OpenCL API calls that are thread-safe allow an application to call these functions in multiple host threads without having to implement mutual exclusion across these host threads i.e. they are also re-entrant-safe. All OpenCL API calls are thread-safe except clSetKernelArg. clSetKernelArg is safe to call from any host thread, and is safe to call re-entrantly so long as concurrent calls operate on different cl_kernel objects. However, the behavior of the cl_kernel object is undefined if clSetKernelArg is called from multiple host threads on the same cl_kernel object at the same time. Please note that there are additional limitations as to which OpenCL APIs may be called from OpenCL callback functions -- please see section 5.9. There is an inherent race condition in the design of OpenCL that occurs between setting a kernel argument and using the kernel with clEnqueueNDRangeKernel or clEnqueueTask. Another host thread might change the kernel arguments between when a host thread sets the kernel arguments and then enqueues the kernel, causing the wrong kernel arguments to be enqueued. Rather than attempt to share cl_kernel objects among multiple host threads, applications are strongly encouraged to make additional cl_kernel objects for kernel functions for each host thread. Errors clSetKernelArg returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_KERNEL if kernel is not a valid kernel object. CL_INVALID_ARG_INDEX if arg_index is not a valid argument index. CL_INVALID_ARG_VALUE if arg_value specified is not a valid value. CL_INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object. CL_INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object. CL_INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the __local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler). CL_INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image object created with cl_mem_flags of CL_MEM_WRITE or if the image argument is declared with the write_only qualifier and arg_value refers to an image object created with cl_mem_flags of CL_MEM_READ. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Example kernel void image_filter (int n, int m, __constant float *filter_weights, __read_only image2d_t src_image, __write_only image2d_t dst_image) { ... } Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for dst_image. Specification OpenCL Specification Also see clCreateKernel, clCreateKernelsInProgram, clReleaseKernel, clRetainKernel, clGetKernelInfo, clGetKernelWorkGroupInfo khronos-opencl-man-1.0~svn27110/atomic_inc.xml0000644000175000017500000001465011660441607021120 0ustar mathieumathieu atomic_inc atomic_inc 2007-2011 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. 3 atomic_inc atomic_inc functions. int atomic_inc volatile __global int*p unsigned int atomic_inc volatile __global unsigned int*p int atomic_inc volatile __local int*p unsigned int atomic_inc volatile __local unsigned int*p Description Read the 32-bit value (referred to as old) stored at location pointed by p. Compute (old + 1) and store result at location pointed by p. The function returns old. A 64-bit version of this function, atom_inc, is enabled by cl_khr_int64_base_atomics. Specification OpenCL Specification Also see Atomic Functions, atom_inc khronos-opencl-man-1.0~svn27110/mad_hi.xml0000644000175000017500000001052111660441607020225 0ustar mathieumathieu ]> mad_hi mad_hi 2007-2011 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. 3 mad_hi Returns mul_hi(a, b) + c. gentype mad_hi gentypea gentypeb gentypec Description mad_hi returns mul_hi(a, b) + c. Notes &integerFunctionsInc; Specification OpenCL Specification Also see Integer Functions khronos-opencl-man-1.0~svn27110/clEnqueueNativeKernel.xml0000644000175000017500000003736111660441607023255 0ustar mathieumathieu clEnqueueNativeKernel clEnqueueNativeKernel 2007-2011 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. 3 clEnqueueNativeKernel Enqueues a command to execute a native C/C++ function not compiled using the OpenCL compiler. cl_int clEnqueueNativeKernel cl_command_queuecommand_queue void(*user_func)(void *) void*args size_tcb_args cl_uintnum_mem_objects const cl_mem*mem_list const void**args_mem_loc cl_uintnum_events_in_wait_list const cl_event*event_wait_list cl_event*event Parameters command_queue A valid command-queue. A native user function can only be executed on a command-queue created on a device that has CL_EXEC_NATIVE_KERNEL capability set in CL_DEVICE_EXECUTION_CAPABILITIES as specified in the table of OpenCL Device Queries for clGetDeviceInfo. user_func A pointer to a host-callable user function. args A pointer to the args list that user_func should be called with. cb_args The size in bytes of the args list that args points to. The data pointed to by args and cb_args bytes in size will be copied and a pointer to this copied region will be passed to user_func. The copy needs to be done because the memory objects (cl_mem values) that args may contain need to be modified and replaced by appropriate pointers to global memory. When clEnqueueNativeKernel returns, the memory region pointed to by args can be reused by the application. num_mem_objects The number of buffer objects that are passed in args. mem_list A list of valid buffer objects, if num_mem_objects > 0. The buffer object values specified in mem_list are memory object handles (cl_mem values) returned by clCreateBuffer or NULL. args_mem_loc A pointer to appropriate locations that args points to where memory object handles (cl_mem values) are stored. Before the user function is executed, the memory object handles are replaced by pointers to global memory. event_wait_list and num_events_in_wait_list Specify events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event_wait_list act as synchronization points. The context associated with events in event_wait_list and command_queue must be the same. The memory associated with event_wait_list can be reused or freed after the function returns. Notes The total number of read-only images specified as arguments to a kernel cannot exceed CL_DEVICE_MAX_READ_IMAGE_ARGS. Each 2D image array argument to a kernel declared with the read_only qualifier counts as one image. The total number of write-only images specified as arguments to a kernel cannot exceed CL_DEVICE_MAX_WRITE_IMAGE_ARGS. Each 2D image array argument to a kernel declared with the write-only qualifier counts as one image. Errors Returns CL_SUCCESS if the user function execution instance was successfully queued, or one of the errors below: CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_CONTEXT if context associated with command_queue and events in event-wait_list are not the same. CL_INVALID_VALUE if user_func is NULL. CL_INVALID_VALUE if args is a NULL value and cb_args > 0, or if args is a NULL value and num_mem_objects > 0. CL_INVALID_VALUE if args is not NULL and cb_args is 0. CL_INVALID_VALUE if num_mem_objects > 0 and mem_list or args_mem_loc are NULL. CL_INVALID_VALUE if num_mem_objects = 0 and mem_list or args_mem_loc are not NULL. CL_INVALID_OPERATION if the device associated with command_queue cannot execute the native kernel. CL_INVALID_MEM_OBJECT if one or more memory objects specified in mem_list are not valid or are not buffer objects. CL_OUT_OF_RESOURCES if there is a failure to queue the execution instance of kernel on the command-queue because of insufficient resources needed to execute the kernel. CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer objects specified as arguments to kernel. CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clEnqueueNDRangeKernel, clEnqueueNativeKernel, clCreateCommandQueue, clCreateBuffer khronos-opencl-man-1.0~svn27110/radians.xml0000644000175000017500000001052611660441607020432 0ustar mathieumathieu ]> radians radians 2007-2011 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. 3 radians Converts degrees to radians. gentype radians gentypedegrees Description Converts degrees to radians, i.e. (pi / 180) * degrees. Notes &commonFunctionsInc; If extended with cl_khr_fp16, generic type name gentype also includes half and half{2|3|4|8|16}. Specification OpenCL Specification Also see Common Functions, degrees khronos-opencl-man-1.0~svn27110/clReleaseKernel.xml0000644000175000017500000001517711660441607022060 0ustar mathieumathieu clReleaseKernel clReleaseKernel 2007-2011 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. 3 clReleaseKernel Decrements the kernel reference count. cl_int clReleaseKernel cl_kernelkernel Notes The kernel object is deleted once the number of instances that are retained to kernel become zero and the kernel object is no longer needed by any enqueued commands that use kernel. Errors Returns CL_SUCCESS if the kernel objects are successfully alloctaed. Otherwise, it returns one of the following errors: CL_INVALID_KERNEL if kernel is not a valid kernel object. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clCreateKernel, clCreateKernelsInProgram, clRetainKernel, clSetKernelArg, clGetKernelInfo, clGetKernelWorkGroupInfo khronos-opencl-man-1.0~svn27110/pow.xml0000644000175000017500000002566211660441607017625 0ustar mathieumathieu ]> pow, pown, powr, half_powr, native_powr pow, pown, powr, half_powr, native_powr 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. 3 pow, pown, powr, half_powr, native_powr Compute x to the power of y. gentype pow gentypex gentypey floatn pown floatn x intn y float pown float x int y doublen pown doublen x intn y double pown double x int y gentype powr gentypex gentypey gentype half_powr gentypex gentypey gentype native_powr gentypex gentypey halfn pown halfn x intn y half pown half x int y Description pow Computes x to the power of y. pown Computes x to the power of y, where y is an integer. powr Computes x to the power of y, where x is ≥ 0. half_powr Computes x to the power of y, where x is ≥ 0. native_powr Computes x to the power of y, where x is ≥ 0. The range of x and y are implementation-defined. The maximum error is implementation-defined. Notes &mathFunctionsInc; Functions with the half_ prefix are implemented with a minimum of 10-bits of accuracy i.e. an ULP value less than or equal to 8192 ulp. Functions with the native__ prefix may map to one or more native device instructions and will typically have better performance compared to the corresponding functions (without the native__ prefix). The accuracy (and in some cases the input range(s)) of these functions is implementation-defined. Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/get_image_height.xml0000644000175000017500000001215411660441607022261 0ustar mathieumathieu get_image_height get_image_height 2007-2011 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. 3 get_image_height Return the image height in pixels. int get_image_height image2d_timage int get_image_height image3d_timage int get_image_height image2d_array_timage Description Return the image height in pixels. Specification OpenCL Specification Also see Image Functions khronos-opencl-man-1.0~svn27110/cross.xml0000644000175000017500000001745211660441607020147 0ustar mathieumathieu ]> cross cross 2007-2011 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. 3 cross Cross product. float4 cross float4p0 float4p1 float3 cross float3p0 float3p1 double4 cross double4p0 double4p1 double3 cross double3p0 double3p1 half4 cross (half4 p0, half4 p1) // if half extension enabled half3 cross (half3 p0, half3 p1) // if half extension enabled Description Returns the cross product of p0.xyz and p1.xyz. The w component of the float4 result (or double if the cl_khr_fp16 extension is enabled) will be 0.0. Notes &geometricFunctionsInc; An application that wants to use half and halfn types will need to include the #pragma OPENCL EXTENSION cl_khr_fp16 : enable directive. Specification OpenCL Specification Also see Geometric Functions khronos-opencl-man-1.0~svn27110/scalarDataTypes.xml0000644000175000017500000003765311660441607022107 0ustar mathieumathieu Scalar Data Types Scalar Data Types 2007-2011 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. 3 Scalar Data Types Built-in scalar data types. Description These are the data types available in the OpenCL C programming language used to create kernels that are executed on OpenCL device(s). The OpenCL C programming language (also referred to as OpenCL C) is based on the ISO/IEC 9899:1999 C language specification (a.k.a. C99 specification) with specific extensions and restrictions. Please refer to the ISO/IEC 9899:1999 specification for a detailed description of the language grammar. This section describes modifications and restrictions to ISO/IEC 9899:1999 supported in OpenCL C. Most built-in scalar data types are also declared as appropriate types in the OpenCL API (and header files) that can be used by an application. The following table describes the built-in scalar data type in the OpenCL C programming language and the corresponding data type available to the application: Type in OpenCL C Language Description API type for application bool A conditional data type which is either true or false. The value true expands to the integer constant 1 and the value false expands to the integer constant 0. When any scalar value is converted to bool, the result is 0 if the value compares equal to 0; otherwise, the result is 1. n/a char A signed two's complement 8-bit integer. cl_char unsigned char, uchar An unsigned 8-bit integer. cl_uchar short A signed two's complement 16-bit integer. cl_short unsigned short, ushort An unsigned 16-bit integer. cl_ushort int A signed two's complement 32-bit integer. cl_int unsigned int, uint An unsigned 32-bit integer. cl_uint long A signed two's complement 64-bit integer. cl_long unsigned long, ulong An unsigned 64-bit integer. cl_ulong float A 32-bit floating point. The float data type must conform to the IEEE 754 single precision storage format. cl_float double A 64-bit floating point. The double data type must conform to the IEEE 754 double precision storage format. The double scalar type is an optional type that is supported if CL_DEVICE_DOUBLE_FP_CONFIG for a device is not zero. See the table for param_name for clGetDeviceInfo for details. cl_double half A 16-bit float. The half data type must conform to the IEEE 754-2008 half precision storage format. cl_half size_t The unsigned integer type of the result of the sizeof operator. This is a 32-bit unsigned integer if CL_DEVICE_ADDRESS_BITS defined in clGetDeviceInfo is 32-bits and is a 64-bit unsigned integer if CL_DEVICE_ADDRESS_BITS is 64-bits. n/a ptrdiff_t A signed integer type that is the result of subtracting two pointers. This is a 32-bit signed integer if CL_DEVICE_ADDRESS_BITS defined in clGetDeviceInfo is 32-bits and is a 64-bit signed integer if CL_DEVICE_ADDRESS_BITS is 64-bits. n/a intptr_t A signed integer type with the property that any valid pointer to void can be converted to this type, then converted back to pointer to void, and the result will compare equal to the original pointer. This is a 32-bit signed integer if CL_DEVICE_ADDRESS_BITS defined in table 4.3 is 32-bits and is a 64-bit signed integer if CL_DEVICE_ADDRESS_BITS is 64-bits. n/a uintptr_t An unsigned integer type with the property that any valid pointer to void can be converted to this type, then converted back to pointer to void, and the result will compare equal to the original pointer. This is a 32-bit signed integer if CL_DEVICE_ADDRESS_BITS defined in table 4.3 is 32-bits and is a 64-bit signed integer if CL_DEVICE_ADDRESS_BITS is 64-bits. n/a void The void type comprises an empty set of values; it is an incomplete type that cannot be completed. void Optional Half Floating Point The half floating-point is supported as an optional extension. An application that wants to use half and halfn will need to include the #pragma OPENCL EXTENSION cl_khr_fp16 : enable directive. This will extended the list of built-in vector and scalar data types to include the following: Type in OpenCL Language Description API type for application half2 A 2-component half-precision floating-point vector. cl_half2 half3 A 3-component half-precision floating-point vector. cl_half3 half4 A 4-component half-precision floating-point vector. cl_half4 half8 An 8-component half-precision floating-point vector. cl_half8 half16 A 16-component half-precision floating-point vector. cl_half16 The relational, equality, logical and logical unary operators can be used with half scalar and halfn vector types and shall produce a scalar int and vector shortn result respectively. The OpenCL compiler accepts an h and H suffix on floating point literals, indicating the literal is typed as a half. Specification OpenCL Specification Also see Macros and Limits, Vector Data Types, Reserved Data Types, Other Data Types, Abstract Data Types, Enumerated Data Types, cl_khr_fp16, cl_khr_fp64 khronos-opencl-man-1.0~svn27110/clRetainProgram.xml0000644000175000017500000001277111660441607022106 0ustar mathieumathieu clRetainProgram clRetainProgram 2007-2011 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. 3 clRetainProgram Increments the program reference count. cl_int clRetainProgram cl_programprogram Notes clCreateProgram does an implicit retain. Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_PROGRAM if program is not a valid program object. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clCreateProgramWithBinary, clCreateProgramWithSource, clRetainProgram khronos-opencl-man-1.0~svn27110/clGetPlatformInfo.xml0000644000175000017500000002516711660441607022377 0ustar mathieumathieu clGetPlatformInfo clGetPlatformInfo 2007-2011 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. 3 clGetPlatformInfo Get specific information about the OpenCL platform. cl_int clGetPlatformInfo cl_platform_idplatform cl_platform_infoparam_name size_tparam_value_size void*param_value size_t*param_value_size_ret Parameters platform The platform ID returned by clGetPlatformIDs or can be NULL. If platform is NULL, the behavior is implementation-defined. param_name An enumeration constant that identifies the platform information being queried. It can be one of the values specified in the table below. param_value A pointer to memory location where appropriate values for a given param_value will be returned. Possible param_value values returned are listed in the table below. If param_value is NULL, it is ignored. param_value_size Specifies the size in bytes of memory pointed to by param_value. This size in bytes must be ≥ size of return type specified in the table below. param_value_size_ret Returns the actual size in bytes of data being queried by param_value. If param_value_size_ret is NULL, it is ignored OpenCL Platform Queries cl_platform_info Return Type Description CL_PLATFORM_PROFILE char[] OpenCL profile string. Returns the profile name supported by the implementation. The profile name returned can be one of the following strings: FULL_PROFILE - if the implementation supports the OpenCL specification (functionality defined as part of the core specification and does not require any extensions to be supported). EMBEDDED_PROFILE - if the implementation supports the OpenCL embedded profile. The embedded profile is defined to be a subset for each version of OpenCL. CL_PLATFORM_VERSION char[] OpenCL version string. Returns the OpenCL version supported by the implementation. This version string has the following format: OpenCL<space><major_version.minor_version><space><platform-specific information> The major_version.minor_version value returned will be 1.2. CL_PLATFORM_NAME char[] Platform name string. CL_PLATFORM_VENDOR char[] Platform vendor string. CL_PLATFORM_EXTENSIONS char[] Returns a space-separated list of extension names (the extension names themselves do not contain any spaces) supported by the platform. Extensions defined here must be supported by all devices associated with this platform. Notes A null terminated string is returned by OpenCL query function calls if the return type of the information being queried is a char[]. Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns the following: CL_INVALID_PLATFORM if platform is not a valid platform. CL_INVALID_VALUE if param_name is not one of the supported values or if size in bytes specified by param_value_size is less than size of return type and param_value is not a NULL value. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clGetPlatformIDs khronos-opencl-man-1.0~svn27110/fmod.xml0000644000175000017500000001042211660441607017731 0ustar mathieumathieu ]> fmod fmod 2007-2011 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. 3 fmod Modulus. Returns x - y * trunc (x/y). gentype fmod gentypex gentypey Description Modulus. Returns x - y * trunc (x/y). Notes &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/read_imagef2d.xml0000644000175000017500000002454611660441607021471 0ustar mathieumathieu [ ]> read_imagef (2D) read_imagef (2D) 2007-2011 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. 3 read_imagef (2D) Do an element lookup in the 2D image object, returning floating-point values. float4 read_imagef image2d_t image sampler_t sampler int2 coord float4 read_imagef image2d_t image sampler_t sampler float2 coord float4 read_imagef image2d_t image int2 coord float4 read_imagef image2d_array_t image int4 coord float4 read_imagef image2d_array_t image sampler_t sampler int4 coord float4 read_imagef image2d_array_t image sampler_t sampler float4 coord Description For forms that take an image2d_t, Use the coordinate (coord.x, coord.y) to do an element lookup in the 2D image object specified by image. For forms that take an image2d_array_t, use coord.xy to do an element lookup in the 2D image identified by coord.z in the 2D image array specified by image The samplerless read image functions behave exactly as the corresponding read image functions that take integer coordinates and a sampler with filter mode set to CLK_FILTER_NEAREST, normalized coordinates set to CLK_NORMALIZED_COORDS_FALSE and addressing mode to CLK_ADDRESS_NONE. read_imagef returns floating-point values in the range [0.0... 1.0] for image objects created with image_channel_data_type set to one of the predefined packed formats or CL_UNORM_INT8 or CL_UNORM_INT16. read_imagef returns floating-point values in the range [-1.0... 1.0] for image objects created with image_channel_data_type set to CL_SNORM_INT8, or CL_SNORM_INT16. read_imagef returns floating-point values for image objects created with image_channel_data_type set to CL_HALF_FLOAT or CL_FLOAT. The read_imagef calls that take integer coordinates must use a sampler with filter mode set to CLK_FILTER_NEAREST, normalized coordinates set to CLK_NORMALIZED_COORDS_FALSE and addressing mode set to CLK_ADDRESS_CLAMP_TO_EDGE, CLK_ADDRESS_CLAMP or CLK_ADDRESS_NONE; otherwise the values returned are undefined. Values returned by read_imagef for image objects with image_channel_data_type values not specified in the description above are undefined. Notes General information about the read_image* functions follows. &imageFunctionsInc; &imageMappingInc; Specification OpenCL Specification Also see Image Functions khronos-opencl-man-1.0~svn27110/accessMappedInc.xml0000644000175000017500000000767511660441607022046 0ustar mathieumathieu Accessing mapped regions of a memory object This section describes the behavior of OpenCL commands that access mapped regions of a memory object. The contents of the region of a memory object and associated memory objects (sub-buffer objects or 1D image buffer objects that overlap this region) mapped for writing (i.e. CL_MAP_WRITE or CL_MAP_WRITE_INVALIDATE_REGION is set in map_flags argument to clEnqueueMapBuffer or clEnqueueMapImage) are considered to be undefined until this region is unmapped. Multiple commands in command-queues can map a region or overlapping regions of a memory object and associated memory objects (sub-buffer objects or 1D image buffer objects that overlap this region) for reading (i.e. map_flags = CL_MAP_READ). The contents of the regions of a memory object mapped for reading can also be read by kernels and other OpenCL commands (such as clEnqueueCopyBuffer) executing on a device(s). Mapping (and unmapping) overlapped regions in a memory object and/or associated memory objects (sub-buffer objects or 1D image buffer objects that overlap this region) for writing is an error and will result in CL_INVALID_OPERATION error returned by clEnqueueMapBuffer or clEnqueueMapImage. If a memory object is currently mapped for writing, the application must ensure that the memory object is unmapped before any enqueued kernels or commands that read from or write to this memory object or any of its associated memory objects (sub-buffer or 1D image buffer objects) or its parent object (if the memory object is a sub-buffer or 1D image buffer object) begin execution; otherwise the behavior is undefined. If a memory object is currently mapped for reading, the application must ensure that the memory object is unmapped before any enqueued kernels or commands that write to this memory object or any of its associated memory objects (sub-buffer or 1D image buffer objects) or its parent object (if the memory object is a sub-buffer or 1D image buffer object) begin execution; otherwise the behavior is undefined. Accessing the contents of the memory region referred to by the mapped pointer that has been unmapped is undefined. The mapped pointer returned by clEnqueueMapBuffer or clEnqueueMapImage can be used as ptr argument value to clEnqueueReadBuffer, clEnqueueWriteBuffer, clEnqueueReadBufferRect, clEnqueueWriteBufferRect, clEnqueueReadImage, and clEnqueueWriteImage, provided the rules described above are adhered to. khronos-opencl-man-1.0~svn27110/bitselect.xml0000644000175000017500000001265611660441607020775 0ustar mathieumathieu ]> bitselect bitselect 2007-2011 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. 3 bitselect Each bit of result is corresponding bit of a if corresponding bit of c is 0. gentype bitselect gentypea gentypeb gentypec halfn bitselect (halfn a, halfn b, halfn c) // if half extension enabled Description Each bit of result is corresponding bit of a if corresponding bit of c is 0. Otherwise it is the corresponding bit of b. Notes &relationalFunctionsInc1; &relationalFunctionsGEN; Specification OpenCL Specification Also see Relational Functions khronos-opencl-man-1.0~svn27110/clCreateKernelsInProgram.xml0000644000175000017500000002356211660441607023702 0ustar mathieumathieu clCreateKernelsInProgram clCreateKernelsInProgram 2007-2011 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. 3 clCreateKernelsInProgram Creates kernel objects for all kernel functions in a program object. cl_int clCreateKernelsInProgram cl_program program cl_uintnum_kernels cl_kernel*kernels cl_uint*num_kernels_ret Parameters program A program object with a successfully built executable. num_kernels The size of memory pointed to by kernels specified as the number of cl_kernel entries. kernels The buffer where the kernel objects for kernels in program will be returned. If kernels is NULL, it is ignored. If kernels is not NULL, num_kernels must be greater than or equal to the number of kernels in program. num_kernels_ret The number of kernels in program. If num_kernels_ret is NULL, it is ignored. Notes Creates kernel objects for all kernel functions in program. Kernel objects are not created for any __kernel functions in program that do not have the same function definition across all devices for which a program executable has been successfully built. Kernel objects can only be created once you have a program object with a valid program source or binary loaded into the program object and the program executable has been successfully built for one or more devices associated with program. No changes to the program executable are allowed while there are kernel objects associated with a program object. This means that calls to clBuildProgram and clCompileProgram return CL_INVALID_OPERATION if there are kernel objects attached to a program object. The OpenCL context associated with program will be the context associated with kernel. The list of devices associated with program are the devices associated with kernel. Devices associated with a program object for which a valid program executable has been built can be used to execute kernels declared in the program object. Errors Returns CL_SUCCESS if the kernel objects are successfully allocated. Otherwise, it returns one of the following errors: CL_INVALID_PROGRAM if program is not a valid program object. CL_INVALID_PROGRAM_EXECUTABLE if there is no successfully built executable for any device in program. CL_INVALID_VALUE if kernels is not NULL and num_kernels is less than the number of kernels in program. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clCreateKernel, clRetainKernel, clReleaseKernel, clSetKernelArg, clGetKernelInfo, clGetKernelWorkGroupInfo, Cardinality Diagram khronos-opencl-man-1.0~svn27110/integerFunctions.xml0000644000175000017500000001700011660441607022331 0ustar mathieumathieu ]> Integer Built-In Functions Integer Built-In Functions 2007-2011 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. 3 Integer Built-In Functions Click an item in the table below for details about that function. abs |x| abs-diff |x-y| without modulo overflow add_sat x+y and saturate result hadd (x+y) >> 1 without modulo overflow rhadd (x+y+1) >> 1. The intermediate sum does not modulo overflow. clz Number of leading 0-bits in x clamp min(max( x, minval), maxval) mad_hi mul_hi(a,b)+c mad24 (Fast integer function.) Multiply 24-bit integer then add the 32-bit result to 32-bit integer mad_sat a*b+c and saturate the result max The greater of x or y min The lessor of x or y mul_hi High half of the product of x and y mul24 (Fast integer function.) Multiply 24-bit integer values a and b rotate result[indx]=v[indx]<<i[indx] sub_sat x - y and saturate the result upsample result[i] = ((gentype)hi[i] << 8|16|32) | lo[i] popcount Returns the number of non-zero bits in x. Description &integerFunctionsInc; Specification OpenCL Specification khronos-opencl-man-1.0~svn27110/clGetDeviceInfo.xml0000644000175000017500000015174611660441607022015 0ustar mathieumathieu clGetDeviceInfo clGetDeviceInfo 2007-2011 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. 3 clGetDeviceInfo Get information about an OpenCL device. cl_int clGetDeviceInfo cl_device_id device cl_device_info param_name size_t param_value_size void *param_value size_t *param_value_size_ret Parameters device May be a device returned by clGetDeviceIDs or a sub-device created by clCreateSubDevices. If device is a sub-device, the specific information for the sub-device will be returned. The information that can be queried using clGetDeviceInfo is specified in the table below. param_value A pointer to memory location where appropriate values for a given param_name as specified in the table below will be returned. If param_value is NULL, it is ignored. param_value_size Specifies the size in bytes of memory pointed to by param_value. This size in bytes must be ≥ size of return type specified in the table below. param_value_size_ret Returns the actual size in bytes of data being queried by param_value. If param_value_size_ret is NULL, it is ignored. param_name An enumeration constant that identifies the device information being queried. It can be one of the values as specified in the table below. cl_device_info Return Type Description CL_DEVICE_ADDRESS_BITS cl_uint The default compute device address space size specified as an unsigned integer value in bits. Currently supported values are 32 or 64 bits. CL_DEVICE_AVAILABLE cl_bool Is CL_TRUE if the device is available and CL_FALSE if the device is not available. CL_DEVICE_BUILT_IN_KERNELS char[] A semi-colon separated list of built-in kernels supported by the device. An empty string is returned if no built-in kernels are supported by the device. CL_DEVICE_COMPILER_AVAILABLE cl_bool Is CL_FALSE if the implementation does not have a compiler available to compile the program source. Is CL_TRUE if the compiler is available. This can be CL_FALSE for the embedded platform profile only. CL_DEVICE_DOUBLE_FP_CONFIG cl_device_-fp_config Describes double precision floating-point capability of the OpenCL device. This is a bit-field that describes one or more of the following values: CL_FP_DENORM - denorms are supported. CL_FP_INF_NAN - INF and NaNs are supported. CL_FP_ROUND_TO_NEAREST - round to nearest even rounding mode supported. CL_FP_ROUND_TO_ZERO - round to zero rounding mode supported. CL_FP_ROUND_TO_INF - round to positive and negative infinity rounding modes supported. CP_FP_FMA - IEEE754-2008 fused multiply-add is supported. CL_FP_SOFT_FLOAT - Basic floating-point operations (such as addition, subtraction, multiplication) are implemented in software. Double precision is an optional feature so the mandated minimum double precision floating-point capability is 0. If double precision is supported by the device, then the minimum double precision floatingpoint capability must be: CL_FP_FMA | CL_FP_ROUND_TO_NEAREST | CL_FP_ROUND_TO_ZERO | CL_FP_ROUND_TO_INF | CL_FP_INF_NAN | CL_FP_DENORM. CL_DEVICE_ENDIAN_LITTLE cl_bool Is CL_TRUE if the OpenCL device is a little endian device and CL_FALSE otherwise. CL_DEVICE_ERROR_CORRECTION_SUPPORT Return type: cl_bool Is CL_TRUE if the device implements error correction for all accesses to compute device memory (global and constant). Is CL_FALSE if the device does not implement such error correction. CL_DEVICE_EXECUTION_CAPABILITIES cl_device_-exec_capabilities Describes the execution capabilities of the device. This is a bit-field that describes one or more of the following values: CL_EXEC_KERNEL - The OpenCL device can execute OpenCL kernels. CL_EXEC_NATIVE_KERNEL - The OpenCL device can execute native kernels. The mandated minimum capability is CL_EXEC_KERNEL. CL_DEVICE_EXTENSIONS char[] Returns a space separated list of extension names (the extension names themselves do not contain any spaces) supported by the device. The list of extension names returned can be vendor supported extension names and one or more of the following Khronos approved extension names: cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_fp16 cl_khr_gl_sharing cl_khr_gl_event cl_khr_d3d10_sharing cl_khr_dx9_media_sharing cl_khr_d3d11_sharing The following approved Khronos extension names must be returned by all device that support OpenCL C 1.2: cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_fp64 (for backward compatibility if double precision is supported) Please refer to the OpenCL 1.2 Extension Specification for a detailed description of these extensions. CL_DEVICE_GLOBAL_MEM_CACHE_SIZE cl_ulong Size of global memory cache in bytes. CL_DEVICE_GLOBAL_MEM_CACHE_TYPE cl_device_mem-_cache_type Type of global memory cache supported. Valid values are: CL_NONE, CL_READ_ONLY_CACHE, and CL_READ_WRITE_CACHE. CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE cl_uint Size of global memory cache line in bytes. CL_DEVICE_GLOBAL_MEM_SIZE cl_ulong Size of global device memory in bytes. CL_DEVICE_HALF_FP_CONFIG cl_device_-fp_config Describes the OPTIONAL half precision floating-point capability of the OpenCL device. This is a bit-field that describes one or more of the following values: CL_FP_DENORM - denorms are supported. CL_FP_INF_NAN - INF and NaNs are supported. CL_FP_ROUND_TO_NEAREST - round to nearest even rounding mode supported. CL_FP_ROUND_TO_ZERO - round to zero rounding mode supported. CL_FP_ROUND_TO_INF - round to +ve and -ve infinity rounding modes supported. CP_FP_FMA - IEEE754-2008 fused multiply-add is supported. CL_FP_SOFT_FLOAT - Basic floating-point operations (such as addition, subtraction, multiplication) are implemented in software. The required minimum half precision floating-point capability as implemented by this extension is CL_FP_ROUND_TO_ZERO or CL_FP_ROUND_TO_INF | CL_FP_INF_NAN. CL_DEVICE_HOST_UNIFIED_MEMORY cl_bool Is CL_TRUE if the device and the host have a unified memory subsystem and is CL_FALSE otherwise. CL_DEVICE_IMAGE_SUPPORT cl_bool Is CL_TRUE if images are supported by the OpenCL device and CL_FALSE otherwise. CL_DEVICE_IMAGE2D_MAX_HEIGHT size_t Max height of 2D image in pixels. The minimum value is 8192 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE. CL_DEVICE_IMAGE2D_MAX_WIDTH size_t Max width of 2D image or 1D image not created from a buffer object in pixels. The minimum value is 8192 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE. CL_DEVICE_IMAGE3D_MAX_DEPTH size_t Max depth of 3D image in pixels. The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE. CL_DEVICE_IMAGE3D_MAX_HEIGHT size_t Max height of 3D image in pixels. The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE. CL_DEVICE_IMAGE3D_MAX_WIDTH size_t Max width of 3D image in pixels. The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE. CL_DEVICE_IMAGE_MAX_BUFFER_SIZE size_t Max number of pixels for a 1D image created from a buffer object. The minimum value is 65536 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE. CL_DEVICE_IMAGE_MAX_ARRAY_SIZE size_t Max number of images in a 1D or 2D image array. The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE CL_DEVICE_LINKER_AVAILABLE cl_bool Is CL_FALSE if the implementation does not have a linker available. Is CL_TRUE if the linker is available. This can be CL_FALSE for the embedded platform profile only. This must be CL_TRUE if CL_DEVICE_COMPILER_AVAILABLE is CL_TRUE CL_DEVICE_LOCAL_MEM_SIZE cl_ulong Size of local memory arena in bytes. The minimum value is 32 KB for devices that are not of type CL_DEVICE_TYPE_CUSTOM. CL_DEVICE_LOCAL_MEM_TYPE cl_device_-local_mem_type Type of local memory supported. This can be set to CL_LOCAL implying dedicated local memory storage such as SRAM, or CL_GLOBAL. For custom devices, CL_NONE can also be returned indicating no local memory support. CL_DEVICE_MAX_CLOCK_FREQUENCY cl_uint Maximum configured clock frequency of the device in MHz. CL_DEVICE_MAX_COMPUTE_UNITS cl_uint The number of parallel compute units on the OpenCL device. A work-group executes on a single compute unit. The minimum value is 1. CL_DEVICE_MAX_CONSTANT_ARGS cl_uint Max number of arguments declared with the __constant qualifier in a kernel. The minimum value is 8 for devices that are not of type CL_DEVICE_TYPE_CUSTOM. CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE cl_ulong Max size in bytes of a constant buffer allocation. The minimum value is 64 KB for devices that are not of type CL_DEVICE_TYPE_CUSTOM. CL_DEVICE_MAX_MEM_ALLOC_SIZE cl_ulong Max size of memory object allocation in bytes. The minimum value is max (1/4th of CL_DEVICE_GLOBAL_MEM_SIZE, 128*1024*1024) for devices that are not of type CL_DEVICE_TYPE_CUSTOM. CL_DEVICE_MAX_PARAMETER_SIZE size_t Max size in bytes of the arguments that can be passed to a kernel. The minimum value is 1024 for devices that are not of type CL_DEVICE_TYPE_CUSTOM. For this minimum value, only a maximum of 128 arguments can be passed to a kernel. CL_DEVICE_MAX_READ_IMAGE_ARGS cl_uint Max number of simultaneous image objects that can be read by a kernel. The minimum value is 128 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE. CL_DEVICE_MAX_SAMPLERS cl_uint Maximum number of samplers that can be used in a kernel. The minimum value is 16 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE. (Also see sampler_t.) CL_DEVICE_MAX_WORK_GROUP_SIZE size_t Maximum number of work-items in a work-group executing a kernel on a single compute unit, using the data parallel execution model. (Refer to clEnqueueNDRangeKernel). The minimum value is 1. CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS cl_uint Maximum dimensions that specify the global and local work-item IDs used by the data parallel execution model. (Refer to clEnqueueNDRangeKernel). The minimum value is 3 for devices that are not of type CL_DEVICE_TYPE_CUSTOM. CL_DEVICE_MAX_WORK_ITEM_SIZES size_t[] Maximum number of work-items that can be specified in each dimension of the work-group to clEnqueueNDRangeKernel. Returns n size_t entries, where n is the value returned by the query for CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS. The minimum value is (1, 1, 1) for devices that are not of type CL_DEVICE_TYPE_CUSTOM. CL_DEVICE_MAX_WRITE_IMAGE_ARGS cl_uint Max number of simultaneous image objects that can be written to by a kernel. The minimum value is 8 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE. CL_DEVICE_MEM_BASE_ADDR_ALIGN cl_uint The minimum value is the size (in bits) of the largest OpenCL built-in data type supported by the device (long16 in FULL profile, long16 or int16 in EMBEDDED profile) for devices that are not of type CL_DEVICE_TYPE_CUSTOM. CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE cl_uint Deprecated in OpenCL 1.2. The smallest alignment in bytes which can be used for any data type. CL_DEVICE_NAME char[] Device name string. CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT CL_DEVICE_NATIVE_VECTOR_WIDTH_INT CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF cl_uint Returns the native ISA vector width. The vector width is defined as the number of scalar elements that can be stored in the vector. If double precision is not supported, CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE must return 0. If the cl_khr_fp16 extension is not supported, CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF must return 0. CL_DEVICE_OPENCL_C_VERSION char[] OpenCL C version string. Returns the highest OpenCL C version supported by the compiler for this device that is not of type CL_DEVICE_TYPE_CUSTOM. This version string has the following format: OpenCL<space>C<space><major_version.minor_version><space><vendor-specific information> The major_version.minor_version value returned must be 1.2 if CL_DEVICE_VERSION is OpenCL 1.2. The major_version.minor_version value returned must be 1.1 if CL_DEVICE_VERSION is OpenCL 1.1. CL_DEVICE_PARENT_DEVICE cl_device_id Returns the cl_device_id of the parent device to which this sub-device belongs. If device is a root-level device, a NULL value is returned. CL_DEVICE_PARTITION_MAX_SUB_DEVICES cl_uint Returns the maximum number of sub-devices that can be created when a device is partitioned. The value returned cannot exceed CL_DEVICE_MAX_COMPUTE_UNITS. CL_DEVICE_PARTITION_PROPERTIES cl_device_partit-ion_property[] Returns the list of partition types supported by device. This is an array of cl_device_partition_property values drawn from the following list: CL_DEVICE_PARTITION_EQUALLY CL_DEVICE_PARTITION_BY_COUNTS CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN If the device does not support any partition types, a value of 0 will be returned. CL_DEVICE_PARTITION_AFFINITY_DOMAIN cl_device_aff-inity_domain Returns the list of supported affinity domains for partitioning the device using CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN. This is a bit-field that describes one or more of the following values: CL_DEVICE_AFFINITY_DOMAIN_NUMA CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE If the device does not support any affinity domains, a value of 0 will be returned. CL_DEVICE_PARTITION_TYPE cl_device_part-ition_property[] Returns the properties argument specified in clCreateSubDevices if device is a subdevice. Otherwise the implementation may either return a param_value_size_ret of 0 i.e. there is no partition type associated with device or can return a property value of 0 (where 0 is used to terminate the partition property list) in the memory that param_value points to. CL_DEVICE_PLATFORM cl_platform_id The platform associated with this device. CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF cl_uint Preferred native vector width size for built-in scalar types that can be put into vectors. The vector width is defined as the number of scalar elements that can be stored in the vector. If double precision is not supported, CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE must return 0. If the cl_khr_fp16 extension is not supported, CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF must return 0. CL_DEVICE_PRINTF_BUFFER_SIZE size_t Maximum size of the internal buffer that holds the output of printf calls from a kernel. The minimum value for the FULL profile is 1 MB. CL_DEVICE_PREFERRED_INTEROP_USER_SYNC cl_bool Is CL_TRUE if the device's preference is for the user to be responsible for synchronization, when sharing memory objects between OpenCL and other APIs such as DirectX, CL_FALSE if the device / implementation has a performant path for performing synchronization of memory object shared between OpenCL and other APIs such as DirectX CL_DEVICE_PROFILE char[] OpenCL profile string. Returns the profile name supported by the device (see note). The profile name returned can be one of the following strings: FULL_PROFILE - if the device supports the OpenCL specification (functionality defined as part of the core specification and does not require any extensions to be supported). EMBEDDED_PROFILE - if the device supports the OpenCL embedded profile. CL_DEVICE_PROFILING_TIMER_RESOLUTION size_t Describes the resolution of device timer. This is measured in nanoseconds. CL_DEVICE_QUEUE_PROPERTIES cl_command_- queue_properties Describes the command-queue properties supported by the device. This is a bit-field that describes one or more of the following values: CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE CL_QUEUE_PROFILING_ENABLE These properties are described in the table for clCreateCommandQueue. The mandated minimum capability is CL_QUEUE_PROFILING_ENABLE. CL_DEVICE_REFERENCE_COUNT cl_uint Returns the device reference count. If the device is a root-level device, a reference count of one is returned. CL_DEVICE_SINGLE_FP_CONFIG cl_device_-fp_config Describes single precision floating-point capability of the device. This is a bit-field that describes one or more of the following values: CL_FP_DENORM - denorms are supported CL_FP_INF_NAN - INF and quiet NaNs are supported CL_FP_ROUND_TO_NEAREST - round to nearest even rounding mode supported CL_FP_ROUND_TO_ZERO - round to zero rounding mode supported CL_FP_ROUND_TO_INF - round to +ve and -ve infinity rounding modes supported CL_FP_FMA - IEEE754-2008 fused multiply-add is supported CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT - divide and sqrt are correctly rounded as defined by the IEEE754 specification. CL_FP_SOFT_FLOAT - Basic floating-point operations (such as addition, subtraction, multiplication) are implemented in software. The mandated minimum floating-point capability for devices that are not of type CL_DEVICE_TYPE_CUSTOM is CL_FP_ROUND_TO_NEAREST | CL_FP_INF_NAN. CL_DEVICE_TYPE cl_device_type The OpenCL device type. Currently supported values are one of or a combination of: CL_DEVICE_TYPE_CPU, CL_DEVICE_TYPE_GPU, CL_DEVICE_TYPE_ACCELERATOR, CL_DEVICE_TYPE_DEFAULT, a combination of the above types, or CL_DEVICE_TYPE_CUSTOM. CL_DEVICE_VENDOR char[] Vendor name string. CL_DEVICE_VENDOR_ID cl_uint A unique device vendor identifier. An example of a unique device identifier could be the PCIe ID. CL_DEVICE_VERSION char[] OpenCL version string. Returns the OpenCL version supported by the device. This version string has the following format: OpenCL<space><major_version.minor_version><space><vendor-specific information> The major_version.minor_version value returned will be 1.1. CL_DRIVER_VERSION char[] OpenCL software driver version string in the form major_number.minor_number. Notes CL_DEVICE_PROFILE: The platform profile returns the profile that is implemented by the OpenCL framework. If the platform profile returned is FULL_PROFILE, the OpenCL framework will support devices that are FULL_PROFILE and may also support devices that are EMBEDDED_PROFILE. The compiler must be available for all devices i.e. CL_DEVICE_COMPILER_AVAILABLE is CL_TRUE. If the platform profile returned is EMBEDDED_PROFILE, then devices that are only EMBEDDED_PROFILE are supported. The device queries described the table above should return the same information for a root-level device i.e. a device returned by clGetDeviceIDs and any sub-devices created from this device except for the following queries: CL_DEVICE_GLOBAL_MEM_CACHE_SIZE CL_DEVICE_BUILT_IN_KERNELS CL_DEVICE_PARENT_DEVICE CL_DEVICE_PARTITION_TYPE CL_DEVICE_REFERENCE_COUNT Errors clGetDeviceInfo returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns the following: CL_INVALID_DEVICE if device is not valid. CL_INVALID_VALUE if param_name is not one of the supported values or if size in bytes specified by param_value_size is less than size of return type as shown in the table above and param_value is not a NULL value or if param_name is a value that is available as an extension and the corresponding extension is not supported by the device. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clGetDeviceIDs, cl_khr_fp64, __constant, clCreateCommandQueue, clRetainCommandQueue, clEnqueueNDRangeKernel khronos-opencl-man-1.0~svn27110/upsample.xml0000644000175000017500000002646711660441607020652 0ustar mathieumathieu ]> upsample upsample 2007-2011 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. 3 upsample result[i] = ((gentype)hi[i] << 8|16|32) | lo[i] short upsample charhi ucharlo ushort upsample ucharhi ucharlo shortn upsample charnhi ucharnlo ushortn upsample ucharnhi ucharnlo int upsample shorthi ushortlo uint upsample ushorthi ushortlo intn upsample shortnhi ushortnlo uintn upsample ushortnhi ushortnlo long upsample inthi uintlo ulong upsample uinthi uintlo longn upsample intnhi uintnlo ulongn upsample uintnhi uintnlo Description result[i] = ((short)hi[i] << 8) | lo[i] result[i] = ((ushort)hi[i] << 8) | lo[i] result[i] = ((int)hi[i] << 16) | lo[i] result[i] = ((uint)hi[i] << 16) | lo[i] result[i] = ((long)hi[i] << 32) | lo[i] result[i] = ((ulong)hi[i] << 32) | lo[i] Notes &integerFunctionsInc; Specification OpenCL Specification Also see Integer Functions khronos-opencl-man-1.0~svn27110/clRetainMemObject.xml0000644000175000017500000001443011660441607022336 0ustar mathieumathieu clRetainMemObject clRetainMemObject 2007-2011 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. 3 clRetainMemObject Increments the memory object reference count. cl_int clRetainMemObject cl_memmemobj Parameters memobj A valid memory object. Notes clCreateBuffer, clCreateSubBuffer, and clCreateImage, and perform an implicit retain. After the memobj reference count becomes zero and commands queued for execution on a command-queue(s) that use memobj have finished, the memory object is deleted. If memobj is a buffer object, memobj cannot be deleted until all sub-buffer objects associated with memobj are deleted. Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_MEM_OBJECT if memobj is a not a valid memory object (buffer or image object). CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clCreateBuffer, clEnqueueCopyBuffer, clEnqueueReadBuffer, clEnqueueWriteBuffer, clReleaseMemObject khronos-opencl-man-1.0~svn27110/supportedImageFormats.xml0000644000175000017500000001064711660441607023341 0ustar mathieumathieu Supported Image Formats Supported Image Formats 2007-2011 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. 3 Supported Image Formats Supported Image Formats Description For read-write or write-only 2D and 3D images, the minimum list of supported image formats is given by the table below: image_num_channels image_channel_order image_channel_data_type 4 CL_RGBA CL_UNORM_INT8 CL_UNORM_INT16 CL_SIGNED_INT8 CL_SIGNED_INT16 CL_SIGNED_INT32 CL_UNSIGNED_INT8 CL_UNSIGNED_INT16 CL_UNSIGNED_INT32 CL_HALF_FLOAT CL_FLOAT 4 CL_BGRA CL_UNORM_INT8 Specification OpenCL Specification Also see EXTENSION, cl_image_format, cl_khr_3d_image_writes, clGetSupportedImageFormats khronos-opencl-man-1.0~svn27110/any.xml0000644000175000017500000001174211660441607017601 0ustar mathieumathieu ]> any, all any, all 2007-2011 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. 3 any, all Test for sign bit. int any igentypex int all igentypex Description any returns 1 if the most significant bit in any component of x is set; otherwise returns 0. all returns 1 if the most significant bit in all components of x is set; otherwise returns 0. Notes &relationalFunctionsInc1; &relationalFunctionsIGEN; n is 2, 3, 4, 8, or 16. Specification OpenCL Specification Also see Relational Functions khronos-opencl-man-1.0~svn27110/write_image2d.xml0000644000175000017500000003440411660441607021534 0ustar mathieumathieu [ ]> write_image2d write_image (2D) 2007-2011 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. 3 write_image Write color value to location in a 2D image object. void write_imagef image2d_t image int2 coord float4 color void write_imagef image2d_array_t image int4 coord float4 color void write_imagei image2d_t image int2 coord int4 color void write_imagei image2d_array_t image int4 coord int4 color void write_imageui image2d_t image int2 coord uint4 color void write_imageui image2d_array_t image int4 coord uint4 color void write_imageh image2d_t image int2 coord half4 color void write_imageh image2d_array_t image int4 coord half4 color Description write_imagef can only be used with image objects created with image_channel_data_type set to one of the pre-defined packed formats or set to CL_SNORM_INT8, CL_UNORM_INT8, CL_SNORM_INT16, CL_UNORM_INT16, CL_HALF_FLOAT or CL_FLOAT. Appropriate data format conversion will be done to convert channel data from a floating-point value to actual data format in which the channels are stored. write_imagei can only be used with image objects created with image_channel_data_type set to one of the following values: CL_SIGNED_INT8, CL_SIGNED_INT16, and CL_SIGNED_INT32. write_imageui functions can only be used with image objects created with image_channel_data_type set to one of the following values: CL_UNSIGNED_INT8, CL_UNSIGNED_INT16, or CL_UNSIGNED_INT32. An application that wants to use half and halfn types will need to include the #pragma OPENCL EXTENSION cl_khr_fp16 : enable directive. write_imageh can only be used with image objects created with image_channel_data_type set to one of the pre-defined packed formats or set to CL_SNORM_INT8, CL_UNORM_INT8, CL_SNORM_INT16, CL_UNORM_INT16 or CL_HALF_FLOAT. Functions that take image2d_t For the functions that take an image_2d_t image, write color value to location specified by coord.xy in the 2D image object specified by image. Appropriate data format conversion to the specified image format is done before writing the color value. coord.x and coord.y are considered to be unnormalized coordinates and must be in the range 0 … image width - 1, and 0 … image height - 1. For functions that take image_2d_t, the behavior of write_imagef, write_imagei, write_imageui, and write_imageh for image objects created with image_channel_data_type values not specified in the description above or with (x, y) coordinate values that are not in the range (0 … image width - 1, 0 … image height - 1), respectively, is undefined. Functions that take image2d_array_t For the functions that take an image_2d_array_t image, write color value to location specified by coord.xy in the 2D image identified by coord.z in the 2D image array specified by image. Appropriate data format conversion to the specified image format is done before writing the color value. coord.x, coord.y and coord.z are considered to be unnormalized coordinates and must be in the range 0 … image width - 1, 0 … image height - 1 and 0 … image number of layers - 1. For functions that take image_2d_array_t, the behavior of write_imagef, write_imagei, write_imageui, and write_imageh for image objects created with image_channel_data_type values not specified in the description above or with (x, y, z) coordinate values that are not in the range (0 … image width - 1, 0 … image height - 1), respectively, is undefined. Notes &imageFunctionsInc; Specification OpenCL Specification Also see Image Functions khronos-opencl-man-1.0~svn27110/storageQualifiers.xml0000644000175000017500000001052011660441607022474 0ustar mathieumathieu Storage-class Qualifiers Storage-class Qualifiers 2007-2011 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. 3 Storage-class Qualifiers The typedef, extern and static storage-class specifiers. Notes The typedef, extern, and static storage-class specifiers are supported. The auto and register storage-class specifiers are not supported.. The extern storage-class specifier can only be used for functions (kernel and non-kernel functions) and global variables declared in program scope. The static storage-class specifier can only be used for non-kernel functions and global variables declared in program scope. Example extern constant float4 noise_table[256]; static constant float4 color_table[256]; extern kernel void my_foo(image2d_t img); extern void my_bar(global float *a); kernel void my_func(image2d_t img, global float *a) { extern constant float4 a; // error. static constant float4 b; // error. static float c; // error. ... my_foo(img); ... my_bar(a); ... } Specification OpenCL Specification khronos-opencl-man-1.0~svn27110/clReleaseContext.xml0000644000175000017500000001371511660441607022260 0ustar mathieumathieu clReleaseContext clReleaseContext 2007-2011 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. 3 clReleaseContext Decrement the context reference count. cl_int clReleaseContext cl_contextcontext Parameters context The context to release. Notes After the context reference count becomes zero and all the objects attached to context (such as memory objects, command-queues) are released, the context is deleted. Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following values: CL_INVALID_CONTEXT if context is not a valid OpenCL context. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clCreateContext, clCreateContextFromType, clGetContextInfo, clRetainContext, clGetContextInfo khronos-opencl-man-1.0~svn27110/popcount.xml0000644000175000017500000001025311660441607020655 0ustar mathieumathieu ]> popcount popcount 2007-2011 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. 3 popcount Returns the number of non-zero bits in x. gentype popcount gentypex Description popcount returns the number of non-zero bits in x. Notes &integerFunctionsInc; Specification OpenCL Specification Also see Integer Functions khronos-opencl-man-1.0~svn27110/rotate.xml0000644000175000017500000001057711660441607020315 0ustar mathieumathieu ]> rotate rotate 2007-2011 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. 3 rotate Rotate bits left. gentype rotate gentypev gentypei Description For each element in v, the bits are shifted left by the number of bits given by the corresponding element in i (subject to usual shift modulo rules). Bits shifted off the left side of the element are shifted back in from the right. Notes &integerFunctionsInc; Specification OpenCL Specification Also see Integer Functions khronos-opencl-man-1.0~svn27110/fast_distance.xml0000644000175000017500000001052311660441607021615 0ustar mathieumathieu ]> fast_distance fast_distance 2007-2011 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. 3 fast_distance Vector distance. float fast_distance floatnp0 floatnp1 Description Returns fast_length(p0 - p1). Notes &geometricFunctionsInc; Specification OpenCL Specification Also see Geometric Functions khronos-opencl-man-1.0~svn27110/mad24.xml0000644000175000017500000001146411660441607017722 0ustar mathieumathieu mad24 mad24 2007-2011 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. 3 mad24 Fast integer function to multiply 24-bit integers and add a 32-bit value. gentype mad24 gentypex gentypey gentypez Description mad24 multiplies two 24-bit integer values x and y and adds the 32-bit integer result to the 32-bit integer z. See mul24 to see how the 24-bit integer multiplication is performed. Notes Fast integer functions can be used for optimizing performance of kernels. We use the generic type name gentype to indicate that the function can take int, int2, int3, int4, int8, int16, uint, uint2, uint4, uint8, or uint16 as the type for the arguments. Specification OpenCL Specification Also see Integer Functions khronos-opencl-man-1.0~svn27110/mem_fence.xml0000644000175000017500000001107011660441607020722 0ustar mathieumathieu mem_fence mem_fence 2007-2011 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. 3 mem_fence Orders loads and stores of a work-item executing a kernel. void mem_fence cl_mem_fence_flagsflags Description Orders loads and stores of a work-item executing a kernel. This means that loads and stores preceding the mem_fence will be committed to memory before any loads and stores following the mem_fence. The flags argument specifies the memory address space and can be set to a combination of the following literal values: CLK_LOCAL_MEM_FENCE, CLK_GLOBAL_MEM_FENCE. Specification OpenCL Specification Also see Explicit Memory Fence Functions khronos-opencl-man-1.0~svn27110/clEnqueueCopyImageToBuffer.xml0000644000175000017500000004265111660441607024176 0ustar mathieumathieu clEnqueueCopyImageToBuffer clEnqueueCopyImageToBuffer 2007-2011 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. 3 clEnqueueCopyImageToBuffer Enqueues a command to copy an image object to a buffer object. cl_int clEnqueueCopyImageToBuffer cl_command_queuecommand_queue cl_memsrc_image cl_mem dst_buffer const size_t*src_origin const size_t*region size_tdst_offset cl_uintnum_events_in_wait_list const cl_event*event_wait_list cl_event*event Parameters command_queue Must be a valid command-queue. The OpenCL context associated with command_queue, src_image, and dst_buffer must be the same. src_image A valid image object. dst_buffer A valid buffer object. src_origin Defines the (x, y, z) offset in pixels in the 1D, 2D or 3D image, the (x, y) offset and the image index in the 2D image array or the (x) offset and the image index in the 1D image array. If src_image is a 2D image object, src_origin[2] must be 0. If src_image is a 1D image or 1D image buffer object, src_origin[1] and src_origin[2] must be 0. If src_image is a 1D image array object, src_origin[2] must be 0. If src_image is a 1D image array object, src_origin[1] describes the image index in the 1D image array. If src_image is a 2D image array object, src_origin[2] describes the image index in the 2D image array. region Defines the (width, height, depth) in pixels of the 1D, 2D or 3D rectangle, the (width, height) in pixels of the 2D rectangle and the number of images of a 2D image array or the (width) in pixels of the 1D rectangle and the number of images of a 1D image array. If src_image is a 2D image object, region[2] must be 1. If src_image is a 1D image or 1D image buffer object, region[1] and region[2] must be 1. If src_image is a 1D image array object, region[2] must be 1. dst_offset Refers to the offset where to begin copying data into dst_buffer. The size in bytes of the region to be copied referred to as dst_cb is computed as width * height * depth * bytes/image element if src_image is a 3D image object, is computed as width * height * bytes/image element if src_image is a 2D image, is computed as width * height * arraysize * bytes/image element if src_image is a 2D image array object, is computed as width * bytes/image element if src_image is a 1D image or 1D image buffer object and is computed as width * arraysize * bytes/image element if src_image is a 1D image array object. event_wait_list , num_events_in_wait_list Specify events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event_wait_list act as synchronization points. The context associated with events in event_wait_list and command_queue must be the same. The memory associated with event_wait_list can be reused or freed after the function returns. event Returns an event object that identifies this particular copy command and can be used to query or queue a wait for this particular command to complete. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. clEnqueueBarrierWithWaitList can be used instead. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the event_wait_list array. Errors clEnqueueCopyImageToBuffer returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_CONTEXT if the context associated with command_queue, src_image and dst_buffer are not the same or if the context associated with command_queue and events in event_wait_list are not the same. CL_INVALID_MEM_OBJECT if src_image is not a valid image object or dst_buffer is not a valid buffer object or if src_image is a 1D image buffer object created from dst_buffer. CL_INVALID_VALUE if the 1D, 2D, or 3D rectangular region specified by src_origin and src_origin + region refers to a region outside src_image, or if the region specified by dst_offset and dst_offset + dst_cb refers to a region outside dst_buffer. CL_INVALID_VALUE if values in src_origin and region do not follow rules described in the argument description for src_origin and region. CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_MISALIGNED_SUB_BUFFER_OFFSET if dst_buffer is a sub-buffer object and offset specified when the sub-buffer object is created is not aligned to CL_DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue. CL_INVALID_IMAGE_SIZE if image dimensions (image width, height, specified or compute row and/or slice pitch) for src_image are not supported by device associated with queue. CL_INVALID_IMAGE_FORMAT if image format (image channel order and data type) for src_image are not supported by device associated with queue. CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with src_image or dst_buffer. CL_INVALID_OPERATION if the device associated with command_queue does not support images (i.e. CL_DEVICE_IMAGE_SUPPORT specified in the table of OpenCL Device Queries for clGetDeviceInfo is CL_FALSE). CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clEnqueueReadBuffer, clEnqueueWriteBuffer, clCreateBuffer, clEnqueueCopyBuffer, clEnqueueCopyBufferToImage khronos-opencl-man-1.0~svn27110/read_imagei1d.xml0000644000175000017500000004220511660441607021463 0ustar mathieumathieu [ ]> read_imagei (1D) read_imagei (1D) 2007-2011 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. 3 read_image{i|ui} (1D) Do an element lookup in the 1D image object, returning unnormalized signed integer and unsigned integer values. int4 read_imagei image1d_t image sampler_t sampler int coord int4 read_imagei image1d_t image sampler_t sampler float coord uint4 read_imageui image1d_t image sampler_t sampler int coord uint4 read_imageui image1d_t image sampler_t sampler float coord int4 read_imagei image1d_t image int coord uint4 read_imageui image1d_t image int coord int4 read_imagei image1d_buffer_t image int coord uint4 read_imageui image1d_buffer_t image int coord int4 read_imagei image1d_array_t image int2 coord uint4 read_imageui image1d_array_t image int2 coord int4 read_imagei image1d_array_t image sampler_t sampler int2 coord int4 read_imagei image1d_array_t image sampler_t sampler float2 coord uint4 read_imageui image1d_array_t image sampler_t sampler int2 coord uint4 read_imageui image1d_array_t image sampler_t sampler float2 coord Description For the forms that take an image1d_t, use the coordinate (coord.x, coord.y) to do an element lookup in the 2D image object specified by image. For the forms that take an image1d_array_t, use coord.x to do an element lookup in the 1D image identified by coord.y in the 1D image array specified by image. The samplerless read image functions behave exactly as the corresponding read image functions that take integer coordinates and a sampler with filter mode set to CLK_FILTER_NEAREST, normalized coordinates set to CLK_NORMALIZED_COORDS_FALSE and addressing mode to CLK_ADDRESS_NONE. read_imagei and read_imageui return unnormalized signed integer and unsigned integer values respectively. Each channel will be stored in a 32-bit integer. read_imagei can only be used with image objects created with image_channel_data_type set to one of the following values: CL_SIGNED_INT8, CL_SIGNED_INT16, or CL_SIGNED_INT32. If the image_channel_data_type is not one of the above values, the values returned by read_imagei are undefined. read_imageui can only be used with image objects created with image_channel_data_type set to one of the following values: CL_UNSIGNED_INT8, CL_UNSIGNED_INT16, and CL_UNSIGNED_INT32. If the image_channel_data_type is not one of the above values, the values returned by read_imageui are undefined. The read_imagei and read_imageui calls support a nearest filter only. The filter_mode specified in sampler must be set to CLK_FILTER_NEAREST; otherwise the values returned are undefined. Furthermore, the read_imagei returned are undefined. and read_imageui calls that take integer coordinates must use a returned are undefined. sampler with normalized coordinates set to CLK_NORMALIZED_COORDS_FALSE and addressing returned are undefined. mode set to CLK_ADDRESS_CLAMP_TO_EDGE, CLK_ADDRESS_CLAMP or CLK_ADDRESS_NONE; otherwise returned are undefined. the values returned are undefined. returned are undefined. Notes &imageFunctionsInc; &imageMappingInc; Specification OpenCL Specification Also see Image Functions khronos-opencl-man-1.0~svn27110/clCreateFromGLBuffer.xml0000644000175000017500000002270011660441607022731 0ustar mathieumathieu clCreateFromGLBuffer clCreateFromGLBuffer 2007-2011 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. 3 clCreateFromGLBuffer Creates an OpenCL buffer object from an OpenGL buffer object. cl_mem clCreateFromGLBuffer cl_contextcontext cl_mem_flagsflags GLuintbufobj cl_int* errcode_ret Parameters context A valid OpenCL context created from an OpenGL context. flags A bit-field that is used to specify usage information. Refer to the table for clCreateBuffer for a description of flags. Only CL_MEM_READ_ONLY, CL_MEM_WRITE_ONLY and CL_MEM_READ_WRITE values specified in the table at clCreateBuffer can be used. bufobj The name of a GL buffer object. The data store of the GL buffer object must have have been previously created by calling OpenGL function glBufferData, although its contents need not be initialized. The size of the data store will be used to determine the size of the CL buffer object. errcode_ret Returns an appropriate error code as described below. If errcode_ret is NULL, no error code is returned. Description The size of the GL buffer object data store at the time clCreateFromGLBuffer is called will be used as the size of buffer object returned by clCreateFromGLBuffer. If the state of a GL buffer object is modified through the GL API (e.g. glBufferData) while there exists a corresponding CL buffer object, subsequent use of the CL buffer object will result in undefined behavior. The clRetainMemObject and clReleaseMemObject functions can be used to retain and release the buffer object. The CL buffer object created using clCreateFromGLBuffer can also be used to create a CL 1D image buffer object Errors Returns a valid non-zero OpenCL buffer object and errcode_ret is set to CL_SUCCESS if the buffer object is created successfully. Otherwise, it returns a NULL value with one of the following error values returned in errcode_ret: CL_INVALID_CONTEXT if context is not a valid context or was not created from a GL context. CL_INVALID_VALUE if values specified in flags are not valid. CL_INVALID_GL_OBJECT if bufobj is not a GL buffer object or is a GL buffer object but does not have an existing data store e or the size of the buffer is 0. . CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see cl_khr_gl_sharing, clCreateBuffer, clReleaseMemObject, clRetainMemObject khronos-opencl-man-1.0~svn27110/mathFunctionsInc.xml0000644000175000017500000000357411660441607022272 0ustar mathieumathieu The vector versions of the math functions operate component-wise. The description is per-component. The built-in math functions are not affected by the prevailing rounding mode in the calling environment, and always return the same value as they would if called with the round to nearest even rounding mode. The built-in math functions take scalar or vector arguments. For any specific use of these function, the actual type has to be the same for all arguments and the return type unless otherwise specified. The generic type name gentype is used to indicate that the function can take float, float2, float3, float4, float8, float16, double, double2, double3, double4, double8, or double16 as the type for the arguments. If extended with cl_khr_fp16, generic type name gentype may indicate half and half{2|3|4|8|16} as arguments and return values. The generic type name gentypef is used to indicate that the function can take float, float2, float3, float4, float8, or float16 as the type for the arguments. The generic type name gentyped is used to indicate that the function can take double, double2, double3, double4, double8, or double16 as the type for the arguments. khronos-opencl-man-1.0~svn27110/clGetDeviceIDsFromDX9MediaAdapterKHR.xml0000644000175000017500000003314711660441607025552 0ustar mathieumathieu ]> clGetDeviceIDsFromDX9MediaAdapterKHR clGetDeviceIDsFromDX9MediaAdapterKHR 2007-2011 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. 3 clGetDeviceIDsFromDX9MediaAdapterKHR Query a media adapter for any associated OpenCL devices. cl_int clGetDeviceIDsFromDX9MediaAdapterKHR cl_platform_idplatform cl_uintnum_media_adapters cl_dx9_media_adapter_type_khr*media_adapters_type void*media_adapters cl_dx9_media_adapter_set_khrmedia_adapter_set cl_uintnum_entries cl_device_id*devices cl_int*num_devices Parameters platform Refers to the platform ID returned by clGetPlatformIDs. num_media_adapters The number of media adapters. media_adapters_type An array of num_media_adapters entries. Each entry specifies the type of media adapter and must be one of the values described in the table below. cl_dx9_media_adapter_type_khr Type of media adapters CL_ADAPTER_D3D9_KHR IDirect3DDevice9 * CL_ADAPTER_D3D9EX_KHR IDirect3DDevice9Ex * CL_ADAPTER_DXVA_KHR IDXVAHD_Device * media_adapters An array of num_media_adapters entries. Each entry specifies the actual adapter whose type is specified by media_adapter_type. The media_adapters must be one of the types describes in the table above. media_adapter_set Specifies the set of adapters to return and must be one of the values described in the table below. cl_dx9_media_adapter_set_khr Description CL_PREFERRED_DEVICES_FOR_MEDIA_ADAPTER_KHR The preferred OpenCL devices associated with the media adapter. CL_ALL_DEVICES_FOR_MEDIA_ADAPTER_KHR All OpenCL devices that may interoperate with the media adapter. num_entries The number of cl_device_id entries that can be added to devices. If devices is not NULL, the num_entries must be greater than zero. devices Returns a list of OpenCL devices found that support the list of media adapters specified. The cl_device_id values returned in devices can be used to identify a specific OpenCL device. If devices argument is NULL, this argument is ignored. The number of OpenCL devices returned is the minimum of the value specified by num_entries or the number of OpenCL devices whose type matches device_type. num_devices Returns the number of OpenCL devices. If num_devices is NULL, this argument is ignored. Description Queries a media adapter for any associated OpenCL devices. Adapters with associated OpenCL devices can enable media surface sharing between the two. Notes &mediaSurfaceFormatsInc; &accessMappedInc; Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_PLATFORM if platform is not a valid platform. CL_INVALID_VALUE if num_media_adapters is zero or if media_adapters_type is NULL or if media_adapters is NULL. CL_INVALID_VALUE if any of the entries in media_adapters_type or media_adapters is not a valid value. CL_INVALID_VALUE if media_adapter_set is not a valid value. CL_INVALID_VALUE if num_entries is equal to zero and devices is not NULL or if both num_devices and devices are NULL. CL_DEVICE_NOT_FOUND if no OpenCL devices that correspond to adapters specified in media_adapters and media_adapters_type were found. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see cl_khr_dx9_media_sharing, clGetDeviceIDsFromDX9MediaAdapterKHR, clCreateFromDX9MediaSurfaceKHR, clEnqueueAcquireDX9MediaSurfacesKHR, clEnqueueReleaseDX9MediaSurfacesKHR, khronos-opencl-man-1.0~svn27110/atomic_max.xml0000644000175000017500000001636011660441607021134 0ustar mathieumathieu atomic_max atomic_max 2007-2011 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. 3 atomic_max atomic_max functions. int atomic_max volatile __global int*p intval unsigned int atomic_max volatile __global unsigned int*p unsigned intval int atomic_max volatile __local int*p intval unsigned int atomic_max volatile __local unsigned int*p unsigned intval Description Read the 32-bit value (referred to as old) stored at location pointed by p. Compute max (old, val) and store result at location pointed by p. The function returns old. A 64-bit version of this function, atom_max, is enabled by cl_khr_int64_extended_atomics. Specification OpenCL Specification Also see Atomic Functions, atom_max khronos-opencl-man-1.0~svn27110/atom_max.xml0000644000175000017500000001742311660441607020621 0ustar mathieumathieu atom_max atom_max 2007-2011 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. 3 atom_max 64-bit atom_max functions. long atom_max volatile __global long*p longval long atom_max volatile __local long*p longval ulong atom_max volatile __global ulong*p ulongval ulong atom_max volatile __local ulong*p ulongval Description Read the 64-bit value (referred to as old) stored at location pointed by p. Compute max (old, val) and store minimum value at location pointed by p. The function returns old. An application that wants to use this extension will need to include the #pragma OPENCL EXTENSION cl_khr_int64_extended_atomics : enable in the OpenCL program source. This function is performed in one atomic transaction. These transactions are atomic for the device executing these atomic functions. There is no guarantee of atomicity if the atomic operations to the same memory location are being performed by kernels executing on multiple devices. Atomic operations on 64-bit integers and 32-bit integers (and float) are also atomic with regard to each other. Specification OpenCL Specification Also see Atomic Functions, atomic_max, cl_khr_int64_extended_atomics khronos-opencl-man-1.0~svn27110/tan.xml0000644000175000017500000001507411660441607017576 0ustar mathieumathieu ]> tan, tanh, tanpi, half_tan, native_tan tan, tanh, tanpi, half_tan, native_tan 2007-2011 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. 3 tan, tanh, tanpi, half_tan, native_tan Tangent functions. gentype tan gentype gentype tanh gentype gentype tanpi gentypex gentype half_tan gentypex gentype native_tan gentypex Description tan computes the tangent. tanh computes the hyperbolic tangent. tanpi computes tan(pi * x). half_tan computes tangent. x must be in the range -216... +216. native_tan computes tangent over an implementation-defined range. The maximum error is implementation-defined. Notes &mathFunctionsInc; Functions with the half_ prefix are implemented with a minimum of 10-bits of accuracy i.e. an ULP value less than or equal to 8192 ulp. Functions with the native__ prefix may map to one or more native device instructions and will typically have better performance compared to the corresponding functions (without the native__ prefix). The accuracy (and in some cases the input range(s)) of these functions is implementation-defined. Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/EXTENSION.xml0000644000175000017500000003510011663317370020362 0ustar mathieumathieu EXTENSION EXTENSION 2007-2011 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. 3 EXTENSION A #pragma directive to set the behavior for OpenCL extensions. #pragma OPENCL EXTENSION extension_name : behavior #pragma OPENCL EXTENSION all : behavior Parameters extension_name The name of the extension. The extension_name will have names of the form cl_khr_<name> for an extension approved by the OpenCL working group and will have names of the form cl_<vendor_name>_<name> for vendor extensions. The token all means that the behavior applies to all extensions supported by the compiler. The table below shows the legal values for extension_name: Extension name Description cl_khr_int64_base_atomics 64-bit integer base atomic operations cl_khr_int64_extended_atomics 64-bit integer extended atomic operations cl_khr_3d_image_writes Writes to 3D image objects cl_khr_fp16 Half-precision floating-point cl_apple_gl_sharing MacOS X OpenGL sharing cl_khr_gl_sharing OpenGL sharing cl_khr_gl_event CL event objects from GL sync objects cl_khr_d3d10_sharing Sharing memory objects wth Direct3D 10 cl_khr_d3d11_sharing Sharing memory objects wth Direct3D 11 cl_khr_dx9_media_sharing Sharing memory objects wth Direct3D 9 cl_khr_icd Access Khronos OpenCL installable client driver loader (ICD Loader. behavior One of the following values: behavior Description enable Behave as specified by the extension extension_name. Report an error on the #pragma OPENCL EXTENSION if the extension_name is not supported, or if all is specified. disable Behave (including issuing errors and warnings) as if the extension extension_name is not part of the language definition. If all is specified, then behavior must revert back to that of the non-extended core version of the language being compiled to. Warn on the #pragma OPENCL EXTENSION if the extension extension_name is not supported. Description The #pragma OPENCL EXTENSION directive is a simple, low-level mechanism to set the behavior for each extension. It does not define policies such as which combinations are appropriate; those must be defined elsewhere. The order of directives matter in setting the behavior for each extension. Directives that occur later override those seen earlier. The all variant sets the behavior for all extensions, overriding all previously issued extension directives, but only if the behavior is set to disable. The initial state of the compiler is as if the directive #pragma OPENCL EXTENSION all : disable was issued, telling the compiler that all error and warning reporting must be done according to this specification, ignoring any extensions. Every extension which affects the OpenCL language semantics, syntax or adds built-in functions to the language must create a preprocessor #define that matches the extension name string. This #define would be available in the language if and only if the extension is supported on a given implementation. Notes This document describes the list of optional features supported by OpenCL 1.2. Optional extensions may be supported by some OpenCL devices. Optional extensions are not required to be supported by a conformant OpenCL implementation, but are expected to be widely available; they define functionality that is likely to move into the required feature set in a future revision of the OpenCL specification OpenCL extensions approved by the OpenCL working group can be promoted to required core features in later revisions of OpenCL. When this occurs, the extension specifications are merged into the core specification. Functions and enumerants that are part of such promoted extensions will have the KHR affix removed. OpenCL implementations of such later revisions must also export the name strings of promoted extensions in the CL_PLATFORM_EXTENSIONS or CL_DEVICE_EXTENSIONS string, and support the KHR-affixed versions of functions and enumerants as a transition aid. Example An extension which adds the extension string "cl_khr_3d_image_writes" should also add a preprocessor #define called cl_khr_3d_image_writes. A kernel can now use this preprocessor #define to do something like the following: #ifdef cl_khr_3d_image_writes // do something using the extension #else // do something else or #error! #endif Specification OpenCL Specification khronos-opencl-man-1.0~svn27110/atomic_add.xml0000644000175000017500000001620511660441607021075 0ustar mathieumathieu atomic_add atomic_add 2007-2011 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. 3 atomic_add atomic_add functions. int atomic_add volatile __global int*p intval unsigned int atomic_add volatile __global unsigned int*p unsigned intval int atomic_add volatile __local int*p intval unsigned int atomic_add volatile __local unsigned int*p unsigned intval Description Read the 32-bit value (referred to as old) stored at location pointed by p. Compute (old + val) and store result at location pointed by p. The function returns old. A 64-bit version of this function, atom_add, is enabled by cl_khr_int64_base_atomics. Specification OpenCL Specification Also see Atomic Functions, atom_add khronos-opencl-man-1.0~svn27110/clz.xml0000644000175000017500000001007011660441607017573 0ustar mathieumathieu ]> clz clz 2007-2011 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. 3 clz Returns the number of leading 0-bits in x. gentype clz gentypex Description clz returns the number of leading 0-bits in x, starting at the most significant bit position. Notes &integerFunctionsInc; Specification OpenCL Specification Also see Integer Functions khronos-opencl-man-1.0~svn27110/clGetProgramInfo.xml0000644000175000017500000005251011660441607022212 0ustar mathieumathieu clGetProgramInfo clGetProgramInfo 2007-2011 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. 3 clGetProgramInfo Returns information about the program object. cl_int clGetProgramInfo cl_programprogram cl_program_infoparam_name size_tparam_value_size void*param_value size_t*param_value_size_ret Parameters program Specifies the program object being queried. param_name Specifies the information to query. The list of supported param_name types and the information returned in param_value by clGetProgramInfo is described in the table below. cl_program_info Return Type and Info. returned in param_value CL_PROGRAM_REFERENCE_COUNT Return type: cl_uint Return the program reference count. The reference count returned should be considered immediately stale. It is unsuitable for general use in applications. This feature is provided for identifying memory leaks. CL_PROGRAM_CONTEXT Return type: cl_context Return the context specified when the program object is created CL_PROGRAM_NUM_DEVICES Return type: cl_uint Return the number of devices associated with program. CL_PROGRAM_DEVICES Return type: cl_device_id[] Return the list of devices associated with the program object. This can be the devices associated with context on which the program object has been created or can be a subset of devices that are specified when a progam object is created using clCreateProgramWithBinary. CL_PROGRAM_SOURCE Return type: char[] Return the program source code specified by clCreateProgramWithSource. The source string returned is a concatenation of all source strings specified to clCreateProgramWithSource with a null terminator. The concatenation strips any nulls in the original source strings. If program is created using clCreateProgramWithBinary or clCreateProgramWithBuiltInKernels, a null string or the appropriate program source code is returned depending on whether or not the program source code is stored in the binary. The actual number of characters that represents the program source code including the null terminator is returned in param_value_size_ret. CL_PROGRAM_BINARY_SIZES Return type: size_t[] Returns an array that contains the size in bytes of the program binary (could be an executable binary, compiled binary or library binary) for each device associated with program. The size of the array is the number of devices associated with program. If a binary is not available for a device(s), a size of zero is returned. If program is created using clCreateProgramWithBuiltInKernels, the implementation may return zero in any entries of the returned array. CL_PROGRAM_BINARIES Return type: unsigned char *[] Return the program binaries (could be an executable binary, compiled binary or library binary) for all devices associated with program. For each device in program, the binary returned can be the binary specified for the device when program is created with clCreateProgramWithBinary or it can be the executable binary generated by clBuildProgram or clLinkProgram. If program is created with clCreateProgramWithSource, the binary returned is the binary generated by clBuildProgram, clCompileProgram, or clLinkProgram. The bits returned can be an implementation-specific intermediate representation (a.k.a. IR) or device specific executable bits or both. The decision on which information is returned in the binary is up to the OpenCL implementation. param_value points to an array of n pointers allocated by the caller, where n is the number of devices associated with program. The buffer sizes needed to allocate the memory that these n pointers refer to can be queried using the CL_PROGRAM_BINARY_SIZES query as described in this table. Each entry in this array is used by the implementation as the location in memory where to copy the program binary for a specific device, if there is a binary available. To find out which device the program binary in the array refers to, use the CL_PROGRAM_DEVICES query to get the list of devices. There is a one-to-one correspondence between the array of n pointers returned by CL_PROGRAM_BINARIES and array of devices returned by CL_PROGRAM_DEVICES. If an entry value in the array is NULL, the implementation skips copying the program binary for the specific device identified by the array index. CL_PROGRAM_NUM_KERNELS Return type: size_t Returns the number of kernels declared in program that can be created with clCreateKernel. This information is only available after a successful program executable has been built for at least one device in the list of devices associated with program. CL_PROGRAM_KERNEL_NAMES Return type: char[] Returns a semi-colon separated list of kernel names in program that can be created with clCreateKernel. This information is only available after a successful program executable has been built for at least one device in the list of devices associated with program. param_value A pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored. param_value_size Used to specify the size in bytes of memory pointed to by param_value. This size must be ≥ size of return type as described in the table above. param_value_size_ret Returns the actual size in bytes of data copied to param_value. If param_value_size_ret is NULL, it is ignored. Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_VALUE if param_name is not valid, or if size in bytes specified by param_value_size is < size of return type as described in the table above and param_value is not NULL. CL_INVALID_PROGRAM if program is not a valid program object. CL_INVALID_PROGRAM_EXECUTABLE if param_name is CL_PROGRAM_NUM_KERNELS or CL_PROGRAM_KERNEL_NAMES and a successful program executable has not been built for at least one device in the list of devices associated with program. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clGetProgramBuildInfo khronos-opencl-man-1.0~svn27110/constant.xml0000644000175000017500000001322311660441607020637 0ustar mathieumathieu [ ]> __constant __constant 2007-2011 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. 3 __constant Address Space Qualifier. __constant constant Description &qualifierInc; Notes The __constant or constant address space name is used to describe variables allocated in global memory and which are accessed inside a kernel(s) as read-only variables. These readonly variables can be accessed by all (global) work-items of the kernel during its execution. Pointers to the __constant address space are allowed as arguments to functions (including kernel functions) and for variables declared inside functions. All string literal storage shall be in the __constant address space. NOTE: Each argument to a kernel that is a pointer to the __constant address space is counted separately towards the maximum number of such arguments, defined as CL_DEVICE_MAX_CONSTANT_ARGS are described in the table for clGetDeviceInfo. Variables in the program scope or the outermost scope of kernel functions can be declared in the __constant address space. These variables are required to be initialized and the values used to initialize these variables must be a compile time constant. Writing to such a variable results in a compile-time error. Implementations are not required to aggregate these declarations into the fewest number of constant arguments. This behavior is implementation defined. Thus portable code must conservatively assume that each variable declared inside a function or in program scope allocated in the __constant address space counts as a separate constant argument. Example &qualifierExampleInc; Specification OpenCL Specification Also see __global, __local, __private khronos-opencl-man-1.0~svn27110/attributes-blocksAndControlFlow.xml0000644000175000017500000001224011660441607025261 0ustar mathieumathieu Attributes of Blocks and Control-Flow-Statements Attributes of Blocks and Control-Flow-Statements 2007-2011 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. 3 Attributes of Blocks and Control-Flow-Statements Attributes of Blocks and Control-Flow Statements. __attribute__((attr1)) {...} Description For basic blocks and control-flow-statements the attribute is placed before the structure in question, for example: __attribute__((attr1)) {...} for __attribute__((attr2)) (...) __attribute__((attr3)) {...} Here attr1 applies to the block in braces and attr2 and attr3 apply to the loop's control construct and body, respectively. No attribute qualifiers for blocks and control-flow-statements are currently defined. Specification OpenCL Specification Also see __attribute__, Type Attributes, Variable Attributes khronos-opencl-man-1.0~svn27110/relationalFunctionsInc2.xml0000644000175000017500000000067711660441607023556 0ustar mathieumathieu The function returns a 0 if the specified relation is false and a 1 if the specified relation is true for scalar argument types. These functions shall return a 0 if the specified relation is false and a - 1 (i.e. all bits set) if the specified relation is true for vector argument types. khronos-opencl-man-1.0~svn27110/clGetDeviceIDs.xml0000644000175000017500000003001311660441607021560 0ustar mathieumathieu clGetDeviceIDs clGetDeviceIDs 2007-2011 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. 3 clGetDeviceIDs Obtain the list of devices available on a platform. cl_int clGetDeviceIDs cl_platform_id platform cl_device_type device_type cl_uint num_entries cl_device_id *devices cl_uint *num_devices Parameters platform Refers to the platform ID returned by clGetPlatformIDs or can be NULL. If platform is NULL, the behavior is implementation-defined. device_type A bitfield that identifies the type of OpenCL device. The device_type can be used to query specific OpenCL devices or all OpenCL devices available. The valid values for device_type are specified in the following table. cl_device_type Description CL_DEVICE_TYPE_CPU An OpenCL device that is the host processor. The host processor runs the OpenCL implementations and is a single or multi-core CPU. CL_DEVICE_TYPE_GPU An OpenCL device that is a GPU. By this we mean that the device can also be used to accelerate a 3D API such as OpenGL or DirectX. CL_DEVICE_TYPE_ACCELERATOR Dedicated OpenCL accelerators (for example the IBM CELL Blade). These devices communicate with the host processor using a peripheral interconnect such as PCIe. CL_DEVICE_TYPE_CUSTOM Dedicated accelerators that do not support programs written in OpenCL C. CL_DEVICE_TYPE_DEFAULT The default OpenCL device in the system. The default device cannot be a CL_DEVICE_TYPE_CUSTOM device. CL_DEVICE_TYPE_ALL All OpenCL devices available in the system except CL_DEVICE_TYPE_CUSTOM devices. num_entries The number of cl_device_id entries that can be added to devices. If devices is not NULL, the num_entries must be greater than zero. devices A list of OpenCL devices found. The cl_device_id values returned in devices can be used to identify a specific OpenCL device. If devices argument is NULL, this argument is ignored. The number of OpenCL devices returned is the mininum of the value specified by num_entries or the number of OpenCL devices whose type matches device_type. num_devices The number of OpenCL devices available that match device_type. If num_devices is NULL, this argument is ignored. Notes clGetDeviceIDs may return all or a subset of the actual physical devices present in the platform and that match device_type. Errors clGetDeviceIDs returns CL_SUCCESS if the function is executed successfully. Otherwise it returns one of the following: CL_INVALID_PLATFORM if platform is not a valid platform. CL_INVALID_DEVICE_TYPE if device_type is not a valid value. CL_INVALID_VALUE if num_entries is equal to zero and devices is not NULL or if both num_devices and devices are NULL. CL_DEVICE_NOT_FOUND if no OpenCL devices that matched device_type were found. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clGetDeviceInfo, clGetPlatformIDs, clCreateContext, Cardinality Diagram khronos-opencl-man-1.0~svn27110/clCreateSubBuffer.xml0000644000175000017500000003572411660441607022346 0ustar mathieumathieu ]> clCreateSubBuffer clCreateSubBuffer 2007-2011 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. 3 clCreateSubBuffer Creates a new buffer object (referred to as a sub-buffer object) from an existing buffer object. cl_mem clCreateSubBuffer cl_membuffer cl_mem_flagsflags cl_buffer_create_typebuffer_create_type const void*buffer_create_info cl_int*errcode_ret Parameters buffer A valid object and cannot be a sub-buffer object. flags A bit-field that is used to specify allocation and usage information about the sub-buffer memory object being created and is described in the table below. If the CL_MEM_READ_WRITE, CL_MEM_READ_ONLY or CL_MEM_WRITE_ONLY values are not specified in flags, they are inherited from the corresponding memory access qualifers associated with buffer. The CL_MEM_USE_HOST_PTR, CL_MEM_ALLOC_HOST_PTR and CL_MEM_COPY_HOST_PTR values cannot be specified in flags but are inherited from the corresponding memory access qualifiers associated with buffer. If CL_MEM_COPY_HOST_PTR is specified in the memory access qualifier values associated with buffer it does not imply any additional copies when the sub-buffer is created from buffer. If the CL_MEM_HOST_WRITE_ONLY, CL_MEM_HOST_READ_ONLY or CL_MEM_HOST_NO_ACCESS values are not specified in flags, they are inherited from the corresponding memory access qualifiers associated with buffer. &clCreate_memflagsInc; buffer_create_type and buffer_create_info Describes the type of buffer object to be created. The list of supported values for buffer_create_type and corresponding descriptor that buffer_create_info points to is described below. cl_buffer_create_type Description CL_BUFFER_CREATE_TYPE_REGION Create a buffer object that represents a specific region in buffer. buffer_create_info is a pointer to the following structure: typedef struct _cl_buffer_region { size_t origin; size_t size; } cl_buffer_region; (origin, size) defines the offset and size in bytes in buffer. If buffer is created with CL_MEM_USE_HOST_PTR, the host_ptr associated with the buffer object returned is host_ptr + origin. The buffer object returned references the data store allocated for buffer and points to a specific region given by (origin, size) in this data store. CL_INVALID_VALUE is returned in errcode_ret if the region specified by (origin, size) is out of bounds in buffer. CL_INVALID_BUFFER_SIZE if size is 0. CL_MISALIGNED_SUB_BUFFER_OFFSET is returned in errcode_ret if there are no devices in context associated with buffer for which the origin value is aligned to the CL_DEVICE_MEM_BASE_ADDR_ALIGN value. Notes Concurrent reading from, writing to and copying between both a buffer object and its sub-buffer object(s) is undefined. Concurrent reading from, writing to and copying between overlapping sub-buffer objects created with the same buffer object is undefined. Only reading from both a buffer object and its sub-buffer objects or reading from multiple overlapping sub-buffer objects is defined. Errors Returns a valid non-zero buffer object and errcode_ret is set to CL_SUCCESS if the buffer object is created successfully. Otherwise, it returns one of the following error in errcode_ret: CL_INVALID_MEM_OBJECT if buffer is not a valid buffer object or is a sub-buffer object. CL_INVALID_VALUE if buffer was created with CL_MEM_WRITE_ONLY and flags specifies CL_MEM_READ_WRITE or CL_MEM_READ_ONLY, or if buffer was created with CL_MEM_READ_ONLY and flags specifies CL_MEM_READ_WRITE or CL_MEM_WRITE_ONLY, or if flags specifies CL_MEM_USE_HOST_PTR or CL_MEM_ALLOC_HOST_PTR or CL_MEM_COPY_HOST_PTR. CL_INVALID_VALUE if buffer was created with CL_MEM_HOST_WRITE_ONLY and flags specifies CL_MEM_HOST_READ_ONLY or if buffer was created with CL_MEM_HOST_READ_ONLY and flags specifies CL_MEM_HOST_WRITE_ONLY, or if buffer was created with CL_MEM_HOST_NO_ACCESS and flags specifies CL_MEM_HOST_READ_ONLY or CL_MEM_HOST_WRITE_ONLY. CL_INVALID_VALUE if value specified in buffer_create_type is not valid. CL_INVALID_VALUE if value(s) specified in buffer_create_info (for a given buffer_create_type) is not valid or if buffer_create_info is NULL. CL_INVALID_BUFFER_SIZE if size is 0. CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for sub-buffer object. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clCreateBuffer, clEnqueueReadBuffer, clEnqueueWriteBuffer, clEnqueueCopyBuffer khronos-opencl-man-1.0~svn27110/get_global_offset.xml0000644000175000017500000001132611660441607022455 0ustar mathieumathieu get_global_offset get_global_offset 2007-2011 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. 3 get_global_offset Returns the offset values specified in global_work_offset argument to clEnqueueNDRangeKernel. size_t get_global_offset uintdimindx Description Returns the offset values specified in global_work_offset argument to clEnqueueNDRangeKernel. Valid values of dimindx are 0 to get_work_dim() - 1. For other values, get_global_offset() returns 0. For clEnqueueTask, this returns 0. Specification OpenCL Specification Also see Work-Item Functions, clEnqueueNDRangeKernel, clEnqueueTask khronos-opencl-man-1.0~svn27110/wait_group_events.xml0000644000175000017500000001170711660441607022557 0ustar mathieumathieu wait_group_events wait_group_events 2007-2011 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. 3 wait_group_events Wait for events that identify the async_work_group_copy operations to complete. void wait_group_events intnum_events event_t*event_list Description Wait for events that identify the async_work_group_copy operations to complete. The event objects specified in event_list will be released after the wait is performed. This function must be encountered by all work-items in a work-group executing the kernel with the same num_events and event objects specified in event_list; otherwise the results are undefined. Notes The kernel must wait for the completion of all async copies using the wait_group_events built-in function before exiting; otherwise the behavior is undefined. Specification OpenCL Specification Also see Async Copy and Prefetch Functions khronos-opencl-man-1.0~svn27110/fabs.xml0000644000175000017500000000771511660441607017732 0ustar mathieumathieu ]> fabs fabs 2007-2011 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. 3 fabs Compute absolute value of a floating-point number. gentype fabs gentype Description fabs computes the absolute value of a floating-point number. Notes &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/get_global_id.xml0000644000175000017500000001114411660441607021561 0ustar mathieumathieu get_global_id get_global_id 2007-2011 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. 3 get_global_id Returns the unique global work-item ID value for dimension identified by dimindx. size_t get_global_id uintdimindx Description The global work-item ID specifies the work-item ID based on the number of global work-items specified to execute the kernel. Valid values of dimindx are 0 to get_work_dim() - 1. For other values of dimindx, get_global_id() returns 0. For clEnqueueTask, this returns 0. Specification OpenCL Specification Also see Work-Item Functions, clEnqueueNDRangeKernel, clEnqueueTask khronos-opencl-man-1.0~svn27110/commonFunctions.xml0000644000175000017500000001124011660441607022164 0ustar mathieumathieu ]> Common Built-In Functions Common Built-In Functions 2007-2011 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. 3 Common Built-In Functions Click an item in the table below for details about that function. clamp Clamp x to range given by min, max degrees radians to degrees max Maximum of x and y min Minimum of x and y mix Linear blend of x and y radians degrees to radians sign Sign of x smoothstep Step and interpolate step 0.0 if x < edge, else 1.0 Specification OpenCL Specification khronos-opencl-man-1.0~svn27110/isgreater.xml0000644000175000017500000001713711660441607021003 0ustar mathieumathieu ]> isgreater isgreater 2007-2011 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. 3 isgreater Compare of x > y. int isgreater floatx floaty intn isgreater floatnx floatny int isgreater doublex doubley longn isgreater doublenx doubleny int isgreater (half x, half y) // if half extension enabled shortn isgreater (halfn x, halfn y) // if half extension enabled Description Returns the component-wise compare of x > y. Notes &relationalFunctionsInc1; &relationalFunctionsInc2; &relationalFunctionsInc3; Specification OpenCL Specification Also see Relational Functions khronos-opencl-man-1.0~svn27110/nextafter.xml0000644000175000017500000001062311660441607021007 0ustar mathieumathieu ]> nextafter nextafter 2007-2011 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. 3 nextafter Next representable floating-point value following x in the direction of y. gentype nextafter gentypex gentypey Description Computes the next representable single-precision floating-point value following x in the direction of y. Thus, if y is less than x, nextafter() returns the largest representable floating-point number less than x. Notes &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/signbit.xml0000644000175000017500000001546011660441607020452 0ustar mathieumathieu ]> signbit signbit 2007-2011 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. 3 signbit Test for sign bit. int signbit float intn signbit floatn int signbit double longn signbit doublen int signbit (half) // if half extension enabled shortn signbit (halfn) // if half extension enabled Description The built-in function signbit tests for sign bit. The scalar version of the function returns a 1 if the sign bit in the float is set else returns 0. The vector version of the function returns the following for each component in floatn: -1 (i.e. all bits set) if the sign bit in the float is set else returns 0. Notes &relationalFunctionsInc1; &relationalFunctionsInc2; Specification OpenCL Specification Also see Relational Functions khronos-opencl-man-1.0~svn27110/divide.xml0000644000175000017500000001374011660441607020256 0ustar mathieumathieu half_divide, native_divide half_divide, native_divide 2007-2011 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. 3 half_divide, native_divide Division functions. gentype half_divide gentypex gentypey gentype native_divide gentypex gentypey Description half_divide computes x / y. This function is implemented with a minimum of 10-bits of accuracy i.e. an ULP value less than or equal to 8192 ulp. native_cos computes cosine over an implementation-defined range. The maximum error is implementation-defined. The vector versions of the math functions operate component-wise. The description is percomponent. The built-in math functions are not affected by the prevailing rounding mode in the calling environment, and always return the same value as they would if called with the round to nearest even rounding mode. For any specific use of a function, the actual type has to be the same for all arguments and the return type, unless otherwise specified. The functions with the native_ prefix may map to one or more native device instructions and will typically have better performance compared to the corresponding functions (without the native__ prefix). The accuracy (and in some cases the input range(s)) of these functions is implementation-defined. gentype indicates that the functions can take float, float2, float3, float4, float8 or float16 as the type for the arguments. Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/get_group_id.xml0000644000175000017500000001107211660441607021455 0ustar mathieumathieu get_group_id get_group_id 2007-2011 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. 3 get_group_id Returns the work-group ID. size_t get_group_id uintdimindx Description Returns the work-group ID which is a number from 0 .. get_num_groups(dimindx) - 1. Valid values of dimindx are 0 to get_work_dim() - 1. For other values of dimindx, get_group_id() returns 0. For clEnqueueTask, this returns 0. Specification OpenCL Specification Also see Work-Item Functions, clEnqueueNDRangeKernel, clEnqueueTask khronos-opencl-man-1.0~svn27110/isgreaterequal.xml0000644000175000017500000001757311660441607022037 0ustar mathieumathieu ]> isgreaterequal isgreaterequal 2007-2011 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. 3 isgreaterequal Compare of x >= y. int isgreaterequal floatx floaty intn isgreaterequal floatnx floatny int isgreaterequal doublex doubley longn isgreaterequal doublenx doubleny int isgreaterequal (half x, half y) // if half extension enabled shortn isgreaterequal (halfn x, halfn y) // if half extension enabled Description Returns the component-wise compare of x >= y. Notes &relationalFunctionsInc1; &relationalFunctionsInc2; &relationalFunctionsInc3; Specification OpenCL Specification Also see Relational Functions khronos-opencl-man-1.0~svn27110/clReleaseProgram.xml0000644000175000017500000001245311660441607022241 0ustar mathieumathieu clReleaseProgram clReleaseProgram 2007-2011 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. 3 clReleaseProgram Decrements the program reference count. cl_int clReleaseProgram cl_programprogram Notes The program object is deleted after all kernel objects associated with program have been deleted and the program reference count becomes zero. Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_PROGRAM if program is not a valid program object. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clCreateProgramWithSource, clCreateProgramWithBinary, clRetainProgram khronos-opencl-man-1.0~svn27110/integerFunctionsInc.xml0000644000175000017500000000452311660441607022771 0ustar mathieumathieu Built-in integer functions take scalar or vector arguments. The vector versions of the integer functions operate component-wise. The description is per component. We use the generic type name gentype to indicate that the function can take char, char{2|3|4|8|16}, uchar, uchar{2|3|4|8|16}, short, short{2|3|4|8|16}, ushort, ushort{2|3|4|8|16}, int, int{2|3|4|8|16}, uint, uint{2|3|4|8|16}, long, long{2|3|4|8|16}, ulong, or ulong{2|3|4|8|16} as the type for the arguments. We use the generic type name ugentype to refer to unsigned versions of gentype. For example, if gentype is char4, ugentype is uchar4. We also use the generic type name sgentype to indicate that the function can take a scalar data type i.e. char, uchar, short, ushort, int, uint, long, or ulong as the type for the arguments. For built-in integer functions that take gentype and sgentype arguments, the gentype argument must be a vector or scalar version of the sgentype argument. For example, if sgentype is uchar, gentype must be uchar or uchar{2|3|4|8|16}. For vector versions, sgentype is implicitly widened to gentype as described in section 6.3.a of the OpenCL specification. For any specific use of a function, the actual type has to be the same for all arguments and the return type unless otherwise specified. khronos-opencl-man-1.0~svn27110/clEnqueueCopyBufferRect.xml0000644000175000017500000005273111660441607023546 0ustar mathieumathieu clEnqueueCopyBufferRect clEnqueueCopyBufferRect 2007-2011 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. 3 clEnqueueCopyBufferRect Enqueues a command to copy a rectangular region from a buffer object to another buffer object. cl_int clEnqueueCopyBufferRect cl_command_queuecommand_queue cl_memsrc_buffer cl_memdst_buffer const size_t*src_origin const size_t*dst_origin const size_t*region size_tsrc_row_pitch size_tsrc_slice_pitch size_tdst_row_pitch size_tdst_slice_pitch cl_uintnum_events_in_wait_list const cl_event*event_wait_list cl_event*event Parameters command_queue The command-queue in which the copy command will be queued. The OpenCL context associated with command_queue, src_buffer, and dst_buffer must be the same. src_origin The (x, y, z) offset in the memory region associated with src_buffer. For a 2D rectangle region, the z value given by src_origin[2] should be 0. The offset in bytes is computed as src_origin[2] * src_slice_pitch + src_origin[1] * src_row_pitch + src_origin[0]. dst_origin The (x, y, z) offset in the memory region associated with dst_buffer. For a 2D rectangle region, the z value given by dst_origin[2] should be 0. The offset in bytes is computed as dst_origin[2] * dst_slice_pitch + dst_origin[1] * dst_row_pitch + dst_origin[0]. region The (width, height, depth) in bytes of the 2D or 3D rectangle being copied. For a 2D rectangle, the depth value given by region[2] should be 1. src_row_pitch The length of each row in bytes to be used for the memory region associated with src_buffer. If src_row_pitch is 0, src_row_pitch is computed as region[0]. src_slice_pitch The length of each 2D slice in bytes to be used for the memory region associated with src_buffer. If src_slice_pitch is 0, src_slice_pitch is computed as region[1] * src_row_pitch. dst_row_pitch The length of each row in bytes to be used for the memory region associated with dst_buffer. If dst_row_pitch is 0, dst_row_pitch is computed as region[0]. dst_slice_pitch The length of each 2D slice in bytes to be used for the memory region associated with dst_buffer. If dst_slice_pitch is 0, dst_slice_pitch is computed as region[1] * dst_row_pitch. event_wait_list num_events_in_wait_list Specify events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event_wait_list act as synchronization points. The context associated with events in event_wait_list and command_queue must be the same. The memory associated with event_wait_list can be reused or freed after the function returns. event Returns an event object that identifies this particular copy command and can be used to query or queue a wait for this particular command to complete. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. clEnqueueBarrierWithWaitList can be used instead. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the event_wait_list array. Notes clEnqueueCopyBufferRectenqueues a command to copy a 2D or 3D rectangular region from the buffer object identified by src_buffer to a 2D or 3D region in the buffer object identified by dst_buffer. Copying begins at the source offset and destination offset which are computed as described in the description for src_origin and dst_origin. Each byte of the region's width is copied from the source offset to the destination offset. After copying each width, the source and destination offsets are incremented by their respective source and destination row pitches. After copying each 2D rectangle, the source and destination offsets are incremented by their respective source and destination slice pitches. NOTE: If src_buffer and dst_buffer are the same buffer object, src_row_pitch must equal dst_row_pitch and src_slice_pitch must equal dst_slice_pitch. Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_CONTEXT if the context associated with command_queue, src_buffer, and dst_buffer are not the same or if the context associated with command_queue and events in event_wait_list are not the same. CL_INVALID_MEM_OBJECT if src_buffer and dst_buffer are not valid buffer objects. CL_INVALID_VALUE if (src_offset, region) or (dst_offset, region) require accessing elements outside the src_buffer and dst_buffer objects respectively. CL_INVALID_VALUE if any region array element is 0. CL_INVALID_VALUE if src_row_pitch is not 0 and is less than region[0]. CL_INVALID_VALUE if dst_row_pitch is not 0 and is less than region[0]. CL_INVALID_VALUE if src_slice_pitch is not 0 and is less than region[1] * src_row_pitch or if src_slice_pitch is not 0 and is not a multiple of src_row_pitch. CL_INVALID_VALUE if dst_slice_pitch is not 0 and is less than region[1] * dst_row_pitch or if dst_slice_pitch is not 0 and is not a multiple of dst_row_pitch. CL_INVALID_VALUE if src_buffer and dst_buffer are the same buffer object and src_slice_pitch is not equal to dst_slice_pitch and src_row_pitch is not equal to dst_row_pitch. CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list is > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_MEM_COPY_OVERLAP if src_buffer and dst_buffer are the same buffer object and the source and destination regions overlap or if src_buffer and dst_buffer are different sub-buffers of the same associated buffer object and they overlap. Refer to Appendix E in the OpenCL specification for details on how to determine if source and destination regions overlap. CL_MISALIGNED_SUB_BUFFER_OFFSET if src_buffer is a sub-buffer object and offset specified when the sub-buffer object is created is not aligned to CL_DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue. CL_MISALIGNED_SUB_BUFFER_OFFSET if dst_buffer is a sub-buffer object and offset specified when the sub-buffer object is created is not aligned to CL_DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue. CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with src_buffer or dst_buffer. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clEnqueueReadBuffer, clEnqueueReadBufferRect, clEnqueueWriteBuffer, clEnqueueWriteBufferRect, clEnqueueCopyBuffer, clCreateBuffer, clCreateSubBuffer, clEnqueueCopyBufferToImage, clEnqueueCopyImageToBuffer khronos-opencl-man-1.0~svn27110/async_work_group_strided_copy.xml0000644000175000017500000002255011660441607025154 0ustar mathieumathieu async_work_group_strided_copy async_work_group_strided_copy 2007-2011 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. 3 async_work_group_strided_copy Performs an async gather of num_elements gentype elements from source to destination. event_t async_work_group_strided_copy __local gentype*dst const __global gentype*src size_tnum_gentypes size_tsrc_stride event_tevent event_t async_work_group_strided_copy __global gentype*dst const __local gentype*src size_tnum_gentypes size_tdst_stride event_tevent Description The OpenCL C programming language implements these functions that provide asynchronous copies between global and local memory and a prefetch from global memory. Perform an async gather of num_gentypes gentype elements from src to dst. The src_stride is the stride in elements for each gentype element read from src. The dst_stride is the stride in elements for each gentype element written to dst. The async gather is performed by all work-items in a work-group. This built-in function must therefore be encountered by all work-items in a work-group executing the kernel with the same argument values; otherwise the results are undefined. Returns an event object that can be used by wait_group_events to wait for the async copy to finish. The event argument can also be used to associate the async_work_group_strided_copy with a previous async copy allowing an event to be shared by multiple async copies; otherwise event should be zero. If event argument is non-zero, the event object supplied in event argument will be returned. This function does not perform any implicit synchronization of source data such as using a barrier before performing the copy. The behavior of async_work_group_strided_copy is undefined if src_stride or dst_stride is 0, or if the src_stride or dst_stride values cause the src or dst pointers to exceed the upper bounds of the address space during the copy. Notes The generic type name gentype indicates the built-in data types char, char{2|3|4|8|16}, uchar, uchar{2|3|4|8|16}, short, short{2|3|4|8|16}, ushort, ushort{2|3|4|8|16}, int, int{2|3|4|8|16}, uint, uint{2|3|4|8|16}, long, long{2|3|4|8|16}, ulong, ulong{2|3|4|8|16} or float, float{2|3|4|8|16} as the type for the arguments unless otherwise stated. Optionally, generic type name gentype may indicate double and double{2|3|4|8|16} as arguments and return values. If extended with cl_khr_fp16, generic type name gentype may indicate half and half{2|3|4|8|16} as arguments and return values. async_work_group_copy and async_work_group_strided_copy for 3-component vector types behave as async_work_group_copy and async_work_group_strided_copy respectively for 4-component vector types. Specification OpenCL Specification Also see Async Copy and Prefetch Functions, wait_group_events khronos-opencl-man-1.0~svn27110/xhtml/0000755000175000017500000000000012350363063017413 5ustar mathieumathieukhronos-opencl-man-1.0~svn27110/xhtml/OpenCL_Logo120.jpg0000644000175000017500000000555611660441607022457 0ustar mathieumathieuÿØÿàJFIFddÿìDuckyÿîAdobedÀÿÛ„   #%'%#//33//@@@@@@@@@@@@@@@&&0##0+.'''.+550055@@?@@@@@@@@@@@@ÿÀxx"ÿÄ• !1AQq"Ò“³t5Ua2‘¡±Br#ðÁÑRb3‚’Cƒ6!1A"Qaq2B¡RÿÚ ?è°˜L,¸\|²ãíŸ#í¡sÞèc.sŒm$’[¤•½¸0>›iØGÑLã|$ÛUýÁôÛNÂ>Šn ¦ÚvôU@OÜM´ì#è¦àÀúm§aEPDýÁôÛNÂ>Šn ¦ÚvôU@OÜM´ì#è¦àÀúm§aEPDýÁôÛNÂ>Šn ¦ÚvôU@OÜM´ì#è¦àÀúm§aEPDÞ !,XûfHËiœÇ¶Úሠ†è!öÈr^~íÈ€`<‡á îÚ¨)ø!ÆøH;¶ª" ÷[GÖ\HØ™«iÆšx—=”÷,ýcíì›Õ†×JáÎ$h;-:¾•ŽæWÞ`-æ‘åÒÃ)cÞNšÿ**;K8×Í^Tf¦;ª'>Úd÷9¿ëë&ü­§xX³Üe#‚fêžþ¼m5ƒd8 §iÔáã\µ» ã.?OôW2"1,P8ÐC@ÑP ää 5yT¦ëf1§VO'%¦Û•°l³7n$´?ºsÊÛ·¼µºÛÊ×Óææ­:B#[hGÃú¼ÚZA×Pä1Ôi§ôá\¸<úºj¦T̺ªÛ⑦b´×9)"“ ýÄ17-ái ~ZP;‘Q‚âˆÄ°»i‡GĬÀV¾#™fÕ=Ë_Nûz™Qv(OÏùKÂOݹ?ä9/ ?vä@0CðwmTüã|$ÛUqù<Ýì—õ‰Î†;wþœzEKN“ á¯Ý÷.V⣴¶{¢-¤’=º ?…¼œ|ZÕllÏ·m›0䣮Dr·VØ¥hU)çDõF?#‘Û||U‹—–¿·²~ÆÌqÊbÉÛŠCv9ãûe3JÙÅYÝÍŒ»ƒªw<±ð— 禅Ú5sŒŠÂÛ¨¯ZK¶Ü\4mPhàÔ·”~¼êú­‰»öSøºžé^­k©ÎÚâò-{:ȃ[Qµú• äi[WMŸ÷2=Ìpa:¡A£èV‹‡'‡fœüš­uØÓ§mà—mn;o c9ÎpÑ q…ñq7Y'Y -c´FáøGñ­Pžßn2Øù†»D DŽ5"êá–íx”zÖ@(+¶óù¼~XSÁ2ëöwUOäÖËè\Nu¦ö1NLgI£µ‚58qŠÄÌ“¡]@GY£­gᙟ'5>&^æ_ÔÛ~Ñ¿å.¿…¿iTë‰Ãsf?»¼f¨c¡kƺÓ§ˆ.œ>%q¹©¿‹—Ý_Šö÷5ª–±RíµÛ îkÕ®ˆè¡•³BÉšl„+¤,‹›Çû–yò Šé¬d†5µ«~Z¸ë®­K¤^¬Z¥”òaæá¾*ůŽVW] ùÿ!ÉxIû·"gü‡%á'îÜŠÇ!€òo„ƒ»jÝ–FÃåËKÈÑR´°Cðwm_Y{Ága$Æ15hέÆvÖ‚ ¡àFE52ÛxÂÉÍÓoW”·0žd°™c©Ô?»øÖºln2 tE‘UÎy«ä:ÏúgÿhþjMýöË:ÉÝFÖcu—Mhá( ù »!ÅŽØcuÈuÿÄ)ǺêÝÙ,˜‘¶qóÛjßöI§A’¿r¡ÅI<½È¶…º`¶Ö#ÿ'q»îVd’Æèž*Ç‚×PÖSE¡¥I½“8«œÕÄ‘þÞÔ +Q GçŸÍ&¿«íSvÀöâ7C<»æÎaåi¢Ä°Ö_ÜöéÐún.8]‹}sÕýYõ¶u~ƒŒ»ýå„'æ{yÿ™¼×}¡~x»hÊ]’#ÿŽSNG~ú®Üת1ÿ©ÆŸ ßX¯âìÿä¼$ýÛ‘3þC’ð“÷nE¤ðÆÈq¾í«=õŒ7ðuT:¬45 ¬!ÆøH;¶ªCI¦šÊdì~×3¦…ÏsœÝŽyPx8•E %± °‚ñzŠKíÅë`{£•’:â´µŽ%çüM)§•mãqrEö@\Sô¢Y O¸Ê­² ©¼kÔ‹ÔDkŸlX\ÜIp÷Ê×Jâç–S¯[ øÒÅn”ò¸tUÄUýqè ËòIrRKB0ö®$pHy^·ìq¶˜ö9–Í-5q$’iʶ‘JÕ$Š_‘Íkã|—Kѽ ùÿ!ÉxIû·"gü‡%á'îÜŠÇ!€òo„ƒ»j §à<‡á îÚ¨ ‹K)—Çâ`ßJ#kŽËsÞî&µµ%ºŠ^/Üx¬¬Ï·¶‘͹`« •¦9)Ƶªˆ" ŠvW=‹Ä~úm‡Éþ¸š äw#[TQã÷N"K Œt‘Áhæ¶}¸Þ×4¼†·›M:O¬×49ºœ…ôˆˆ ùÿ!ÉxIû·"gü‡%á'î܈Èq¾íª‚Ÿ€òo„ƒ»j €.VᬛßöìºdfKF»Hë6\á¥~¥Õ)yœ ®XÃ+¤’ÚîØÖ ¨NÌŒ¯Ä $û¡¬Ü>ßž ޏêÜGÌè*ݺü'ë+KÌæa¹i7´Öí³¹™–Ìe–é£Í*[JhåWqÞÚ†Òûy]Üͽkv#–r)Oö4jP0ÞÜ»¼~YϺºÇ¶k¹XøØ6[4DÔ´?Èé N÷NN÷‡ƒjfK{Öþî[8öîØ oé4j.¥]M\‹.ôÎ[á³[Fñ‘[ŸauyŠz=À=¤–ÑÔW®}«–ÊÎÖÝòZ?Siq©# ´ºµ×´t•ôïo>|mÖ>û!qt.ök#öA`iÚæÚ ð "²lÍ…Þò\Œ—Lʹ¬¹·x6õk‡VÐ4R«c ا÷–n[ª:êmƒµ¶"9Å£þ¿_ÅXŸo;q­t­Ì|T§<ÆÐÑ·£áÀ°å}µk‘ºeüSKeÙ6îÙs›Äñ€Áï¯þVûÿO}¹oþˆ¿#~å!þÛuÆ.ë}¸ºmÙat¯-ÚgVæ¼ PWgJÉŽÁMcrÉ“»¹cDÏŒÔSHj@WDDüÿä¼$ýÛ‘3þC’ð“÷nDŽ7…‹ Š\…³$e´-{4aÍp ‚ ´··þÔ­;xúHˆÿÀú•§oI7þÔ­;xúHˆÿÀú•§oI7þÔ­;xúHˆÿÀú•§oI7þÔ­;xúHˆÿÀú•§oI7þÔ­;xúHˆÿÀú•§oI7þÔ­;xúHˆÿÀú•§oI7þÔ­;xúHˆ Þo .!Y gÈûišÆ6hËœã€i%ÿÙkhronos-opencl-man-1.0~svn27110/xhtml/headBackground.jpg0000644000175000017500000002237311660441607023031 0ustar mathieumathieuÿØÿàJFIFHHÿáSExifMM*bj(1r2އi¤Ð ü€' ü€'Adobe Photoshop CS4 Windows2009:08:11 17:33:16 ÿÿ  _&(.HHÿØÿàJFIFHHÿí Adobe_CMÿîAdobed€ÿÛ„            ÿÀ_"ÿÝÿÄ?   3!1AQa"q2‘¡±B#$RÁb34r‚ÑC%’Sðáñcs5¢²ƒ&D“TdE£t6ÒUâeò³„ÃÓuãóF'”¤…´•ÄÔäô¥µÅÕåõVfv†–¦¶ÆÖæö7GWgw‡—§·Ç×ç÷5!1AQaq"2‘¡±B#ÁRÑð3$bár‚’CScs4ñ%¢²ƒ&5ÂÒD“T£dEU6teâò³„ÃÓuãóF”¤…´•ÄÔäô¥µÅÕåõVfv†–¦¶ÆÖæö'7GWgw‡—§·ÇÿÚ ?±ÿŒû?òÌÿÛcûÒÿÆ}Ÿùfí±ýë¸ûJ_iNâ=ÑÂ; ÿîAdobedÿÛ„         ÿÀ_ÿÝÿÄ¢  s!1AQa"q2‘¡±B#ÁRÑá3bð$r‚ñ%C4S’¢²csÂ5D'“£³6TdtÃÒâ&ƒ „”EF¤´VÓU(òãóÄÔäôeu…•¥µÅÕåõfv†–¦¶ÆÖæö7GWgw‡—§·Ç×ç÷8HXhxˆ˜¨¸ÈØèø)9IYiy‰™©¹ÉÙéù*:JZjzŠšªºÊÚêúm!1AQa"q‘2¡±ðÁÑá#BRbrñ3$4C‚’S%¢c²ÂsÒ5âDƒT“ &6E'dtU7ò£³Ã()Óã󄔤´ÄÔäôeu…•¥µÅÕåõFVfv†–¦¶ÆÖæöGWgw‡—§·Ç×ç÷8HXhxˆ˜¨¸ÈØèø9IYiy‰™©¹ÉÙéù*:JZjzŠšªºÊÚêúÿÚ ?0ÿ¡?‡þ¦vÿ‘úåÞ1îjðÝÿBýLíÿ"õÇÆ=Ëá»þ„þú™ÛþDëŒ{—Ãwý ü?õ3·üˆ×÷/†ÿÿÐïÿ¤ÏŽ*ïÒgÇwé?|Uߤώ*ÿÿÑí\wÅ]Á±WplUÿÒïU«¾ª<1W}Txb®ú¨ðÅ_ÿÓôM*ê UÔ«¨1WÿÔôN*ìUØ«±WÿÕôN*ìUØ«±WÿÖôN*ìUØ«±Wÿ×çÿã¿<ÔÅ©ÿÒeÇü×›o=ÁÒx³ï?7ŽüñÿS§ÿI—ó^>{‚ø³ï?7ŽüñÿS§ÿI—ó^>{‚ø³ï?7ŽüñÿS§ÿI—ó^>{‚ø³ï?7ÿÐå?VlÝS ·}Y±¥·}Y±¥·}Y±¥·ÿÑ…~ÊsyO=ný?”ãKný?”ãKný?”ãKoÿÒ#õ­<$ÿ€9½yÇzÖžÀUÞµ§„Ÿðw­iá'üÅ_ÿÙkhronos-opencl-man-1.0~svn27110/xhtml/headBackground-bigger.jpg0000644000175000017500000000103011660441607024251 0ustar mathieumathieuÿØÿàJFIFddÿìDuckyÿîAdobedÀÿÛ„   #%'%#//33//@@@@@@@@@@@@@@@&&0##0+.'''.+550055@@?@@@@@@@@@@@@ÿÀƒ%"ÿÄfa‘¢T"ÒQÿÚ ?íùÞÇ•«—ÄùÞÇ•«—ŧªUYͤa˜ùÞÇ•«—ÄùÞÇ•«—ŧªU'6FìyZ¹|Fž¨NlŒ9'‰ OpenCL 1.0 Reference Pages

  OpenCL 1.2 Reference Pages

More OpenCL Info >     OpenCL Specification >     OpenCL Quick Reference Card >

khronos-opencl-man-1.0~svn27110/xhtml/copyright.inc.xsl0000644000175000017500000000135311660441607022731 0ustar mathieumathieuCopyright © 2007-2011 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. khronos-opencl-man-1.0~svn27110/xhtml/bullets-expand.gif0000644000175000017500000000013211660441607023031 0ustar mathieumathieuGIF89a‘...000ÿÿÿ!ù,+Œ¦ â‰T°@¼¿ eX )‡&€‡I¦èƒl¯‡í7§wEï<›a ;khronos-opencl-man-1.0~svn27110/xhtml/KhronosLogo.jpg0000644000175000017500000000462611660441607022375 0ustar mathieumathieuÿØÿàJFIFddÿìDucky<ÿîAdobedÀÿÛ„       ÿÀ–ÿÄ— !1A"Qa2Bb#q‘¡Rr‚3±Ás³$571!AQaq±2¡Á"Rb#ÿÚ ?3â<¹ÿ—å6a|8À%é«pàJÔ’vÐm"ºgÉgnÝ%D¶*-Š Æ4;ƒ‹©”´“¸¡4JG|tò§)#Pmær¯¾4Xl6j¸ô5úú ò¿(£…k’¨Ìå©HXoa4õƒíÐ^­ÈJ¿xúôI¿˜«¢r+ŞՆͻ›+Ëj[±D¥E!e!5¶zãQ±r ¡ùÖÖÜ"™Ð^§q¥TšŽ…*ô舮AåØö Ÿ&´G7ÚÈ@i ¨%gÁ;SÕJ÷k6\úNÚøÙíp{Vú}ܳ³Í ÇÎy ~&uÝ».uKUÀÝEýz‘$õ¶ŽïÌáãðÇ‹½˜—‚rœ©Ö²ÉNùöË©?Ê…îýš³†ßÊJ÷6ë‹Ëó1k‘¹#Û¢cß­L«có#×sf´£¢‰q£üi¦¸œ™)ý¡¢¼N'#HpÞzkÒ~ fSÌq,¼k 8jÜä–&¸Ûh†V”­;÷Žª¡6kU-º5xŒ3%©3®ÙÑ#däûUëÍà4VÛ]~DÃ{o0’\eJ§ˆ#ÆžuÓâuÆYÊsŒ>.F˜†”·P#•o#´áEw šB¢¼+JPzyThº øöCiÈlÑo6‡Ä›|ÄttéàBê“Ðnˆªrw*3†.ßo‡nvó]”Soµ±õÔâ£îÐV¬Üû*éŠd2ÛÇŸo+ÇžF>¢JÜ\¹aM+P¥šŠy{ôP/)¸äoü¨mM¨Å~[lÝä6¨«’°T‘÷•é'ËAêþ4cc²# ÙLVÌUõýýÕÝïÑ_Í¡}1°õGREÁe„Ÿàíìݺš,(ÜËtæ PìMçv¸pâ|ÁµCz2”\;’BIéM­™þ‹Â?³Dy.ËÉ2xû?ä[Ëv•ÜØvjXuIXBYZt¶WÐúTj4Qgòû†ÜìÖÛÎUw[ ¿”¼™Èb2ÂÙiRÓë Wp“ìÐê寶x°y7"Eìy_ãZ]v›^ŒâÔ¥8É=HÛZxk.í´ëÖ^çsÍ9pcš}&=-ïú zÔð‹@#æùQ¬RmWè K7â›}´þ¢5=M¼Ÿ§Ë¨óÖ^M¶ÌLu{ý—ݦJZ?Ïn¿ zÂ#ó! ŽÅ¾8‰2ã­˜Éè K‹Ú¸iˆÑáÚÓiÖgY ‡Ì¸¹Ù¶‡”¥â9Ý›» Õ“µ™Kæ}¨R¶«Ú’“åªägü±ãÖŸñdÿž­ QùaدþcñYûÊã¥ÚKŠ.MzSº€ë–Ûíñ[¤K›mªÜ¸®‡ÒàBv½|)â4@—òŽ©c¹´¥Ânæè†£æ6#}?›E”§2ñýòû’Xò,Fë.]eJÄxJ{Í’UTƒZê­SB4\{–³ù°ò› –ÌòE¯á{*Ch |»1¨ê.«Tw7¥U¥:ùh.¸ =lËs[¥æD{…«- lÂJ [ZÔ¢•• ¢ü´CÎã|r³Éº·qÇÜx½ikj’ë‰Ü•H!B„ÓíTùè1q}Ï;VÅ4IK­~âµ’1䯄~è~ŽÜÞ'"w[\Y=c¤ü}´>grÛøì×t)>-<ÑtŠyì ?I:ê3Lu¬³Û¶c¿rãù;Læ\šäÙkÅf¸òºŸmA ûhBíÕœ·Ÿ¦©^߯¤ë—,OµMq¾*Ê/÷Öò,ñê†Ö—·Rjå=)JOÙOëÔÇ‚uÝyÖ]rûµ#ÙãÆÚyÏœ­|ËÇ“óÌ,Ø KjßÛýç’¥§ka@¦‰ ×Õ­OóŽ*‰–qÄlZSˆná†D †Ú†¤2€ôñÚ Pöh:pÆ8Î/…1üÎ5ÎU½ÇL‡¢š¤\RÀ"¤f¿,qž1ȱQlzj!ä6ð^ƒ!²•<ÚWJ‡®å6®>‘ ÌáþUq†lyo!2Æ6µҎ⻯!'êå<½¤QÛÇ,8v3ÓnJbÛ 7õÖ@÷©Å¨ø•¤èŠ7(quã$È-™†wnÛ”Y£orªeÄj…m­Ê Ô~ÃÆ9 +6OzNU G!]žŠ—. ‡Œ¦e6âX uÂ}Ý4MÐ-Ð-Ð-Ðh®ÏÚÛôÓDe=¿³O¢š+mÐ6¹ö¾[/½¿µÙs¹Úþ¦Ý¦»>õ<4¾5C©yŽãÑþ]áÿ -6¢û{¶¸êKûiÜÙéúk ç îk‚’ëÿð-îiÆÑðû6#ú.ïîxoª>­4sô6©ïQàÕ-~8<Ón¶bnû%n5G‡_j|7yh$²!ñ¬ ¥¾ˆFÚµ*|#´6•©)*ð¨*§@ãJ“lšp¹+æþ1{iï÷NþÚBœôW¦º E±¿ü^ò˜®Éøÿ˜Æù“…±Þ§Í*À.línÜ ú»MÿÙkhronos-opencl-man-1.0~svn27110/xhtml/present.css0000644000175000017500000000252111660441607021611 0ustar mathieumathieu@charset "utf-8"; /* CSS Document */ li { font: normal 14px verdana, sans-serif; line-height: 14px; } ul { font: normal 14px verdana, sans-serif; line-height: 14px; } a:link, a:visited {color:blue; text-decoration:none;} a:hover {color:blue; text-decoration:none; background-color:FFFF99; } #navwrap { width: 320px; margin:0 0 0 4px; padding:0; } #containerul, #containerul ul{ text-align:left; margin:0 0 0 4px; /* Removes browser default margins applied to the lists. */ padding:0; /* Removes browser default padding applied to the lists. */ } #containerul li{ margin:0 0 0 15px; /* A left margin to indent the list items and give the menu a sense of structure. */ padding:4px 0 0 2px; list-style-type:none; /* Removes the bullet point that usually goes next to each item in a list. */ font: normal 12px verdana, sans-serif; } #containerul li.lev1 { margin:0 0 0 0; padding:4px 0 0 2px; list-style-type:none; /* Removes the bullet point that usually goes next to each item in a list. */ font: normal 14px verdana, sans-serif; } #containerul .symbols{ /* Various styles to position the symbols next to the items in the menu. */ background-repeat:no-repeat; float:left; height:14px; margin-right:5px; margin-top:1px; width:14px; } #containerul ul.Level2 { margin:0; padding: 0; } khronos-opencl-man-1.0~svn27110/xhtml/bullets-contract.gif0000644000175000017500000000012211660441607023366 0ustar mathieumathieuGIF89a‘...000ÿÿÿ!ù,#Œ¦ â‰T°/~sËð!LG."žƒ®÷n¬c;khronos-opencl-man-1.0~svn27110/xhtml/bullets-end.gif0000644000175000017500000000012211660441607022317 0ustar mathieumathieuGIF89a‘...000ÿÿÿ!ù,#Œ¦ â‰T°/~sËu@xzVꉛ‹i­r0´Q;khronos-opencl-man-1.0~svn27110/xhtml/undohtml.css0000644000175000017500000000057711660441607021774 0ustar mathieumathieu/* -- undo browser HTML defaults -- */ /* -- Global resets of all default items -- */ :link,:visited {text-decoration: none;} ul,ol {list-style: none;} h1,h2,h3,h4,h5,h6,pre,code,p {font-size: 1em;} ul,ol,dl,li,dt,dd,h1,h2,h3,h4,h5,h6,pre,form,body,html,p,blockquote,fieldset,input {margin: 0; padding: 0;} a img,:link img,:visited img {border: none;} address {font-style: normal;} khronos-opencl-man-1.0~svn27110/xhtml/style.css0000644000175000017500000000007111660441607021267 0ustar mathieumathieu@import url("undohtml.css"); @import url("present.css"); khronos-opencl-man-1.0~svn27110/xhtml/OpenCL_Logo.jpg0000644000175000017500000000310611660441607022221 0ustar mathieumathieuÿØÿàJFIFddÿìDucky<ÿîAdobedÀÿÛ„       ÿÀ22ÿÄ– !1"U6–AQa2RÒ3³t”Ö#ðqb4„5!1QaðAq"2‘¡±ÑáBRÿÚ ?úKé}2½3hZ픵BŽT£¢I-'NZ§U4·CÁûf}Úꦖèx?lÏ»@TÒÝí™÷hªš[¡àý³>íuSKt<¶gÝ 3¯Øz6/m8_¿‡ìz¾¯¢€Ó´§e¬ÿC䦀U¬5Ìk+2£Aá˽°Á’!(¨Ð )j mÊ“Ÿ.8åÖ»—4ø7›åi5f•i˶$wýG¨§Y^TçšfchÇŽµ4ß/­¥â”ïØ­¾zªÝ_¹X¨×ÍL¼JËî_”[•Y,1«E¼É‘9ùÆl†£­k}‡–˜œÌ1߀a\ßúwç¸t›´Û|£á—%Í££±¶RǾcˆºå¦å©«C-)G+‰Ùy3cëå#vü0Ú-:oÉé¸ÜŽ”Þñ_ÔµŸK“ލbV%A@)'v‚7]IReŸ›Ðnñ¬þÁ¹ÉÌY‹n޵¥ÒHR $ùÇó¬JTU5^¼­ÁÎY"kBécyáêKëé¹¹fÛ$¶·V`±!* Ì¢R”îÊ‘–´[…|Ì©Ùm}×îÜjOø¼ª¹öú£Ee†i-0ÚZi¶€=l© QŠJ‹LêË•¹”ˆq2.òã™KÙÙ°·³y#}UïúM­ÄZô6Óªï§&û7œs1›ž£m¸>¹hMÊôÒ”ÑmÀ¤ÁŠ ®RÑÈ·”*XJqÜ’š­[{6¼±iô¯ýŸØíúL½r*MéRY¯S\»¢¹ã'ßCMð{[ÌÔvÙ‘®.qgÁp&T£3.ã—’€”òT’6 ØUÎÊóœi,ÑGò—¬âáè’û¬Åß›ÔÓž*[³L¼h \—mo9!çlæÎ[I)䩳‚¼»kÌ“h¹µ+Ói|J+l>eo¯Šc´†‹¤`VP ˆÛµ[ë)QmÃLRà¤Uï›¶‹Så8J\Ê´7—2•)D`Ÿh¤è5“ÙΞÓlÚÒ©(Hº>$JÃþ`ã•ÿS¼ÐZ—Á—»ü۷&/‰ÍÒÀVU`¹EÁŽ$cº ÜÙ)Iºæu[/”JŘÛÑ«JÏWì6Ð>ÇÒ 3¸¹0Èk‚[Sa´ŽPVmŠVÝ•²ÆÛÛu­H}[®=ä\tºçQ'æõ(¡/ô§e¬ÿC䦀îë©t塸Ñî×Xv÷æ«$6¥Hi…¼¬@ÊÒ\RJÎ*Ð h\q¶ÛSŽ(!´¥­D„‰$ÀP -³JÞ–g¼Á¹,‡L9,¾pd 8pmJõ ÈÍæÌœwŠ­–~o@_éNËYþ†7ÉM!â‡×ëõÊâõ±ØF5öÊ«ß â¶]qÁ&0BT¿×8¡E” æÙ@F#ÂpýÑÖîJµ2ôéà4e¿ÆšÏïöðq§Ød&3YZÊÛ€¥|¤ï01oÀÛúís¢É¾8§ç0ôUÈzKò‰Ž«|fiФ²Û IaŬäIRUä$€K6 |uU£P<Å¡µÂ…&×&+2$ðøŠ÷¬cŽRy²†C³w*†KÊ,üÞ€ðiÿø6ÞÚŠÇÂø >§öù¨}è¾ôßzï½wÞ€ïOjö(`ÿÙkhronos-opencl-man-1.0~svn27110/xhtml/oclRefPages-Title.html0000644000175000017500000001477211660441607023571 0ustar mathieumathieu OpenCL Reference Pages

OpenCL Reference Pages

OpenCL (Open Computing Language) is an open royalty-free standard for general purpose parallel programming across CPUs, GPUs and other processors, giving software developers portable and efficient access to the power of these heterogeneous processing platforms.

OpenCL supports a wide range of applications, ranging from embedded and consumer software to HPC solutions, through a low-level, high-performance, portable abstraction. By creating an efficient, close-to-the-metal programming interface, OpenCL will form the foundation layer of a parallel computing ecosystem of platform-independent tools, middleware and applications.

OpenCL consists of an API for coordinating parallel computation across heterogeneous processors; and a cross-platform programming language with a well-specified computation environment. The OpenCL standard:

  • Supports both data- and task-based parallel programming models
  • Utilizes a subset of ISO C99 with extensions for parallelism
  • Defines consistent numerical requirements based on IEEE 754
  • Defines a configuration profile for handheld and embedded devices
  • Efficiently interoperates with OpenGL, OpenGL ES, and other graphics APIs

The specification is divided into a core specification that any OpenCL compliant implementation must support; a handheld/embedded profile which relaxes the OpenCL compliance requirements for handheld and embedded devices; and a set of optional extensions that are likely to move into the core specification in later revisions of the OpenCL specification.


Copyright © 2007-2011 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.
khronos-opencl-man-1.0~svn27110/xhtml/index.html0000644000175000017500000000107011660441607021412 0ustar mathieumathieu OpenCL 1.2 Reference Pages khronos-opencl-man-1.0~svn27110/xhtml/opencl-man.xsl0000644000175000017500000002521412155450025022176 0ustar mathieumathieu ansi http://www.khronos.org/registry/cl/specs/opencl-1.x-latest.pdf#namedest= .html .html <a href=" " target="OpenCL Spec"> </a> <a href=" "> </a> type="text/xsl" href="mathml.xsl"

padding-bottom: 1em
 
    , )
khronos-opencl-man-1.0~svn27110/xhtml/classDiagram.jpg0000644000175000017500000016621711660441607022530 0ustar mathieumathieuÿØÿàJFIFddÿìDuckyPÿîAdobedÀÿÛ„      ÿÀ;XÿÄÇ    ! 1ÒÓ”Ô•ÕV–WA‘Ñ"’S“Tµw8XQa2#´Uuv7qá3³6¶Ö9±Rr²tä¡Bb$4%5CsÅD„Ee…&†¢cƒdfQ‘ð1a¡2Aq±ÁÑáRB!"ÿÚ ?ÞÍÅuÑ­TSWTÍkÎ 5ˆ0&T^vA0ô“BY„Ëîp4Ê5vKNÔËZ¦™«s“6:SmïÕ7g’•þЧ<1—3FÑ')¶÷꛳ÉJÿhœðÆ>LÑ´IÊm½ú¦ìòR¿Ú§<1“4mr›o~©»<”¯ö€iÏ cäÍDœ¦ÛߪnÏ%+ý sÃù3FÑ')¶÷꛳ÉJÿhœðÆ>LÑ´IÊm½ú¦ìòR¿Ú§<1“4mr›o~©»<”¯ö€iÏ cäÍDœ¦ÛߪnÏ%+ý sÃù3FÑ')¶÷꛳ÉJÿhœðÆ>LÑ´IÊm½ú¦ìòR¿Ú§<1“4mr›o~©»<”¯ö€iÏ cäÍDœ¦ÛߪnÏ%+ý sÃù3FÑ')¶÷꛳ÉJÿhœðÆ>LÑ´IÊm½ú¦ìòR¿Ú§<1“4mL·ŒÈ¾J» _TíKƒ´Nxc&hÚ%ßZ—mõ¤7\·&õõ1×in2²[+Sn%m<”8Ú’´šM+I(Œ´2TLM’ìM¬qÐ=|­e“0£d£âÕWª¨Ñ¯™Pê$G§ý&4£u^^ðš·ÆÞ „f )}<ì{6çy‡TËÍÓdn Í*Iì tToé/ÈÃU~=å½ÅÝU‚A¬õ2.»týQ¯{®SGL/HÉ@rúþ'á?ÚÕo™*J7Uåï «|mà˜Æjz“çÁ¥A™SªMb›M§0äš…BS‰e†i&·uÅ™% JHÌÌÏB.ˆ Ô̘Šü©ÈÊV•ßWKjtéTZÔÒvZ©\Lw–½º'§-s)ÙvîE±qUV¤ã®G‡UiÓRëCìÑ›mÙ†§’“Cf„¸FD£-¯Pˆ¿oËKY×ý}V˜·­;^"¦Vêò544Ñ$´JHÔ¥)J$¥)#5(É$FfÃÙŽÊÎvkwÕ„íAÊ"彯ê$Se6û&¤®<”!eªV•é¡‘–†SˆdìEÕû2Oû†]±äª¦&ÝR÷½hXæãËèMQš‡kErTùÒßšãl¥\R6YJiç¶Å ”¢B̉¯{®SGL&ÍÃ÷ÈÏb»ÒôÉ4 ·qZ÷åNÔM6ßKéŒLA…IÔü™F· r–“RI2"2Iz¹)v€C—×ñ? þÖ«|ÉPQº¯/xM[ãoÆ3PÞ¤µÝ›x"Ó]qÝÊZúd€x¨/w+‹ n[BÝé«Vf÷lTìGcɱša5¨KŽÃ*®=\z HÒÒKãÊIþWš€l;2}¾·/ýÖÉ? Džæªö÷.¹â$bk^È¢ÃiÚeRü“P~uvi´n;¶â9¨m¡_›ÛqK3?m¡' 5ñ™ïüóÍãpæLO¢[˲íɻiµwe­¨°áÇ›°š{±M+ë‚6q”¿k®›`)6lVö’·Ç »dâ™xªm+•?¬þ]]Äë+—L:w^*BŽ2”kâúçN‰mìpèe™K8e ‚è—B·í›Ç9]— ;Bϵm'&F¢O­Ö%-ªkdìý_Cie;oú©Q'MHÈ0mÞcåÌS`o5GÇõk_8Ê“G´ï ª1þI¯2ÁÉnæj+pÝmä¤ÒÛˆÐö¸L´ Œ½Ÿ7“Vò• Ûp›fOžv->ððÚí\äB¤¡É’£É9ˆˆ³SÄïÓL¡´’‰JRÔf”èAïŸ3Ž2½·rÆXòŶ/ë6F®D©Æ¨I“ *.gúå/¤öúÑ…:뎤ЧÚ (ÙYê ¶óîû÷E÷’7t§ØøÁ¼Å‹Õ©påWÞ©&ÒU§Ÿ§6Í9+TÕK­¤p¬„¡F¢Ô‹h-fê9Òvð¸v—}×(M[7d•FÞ½hq–§#1V¤ÈTynµ”m¯BZu32ÚÙ3=50² 1 ýˆº¿fIÿpÀQ-Ì/Ë3nët^ýÏN´-zmÙSLêíQônjڟž¶šI­fEªÖ¢Ip™˜×½×)£¦¯4nH°\ǹc·wÒ•{Õ2ÃrS-n¹AM‘ITKIšÓ&d¥´kB‹R/PÿÉMÇ/¯â~ý­Vù’ 4£u^^ðš·ÆÞ Œf 9¼E¿Zºð&i¶-Ê{µk‚á²+Ôê%-“I9&\˜4ËH5šS´µ¨ˆµ2îÃŒiØç b8,jm£|ò(P/"V&õëYL–ä¼ÂuqdêOhÍG©ðê`0£ï*Öù¬dU¿&m™dÛ×ÔK®àlÑÄAz§3pÐá‰Zº¤'e&®f,SvÊÞk-\¹/uºžõvõáK¢ÄÝêB¥Â]¿n›Mª„:‹3d6ˆDì¯Ï.A4â?’FfdcÀK!Óy¼•‚n*Û9£eÞ6ÿȳ‚K2ê’ji‹´´)I$,ŸBˆõü“ÔÿNâ·³¦RÜZ—†äîÿsÙ×Î3sÐÓM¨?Ï–>CŸ¯åÁâ_WæZn6ÞÒ̵%{]vLÀ[]ó±]û’qÍYŰ#Öò&¿(YÖ¶e>˜ÍU¢¸ç_´mN´ê¶MZÑjZêq9zœÉ« ¸pf5Áç¯;†}Þü>¿ªÖ‘q Â§Gˆë¦m6·µ¼½ Ià"#ДíÁ¼co×|dÇè°êxn‘oÁ¹ŒÑÖîTØ­?!Ȥ[[{iiD£öºiê€üf›ó¸·ªÜîö¢[ÒjV‚åðw•q£l™§•FÛ8âRÉ_p)Ù#áèè‹ñýåEß'z\ƒT·ä³/[vʼnjÜ8™¯SbInb"Q«V”²%mt@uûˆã«ßbKƃ~Û²mš½C$Ýuxp%f· ͘KŽùqjYl¸’Ô¸@]@†@þÄ]_³$ÿ¸`4ß»æõ”ÛvëÄ;ÁÞô9Ý{tTÝ­Y5k~­UŒ|TõºÉºMÓŸaF•¡+I¥G¡‘;Ómrš7Bj°÷·æ¦Åõ§.Ìwáï`¤ëqŸ>Ìwáï`¤ëqŸ>Ìwáï`¤ëqŸ>Ìwáï`¤ëqŸ>Ìwáï`¤ëqŸ>Ìwáï`¤ëqŸ>Ìwáï`¤ëqŸ>Ìwáï`¤ëqŸ>Ìwáï`¤ëqŸ>Ìwáï`¤ëqŸ>Ìwáï`¤ëqŸ>Ìwáï`¤ëqŸ>Ìwáï`¤ëqŸ>Ìwáï`¤ëqŸ>Ìwáï`¤ëqŸ>Ìwáï`¤çq¯>Ñûƒp÷°Òu¸ÏŸf;p÷°Òu¸ÏŸf;p÷°Òu¸ÏŸf;p÷°Òu¸ÏŸf;p÷°Òu¸ÏŸf;p÷°Òu¸ÏŸf;p÷°Òu¸ÏŸf;p÷°Òu¸ÏŸf;p÷°Òu¸ÏŸf;p÷°Òu¸×ŸhýÀ¸{Øé:ÜgϳÀ¸{Øé:ÜgϳÀ¸{Øé:ÜgϳÀ¸{Øé:ÜgϳÀ¸{Øé:ÜkÏ´~à\=ìôn3çÙŽà\=ìôn3çÙŽà\=ìôn3çÙŽà\=ìôn3çÙŽà\=ìôn3çÙŽà\=ìôn3çÙŽà\=ìôn3çÙŽà\=ìôn3çÙŽà\=ìôn3çÙŽà\=ìôn3çÙŽà\=ìôn3çÙŽà\=ìôn3çÙŽà\=ìôn3çÙŽà\=ìôn3çÙŽà\=ìôn3çÙŽà\=ìôn3çÙŽà\=ìôn3çÙŽà\=ìôn3çÙŽà\=ìôn3çÙŽà\=ìôn3çÙŽà\=ìôn3çÙŽà\=ìm±–RÇù’Φ_øÊè‰wZ5sq0ªñ ÄÛ*48Û<–Ýii2áCˆJ‹ðp ø7}©)ÉØLÔd’*­[„ÏOÿ¨ £u^^ðš·ÆÞ cß‘îˆBŽ=~Gº =~Gº =~Gº =~Gº =~Gº =~Gº =~Gº =~Gº =~Gº =~Gº =~Gº =~Gº =~Gº =~Gº …þû'dÝZ<~L“ÿh¿Ô0˜Ý?qýÕ3n?­ÞY'G¯ÜîÜÕv¥ÖY®ÄSÄSÐÔÔZ‹L‘—CÚ!#NôY\¦Ð´^‹ýżŷåÉßAšEþâÞbÛòŽäï ¢ÿqo1mùGrwÐѸ·˜¶ü£¹;èè¿Ü[Ì[~QÜôô_î-æ-¿(îNúz/÷óß”w'}=û‹y‹oÊ;“¾€‹ýżŷåÉß@EþâÞbÛòŽäï ¢ÿqo1mùGrwÐѸ·˜¶ü£¹;èè¿Ü[Ì[~QÜôô_î-æ-¿(îNúz/÷óß”w'}=û‹y‹oÊ;“¾€‹ýżŷåÉß@EþâÞbÛòŽäï ¢ÿqo1mùGrwÐѸ·˜¶ü£¹;èè¿Ü[Ì[~QÜôô_î-æ-¿(îNúz/÷óß”w'}=û‹y‹oÊ;“¾€‹ýżŷåÉß@EþâÞbÛòŽäï ¢ÿqo1mùGrwÐѸ·˜¶ü£¹;èè¿Ü[Ì[~QÜôô_î-æ-¿(îNúz/÷óß”w'}=û‹y‹oÊ;“¾€‹ýżŷåÉß@EþâÞbÛòŽäï ¢ÿqo1mùGrwÐѸ·˜¶ü£¹;èè¿Ü[Ì[~QÜôô_î-æ-¿(îNúz/÷óß”w'}=û‹y‹oÊ;“¾€‹ýżŷåÉß@EþâÞbÛòŽäï ¢ÿqo1mùGrwÐѸ·˜¶ü£¹;èè¿Ü[Ì[~QÜôô_î-æ-¿(îNúz/÷óß”w'}=û‹y‹oÊ;“¾€‹ýżŷåÉß@EþâÞbÛòŽäï ¢ÿqo1mùGrwÐѸ·˜¶ü£¹;èè¿Ü[Ì[~QÜôïÍ˹•“óeålá„S.KJ¹+VýKåëî·—"Dgx·ªKm{6•l­&“ÓC# '2ÿÙFêúL«ü×H·X·è÷=ý†)ØI¨Sž«Õäe-h#4Qj“Õµ%\Ê.Õy{Âg|màÈù Å^(µÙ2ú°…†b¯Zì™}XÌUâ‹]“/«rмQk²eõ`C1WŠ-vL¾¬Èf*ñE®É—Õ€9 Å^(µÙ2ú°!˜«Å»&_Vä3x¢×dËêÀ†b¯Zì™}XÌUâ‹]“/«rмQk²eõ`C1WŠ-vL¾¬Èf*ñE®É—Õ€9 Å^(µÙ2ú° RúÂXµ‹6çy«M¤¸Ý6B®¹•ÀdƒÓÿŒæóm áZ³-'a¦nвGGD¦S¤EÃøˆkÞë”ÑÓ ä2PÞ§ìÁ¼‡Ñuáó,°'™ì£uý&Uþk¤Û€+Ö …az‰ÒêŽ*¯TOXÒØ92UµE¨©l:‘z¼"èÝW—¼&­ñ·ƒ&åU>n¯žâ«ªQʪ|Ý_=ÅWTåU>n¯žâ«ªrªŸ7WÏqUÕ9UO›«ç¸ªê€ª§ÍÕóÜUu@USæêùî*º *©óu|÷]P•Tùº¾{Š®¨ʪ|Ý_=ÅWTåU>n¯žâ«ªrªŸ7WÏqUÕ9UO›«ç¸ªê€ª§ÍÕóÜUu@USæêùî*º  RúÊ)v͹Úäö÷on› ¸ÅÑ”I-P|&|gƒ¹½ÆáZ³» oŒº*ÊâÖZ);R=^¡—ª5ïuÊhé…ò(ïSö_ÞCèºðù–X Ì¿öQºþ“*ÿ5ÒmÀ9}ðŸíj·Ì•¥ªò÷„Õ¾6ðLc51 ýˆº¿fIÿpÀSþoàÕk÷®±ú[£^÷\¦Ž˜^ñ’€Mz¹K¶(u›’¹( Q-ø2*U‰Æ•,˜‹µ<û¦””d„$ÏD‘™ú„f;lØOübkÉtD(ÒšØéz‹M±Z"?u þ¡zsÃùNhÚŽShÞ/ÝÞLÖ;P4ç†1òf å6âýÝäÍcµNxc&hÚShÞ/ÝÞLÖ;P4ç†1òf å6âýÝäÍcµNxc&hÚShÞ/ÝÞLÖ;P4ç†1òf å6âýÝäÍcµNxc&hÚShÞ/ÝÞLÖ;P4ç†1òf å6âýÝäÍcµNxc&hÚShÞ/ÝÞLÖ;P4ç†1òf å6âýÝäÍcµNxc&hÚShÞ/ÝÞLÖ;P4ç†1òf å6âýÝäÍcµNxc&hÚShÞ/ÝÞLÖ;P4ç†1òf å6âýÝäÍcµNxc&hÚShÞ/ÝÞLÖ;P4ç†1òf å6âýÝäÍcµNxc&hÚShÞ/ÝÞLÖ;P4ç†1òf å6âýÝäÍcµNxc&hÚShÞ/ÝÞLÖ;P4ç†1òf å6âýÝäÍcµNxc&hÚShÞ/ÝÞLÖ;P4ç†1òf å6âýÝäÍcµNxc&hÚShÞ/ÝÞLÖ;P4ç†1òf¡ø,­j76“OžÕn‹&»,àÒ«E©@iù Žô£i/ÉŽÛD®*;Š"R‹] SЇ'·1ÿÌ`Í ^á#è…1»’ì¢Z‰¤eÙI]ziÓhñ¡B•=ù“ù†Ú†ÓÎp3Õ™št"Iê} jšf­ÎLØÇ¹M£~ »ñø3XíAZsÃùs4m)´oîï&k¨sÃù3FÐr›Fñ~îòf±Ú§<1“4m)´oîï&k¨sÃù3FÐr›Fñ~îòf±Ú§<1“4m)´oîï&k¨sÃù3FÐr›Fñ~îòf±Ú§<1“4m)´oîï&k¨sÃù3FÐr›Fñ~îòf±Ú§<1“4m)´oîï&k¨sÃù3FÐr›Fñ~îòf±Ú§<1“4m)´oîï&k¨sÃù3FÐr›Fñ~îòf±Ú§<1“4m)´oîï&k¨sÃù3FÐr›Fñ~îòf±Ú§<1“4mdÊ1™Èq~?k¨sÃù3FÐï­;Æß½é‹«Ûs2 R¥BuN2ìw‘ C±$4ã/%!M¼ÊÐd¤‘𪙦l—bmd㎀ ]ê~ÌÈ}^2ËBy—þÊ7_Òe_æº@ ¸®ÛÂ[9F¯L·«¸…øL^v¼‰OÀ9ͨQJ…"‰?œA%DR6‰Gµ¡§òxx.Š¢-·Å5Eªt^r½OÿPˆ®K¥ÍEÜþ‹&óä^r¿Äì’éC5sú,›Â¢ó•ŸÊ8ÿhºPÍEÜþ‹&ö¾¯®qMáí ®m±$Ó®”ÒŸTYuª[üt/·©:˜R ;/6…{Ry:¡Ã#6ÍmšZÚnÛɽqñó¿Nd³é·æ2¾)7e¯T#J&F”Iv4„q±%°¤í°ûFz) .†‹A­µ¡jf¢îE“{>ùœ¯ãñ;$ºPÍEÜþ‹&óä^r¿Äì’éC5sú,›Ï‘yÊþ?²K¥ Ô]Ïè²o>Eç+øüNÉ.”3Qw?¢É¼ùœ¯ãñ;$ºPÍEÜþ‹&óä^r¿Äì’éC5sú,›Ï‘yÊþ?²K¥ Ô]Ïè²o>Eç+øüNÉ.”3Qw?¢É¼ùœ¯ãñ;$ºPÍEÜþ‹&óä^r¿Äì’éC5sú,›Þ´Ë_œ~©E:¡6#g Ù–Ž¹è¶¾ô5sú,›×§uK^ر›fæq§k’çÊ¨Ô ­v É.)Åjf|¯Â&º³U2í1dX³"]CÆ©HÝû7LÒ~\©~§>GÿP¾ß\yÂjÝ)‰èYÿa?èVõCÊ85㾌Éld-ÝÛfK­¶WRM¥FIÚTiI3Ó¡©‘è4£¦¯/xLï†ÂÛþ¿öKý5?`!¼Žµ•ÿ€%¯*‚¦¥jWÈOúF”n«ËÞ;á2 Ôè.§fÚ¯ºÒÔÓ­Óä)·z)&M«C#.€ SÍúûÏãkðÞunš/Šé$Öfzk>B£øLÌÆ½î¬=Fåõ(ïSö_ÞCèºðù–X Ì¿öQºþ“*ÿ5ÒmÀKr*àE»^]¤Ôî¤S¥*Ùbª·€º2®µLµ²Jq,›»$á Dt-@hNeo…w¯Þv §½dËb\›еéÙ"u³ÖRUI_ÉTº{Ò)ç³jrqä’]y)qq‰yÓXE›ÆîÝð&ø…aÛ~–Ín…>©k*ô—Ta§•]“6éKšÚ‰HSn¶’lš=P–Ëc‡Ûƒk˜/q—7pÍ·ÿ‰³ J‹‰®…¸u¬.›×¬8Ú™_ÚjnLÚ.µ}{l¸l¤ßæ–âö–µý oö}Í߸µÿ›ÞÚë8M[¥21ý ?ì'ýjÞ¨z•jµ.ƒK¨ÖëuÔŠ="3³*•IŽ¥˜ñ㲓[ŽºâÌ’„¡$ffg¡ਖ†ÿ›­^÷u"΢d ˹*Jµku =N "«9KâÑFLfØZÖ¿j‚5Ñð'S2rÀC˜[4Ps}ñ­[ô¹ô˜öeå[²§5P&‰nË¡¼L¼ó\RÖ\ZÌõN¦Jü$@2¼’¬LGhUoÌ‘s´m:2Rsë”d‚RÏe ¡ %-Çg¢P„š”|F¾ã}ø÷uÊ…"¢Ý*Ór¤ÕiÓ®z5F†Ur"×ÿìæmåtJÚW¨FÝ×FúßÄMÞ?zZþ¢HÒŽš¼½á3¾†ó™Ï>¹™lMÕ7^‹B¤äÛ¶Õ~õ¹r=ÒÚÞ¦ÑhÌ>ë ñhi¹?œyøÊeJr;‰OÙuY¸Öjf›•ïwç;c"Ú¹Z™L£æœvL³2Dj:”¨R]е¶Ìæ’{Il[/6¤¥jI©¥8„8–Ððy.þÅö ul]‰êù’ÿ¯U¡Ð-kV›¢#3*vÞÌꬓ2(И$¸ê´I(Е­¤©N !oÝà¯íåp#¹$&š›MV•­*:¢Çëf8—™I6¥¹Â‚|ÐG®¦”–ÖªÕFž^J° _ôœW6î¥ÅÈÕÚ[•ª=šì„¦|˜ ©h\†™>$¥ÿ.Â̸­ÈÿÄ-ßÿ|j?ÝJðÒÕy{Âg|&aš€ëy<øÞ,›~ëE“QÈU;¦ê¥Ú Z™!˜Ò$O«‰ŽDãú µS{<>©—@¸@z_4el“pÕ(÷îí7>¦A§œÈ—n§MšÄ§ÉÖÛëT"Ô²Y¥f²3-4IúºjP/{Þ4,yfÝWåÑ!È–Ý™I™[¯Je¥¾ãpಧßZZl”¥šPƒ=µ0Ý­rRo+fÜ»è/.Eê¥Ä¬Q¤8Úš[‘'2‰ )M¬‰I3BÈÌŒµ.€ï@c·wöZâý'úµ¤ÜßÃ[û÷æ¹út¯{«k“Fåû(ïSö`ÞCèºðù–X Ì¿öQºþ“*ÿ5ÒmÀS^ª*‡C¬ÖÑK[U ‰É¢ÒÚKÓ¦v”áGŠÒÖÚVë›;(I¨ˆÔdZ—D‘1LÊHç¿·©n•›höfb·©VLæZ“v–ñª‹SgºêÂ#£¬µ«Œö©23õ@züàŸæ=¸wí‹;ûÞ{ )yó€î°WÑىɴÇ)ȵ•u=‘2ƒÈm5c£üžrIH9†öŽDÁ‘²dîÞÇ Ÿxÿ³înýůüÞð¾×\yÂjÝ)‘èYÿa?èVõB€óÈ‘/ X6*¤½ƒ•ò½g^.²³lÕI1OHA­&FD£a$‹€p]ï-¡Rmu[§-Ê Ä:% ÈŒ®$E@RUL2¤šl) 6Í%ªLˆË„—UÎ{Ëç<ßfØ9ªvÆXd m™dÕ:Ý~TB—%ù.ÎC„ÜxÄ´¶M ‹o¢f@07“Í,î_½5Z½pÆ÷k¯Öl™÷Ý6-³>E2DSb¤ˆŽ%ÆP§˜D¤ììêFdE®„íïpï¯kû½V[Ï”Kš¹¼ôãµê–B‚Ãví¯2¡ ¥Å™K&t’ÿY¶•ð<¿Ï-%·À½î¹s ¼ÞMÝ»&åI9𑯥dFî©ÓâSê1JTÅÓåÃt¡! ­âvÑÁíKƒÕT¿7Ä»°~}Þð­Û0%Óx•gF¡ÀšÌ;v¢ëϵY}ÖÈö :zÝ”4IГ¶µ)JÔ‚Ls oCaÏÝ_<^™z%ÅmoyÐ-«¯ @¤Çb‰FvF[ôó§KQŽ’FãŽ/Û¬ÏþÇ„ŽEÈõ»wÁ;›}ø{³[RéHð^ΦөզÎJÜ'§Jrjd<ìtûD¥¶›Bx´½@CNïI—+Úu¬ûåŠÞV¡Q´2ü ; èß[ø‰»ÇïK_ÔIQÓW—¼&wÂ6ÌyJÓݯœjÐÉÙRT‹{e"õ£õ~;«§±×δje)[(a‚VÊLÒr5hžš‘fåÙ“c‹ÿ?æK¢«6%§¾^z‘o`gSMšKª¢5BrÓPÙq”qq”º³MÏ….%hRHн`/ï¿»M:N©W² [p1ãà%å&£bI5“7Ò†£%–]SéYÅCl¥¨È‘¢Œ)3¶SÇòp­S1s0îL[¬]-N*B]n’³ƒ2xÕ4L¨¸Å$´JÍE©j@5[1.ð%¼“¶ƒ–P.·IªU(øÆuå¡wÍµŠ«-UvaÕÓm’eÎfl”'­W¶•)Í™çø}3]MHbçÝ™™mHbS7”If[å*BM¡\%%é©:²>,¿(ø}Q¥ªò÷„ÎøOc55ëÎ<šêñžE®ô÷2ó­ŒVëõ48äN7äu²¥!£'Ñ9²k$(Ó®œ ,¾‰¼„w.ÏÕŒwVaÄÇð\¬HuHŠAþs®zìê/ºJ#-4öÚú€5²¬³xá,¾^*ÝJ©“qõóà–“*SÏT^§ä—R«}m¾ê”á­’ú‰D£Ó`´è“÷«›qb»#tÛ)Ò¯›‚…yÍ:6DzÊynÝuºu³JCòaÆãì¸G5Ó%<²u*âÒ­¢Fžê«ÂÑÞ æ¡Ø¸¯+ã}Û«ÖYN‘BÉkqæ©÷dYÈlŽ–ä‰ÓÝJ$ÅpÍhã8Tz4³°$}âoÍöŸÈ9.úùÇÉuˆ8þÕ¥Wf@ƒI¨:3ß)¥,8“uÄ~m-¶¿Í ’­fáèü™sß5…ù*¯T«\tìiZ®*¯|ˆËŸBb|hÎM[ AÈJÒÑ­¹´—…df×îa‰m½ÊVÍ&Þ’«åù‘äZïR‰H'á”hïñÞ%ñŽ´•6¥¬º%¦¦Z7AË îxnÏ"³oT2Mr·> Åe.½–ò$\åW'dÊ–Ñ­‚×`­•Φ^Ø‘ÍØrëÈ—Æìú{p0íñáÖ™n­·ä×âé)mdµñŽ%§ "k¯o)óæPÊ»¸¹cV¨9ê %7µô~l_‘«Txç Šœn³mÃÒ™=\kT©JõH¸@I;žaïcÛÖÖÈ·>긮,p]*¸©è6‘5ª«8O¸Á¥$ËŽ)*R›I©(×BQ€ýoK€.ŒÁ^ؾé‡eæ¬)\UWjl©úsÆûdÌÚtô6F¾"SiI(ÐFe§CC0xKLËfÑ™ÈX÷T,;à¤Üwn!³+3Ž«z3M—×¹s£ñL6´¶~ÙjÓ„Ì’FýÿnåLã'w찼ݳãÆëÐj§'1"ŒäŠ}\Š ØÒ ”:¶aÈÆ¦Ì‹eDd­tÑ*ïn÷™i9[x|•ŸëvÅÀîz·h4ÙTëdŸj<„ÌÈÏÓšKè%©¦Yy´!å+mÓÚR’ž€ ?c=ö°m§IÂD,KyX–›«ƒdå+ŽUMŠ‹e<¥²ÜêTV6^}„(Ò\[ÉJ´N§Ñ0žñØ0ÖrnÏX-Ûr¡b†k4Š¥£t¼üJ}V•\i¤‰˜lp·7ç©Rè×¶ªÖê°ht˜"¨UêRZ‡;IbN«y÷ԆВü*2QÓW—¼&w„ï­Î§oj,Ü[„±Ý #Óâs#ß´V*4ÖŸKN Ÿ¥PêL(–ëfâMËA-iQ,f§«º÷:½“2“Ž÷¸Ç´i0l©1_²2•qé/ÁCmByÚ# lÆ\t›2)é#Il6ˆÄ[K~÷¨Þ‹uL?†$Ö¨VÞ>Ë“ó‰ ¯i‰N¨R«upÙv»U6´- ¼É¡n/ó«qÒL”•©°¯œÝ5ü/Šè×þb˹÷ [Ù 69LkBvÛ§?B¦FãœC j<†‘äÉR¢6‚&’ÓDççv›h6N{Óî¤r(÷ŽÄç)¶ÔÓrNï¡q‰BŒI%uÞ¤Fi#2ü@1–jÃY')àzF:˶MûW‰tÔåʤ[—6©-¸éµëˆSÊb$‡\&Ò¥¥&£NÉ’Fz™ (ÝW—¼&wÂÙ Ô®»ÌàY{ÁÙ6Õ³L¾ŸÇU«Bï¤ÞT ¢<ªJfuÜSqŸ[hQm9µÂfZ‘jFZÅÙÞɸªL£¼´¼ËC“OThVÓöµ&†˜òÖÖRŠDÎ(Ò„©í}¶½ FÜÞÚÈ›Ïãä$ÝiɲنºõˆÜ}¸µ©ôƒ’ºDÇÝãRI\EJ3-[V»)"4ð€’·„Àq3¥×87mCä wZnãÆ¹”ÛoÈ¥Ô[BšVÜw¿6û.¡F—V„¢Ó‡€¯†q¶uµ+JöhÞ yméPJ.ݧÛÐmúT=K‡+a…:󯨓³ªœÙ$™‘'ð·Šð[xέžêer®±Ë…ã2ìq“ŠLü›×pÙˆqÈøÅñ» HÔG0ï3Î<ɸ‹ä™™šâ¥LÈ6}å—LfÆ£»V§±1l¶µ,IB4‘Ÿ ‘‘ý8ÏÏ­Ïøÿô¸]PЃŒüúÜýË…Õ=8ÏÏ¥Ïܸ]PЃŒüúÜýË…Õ=8ÏÏ­Ïܸ]PЃŒüúÜýË…Õa¹™ÛãköÈQ³EÉQ“cPªèô÷i±‡Ü§G\”4µ%ÍRK6Ȍ˄ˆ_n-ª<ÓVénmŒ×Œ›a–Îä^¨m)ÿÈÎõ þLïT<¼·cØ»\p9nÆ>2+°'v¸-ØÇÆEvî×å·øÈ®ÀÚà·cØ»\–Ücã"»wk€rÝŒ|dW`Níp[±ŒŠì Ý®Ëv1ñ‘];µÀ9mÆ>2+°'v¸-¸ÇÆEvî×å·øÈ®ÀÚà¶ãØ»\–ìcã"»wk€rÛŒ|dW`Níp[±ŒŠì Ý®Ën1ñ‘];µÀ9nÆ>2+°'v¸-ØÇÆEvî×å·øÈ®ÀÚà·cØ»\–ìcã"»wk€rÛŒ|dW`NípÞßÁX³=W°¾>¨N™V¢×+¥¨ˆ$ü m¶¦$þr;ò#© q¢’jBÓ¯å!E©”ôÎÞ0™ß WoYÍ›w|j§xÙ)s0⨈rSõÊTu"¯KŒÚâ×S¦¤ÜVÂ׫Ì)ÄP§&É#5=Ô¹²3ŽñeMº®–]Ãø¦chÅ×YˆµT*L:ÏÊétÅ)•ºÛ›Mèûªm£B¶ÛSÆ“A†Ë÷…æÆ©ÄXÝʼnñ2E¦ÃŽJb¹Q\ƒ»²F¶ŸqÃn2+°'v¸-ØÇÆEvî×å·øÈ®ÀÚà¶ãØ»\–Ücã"»wk€rÛŒ|dW`Níp[qŒŠì Ý®Ëv1ñ‘];µÀ9mÆ>2+°'v¸-¸ÇÆEvî×å»øÈ®ÀÚà·cØ»\Cuf¬fí³_mnSä%Ö3¸LÛVŸýœsæð}©8¾ø’¶ّ{Vœizj•M|Èô= ¸Õ÷º°ôM›(ïSö`Þ?èºðù–X Ì¿öQºþ“*ÿ5ÒmÀ‰¹Á?Ì{pïÛw÷¼ö@kG³ì[ypøý¿úrZýӾ˴ýY¿1Ã?€…·û>æïÜZÿÍï íuÇœ&­Ò™þ…Ÿöþ5oT<£€];ëò‰»¹z…tµýD‘¥5y{Âg|6&ßômÿ²_è©ûŠRlkBƒt]—¥߇Lºo´@Eá[އª?%¶ãPÎF‡¢”Ón©­5ÙЌ̈´ ¬3‘ÿˆ[¿þøÔº•ᥪò÷„ÎøLÃ51ë´ôµ®#/ÕÒ«P KÍñü5¿¿~kŸ§H÷º¶¹4n_±’€.õ?eýä>‹¯™e€¡<Ëÿe¯é2¯ó] Üh›œüÇ·ý±g{Àod´yÛ>Å·—íû^Î@ _ºwÙcvŸ¢«7æ8`'ð¶òý_3~n 5ýžð¾ß\yÂjÝ.Á£ÍÜS{-Øû; ÙÕu-z쉫{°òkœ=îÆ÷u>”q×ç{±½ÝO¥ιÃÞìowSé@5Î÷c{º—Js‡½ØÞî§Ò€ç\áïv7»©ô ç{±½ÝO¥ƹÃÞìowSé@5Î÷c{ºŸJ®p÷»ÝÔúP s‡½ØÞî§Ò€ç\áïv7»©ô 8×8{Ýîê}(¹ÃÞìowSé@5Î÷c{ºŸJs‡½ØÞî¥Ò€kœ=îÆ÷u.”\áïv7»©ô 8×8{Ýîê}(¹ÃÞìowSé@5Î÷c{ºŸJ®p÷»ÝÔúP s‡½ØÞî§Ò€¡ÛÙž@<—»ç…È·“Âvø£¤*Y¹µÄIÓk®‹OäQÓW—¼&wÃhÿFßû%þšŸ°cùt¯ àÑ@:dž3ºÔªféFÓÁzîÞÙ²F¿É×M=Q¥ªò÷„Õ¾>¹ÃÞìowSéFjq®p÷»ÝÔúP s‡½ØÞî§Ò€kœ=îÆ÷u>”\áïv7»©ô ç{±½ÝO¥×8{Ýîê}(¹ÃÞìowSé@5Î÷c{ºŸJ®p÷»ÝÔúP s‡½ØÞî§Ò€ç\áïv7»©ô 8×8{Ýîê}(¹ÃÞìowSé@5Î÷c{ºŸJ¡ºU›<¯ñ­ØæßÉò8͕ԵӋVºjÏ›Çä¾øë®,¤ømZë‚k^/o¯_ÚÙÚáÓ^†£^÷V‰£s`% ]ê~ËûÈ}^2ËBy—þÊ7_Òe_æº@ ¸Ñ78'ùnûbÎþ÷€ÞÈ hó¶}‹o/Ûöÿéèk÷Nû,nÓôUfüÇ þÞ?ìû›¿qkÿ7¼/µ×pš·JdcúØOúÕ½PòŽ to­üDÝã÷¥¯ê$(é«ËÞ;á±Fÿ£oý’ÿ@ÍOØg#ÿ·ýñ¨ÿu+ÃJ7Uåï ð™†jc·wöZâý'úµ¤ÜßÃ[û÷æ¹út¯{«k“Fåû(ïSö_ÞCèºðù–X Ì¿öQºþ“*ÿ5ÒmÀ‰¹Á?Ì{pïÛw÷¼ö@kG³ì[xþ:ý¿úrZýӾ˴ýY¿1Ã?€Á²mªíõŽo»)—Ê+—u¡FL£N××ÑÖÁ¸IÔµ4íêE¯Dv™²b\˜¶,kr鵹ƤWªOS.ZQÓÖéõ™EÖ3$Ùp$ÏæÉiêmò3Ñtãô›&ö?à‡9GŒp¾]0f£óÏè²o<ç(ñŽë¦ Ô~yýMç‚å1ÂøutÁšÏ?¢É¼ðCœ£Æ8_®˜3QùçôY7žs”xÇ áÕÓj?<þ‹&óÁrá|:º`ÍGçŸÑdÞx!ÎQã/‡WL¨üóú,›Ï9Ês”xÇ áÕÓj?<þ‹&óÁrá|:º`ÍGçŸÑdÞx!ÎQã/‡WL¨üóú,›Ï9Êo¹Ç, ñ+z%Uñåô·©w…÷dR¬ºÛ÷#1éu‹Èé(f‹&ƒÑ PÜ„dûN>o:Mº£ZœgJ 7I¹¥«lnÏŠèU«Rê²*0!ÎK¶­íSEb» ¨Êq¤K˜ÜH)^­©*m=nÙ¶Ù¡³N¨0·¦¾ë\ùWh2$I§!§‹MuIcèÎiø½²ù@|©oŒ³ëûÙN£R­ Ô;²è¿j6UŒ«©Ÿ—êÔ„“Ï]Ñ$uªzÖ=R K8ïq‰Õ¢ëµj—c<ç0çÓ¹½q}>«©Lª@©Ù±êTÚääTê‘ä5J‡Z9´¥2d!DiuÔ‘‹#QjbÛ¨}–·jú+³~d†~ïSö`ÞCèºðù–X Ì¿öQºþ“*ÿ5ÒmÀ‰¹Á?Ì{pïÛw÷¼ö@kG¯ì[y~ß·õìôµû§}–7iú*³~c†ëȉ_r¢µ$⺙Ô%|[¨Ô’â6ˆöTZž†\ =€%Þ7výø¨;ùÞ;ÐîÛ©—Lið©íÛu™µ:*N¶ôj4Ä=¡>#¤´›nLˆÓ¡¤õ> ìYºyîÚp–¼mnIN†\KÙ„žWÚUP®åîxgÏiæ–Ôì›O¿ óÚy¥µ;&ÓïȆ|öžimNÉ´ûòáŸ=§š[S²m>ü€í0VöûðÛûÝc-Û·ª´mŠ?)”éU$E†Ü'&LjÜJ‹‘¤1&•>DrÛ‘HZ%+dµ"N©Q†ê@ksœ[}+ït .e–„ó/ý”n¿¤Ê¿Ít€p¢npOóÜ;öÅýï½ÑçlûÞ_·íý;9-~éßeÚ~Š¬ß˜á€ŸÀG™OXùžÇ­ã̇Dj»mWZØ}…ûWXu:ñRc;¡›O4g´…§„ð‘™|ÉÞ{šä+|Û/ušFUnLÚ•"[%Êì÷àZsÛ©K›Ø­¸JijesTäDRñº¥p!óPèúFÀ¸nç©ØóÓ:Ú }¬VÙTê¤Õ$‰ÉsI'mjÓB""JD„$ˆ‡ÒÒ©SiÕštúE^j­&«ØuJ\Æüy1ßA¶ë/4á) BУJ’¢22=€Ì/8&ä´¼ÙRqýËO2ÝyLY¶…Z¯šESVÉÖ”äç›Jà£F’ÜQ 4¢JÒ{½Ñ»MÎw9¶÷a¶æV*ó½3mèß‘r#»n¨ÔêÉ÷ SÖñ©Œ—H”µ¨‰É:é$’ÓLð]0.õ?f ãþ‹¯™e€¡<Ëÿe¯é2¯ó] Üay!Ù˜¢Ë¯ä<…^fÙ³m†"¹[}8†PãˆeM²‡Z–ã‰BR„š”£"I˜ Ÿ…·ýÁÙ—#ÜxÆ%^5 ¾ÍÝRµñÒÕ5©Í]-SSîT"**T–q54ošRî©KK[›H@P®pOóÜ;öÅýï½>Kº«vEƒvݶݙ?"\ kÒèÖ=-dܺœ”æ£6³Jöv”eª‰ 2N¦”,ôI… Ü/x|ÿšò&õ¾|n—I¬bªÍ :ÄrD~OÊN†™L©ÕI$®5ZÞsÛml+`Ȉ<|íŸbÛËöý¿úrZýӾ˴ýY¿1Ã?€Õnñ;Òï7gï)…, ~Äká;‡.[vD»Ú¨QeÔ®äMv7ʇݳ -ÊÙ'P³ZS²òTN²¿ù·/Z˜Þ™fôyMÐlÚzå®3ÓK’£&¢Ãg€ËŒ’úÐÒ ý©µQ’H̃âÖòΙõ͵=àªÅÃÉS®FîˆUX浦¸®¡Ø-ÅL…Ä·SÞ¼î³òµ‰RžÏX^´6”“ù2»)Lè»$ãªJ J'YÛVÚ˜q¥¨’jЂŀÖ6wÍ»Êå åk›©n›uۘʻŒífnÜ‹.He,Þ~JXëjTT; Ê[Ss㺵›;f{[*I6hx' Å·‹¸÷—Á¥vÞÔ¦©õ¡pO´/–¢µÄÆv£OCñ̶n8i%±)­²×Bsod‰ 2 îòÞbÄ8½úÖƉ¿îÙ%1É•YΡªM½N§ÂztºœòS„–Ø4¶Ù-;k2"R•²Ó¡ÓnS™®\£º&9Ì™zå†õvt:ô»¾êˆ´Ø©b•W¨E뇉¤³”·2Mj"JKCQéÂæ }íç'ïQžn+é‡fÆ¢—ÈXÎ’ñMŠ{kWßá§AÙˆzŸ³ñÿEׇ̲ÀPžeÿ²×ô™Wù®n"lé`ÜGß­pSmzõÍ1©õªÅ%~f—›qmɦÎCŒ<‡…4{iVÆÖÙ$Ô’  Ü“›«+à|ëUÈ× n-•d\u:MÉ´Ú=Qw]¶ëµ|%!ùOÑ^S‰B–Z“¦ÛŠki$•“¡s‚˜öáß¶,ïïx ì€Å¯{ÖØÇ6Å}Þ•DÑ-KR µ*ýYM:ù1„í-|SqÕ™A(I¨úF`4‹¹nÃ×~òÛïZ0òmB7z¡ ÃuÊ4iÑ*˜oåé/KˆûÐÔˆo0Ô„8ŽºJ=¶„IQ‘¤~ßVîÞw㬅ºÖð•)¹^ݼ'A¯á¬Æïµ\¦iÓ™vCn)Dµ(É¥hìu¬ÜŽé£enGq¥¯¢|ÝÖþÞW{º^Äø‚¿\ÁY–Õ¿“r5=If§UªÓéQ£Jb3éÚ-£4(˜i*ÙB®$j¥2ÂC|ãõ¤H±8÷¥u«(k®d+m×6IÛqZªVš™éÑÀ )s…ï'„YÎ[®Û._HMf:+ÓJRQÒé­»c’8ÔÅ6¤l4Zš[‹Ôô$™êDû*Y8«~íØª”‹~ºÕZÐÈ:Á½J+ͪN«LI©bKl¾ž*Cf‡Pd…)³q½H•¨Žk‡Þ–¾@«bʽ½-9\rÛ—lFO]É]Q¹­˜(æá>¥»í[6D½HÐj# aû‘nÕu¬lcùÛ·YGpd™í¨Ô—ks[liÆ8“DV›n2M)Y7Æì¥N(¹¦û&Z;¦ó“fܕꫲ±¶kÇT§,k¯¬'ÔZ•.˜Ý"± 4èòV—¨o©d¤–Êx³Vœc{Aên™é˜?ØŒ¯nÖè5½÷råÓrâf£CK¬7æiZvqºËo¼¢âT–ÖJB’éì´d°†BßÏwL‰ºvV¾š¸*¶­ç+ŸÛh­Ò¤õÄÚùÑTóM¡¸ ™°Ó­ÈB’ㆂ-t^¸a<ÙWþË R7o•Unã¸è4+†T±Ü:9"—pVjz åm4â^$ˆÍ‡T¤íh{*óá½nï5íØ3}ߊkôºlJ¡e×]B’U:³R¡I%m¥K"J™{`¶ûn¡&d@oïšWuTâ\Jæu»)æÖAÌÐÛ]  Z¦hz"I;i\õ¤¤¯Û©&ÙGàBÒ²0Û¨zŸ³òEׇ̲ÀPžeÿ²×ô™Wù®n"”ëõ ƒÙé©Té0îzIJªK¤Íz …³“>BZ'ØR\IÈmG²e®Î‡ÀfG¥Ù³ÃÞWƒžFèÞ9ßÞVÖ{d58A—‰ÈÕÇ;ûÊÚÏl†§2ñ9¢øçy[YíÔá^(®ïÜ·_·½™‘ï÷=Á{ã×c?gÜS.Z³’ ¹W^ÇSj9?ü7ý¹kêþ!Ìü ËÅ*r5EñÎþò¶³Û#ºœ ËÄäj‹ãýåmg¶CS„xœQ|s¿¼­¬öÈjpƒ/‘ª/Žw÷•µžÙ Neâr5EñÎþò¶³Û!©Â ¼^'ð½)‡£J»/™Q¤¡MIŒõÕWq·YT…¡RM*Jˆô22ÐÃS„x±úvìØÆ-¹ôb®Ñª ’’Ìø‰‘_A,¶TIu—²##Ðô> Neâë2êŸ+Ûªµ2;—Eé@ë†æ3O«\u9IbS$¤·!ƒqõN%+RvÐd{*RLöT¢>M| ËÅÙYû´cœ}mÒí ¡vÚvÅ E6‡J¹j‘c5Æ-N¸¢CRF¥­jZ”|*Q™™™Žêpƒ/MÈÕÇ;ûÊÚÏl†§2ñ9¢øçy[YíÔá^.ª¹Œ(T*5N²åÛÉE23’U7}a&¾-&­NO¿„58A—‹Ý&VrŽ.v±\uÉi•š52YºòÚ)Ä4n8®¨II¨øOMO„ûLALÛ mŸ7œÞÒÇÞëw«vÝ;a ƒ‘kRk§UêWt§A6kêÕõÁhÑ-&-¥†²ÙJ3Sm€4oΩ¼oÇ™7c¼grÌBN£Üòíú;ãÏ:£YŒF'gÃ6ÖfRÑGK†{MíRjlÌ6g¹öFºòÞí¸³"ß¸× Ùt@•"¹T‡ÊcFós¤³Ä”WÙ¤Ø&É¥))ØqI7ª“e@tE×kY)×EérÒ­ f™Å|¥qVæ1OƒŽu 5ÇI’¶ÛFÛŽ% ÚQj¥K„È|•%iJТRTDiQ¤d}#Tª7eÉ‘n[:…u©Ø·è•E>ÌòÞ~EZUU—¥IÛI!§ ÒIIªV¦|ZDSÛ7¦m¶Ç½ànFóÅ;¸´®¢¨»ŸÑdÞÄê¸Fmvkµ*Ýß±Q})KÓçZ”­(-”’œr*”dEÀZ˜f¢îE“{%‹aßcG… ,ɇ#if,F(T–Úi´%BÁR’-ˆ¸5sú,›Õ¶¿¸¥£rïnï7V¼¤IÉ–ì6ÙmåQ銉&lfÖÄ:œ˜êhйQšZPÒôö¼S*-ÙòÚnæY7¬Ï¹ÏîâÒºˆîj.çôY7žäo›JZÔ£=533>‰†j.çôY7¼ñÝëN' Ÿ”Ý‚O¥HkhË jØ`µÐ3Qw?¢É½]3þâ¶žó; ­–oyõ¹¸þq¿æiТ*T'‡§JTt¶§uM¤ú$´{n-HÛV¼¶›¹–Më.V^DIQ˜&¡ -„ÑiDDEÐ".'ÔÍEÜþ‹&÷>äoOÜ ð¹ª*¥]8z¿æÎ”ˆ´ª‹ ÑÕ=Êón:$¡N>IDw8¥ŸDõ-rSis9Á°lzÖA¤B¤^u¦±Þ3•çV`Ò[ëYô “Ù1ºÉ/ÉióyMÕYR‰æ›B4smÄñjbhÇ7ŽÅøúò­YQ.[>ìƒI¼­ª%×M!È®>ÂdÄyqÜãÛCí¥Ó-¤)EÂ{*ROS t†ùài9bUEš§N¿SŒé–,e*Ê*$ÝŽq×q¡¨q•M¥.TŽs‘V³'T³hš4µ°ÓŽ$/·7¥?-Ó0µÕ8À¾!ä´ßÕ“¸ä^õ¨õã¼D29TWRÒ*k†GÅKu³p[n© IX«oøë”ÿsìïÓ®1¤ôGœû'ý Í@ ƒ¿GÙ» À?ýCƒ^ÏT"½ÊÛ¼Ì<µ;s,Æ…{IÈ/PUE™fÔNjºÚaªë®4ãgLA«i’Y¶·]Jd¬–­üÏ´Œ«dŠÙM¿U,‰ËÅõ¥ÔÉÛ­‘p­©qQ-¨š©&sR–“7IdÒRšØu·àïSö_ÞCèºðù–X Ì¿öQºþ“*ÿ5ÒmÀ9}ðŸíj·Ì•¥ªò÷„Õ¾6ðLc55Ó½Õ¡jß{Òî%jÞÖå6í¶ª•KôªT ¼fæCMPÙu¾5—R¤+ehJ‹Rè‘ ;'bë;tÍä7eÈx2ŽÎ> f{Å8Ó*XX£TÛ©0ã&ŸÓÑœmJÚBK^õU´Æ[ÏYIÌÎX RìÏ ¨Vã7N@½oéRš£Ó#LyLÁ„Ìx&—ß“ Ð¥þQ%á=Lô ém=çòMß»Îw¼`Ø´Vs¶ïó+4kªËjKÓ(³*F‘-NÁ}Û«fTUm4Fd¢Wµ3=50ínýëež3Ý‚ëÆ”Z}~èÞj¿oS(iËw‰‰|s—VçiYõ‹HQ+‡Zk¯@jwU·îMXöÞùyxPë§“ø•|½Äx¢ü™ÆþO[kùÍ4×kÕÐ WÏÛÉ䌓–-½Ù¬«h`Ê¢m뮵{ÏEv¼Û)~]:”P‹‹cˆJÉäƒ4íè’`$\á¼ ç)jÕµlºc™Ç:IëzÖ¸*U"Œ¸ŠmZMJdb58Ԟɓ<.(Ë`¡ƒ3ÆG­e»ËfÚU¦ÎC·­Ø—½sØòd½E«Ñ$ÉT7ML5>ÃÑßI!IRk]KBÐÔʯÿ´Õ?áþ­@5q»:Rži©é$‘'“<‡íH¸?¦¬€âÈÜÇdÊñ…vŸ¨ö^R{Ñë´<¥oGM.µºŠ[RZœ¹‘x·Q¾[Nm™íj}ÐÈ-¾åÙf·›·aÄYæqOÜ•zAŸ&(ˆŽLÊsîAzI‘p¼¦8ÃÓÕP Ï b.¯Ù’Ü05´e÷óm¾Õ9Êz.?•¤:;³¬‹Öý(ã“Z#§u¹Éãµã cã6ÿ;¶4îÛšmM¡³yVÏ=|ç—&l:ÉiÆ>ü\pâÕ¡ªS&g¡ƒ5=…Ñ9î\7Ôâ(ëT¨É…$ÔÆ93r2v¶X^­{dÚ´IðpŸ €öڇώËm²ÌªsL´’CM!ñ)JRZRDÞ„D]ûë~|¿@õ±çSë~|¿@õ±çSë~|¿@õ±çSë~|¿@õ±çSë~|¿@õ±çSë~|¿@õ±çSë~|¿@õ±çSë~|¿@õ±çSë~|¿@õ±çSë~|¿@õ±çSë~|¿@õ±çSë~|¿@õ±çSÔ×-žzûš—*‡rD¡\4YÄ‚G©EÇâ¼M­.#ŒeæV…l­$¢Ô¸ ˆú$¶(üùeÀS`@¶qçSs÷Fö(»3Io|ìW²É–¡ÐÕ¨¤$ñÕ¾/oä$¥xî;òÿ9ø}®È¹é9öO‹c"ŒsFQ£aLSejûJ“L±¨ò*nBB‰ ’ëiшèQðžuIlŒú ’ÌÇÛùd2™ÞÞb—cÞ÷D6kÔL$»^‹ZYH'˜¦N”fs”£mDN:•ЭI;Zjäe|åŽpE­K¹rÕÆÍª²§Siñ‘:]B âu8ð!ÇmÉ«]%­zXcxœMŸ#W\Æ×“ê³èt[•r©•ZsŽ‘›E& ÖÙy²Iì«gdô=R0]ë¿–ì Ná¢Wï÷Õ[´kh·UŸH©N“Mvœm¦T‰MÇŒ³n3jq)ãÚ(õ$*Ð;íã7—¶ðöîu¬ãnT"Ü-Ôèýq%7]BŸQ.#’iüqÂ-¤0é#U8¥!$]¤Ì€d»ï ggüuð¢Kuip`•ì‰éô¸ÑjCnL„0ªƒMq¬ Ôz8…-:Ú0§¾Þî­åH²h¼‡eܳݥZ7 šMF- ³=•V~:"HshŒ’HpöÏG  ž^[° e:VYT,‡]¡½qPèÏÆ} ̓ÃiåG”¦É‡lÒf¦Ò½²O¶4ìð€Šo ë1…'el±mÖ]®Rq¤ú¸íAª]FLW«ðÈšK ñ í>ÉHZ·šÕ²öÞ܉&d~èûÐ[ûÌãz5i•-›êF¦JÈTÆiuø³§6³SpŸšÞÃí’š^†Ó®hZj®Ô-x w¿y<{³äRŽ¢KçN‘Ä©]Wæš;]Pš÷5±bZ\òR,ËeÛG(Ú±­w)Ì 9Ç´Ôh‹°\ZLÕHYêEÑÕF‡„f§qDÆó6Õ.%Ü¿ì{~‹”˜4zm:Ή’ZÍÅl³DJª”j= ¢f`;_yí|ìZ½iw˜ÀÞ{_;¯cZ]æð7ž×ÎÅ«ØÖ—y€< çµó±jö5¥Þ`yí|ìZ½iw˜ÀÞ{_;¯cZ]æð7ž×ÎÅ«ØÖ—y€< çµó±jö5¥Þ`yí|ìZ½iw˜ÀÞ{_;¯cZ]æð7ž×ÎÅ«ØÖ—y€< çµó±jö5¥Þ`yí|ìZ½iw˜ÀÞ{_;¯cZ]æð7ž×ÎÅ«ØÖ—y€< çµó±jö5¥Þ`yí|ìZ½iw˜Auâny›Ú×¹,ËŸ%ZµKjî¥Ì¢Ü4Þ.×g® Ïaq䳯³ImÄm¶â“´…%E®¤d| /ç7Þí~êø“ûò©N¨ÝuÛŠmÍUJRÝåÇ‹Rû‰lÝRQ*Z‰$’R)5%$µá__Äü'ûZ­ó%@iFê¼½á5o¼Í@ ½Ô,FÍ›¥e»?ÜÙ^‹ª{·M"Öi‡f4š­)˜qe÷ZF†³3áWA'êé¨tð-ÜÙ½&oÄ9 #by¸7 à‰òn;~ܸ&E‘_¸.'Yâ"¼ìh‹uXˆJ5Ò¶”­K„•í9ÞG Sh;ÏUó}÷»4íç±VA´é´yðh0Z«VmÚÕ%Å!"žë­ŒIaDJRÚ©<:pm¿ÝzÛ³éøö¶»_w'÷q¢×êï¯ÀŠ£Pgˆe´Î™+&ájßâDHÔø €RÍÔ7zË6¦ðåo_ö¼º~ÝM»º&ïõé)>&§á•KmÖMFd®µƒ¶Ñéù&¢.€ H«"ï=ÿÛÈ…nNð°J¨uñø/•â)=gÆký/íötüžE¿\Ì»¦e=â-è»^Y¦×Í7¼¼ƒŒ.[<£»3jì4‰Tú»¯8ޱKN²Z:²Qlê¢#.ÌÆí™Šµ…ceçqCÓ\Ë8&3íKrLJý=–¦|œ§M¤Jv–’¶ÓÀni©Í·P ãÝ7=ÃŽ·4­îá¦áxerÒáѧÔ×’·a5 ·ß‹I¶•šÕ¢LÈ‹Nz¦ÚÞ§Ti&·ŒêAtMJA‘ý&^;¾âü‡BæÚ“‹+v…F‘‘_°ojcvt¶É©½wPz¨qY4(ô%:O Ó©ÿÚ µ•·¨•»••»®<ÝVî´ï¨v=>˨d»ÚL e–mÀD)5vCûJShJ Zìê“ÐÒa°¬‰éx3ãÜMG‘×±,Š;÷j;ƒ•'…ÉRM%ùŸçš3BŸDFÏÕÕ)-ŸSB›vSœâsdRa¿6­˜/ ]VbÙB‘ ªdu"3«2ÕM¤ßpÉ'ÁªÕøLd”‰<ÏÒÒŽ1÷¹¯$ˆµR¶‰…§áÑ)/X×pÖŠùæò¸àã ì[Žâo5 Ñ¥7&B]¾¦ ™R”‡V‚Q%'¢µU¬Ü{PÌÛ¼àJ]c} yLÅñ\³¦ÚÖÔ;ZO¨A©ÒÜŽqi¬ÊU\œL´IE~G‰äÖ$Ie{ ÉA¡„%ZÝÙÐý¡‘„ƒ€«6ø câêK´je×(•[eÝU:v$) Õ–Z%Fú¥šÜQšH×¶KЉD:ÜFè¶ë»©`juà§Õª4[ŽÅbYM<üGѲh}¤(ÔÙ’ÚZ}± L½@üAߣìÝ?àþ¡Á¯gª^äÉÿƒ˜ãöoô –Ím‹ÎϽ¢Ïf]t{º *{Ôº¤Ê,èóÚ:9$ÞŠòã­Ä¡æÉiÚBŒ”KRá’€‡/¯â~ý­Vù’ 4£u^^ðš·ÆÞ Œf !?±WìÉ?î Íñü­~õÖ?KtkÞë”ÑÓ Þ2P^¼âø2”°}á{Ü·]ÄÅ'Y÷%r“`Ó¥”jMF³Ö„pgTI5

Éÿ_ÄÈ3Pwu½Üß¾Ï&½…,÷/£{®Upª•Ü9:ëמ,Þׇ4íëõ¨ !cL–-¹†I´)w­µ)iuÊEV:$6—Q®Ã­íÓkN§¢Ðd¢õ ƒb¼sˆ-Öíøµì *ÊvæzÒ¶)Öë—UêåÔpYK%>¥!)KÒŸJxã„’Ú=8}Pþ;¸›J¹¦ã<{C±å^2S.æzŽ[­šÍd‚"$ ÜY¥)Ñ%´z €“ÀTú>ÍÙþÿêöz¡î{1ñCY¿u+_K¼® “tÑ)ìW«ËíÆ¨»OK‰\¨iyÆÝ$¢Ki6œö¦F…TJA©*Éj¿Í%3æJlzÞ ?4ÜQ¡1´¥ì4Õ.Ž„'iFj=DZ™êj  <±*·þÃÛô¦+U4Õê„Ô zѵ$èµ £7vÓBõ6EѺ¯/xM[ãoIá_ókGòƒþLB²ÿ›Z?”ò`8ð‹0yµ£ùAÿ&Ÿ²ÿ›Z?”ò`eÿ6´(?äÀ<"ÌmhþPÉ€xE—üÚÑü ÿ“ð‹/ùµ£ùAÿ&á`ókGòƒþLÂ,¿æÖåü˜<"ÌmhþPÉ€çÂ,ÁæÖåü˜„YƒÍ­Êù0³›Z?”ò`f6´(?äÀb—ÍÁ–×fÜé{QÛiTÙã…_×BØ=ON´-}p‡7¡¸¬-VS¨&ÝUÑV7[#Ú$¨å;©ðk¡ú£^÷\¦Ž˜_!’€ÎzÍöÆïXùì—yAŸ6ÚƒS§Óꪦ¡?ä&9HâÖ´m¥³Q’“Ú2è˜ *Ù¹­ûÊߤ]V­^-~ܯÅne³ Âu‰ :Z¥hQÖ]>áS·Ú·3½áŠ+Ö¦+ªâê‡qÛµÚv`¸rDºŒSéïÇB[•T=XdšG§W ”’üÙèiÛên+7)9‡©;ÖóÄWõ“dR(–¶2¹qEB}I/F£Ã(¯•]ùz7×`ö[B Œ×´„ûR$(¯“ÎÙÀÕP’^Ú?(|´RLõëë‹‹âºÜËþöºþ!¤ôGœû'ý3­3‡¾XÞâ§Ó Ôiœ=òÆ÷>˜Láï–7¸©ôÀg|±½ÅO¦Ó8{åî*}0™Ãß,oqSé€s¦p÷ËÜTú`iœ=òÆ÷>˜:g|±½ÅO¦Ó8{åî*}04Îùc{ŠŸL¦p÷ËÜTú` 3‡¾XÞâ§Óiœ=òÆ÷>˜:g|±½ÅO¦T÷Ñ,±õ|¾~]]¢tÞ²{®J g“ûÖË|;Ö?$á<…® š±r\5[¥VŸ\‹qMn4bŒI’Äf™ŒH‡´’u½µ$ÉhZФ˜ ¶€®VÎóØÞõÞçÝÊÑ’»‚æ±í¹UÛνHU: ¨³bB](œ#3rKg(”öϵhË‹RÒq …__Äü'ûZ­ó%@iFê¼½á5o¼Í@ C b.¯Ù’Ü0ÿ›ãø5Zýë¬~–è×½×)£¦¼d ¤7¼çÌxoxX{½a "ÆL¹ŽÅEm8ÍB¥:s²\µ" a¥ÓK 4¥­Fj3ÑG²”£iA z@¹È~âo#nÿd%}o‘¿ŽL´«¶%ûÍã2ç´nXǵE™f^Û­™’’¤©*JÛqµ-·¤­µ’V…%i# ®»“ïg¼Fïw ã‹èféË4¸Ë¨¿3%X£Î†æÃî·ÅBôsBÿ7% ¡«‡e+èôSä·ÅÏ;ÑÕxÌ›t©‹j#é~“ލää:'[J—Öµ:é‹Ñ×Öã„JRR¢Gµ.÷ çü½»ÍÐWn"½§ZU'vSS†Ñ¥ê}A´¥Ä%¹Ð^%±!)'W±Æ Í =¶Í+"QÔáÀß[Ê»~ä¼Ç™Õ£ “Bd"ŸZa¹× ©MD¤‰ŽêÜ[i.1Ò%6­QêIÒz#Î}“þ›¨Mwö‘&.ìyDJ{µGÛ‚é"*B½¦–“2S†Iö¤f£õt.3àv¦Ê¡5î|³g}é³–lM³/Úëô[2Ï&¢R1}=.Â¥Âv" ·ã­Juù¢Qšä)kB”´£a°Y©ã ³’p½×÷Å—NȹâPUk»û)qyL¨”Ô–¶Ðkeä-µh[I0–½ùÆ7Á¹wO\‘†åã¥]²•BsxêiH‹k$…þJŠãzÅò}§]%õ ”—ºÜ›tˆã„-ºuÞOXëªaMÇê¹®å:u ®šÃSr¦Û­¾!‰p™âË. ÒhlôÛIšÌÔ\o½ üâpjÿ’—oRôƒóˆ}Á«ÿÿÚ—oRôƒó‡ýÁ«þJ]½HÒÎ!÷¯ëû©võ H?8«¸5Áä­ÛÔ€= üâpjÿ’—oRôƒó‡ýÁ®%nÞ¤éçûƒWü”»z¤œ?î _×÷Ríê@<2yÃùÂ"0ü¹[†×"Ōړ%ë^ëCm¶‚5)kRš"I$‹S3èØNãÔOÞï OÉ{F=›X¡\²íŠ¥>•ÉŒûÑbC™× ñˆJÛJ“5)ØQ¨ÈÒ~ØõrÀ@y^ŠÕ~þÃקϦ¡Ú½QG.›%q$Í z%ÖôQú¢èÝW—¼&­ñ·ƒ%äŽã¥ëÝù}0…‘Ó¼t½{¿/¦äŽã¥ëÝù}0$tï/^ïËé€9#§xéz÷~_LÉ;ÇK×»òú`HéÞ:^½ß—ÓrGNñÒõîü¾˜’:wŽ—¯wåôÀ‘Ó¼t½{¿/¦äŽã¥ëÝù}0$tï/^ïËé€9#§xéz÷~_LÉ;ÇK×»òú`HéÞ:^½ß—ÓÅ/¬QNf͹ÝðÆósb› ö^”i=}3áóz6MaZ³D¥,šº*È%¬ö”{2-TgÑ3õLkÞë”ѺÈd ¯?ó´Ä¿º’ºu½[·±§fÚæ¸mÍß$=OÉW4¨˜U˜ïµÈ¥IB'ÊL—LˆûœoWQ®Ó_œ$™Oº~ê&êÖ-úQY¼«(iëêùu²LŠŒ”m‘êmFhÌɦˆø8T­¥©J0w§æðÀ›Ï·P¯K¦ru”ä‘©¬•@e vC¤‡•!j†f§ii5(ö2BP—Ђ4˜D®sRa ük«'¸Ær¿Y>2U¡%»~žjhÐdÍ-ž™+I­Z;$Ô\[m4âv€\5ÙÅã²9ÜtÓ¨œ >Ñ(†Rg`œqmBâ5×dº#Iè9öOúg<‰cÕÙó»`f£‘,câÚ»>wlr%Œ|[WgÎí€D±‹jìùݰÈ–1ñm]Ÿ;¶9Æ>-«³çvÀyÆ>-«³çvÀ9Æ>-«³çvÀ"XÇŵv|îØäKø¶®ÏÛ‰cÕÙó»`‘,câÚ»>wlr%Œ|[_gÏí€D±‹kìùý°È–1ñm]Ÿ;¶U=ô±MƒCÝòù©RèJ647–ÃÇ2[›&L¸d{.<¤ŸCÕ!§gª^çWtnK‚÷®Áö»ö‚tœ€‹n+¬£FÙb²Ï†ÒÒ$,ÈÑ1¤!¤¶–ä%{5&Ò•´3R=Ý·š[az™Üù. yòèŒúÕGj³Nn+F”¥ªA¿-2/oªŸumð¤ÒÒV‚Y†ÍnûBÙ¿­šÝ›yQ"ÜV½ÅpëTiˆÛeöWê@Òi2%%I2RTD¤™(ˆÀP Ó·YÊ»«gœ•mPî9UýÖ.ʵ›e™Rc©ÈW]Åi–Ž¥©y1 ä­æPM¼„µÆ{t! ‘Àò§ðÃ#þëÖ?Bx¯y•>Ë÷Ò­Wæ: ¿­Yêþµ±}ÁН«Ö¦Š=·DªTÎlç:Nѧ¡´ýå¬É%ÃÑ2vâÛb.÷„Õ6X†}$[¶~»•ë1ÕGtjs<’-Û?]Êõ˜ê¡£QžIퟮåzÌuPѨϤ‹vÏ×r½f:¨hÔgƒÒE»gë¹^³T4j3Áé"ݳõܯYŽª5àô‘nÙúîW¬ÇU Œðñ»ÎO»C'®ÊB D’Q“'®.G'µT;žOIí¿®åzÌuQݜϤ‹vÏ×r½f:¨hÔgƒÒE»gë¹^³T4j3Áé"ݳõܯYŽª5àô‘nÙúîW¬ÇU ŒðzH·lýw+Öcª†Fx=$[¶~»•ë1ÕCF£<1û«œCwZ͵\¥C¬ÉTº„'£ÇJ¸„‘­i2-Oà ®3Ã/æøiÎD%ÌR ,T®*œ¸j?ûl»%Å¡eøHÈø s½×.ÑÓ Ø3PHWŸùÚb_ÝI?Ý:È Þ€­U þÎÇ™“'Uo:üZ)œÜg$«Cue:ãÔ’ÔÕ¦¼:ÖÉš#Î}‘oþ¿ŽÏëM¼áÀ÷.t‚2MÊÍÖ›yÃî\é$ÜfƒëM¼áÀ÷.t’n3Aõ¦ÀÞpà{—:@É7 úÓ`o8p=Ë d›ŒÐ}i°7œ8åÎ2MÆh>´ØÎrçH&ã4Z| ©(5>hçJ$ÍÖ›yÃî\é$ÜfƒëM¼áÀ÷.t’n3Aõ¦ÀÞpà{—:@É7 úÓ`o8p=Ë d›ŒÐ}i°7œ8åÎ2MÆh>´ØÎrçH&ã4Zl ç¹s¤ “qš‹| ù‰o< {Ð-›Æ-Z¯. Ž·„Ê\ÚVŒ9¯E$D4íS1T"¹‹!Máìt…¤Ð´Q#’’}2!‹D°ÊŸÃ û¯Xý à½æTû,_ßJµ_˜è`6ü¹­+rñ§;I¹©,V)ïË‘¤'i&_Èú«nýæÂð_ÎõVÝûÍ…࿜ê­»÷› 7Á8Õ[wï6o‚þpª¶ïÞl(ßüà8=Õ÷~"3ë­ÁH†æÄ§ä:ãIq¥TKŒZmŒ!M§M¶µ>gªù2Ãè‡n=¹æX±-L“cÁ“Uµ/:k5J4´ÉJ–M¼TËăQ!æW«n ÏT8•!Z)&Cº•_&X¹šú77gýA3áÏØ J¯“,\z77gýA3áÏØ J¯“,\z77gýA3áÏØ J¯“,\z77gýA3áÏØ J¯“,\z77gýA3áÏØ J¯“,\z77gýA3áÏØ J¯“,\ì)|Ý›¶R§GžÕ´óîFY-¶ßpœAšORÕ*#Ôs=WÉ–.]ÊU2 •Od˜…¤³”ô„–„D%׾ʟà û¯Xý à½æTû,_ßJµ_˜è`6ü…¤e©§RÓRè—òÑÔ.jÌ=®ó=ànÖd·n•mÀ5%¿—¼—X$ºÒ œzcªŽjhÌå+WtpÖm™Æ ’9êþËÒ­+æ:à ¡b¿á†8ý×£þ„È ð¯?ó´Ä¿º’ºu½…dYbY\‰Ò#Ä$Ñç¦<‰ Cd—Ä‘%k2"3á.ˆ Kà{2ûÊ\ÏíãÜOWL[þ«@¹› —4~TrºªOʦ–Éê…T"¶ìdíh“ã4Q’uQÍ ‘¤Í*#J’z)'ÀddêßšKe u¸µ ú«(­ëæªí{ÚÛq.S)/¤ˆä%N’T–ç¸G!¶Ò\^‰ô™ªBô ¢Àò§ðÃ#þëÖ?Bx¯y•>Ë÷Ò­Wæ: ¿Ô=_ÙbÁúU¥|Ç\´,Wü0ǺôЙžÒçþv˜—÷RO÷N²w !¬×»î!Þ&Jµó W…‰P*¥._O§›RÉ¥³Æ´ùœ?hâ‹dÔiõtÔ‹@Ä0¦è;ºîí^«\øw&Ï®Öà|—S¨|«V¨)Ȇê6‰5’R‚5¶“3Iðt@|üow`‰Îh™y©¼K]®Âªg¶¨ì=4©u§d8ªÌ-·[Z‰å¡.I[+Zã-ç’†ÔãnêÞr€õ†í¨å=ÛYÚ|eÛnÒM¥SÕOSI8§ØüѲmlñ{×gMžÀ * 2?î½cô'€j÷™Sì±}*Õ~c¡€Ûð @óÕý–,¥ZWÌuÀBÅà qû¯Gý à !^çi‰u$ÿtë 7z®ïYGÞ^ê°Ú²÷i›B¶kwJž‰tßõjƒðåÒ è‚ÒšLGyDûûJ.<½³)I›iãT‡Ÿ,á¹ý­†·®ÝwÊ¥^Uq´Y.¹Å2oË®\2éòÎ ,•Å!¶B5$õ4í­:¨Òr»œà]è7a¸ë8ºä¹m컓L‘gÔÎd†«g Ju¥3Æ )nIŸç£“ªB>5·?¤'ƒc@0<©ü0ÈÿºõО«ÞeO²Åýô«UùކoÀ?+=”©Zé¡릿õDÊ$}ñwˆkx4_êËÙrm´V+»ÇŸ)Q_³‘uñÅq ãqzñÈë/k>Ô¸­žºÚxÏùêþËÒ­+æ:à ¡b¿á†8ý×£þ„È ð¯?ó´Ä¿º’ºu½êÎ|ãB™%.4Ê£°ã¤ëædÒM 3ÚpË„’Zpéêù{·9Ä·Œ{xB©½™¬è°ª”ÆíiW T®Uãåu¬ÔJ*¼j2ëˆïKDb‰Æõ¢L‰Ç®$”n4“/óEÜ—ùl_ï„àêåOá†Gý׬~„ð ^ó*}–/ï¥Z¯Ìt0~_e^Ý]·N·(®‚訮:›> ºkMC“5×\ÜYŠ"J#H‰£ÕJ.jbè¦ÛmÎLØÆ¼!ÎÞjìï-&‡rÓ'-›s·š»;ËIŸáÀËMü‹fãÂíæ®ÎòÒgøp2Ó"Ù¸ð‡;y«³¼´™þ ´ßȶnLñÇ 9\µU^žDÝ=ë )áŒ|™ãŽr¹jþª½<‰º{ÖSÃù3Ç$årÕýUzyt÷¬4§†1ògŽ8J»S1~ëÔ|‹7%SñeÉ¥2Ùi•¶VÈt)ñ*mVëzIÒ:Ù—5†ß%!£‰ã‰ÃR”ÒžÇÉž8á*'½Å‹òNÿ;«æ+'ßÌoüðÂæM¯Ya¾L¹%Ï—´ÃðÛ}|\w¿hÚ¶µÑ:«€sNxchmוËWõUéäMÓÞ±Ý)áŒ|™ãŽr¹jþª½<‰º{ÖSÃù3Ç$årÕýUzyt÷¬4§†1ògŽ8IÊå«úªôò&éïXiO cäÏp“•ËWõUéäMÓÞ°ÒžÇÉž8á'+–¯ê«ÓÈ›§½a¥<1“Ë÷Ò­Wæ: ¿‡/¯â~ý­Vù’ 4£u^^ðš·ÆÞ Œf ?±WìÉ?î ƒÍòfxf²F|uÖ4/þöè×½×)£¦¸d ¯?ó´Ä¿º’ºu½Û«R³žPJ”f–ìë8GêϹBÿ¤Æ“ÑsìŸõüwªË¸Á…wÝ=Ø}~ÕŠ©M•IQ¸³wŒK{F\Yô.’ÚèpŒÔÈnûÆÖ°-º­áz×àÚö½ ¢z¯^©<–#GB””$Öâ̈¶”¢IªfD\&ÍkÝííoR.ËJ³á¶«ñ‘2[‚á;K ü—Zx Œ|§¯Ü+R‹R¸îzÌ+zߣ°©5ZÕEöãEŒÊz+uçM(Aá3 c­ì7oË7‚ï2[WE΢Z˜¡Æ•±%òlµ_[¡âlÞÙ"Ôø½®€ Öê˶•Ÿ’1v+«”ß 2ñVNÒ6ã#ÈQQ._\;´\_æÖ[©ðp”`–M°òŒåJÀ¹bÜðmºÜËr¹&),“©O4”˜ÊãƒÚFÚxKR2223 ؉Q¡·ÇKÔVv’Ž5å¥ ÚY’RZ¨Èµ3=œH߆T˜»·dN¶ã}6Coqj4í ÙsT«N‰àöz¡îL81×Ä8ñ÷–n:í:ÜZS32333-+Àò§ðÃ#þëÖ?Bx¯y•>Ë÷Ò­Wæ: ¿‡/¯â~ý­Vù’ 4£u^^ðš·ÆÞ Œf ¼3ío:]ûÚãÜ‹ó„¼-@ªã:•ÝR¨Â¢S«?2%L¢¥*DäjDhQ~JËM: 3½Ó²ÎR¸®Lõ…s=Z›vÞû¾×i´÷2.!@f³O¬CTÈ=¤4úƒ' ׄ‹¢F¥g7ËÝ×+^Öþ=Ç×ï„×EËDú|HÔùÄÓhŠO)Æä¾¶Ûì0µ“n©+4‘š):‡‡)¦ºæÙ7µðò.J3 ʹ ÒiUºi :D¤;RvgÑ”“%hâˆö}¶šh`&Õäì|Þ=<°«Â—ɱR~];Ф$à|±ÆuÁ:\ŸS£¯µÓ^îÉ߯v¬ƒyÛøþÛ»êÎ]×[¦Ý¤L¶ëÕ-§¿¢’…È‚Ú …éÀꌑøÀdYW|]Þpµ~±iä;ó䛦ˆÝ=évãùÓ&­ªš^q…°Ìf7’”0µ¸h׋"-½6“¨dYgyŒ9… Ýjû¹$3T»˜\«jÝ¥SgUªs#´I7D8 >é6¢ÕjI'Ô×Pn2ÌXã1XÌälurµqZNí»= <˱ދý;#¾†ÞiÖÿí!h#è@ÈÌ *8éuJ½¥G…–c:»ÍQš¦U{tøò&ºÚ4ù«Ž–!¼æÉ™6úТ- DDdf¶6ÞïwÜ·ÎÆvüÕjìŠÃò¡G8s#Æ©1f‰Ó%¾ËlLCJIí)•¨´#Qj’3ebûu~Ì“þဧüßÁª×ï]cô·F½î¹M0¼±'BžÚ݃1‰­4êØqÆK‰K­+eh3I™’e¡—DŒd§´HWŸùÚb_ÝI?Ý:È Þ€†í¿ã®Sýϳ¿N¸Æ“ÑsìŸõüj3yê\ê÷9ÿxv;’.½Ù âûÙ–Y/ÎH¢]C®Ä×ÔKÞ5+ñ f¥¥ß*»JÎÕ,7‚hr ¯gÜ”:–eÈŽ2z¶í³oÁSÔ†Ý"èµ: ëEÿøÀuÛ:»»Ï6Æ ¾éРTnIÔ:%½gê¿Ö´ãªU¥*;NTñl2F§\=KÚ ËTë©s7•È6ÞvÅx²ýÎØ»xjjj©RÁn™<Ê=³h7qjèp'C/l.ýðwˆ•ºŠåépYt‹ŠÝD‹‘âR Ê—£3ÂQ¦SÝyÖײ—ŸiiQžÑ¶•Φ!ÆTÜ•J´ãCË7=î¼’ûê—Z Óœ¥Â[*Y›(Lg_¢RSÀ£Ûáü ú>ÍÙþÿêöz¡îL˜ø9Ž?aÆÿ@Éih•?†÷^±úÀ5{Ì©öX¿¾•j¿1ÐÀmø9}ðŸíj·Ì•¥ªò÷„Õ¾6ðLc55uŸ¬›®þçÅ´ 7(Ö1_‘J¼…ÝT8ÐåÊS(­$—Ñ5·[$¬ÔJ3$í¤´s0n´ð»rÁ¢UkeËzTž®ß×õÇ$¥ÕëU'S²oIu)BI)Ih„!$”—ã33 é͉D£ÓwA±júlhs® ÍË>¹1¤\—%©±RóÊè©Ie”6F}¤ˆ¹ÕëŽ,Ø»áÓrÅD·ošvb»ªy5»‚C >í!óB©ò'ÌÈŠ´MôS¦ÑG„+LhE抻Q6B½\¬Êb4¦×³.ðmúcòÐiQ¦S£®{SüÉ™‘p »ýÓQÏÛÉZyVëȸm‰øºÉ©Û–õ‹Œî¤\ª«©ºÊ¥N’“m…³¤°FÓ&…)*=Teê†`ÐèÓ¹Æ÷„®L¦F•X¢ã AŠEEÖÉnÆnk’JJZQþOM ”eÂdZt5ÞglÅ¢o c`L[>ÊÇ·vÉvÖ2½é s’Šty…©´ØÍȉƼkAºá-Ý’Amlê@"½À'½R²·Ã˜ýÏJ½•˜î—ž»(LZ]IÕÓa’á0—^JuZ¨ˆœWáÚ>ˆ ±"Þ 5̱Ö¨ðšr{Pê“]K(Jžœ»Á ªKŠ"ÕNdHÚ>’$ô8\â)«{yNnxôlj4zm~ç¤ÓØ„ÒXC ‚„”VÒ‚"KDI"$— Œ€Ä2ö"êý™'ýçº=Ç{Z»…ä*Î;¸®ûfñfýؠϲi)¬ÔÝ–ågf4E0§˜41%þ-§V•ì«g‹x”l¹¯{®SGL+ï4ýÛ•‘˜•iUkW"À™6鍸1J·Ø~Ö¨ÖU"jîU*ÜbUØ|TeCš‰A)„ÈQHÉO£PB¼ÿÎÓþêIþéÖ@nô7mÿrŸî}úuÆ4žˆóŸdÿ¯â¤`Û‚©¼îô7Má@mÜW—ì nÖ4ä2³›ÄG• É°•›ˆÙKÚj´‘¼ŒÔƒ7CÝW0c39IË®·Y¿'[çŒq:ÎCìÙô8Ï·LÙ[j4´™N¿´iY’‹a&¢ ¬ÝÕ2-Õ¸.%ÂÒ`RéY{±B¯S(5…µ.˜í^‡)R:ÆbÚ7[[O¶¥´fFiÕ\<€ð‹uýo9[ÜFÐÀÐ)ŒIUÅ›©Ûòe7'­Ö–Û¤µJŒo-.¸{*[‹oDôO€Ã5Âøº÷´wßÿ¯ÒQ ÔÊ“ìç¬j’d2ê¦"•FTI†¦³[\[¦IöäZôKRZi[¶æ8ÜÚ—vï¯Úͧ,Õ­¦´S¢Vrî7g²]uÆñ´Â‰\+àè Ãy ’oȸtƳnîµjÖå®ï«DDEªÒèøô ‰+×N 5NÖÒB#ÈÖþõ»áÓ(X àØ›»âz}C.×g\°«µ ¼:sè•òm-ŠzKa/:ÚuqÝ4"üF•½69γ³ì™OYÔ{­ì,ÝØýfWžÝ:3ìT¡Dˆˆ ¸£5!Ù %Ô´æÉ¡µ’MÍÙÀ¶d¼wƒ¾÷ŸÍV#8žDË>?Çxßå8õy‘é¬ÌUB\ɲb~d–ëúžuè¨ ÌŠ·Pß" Ý1wö^ÈðéUu‘­–¤õûNÄyDž6—›I«gÔ×@– åÚ}SÚ·Và–·W·dÓã^9Š•½òy5Ò—jtÈñâ®ržp“Æ6Ú‰&•¶_ 2œ‘ggœ=¼Õ˼Ŭfëc,Ú´Ë~û²Ú¬Ä¢TàThªYBšËÓ¿4ã+iÍ…$½±§ø5×x,oŸ³¦éQ*¶Õ½KÎEU¥ÜÍØôùæºnÕ&²Üö)Ý~ö‰S§¤¡np6n릈22 MŠî{îﳡ×r>7^(¹¥<ú^²ÝªÆ¬8Ã(^ËN9*"RÑ›„[[)×g g¨~³v@ÿ€ú‡½ž¨E{“&þcØq¿Ð2ZZåOá†Gý׬~„ð ^ó*}–/ï¥Z¯Ìt0~__Äü'ûZ­ó%@iFê¼½á5o¼Í@ Yë"Ñ“xÂÈOÛ°½é´·h°.•2“šÍ9÷Iç"¡ßÊ&Ôጿ  ÈŒŒŒµ#à2ŒY¶U¥-Ø6•nÁµmšbž]>‡Me,FeR^\‡ §B#[®)gøLÌqnÕ€2Éïȸ‚Ö¼nxˆm¶ë•:s/HZþ,Ëó©O@’æÑpÃ÷®Â×6cÁumަR¨Õói¡Ð*dã4ZœJL–ä*4¢–Ú#HKd…¦š›:€­öÖïù‹#f¬3‘¯ì-7x¢áJŒª¹½fÌEJ·^üUEDN><8hb¶Úq 5©\ /TÈ6Ë´é÷]fú…oA‹x\PâÓë—#m%2åE„j8ìºïEIlÖ­’õ5‰d܈s;4¦2®9¡_ˆ¡¸§hê¬DD…ÆRôÛ&œ2ÚJW²[I#ÑZ¤zÈ-\gû\ 2 Õg\u«Nã®ÛtúµvÄ}ùVuVK)qúkÒZâr2̵lÖßµ3/PVÈØ‹«öd÷ wxç.ÝûwKRàÇw·Õ«ðîZ»³£Ó)ŽC-©nèM¹"¬ÃŠàü-¤iÝ›k”ÑBP³9Ú7Ç4Ù”{ _6U&¡=ê¤úmÜ· 0ôÙ’vCǬ!*qd„¤Ôe®‰It†jeÞšÕ¼FÊ]Ê¢÷ìÓQº·ˆÙK¹T^ý€zj7Vñ)w*‹ß°MFêÞ#e.åQ{öé¨Ý[Äl¥Üª/~Àsé¨Ý[Äl¥Üª/~Àqé¨Ý[Äl¥Üª/~À=5«x”»•EïØ¦£uo²—r¨½ûôÔn­â6RîU¿`*N(ÞÆÞs£ eL{O®S(èUJr¡ÜãF–—áÚÕ”/ÚE•-ƒ###Û#è–ϦF !»oøë”ÿsìïÓ®1¤ôGœû'ý ÍH'8çXY«v}k ÝÙ.¾Võ™fÐzÙ2¥HKJ}Å;-ÖYm¶YiJR”¯ÁøÌ‚uI™¥&i4™‘¤ú%ø¸`™G RñF8¾rer$ª…¡ͮÔàÁ$—˜‚ÊžZ'„m¨“¡m(‹ñ€í컢ïgZw¥5‡¢Ó®ú4 ÜÒI$ólÔ#¢KhpjI))pˆô3-}P(š¹q[öÄFgÜ•Ú}¿D¦ Ç›R’ÔV—*RɦJÞRRkqfIBHõQðä-{Ù” ‡iW싦;òíëš"àÕãÆ’ü7”ËDˆËiÖσ€Ð¢0N1ÅÖ²é8û[ÌÛ6œ84ÆVã¦kyf㮺óÊ[ޏâÔjRÖ£3ü 2j¥ÇoPåÑ V«´úDëŽWXÛÐæÉi‡gJ$)Î"*RTë› 5l Œô#=Cùã;ÁÀTÛV丬ÚÝv̬֢Ñî{®”q”ŧHb$Y3ZuæÝ[n<úSù¤¨ËC×þÉO *ýfìÿÿõ {=PŠ÷&Lüǰã d´´ÊŸÃ û¯Xý à½æTû,_ßJµ_˜è`6üÊõ¦hö©? }A¶ªõDœZlg%È=ª-@µKM‘¨È½SFê¼½á5o¼/+”¯ï?'æô‚r»Jñ>óò~oHÊå+ÄûÏÉù½ +´¯ï?'æô€®R¼O¼üŸ›Òr»Jñ>óò~oHÊå+ÄûÏÉù½ +”¯ï?'æô€®R¼O¼üŸ›Òr¹Jñ>óò~oHÊå+ÄûÏÉù½ +”¯ï?'æô€®R¼O¼üŸ›Òr»Jñ>óò~oHÊå+ÄûÏÉù½ Rú˧¬Û¯¯øÊl„’×@˜I-P}4èD£n9‡0Õù‰*•«ÇÙ7EUw5_Z¥fۥʚ¤ª[§£¯?N¨ËþòN€×½×)£t.gÕ›vÿ»î5òRÚ£%VmÛþï¸×ÉJ?j€}Y·oû¾ã_%(ýªõfÝ¿îû|”£ö¨Õ›vÿ»î5òRÚ VmÛþï¸×ÉJ?j€}Y·oû¾ã_%(ýªõfÝ¿îû|”£ö¨Õ›vÿ»î5òRÚ VmÛþï¸×ÉJ?j€}Y·oû¾ã_%(ýª$µp¾±*ß/ٞͳk¼Bã|µC¡SéÒø‡ mqñ˜m{ 4‘šuÐô%€†í¿ã®Sýϳ¿N¸Æ“ÑsìŸõüLƒ5(.l®E¼÷ÓÝ;RÛuŠÆ8]Ç~Üs''­b¹ÚK´æY€·vzñóuâ5¡®-´½A½M~¯oÖhjûãÑwZ°ß§© ” \ŠÝZª—´â^©›…ÖÍ6mê†YÔÕ®ÒÈ +ý2Ý»›ƒy:ýépÁ¼«V½ýµ¾©‘Ó=v=)—Q¤†íDz´«D‘«¡k  %«‹z}Þ°&Þ2¿™é÷‹.™uàÈ´HÌÒ¢ÛdEƒâÔUµ1sC­n)[&³V…°’J‚mÞ.Þ”-á,Œ[Wβ7\ÅûEÊ(3Kƒ-ªÍÑ׊g乪L½*ŽIwe[{ZøRçµ24ü „d+2Þ§^Vl ’l ,\ªK¨Dn5e Q¹Äq%O!–Ôm¯keZ¤ˆ‘¼åÝž÷uݦÚoeÈYgú (¯½*ŸOn¤ÍR§°PäEŽÙ²Óf…%•-KÙöÄ¢W F™eïaa{ù»Çyª=O Ôœn©(ר¡ÑívLuûmÅC¬¶ó-]S*}E¡šxÍRF@*ÞÏõ¦÷¡´± #zèר×ý¯ZŸTÖ4Øó(z?êT‡©m¶Ú™’Ú”IB‰ZhfGÁ³ã7˜Ê¹íŒaœÏXØ&äU‘kÀ…BWr³]‡·çJª®rT®!.8–ÒÛFSé(µP`åY~¯”7S™—ÁzõJê‰GqŠ$)0©÷#tÉ.L­ÄëÂ7Kœ-¥‡ŒÐ”è¯Ê<ï—eÝŽîI~PjW2/[žÔ¥Ñ«뢠˜”ƒ©•§£5óm&Üf\q¨Ë4¡&Eµ¢K¢@-ž<¾¨¹6ȶoûq™ñèwdê¶j‘ƒ--9®Ïâ% ø?Ë„ŒÈÈÀf`*ýfìÿÿõ {=PŠ÷&Lüǰã d´´ç?œ‡.g8ûÎE³qýnå¼hÖ ñbWí{=V³NӨׇɪv‡Ÿ5¥>íAÊ®S¦Ë£mISHK¤ÉšCi;½_5Ü“¸³w¥ÉyÕïúÕjѺ:è®Ò¢Nym.s&Û‘#=!­–v8¤8•Ÿ”’Ì’¥H+G2§ÙbþúUªüÇC·àåõüOµªß2T”n«ËÞVøÛÁ1ŒÔÄ2ö"êý™'ýÃOù¾?ƒU¯ÞºÇén{Ýrš:a{ÆJCvßñ×)þçÙß§\cIè9öOúþ&Aš”Czú•.ÝÏ[]5Éñh”šuýpA—^šê#°ÁÔ-ÙM¶ÒßpÒ”“ËI'C?ld@=<½…ót æ™ÞÚv6Rn±bµe¹@½§=tؘ¹IŸ æãJ%4é/GP„¥g¡è| :[v ·@Ýxü/sÍ·*-T.m1ÇcÒ]räGæd¶ÍqÐ¥™ûM° S¯w=ïoû'îÝ–*"Öûz]Õ‘¨ÏJ*Ír™oOE¥9mL¹¶ÒãÛ{*$ÈµÕ ¼•¿¼…ÞW‘ec<]”±måB( yM• U*¤á:ÛÒd4Q¥5)’J¦É½‡¢>€Â¯ÍÔ/·÷2ÇXѺ©Õ\Š Ù©Ðë5~9ºtê…½)¹|BÍ$·e{*m³Ð̈“®œ:{™ñnwϘÊ Ý4[R×ɰ¯ë~ä®ÑiÕ))ŒS©Rin[ŒÜt㤌Ë`“µ©éÂEÞÿ ÜyÿÝ8ÞÒ©@pK—L©ÓcÕøÏ“'.—5™c;Š%/‰|šØQ‘‡¡èd ±pîñ—ñ¸s3ä‹7ãk?Û·=‹iNzd–§„&Bß8‘Úq.­²$´„‘4„þR”³Ð8•‰w«ÂÙW5V÷vƒ`Ýö6y¬¦éy‹ÂlÈ2-»æÄɈ­9×qÝ4%Í„™+€“Á¡šƒ:Þ+ f«ÚÚÝæí²ªåϘpMÍN¹jªÆí2•]y0W¢–”Ò]Tn1nÛ##$—ºèߪ»Zú˜M¡ä7(´|}Ì´é’­JTµ<ÄÉÎשª—ŸÇ“oIBQµµí5ÙÔ̈€l9)J”!$„ ‰)JKB".ý¨;ô}›²üÿÔ85ìõB+Ü™0?ðs~Ãþ’ÒÐ Z÷¹QfÙ÷=Ô¨è˜võ.]A¨+pÙL…Æen¥“tᣌ4ìíl+MuÐú¨§5Q¹3dZǾUÌ>¥‰fùYPÿв‹ç·-ªí°qò®bñÍò²¡þ (¾pû-ªí°>UÌ^"Y¾VT?ÃeÎeµ]¶ʹ‹ÄK7Êʇøp,¢ùÃì¶«¶ÀùW1x‰fùYPÿ”_8}–ÕvØ*æ/,ß+*áÀ²‹ç²Ú®ÛzY÷fDM¬›×Ø— l«† ×k&MÛS"‡Y¦íõ¤Äl[éÕMñŠÐ•ªxxHÂÊ/œ>Ëj»lµÔÆb¹­{’Ûð:Í…á.e7¯<)¨9ÅuÛ gŒØðy;[;Zé©køBÊ/œ>Ëj»lgrMÚ3Fçø¦¿++ .¹uË¹Š²ŠÕF–M˜0aõ¿ti[[=eµµ¶_•¦Ï§ÈŠ|fpû?êâ|«˜¼D³|¬¨‡l¢ùÃì¶«¶ÀùW1x‰fùYPÿ”_8}–ÕvØ*æ/,ß+*áÀ²‹ç²Ú®Ûå\Åâ%›åeCü8Q|áö[UÛ`|«˜¼D³|¬¨‡Ê/œ>Ëj»l•sˆ–o••ðàYEó‡ÙmWmò®bñÍò²¡þ (¾pû-ªí°b¶^g+‹#ÝXº³N¦S.‹RÒ“I©=SŒ¶æ©ä8ç¡AR\lÙ=¤ñfZtVº’y]1$M¯W[—a†mê¤z=MUz¡µ:Lc–ÚH¨µ ¢6‰Æµ×ðíªò÷‚wÆÞ —ÁüÁç‰Üvè…æ8ÔNà+·@<Ìq¨ÀWn€x?˜<ãQ;€®Ýð0yÆ¢w]ºàþ`óDî»tÁüÁç‰ÜvèƒùƒÎ5¸ íÐóœj'pÛ æ8ÔNà+·@<Ìq¨ÀWn€x?˜<ãQ;€®Ýð0yÆ¢w]ºàþ`óDî»tÁüÁç‰Üvè Rú åÄÙ·:žÈtW*lƒq@23-ƒÔˆúðôõ€AüÞ„âp­Y.¬œt®Š±:âKd”¢”î¦E©é©úƒ^÷\¦Ž˜_!’€Árï(¹Ë#ø!F¥ÕÖ»FÑëò©Mr6E:âØâø¶Úׇ]tÓ€i=ç>ÉÿLÛålÓâe­Ý©=¤3S¼-ÛÛ!QÎß¿1yP¸ö¥"µ9s£ìžÓn“OÓÖ’R ­5 IUsBH’›.Ö$¤ˆˆŠµ$ˆ‹ñà@>VÍ>&ZÝÚ“Ú +fŸíníI핳O‰v·v¤ö~VÍ>%ÚýÚ“Ú@8ù[4ø—k÷jOh€çålÓâe­Ý©=¢ò¶iñ2×îÔžÑÇÊÙ§ÄË[»R{DålÓâ]­Ý©=¢¸-ËÖì©[u‹£ãûŠ«gKTûN£Rœ¹OSe,‰*~"ݧ¨ÚY’KÛ#Cà/À@2¯•³O‰v·v¤öˆÊÙ§Ä»[»R{DTßF¥•ÝîúEfÕ·aÓÕ î¸‘¬ûÎ¥Ó “å:ÆÀ)'i’[†­ ¶“ù[!—fýé똳/Ú8BÏÃu|­|ßöÄšå§›=ˆlœ˜òÓMNuöÍc¡²[«¥'BA!JQÈ÷wÞ"¥˜ªy"ľ±äœM—±ø‘/‹ùÍTÙ&*-ð&ÚÊK̾„¨ÈöKM?÷»(ëY*öº&¦™mÚWîC«×g¨µ&¢CªIyÕl— ™%'¡ Ÿíè›æäÆ×†LÝΣŽ0v^«@£Ù™ÚìYÕ®ÖJKÕšCL¥Q–fžu|^ÑøL}¼Fõ\'‘1®*µñS+ÞÙn›Uz̦S'5j}9qÒ–d)æÔ†˜4<·]}JÑ´ ýªµà '`Ön‹†Ì·+Wµ¤vÛQ„‡n <æ5Qù>QêN0RØ"mâ#.$´2—€ÖÎ!ûqæØ4ÿÒä ké§úŠwÊØg¬?QËÖÜ:mïeV©Žºõ>µÉ.$ßaØÎ%[IV©SO-&Zz¢)ªiTŪèîË?xªÁ#©ŠÕá9ôweŸ¼UGà‘ÔÃW„`d=ÙgïQø$u0ÕáGvYûÅT~ L5xFCÑÝ–~ñU‚GS ^‘Ñ\û‰ß¶eµpÞ6ó3éVÝ©L—Y¸*ŠŽn&4,®D— 0·Hm V‰I¨ôà#0Õá w N³¼þSÈXòÄË•eÑ¢VéWU~;]«F”¦R—Jž–Ö¨í¬ž'Qº³q½•¨›5lW„`dB[êÕníØ²[¹²«xÞP£7U¾ $Ò#SÑ$’¸0ŒÓ¢Íç3yÔ©$DÚÙ4¨öÕ²ÔáWç n—tgŒafå» xúº­›ÖfE%”ˆ¡Jf\'ÿ2’S‘d6ã*RKeF¤ê“# ^‘'z;²ÏÞ*£ðHêa«Â02Žì³÷Ѝü:˜jðŒ ‡£»,ýâª?ަ¼#!èîË?xªÁ#©†¯ÀÈz;²ÏÞ*£ðHêa«Â02Žì³÷Ѝü:˜jðŒ Ž=yQÏhþðÕYQèëJeJOªZZ¯ÀÈØ&ð°}ƒÊ…=u3mç$Ëœá)×ÝQ©Åž„EíŒõ誩ªm—b,‹Xã  à»>›vg<ŽšŒÊ¤BƒhÚ&ÉÓ*`¸É×¼aÇZ6ôÙ-5èÒ4žˆóŸdÿ¦qÈå³úæêò†¥ÕÆjqÈå³úæêò†¥ÕÀ9¶\Ý\ÿÐÔº¸#–Ï뛫Ê—WärÙýsuyCRêàŽ[?®n¯(j]\‘ËgõÍÕå K«€r9lþ¹º¼¡©upG-Ÿ×7W”5.®Èå³úæêò†¥ÕÀ9¶\Ý^PÔº¸y¶\Ý^PÔº¸9¶\Ý^PÔº¸#–Ï뛫Ê—WärÙýsuyCRêà*žúXÂߣî÷|ÏT¸Ÿz<'”Ûr«sŸhÌ™pý³n:¤¨¸=Rvº¡5îZ¬üDZ# f¤´Þø5?dIþ¬Æ®¸ó„×Ó)˜f ©Pô8¥Ç†åBDXî¼Ä$ãëBMIi£$‘¬ËBÔô¦}éò‘½µ‹KǶÈ0÷«MZ–›2E^Ø—JgË5§dË—ZÙ&›ŒÓhsSKªJŒÒ­’2#HOÛäW®ª ñ¨÷íË-ÍܦÀª'*ÝXݪ‚gH®²Ó_'Gžý%·&±ÓÛQD[Jà>†©W›Þ‹òeÓ½lØ6µíkÚõËÊ6ÐEþ™çZ•T”qrz¢¥¾çZ,‰k5!*J²¢Ù †íkZéoš¯3[ŽÛufîK½Ž%pŸL× ëŠKìF4q‡´“Ú-Â\ 'ìñB®Ís›ÀâQj·’-×ëœLg\ë6ÑD} rNÊOŠJUÀf½¢Þ/(³‡÷ôÃw­BÔ¯ÝTØŠ»æðr• ”Ø/UšÚ¨*#$nºÓ. ÂlIJ¶ô= 3ýÔ×XÊYÿy-æšµë¦;¿£[v¶7*ì7iÓjÑè1Ý)uŠù%Ä4·\$´j.×Õ#"· âKÊýÜ+x\[—&‘vÞ7FbßRipÔóÏÔä9Ž$™!å$”|½ö'¢î£t1ŠlkÇgÙ9r êk‡Õ½¥@¥Ö`¸ÒU.O\J*ra°ò Â^Þ„ÙjH/Év²}"­#~ÍÖk1éS¤S¬›õš…Y¶\fy¸|Zx’hA¯CÙ%kê»À5³ˆ~ÜyŸö ?ô¹Zúiþ¢òÙ0É`̵!§cÈi°úÛ̸’R…ŠJ’z‘‘‘èd`57çVâs“ïß>Ò§F¯\ÌckzE­F“$£1:r(teÅaÉ+‹C®R¥è{${@>hrUzö¹òñpä¥K<ƒX®Ï•{"{i%º¢ä,å¶ìm†É…6îÒx¢JIlRE  ßó#\ù=Ù™žÎL.¹Ã0؉Xz¤ê‰' æ´0Û1“´F²— ¥©í¢GÏ 8ÏÎÐ8 Y“÷€°7|Ë7Írþ‘";7±kE¡´ËFdûæ×U$‰Åh‚6“!³Qëí“ÁÂ5Šfªb"ùöDÍ’À}&½ûäÿ]žœ4jÚ`ϤÃw¿|Ÿë³Ó†[Làô˜n÷ï“ývzpÑ«iƒ<“ Þýò®ÏN5m0gƒÒa»ß¾OõÙéÃF­¦ ðzL7{÷Éþ»=8hÕ´ÁžI†ï~ù?×g§ ¶˜3Ãç2Ýè)7g«]’ÕONŽžßÔ ¶˜3ßI†ï~ù?×g§ ¶˜3Áé0Ýïß'úìôá£VÓx=&½ûäÿ]žœ4jÚ`ϤÃw¿|Ÿë³Ó†[Làô˜n÷ï“ývzpÑ«iƒ<“ Þýò®ÏN5m0gƒÒa»ß¾OõÙéÃF­¦ ð‚7‘߃æ,ItX6^=^­Åy¨-/‹=¥©¥¥)$¡JQ™™‘ íö暢gÖUQ0Ù¦Œôo¯Žâ;Ó€r®Ï›ë㸎ôà(Ϋ&·¾¦cžŠ|úY9C€ž´©0q¤’äp©³32.­}4ÿQNùlðd°I›ó]»ö;¬d¼ƒ*CJ^Ë1¢CeOÊ›1ÒW: Bã4èFµ% è­II|Ëï©sï ™-Œ²Âm;ñ¯¹@ÂØÑfé”Z90ä—¦6•%£¦Ód§ÖD¹ öÉJC);ÝKxܧ»ÎM¦îY½„IJ©uÄjfÈ­¥élMfKœDå#`•"#êö‘Þ4’™Q¥Lðn Cu\Ô[.ظï’aS­ÛN—2³_¨T²b"C¦”‘¨öBB-@hcîùXÞOr½ñsMÉIo”]än*ãj²ÚVdÚ­ÙONŒÌSY©d‡%®Lt–¿‘²h;„f>[÷RÄ·\¹¥6ã£RÊ×»ÍRNTŸ”hgÖJvRÕí¸ÙL¶Ô¥¸ttº=3¼'ðk ~È“ýY;]qç ¯¦S0Í@ lâ·gýƒOý.@Ö¾š¨§|¶L2X§¸kL[výrâ•mB5Ÿ&£"6:åÌ}ZSÊj4vÈÖë«$è„'…JЋ„Àjgs²Ø—Æv•c.Òªr{sH·¨øÓ¬©»sü«S&Ñ<ê±Rúã“RÒ¾!JsD¤ÛCä¥qa…óÜÿ0Ç›Ü» ÇçeÌ\šn©T´©õ‡qfZ¬[Z/+ˆÝ5'×µGÉ´‘­ÖTËÒ. $½ 1¼1θ~ÄØóRò¼…C±è©*u6õd‰ç™hŠCæ]gÑuÓZÏñ¨?͇˜lwÞŸcŠû•Ì]rUÈø‘㎨l´Êžn5Až.BŒâäDl’iÓf:ÕÁ®¦¼ oKVȉmdÛ‡F”M¸e´IW­OWA§k®<á5ô˳;c+êzeHDZðƒÌöÈÍN<Êþu!y<Ïl€x/–<êBòyžÙð_,yÔ…äó=²à¾Xó© Éæ{dÁ|¯çR“ÌöÈ‚ùcΤ/'™íòÇH^O3Û  å:¼žg¶@<Ëu!y<Ïl€x/–<êBòyžÙð_,yÔ…äó=²à¾Xó© Éæ{dÁ|¯çR“ÌöÈ‚ù_Τ/'™íòÇH^O3Û (Ö‹W‡¾¦cb¹VnµPM¹=¨Éˆ•]È褩DZ(Ò¾š¨§|¶;qÝvµKºä¥ÚÔ·K©Uæ39º¢3Kdì…¡FI3"×^ü"™Ê™±‚òù‚üôØžQÓ;`VwNf‹Î_0_ž›Ê:glwNh¼åóùé±<£¦vÀi×tàf‹Î_0_ž›Ê:glwNh¼åóùé±<£¦vÀi×tàf‹Ý5ŘðMÅo×mõgËRˆší>U<ë4‹®›¡¥4¦ºâ„¾fÓÍím6²/j¢#õN»§4^Ô¶-ܯcýâ*Ù-Í´èò)u‹ã§ßѼ¥TÒ”eªÓém¶zœ}+âUÆ©‚ÛOçxÆwNh½Ç<]÷cä I‰!Øw ö™ïôèt ”Z“̶¨%+q¸®8¤¤ÕÁ©–šðöê w4^Ü/x/ÏE‰å3¶N»§3Eç/˜/ÏM‰å3¶N»§4^rù‚üôØžQÓ;`4ëºp3Eç/˜/ÏM‰å3¶N»§4^rù‚üôØžQÓ;`4ëºp3Eç/˜/ÏM‰å3¶N»§4^rù‚üôØžQÓ;`4ëºp3Eç/x/ÏM‰å3¶J»§4^’)UzUvj¥¥¯L˜Ú]‡Q„òaæÔZ¥mºÙ©*I— †"bÅ;&p݇o VÂsMŠ‹Ô¬ÓšvÞÕB£ã|¡ÄuÖ‡O•oŒëfÿ/kMž 5=CDûÈn¥»ýƒÎ#»Nµ1ãtÌ[Qh’nÛPêuG“-éµj¼W—×OL\–ÌÛŒÑhÛ©"Ù×NjÅ›Šî©…/zNGÆX¡»fô¡¢KtªÑV+3 ”ËaqŸÑ™“ŸhöšuIÔÐzkÁ¡€¶À!­àÈÏ d _ý"OõjvºãÎ_L¤çî W—MnwÚ=aÙ-!i?Ài5ÍO„ö׌4ÞËg¦ Â{kÆoe³Óá=µã 7²Ùé‚ÀðžÚñ†›ÙlôÁ`xOmxÃMì¶z`°<'¶¼a¦ö[=0XÛ^0Ó{-ž˜, í¯i½–ÏL„ö׌4ÞËg¦ Â{kÆoe³Óá=µã 7²Ùé‚ÀðžÚñ†›ÙlôÁ`xOmxÃMì¶z`°<'¶¼a¦ö[=0X9ðžÚñ†›ÙlôÁ`×v“fûÙ–DI ÊaT~Ë쬖ƒÿÅÈè)&d5¯¦Ÿê)ß+¡|Èw”\/ kXÏVªo8Ñô mЪIIÿÐK1Ê7UåïÕ¾6ðKôgvöV”¤ô2Ó€ÂÙ,TýÄkÕJþªH«Krcì\õ–Ð뇩ìœ×–eî”f4ïuÊhÝ ®2P-¹3–³«S-«»0Ù­ÅO&Õ>X¸)°f°O!.´nÇ‘! –…“ªxHÈË€ÀtŸYÜ>ðÛʺ?m}e÷pûÀco*èý´õ˜ÝÃK£öÐÖ_w¼6ò®Û@Y}Ü>ðÛʺ?m}e÷pûÀco*èý´õ˜ÝÃK£öÐÖcw¼6ò®Û@Y}Ü>ðÛʺ?mÓ.õyCWùÐwM½(yÖ¬Y´* ¾ŠÝÛ±ú\5±Z­:êdMCÆËjJJŒ”¢=ŸÂ@75õ—ÝÃK£öÐÖ_w¼6ò®Û@YÜ>ðÛʺ?m}e÷pûÀco*èý´õ—ÝÃK£öÐÖ_w¼6ò®Û@Y}Ü>ðÛʺ?m}e÷pûÀco*èý´õ—ÝÃK£öÐÖcwÖiû×Gí ­á ]tx7 ­\§Ü´ ¢ Êer•%©ä ”h53!…-µ‘)&Z¤Ï„€w1‹ÒׇzÚµëN ãB¸!;ZÚZ›Y6òM ÙZ *Ièg“#/PÈv&bm‡&-knµÍÇV«Õª>]nœ÷Öò‰Õ©Õê³Ôö–½T£üfbõg†æHuž*·Ÿzï­üÁ«<0ƒ$*·Ÿzï­üÁ«<0ƒ$*·Ÿzï­üÁ«<0ƒ$*·Ÿzï­üÁ«<0ƒ$*·Ÿzï­üÁ«<0ƒ$*·Ÿzï­üÁ«<0ƒ$*·Ÿzï­üÁ«<0ƒ$*·Ÿzï­üÁ«<0ƒ$*·Ÿzï­üÁ«<0ƒ$*·Ÿzï­üÁ«<0ƒ$*·Ÿzï­üÁ«<0ƒ$*·Ÿzï­üÁ«<0ƒ$*·Ÿzï­üÁ«<0ƒ$*·Ÿzï­üÁ«<0ƒ$*·Ÿzï­üÁ«<0ƒ$-î[¦Ò0êµiW4»ª¿Wi¦$TåëµÅ2¥))"õ45™ð~5W5ov)ˆKW×ñ? þÖ«|ÉPFê¼½áÊ·ÆÞ Œf bÞÛ<Ö7sÅ d:¿äœõËE¡ü9×h›©É&æÓDjÚI¤@<5LÿX¬o!HÀºÜ‡t·lAùg<Þ_q¸¶ÜIÖŸ®-&NΔ~Ø›Q–Ë~ØõöÛ!`î+¶Õ´#36칩6¼9.1åÕæ± §>‚·Ö‚5~"=@vªŸUT\ÖLK)Uq$Á0IÛ7MÍvv6xvµÓNl ¦ØªÔŸ£S.:]F±+3¤Ò¢Ìeé-ÅD¦_[(Y­-¸J#JŒ´=x ¤õ÷dGz‘EåCbEÀó‘è,9QŒ•Îy§ §Œ“pÕ%di2F¦GÀ| 2g]i†œ}÷Ë  Üyç ’”%%ª”¥ ™€è­ÛºÓ»Ø“*Ó¹é7Dhnñ2äRf±5¶œÿQjak$«ñ ׈òííwïE½n,®KŠõ‰ÑfªËŠÔd¶û'Y¥®TÎ9â=§vœIuü’à Ô!?±WìÉ?î Íñü­~õÖ?KtkÞë”ÑÓ Þ2PæzÕÝ{ï_ÎM½–9Èõ{†“D¢®á¹"Ê·åFbYËb¯NŠ„-s"ÌG±1~ÔG©'C"- /?¡_uo2—uhÝäô+î­ãÆRî­¼€…}Õ¼xÊ]Õ£wЯº·Kº´nòz÷Vñã)wVÞ@B¾êÞõ@q¸Ìæq­3nÕc6Æz¶®I×}Éx%µ!iÀ„!$^®¡®ûwÒPµ™™z 2<5ƒ²¥µ¼å‘’¨·Zû³ãÆ­Šµ½“éÕÇ |jÒT„;HqP!EŠ‚v;èÓŒ4š*=UÁ¡†o»çÛŸ_þ^9ùÀˆdìEÕû2Oû†Ÿó|«_½uÒÝ÷ºå4tÂ÷Œ”Ñvç?æÉ¾Oì+ŸûÁC½Ÿ|ï²^ñÿGW耆9®>Âx3ÿäßÞz° þ¾¿‰øOöµ[æJ€ÒÕy{Âjßx&1š€ÞuÁöŽðv3vë*¥ŒÕbZCô§ÃýqM|Ÿi;N6él¨ËEκt Œ¯`k2ÿÉX».J“S _¸žKê¢Whï¢:æ@”“Lšdý¦×ÇEwS3G‘™ì©;JÔ0Lź…­•/H™:…~Þxk'3OM¡|Xu"§I¨ÓP£Z"ÎmÆÞiä¡Gª Ó´\:Hƒ8¢à{n†îl-"æºnZ5áN«Sî+¢àª¹R®I:ÓN5)õL|”D½=‚$l'ƒD€Ïñí“IÆÖ%›h.É~‰dQ`Щ/LY9!qà0ˆí)Õ¥)%,Ò‚32I¾ †»?·0Eë»Üõ—,»é»…º¼çŸiUÊëïKâ&I°o™#Tšº€ï®ÝÞ±µõ…é8"êƒ.©eЩtºmW\5(«£4Ûp¦1)¢I·!®(”KI¤e²f~ Ý‘²çMÝXÍùG.UaÂzDz×Õ2 (Ïš6ö"2Û-­Ã$qŽ•ø4!YøZÔ²²¦ZËÔ™5nlÊTTݤ¼…Äh¨QU7Z¶M¥HÚBµ^Ò•©ô4/Ä2ö"êý™'ýÃOù¾?ƒU¯ÞºÇén{Ýrš:a{ÆJu’+thk6¥ÕáEpº-½!´(¿èRˆÀzþ[~0S{-žœÂkoÆ oe³Ó€xMmøÁMì¶zp ­¿)½–ÏNá5·ã7²ÙéÀ<&¶ü`¦ö[=8„ÖߌÞËg§¤ ÏæÃι¾\¹Ùb"(W>ܧJ[-nKU™éÑ=:=¿ðšÛñ‚›Ùlôà[~0S{-žœÂkoÆ oe³Ó€xMmøÁMì¶zp ­¿)½–ÏNá5·ã7²ÙéÀ<&¶ü`¦ö[=8f5f‘1dÜ:¬9n+òPËí¸gü„•È‰çØŽ·ÞCÿ]ÅK×=uGrÛ©3J«ôÔ™tHå2Gþð<&¶ü`¦ö[=8„ÖߌÞËg§ðšÛñ‚›Ùlôà[~0S{-žœÂkoÆ oe³Ó€xMmøÁMì¶zp³|zý NêƳµ÷—ŽîCMÉiJ38.‘+S33Ð7Í…[£BÜc12¯ #éð›i—¤6ÚË[šªeªT¢>‘€¾þ[~0S{-žœÂkoÆ oe³Ó€xMmøÁMì¶zp ­¿)½–ÏNá5·ã7²ÙéÀ<&¶ü`¦ö[=8\¶áðÁM3>uÛ=0Ò<˜ÒÛ'bÈnKGÐu¥’Óë¤Ì€yÀC—×ñ? þÖ«|ÉPQº¯/xM[ãoÆ3PÈØ‹«ödŸ÷ ?æøþ V¿z륺5ïuÊhé…ï(ãyF–]QtR…køˆ‰-kNⲑ\¬ÚtZ…R«]¸äΙ"ŸÇqÊÜã3RÔÙ™ÿÒ6¯¹TM‘3º=!ÓázJäöÀñßîd^¦#V»çrSqÉíâ=¿ÜȽL5k¾q2SqÉíâ=¿ÜȽL5k¾q2SqÉíâ=¿ÜȽL5k¾q2SqÉíâ=¿ÜȽL5k¾q2SqÉíâ=¿ÜȽL5k¾q2SqÉíâ=¿ÜȽL5k¾q2SsÆœoŽÒâÞM…n%×8t©Q JþSâµ0Ôªù2ÅÏ''¶ˆöÿs"õ0Õ®ùÄÉMÇ'¶ˆöÿs"õ0Õ®ùÄÉMÇ'¶ˆöÿs"õ0Õ®ùÄÉMÇ'¶ˆöÿs"õ0Õ®ùÄÉMÇ'¶ˆöÿs"õ0Õ®ùÄÉMÇ'¶ˆöÿs"õ0Õ®ùÄÉMÇ'¶ˆöÿs"õ0Õ®ùÄÉMÊQž*‰²w…ÝÖjR©–ü)õwÓ<éðØŒëÉ~#ÈR\q´št/Éèz¢óMTM³s™b&,lb°™Û2·ƒéSb±:S¿‰Ð¤´—šq-ѪŽ$”…‘¤È”’>è‘×µ33JkHœžØ#ÛýÌ‹ÔÄê×|âd¦ã“ÛÄ{¹‘z˜j×|âd¦ã“ÛÄ{¹‘z˜j×|âd¦ã“ÛÄ{¹‘z˜j×|âd¦ã“ÛÄ{¹‘z˜j×|âd¦ã“ÛÄ{¹‘z˜j×|âd¦ã“ÛÄ{¹‘z˜j×|âd¦ç ÇxýiRbÛÊJ‹E$é‘ ŒÔ2âƒR«äÉ?-ãœzÒÛVºÛiü”&—ˆ¿‰ ŽåQã&X¹ûäöÀñßîd^¦µß8™)¸äöÀñßîd^¦µß8™)¸äöÀñßîd^¦µß8™)¸äöÀñßîd^¦µß8™)¸äöÀñßîd^¦µß8™)¸äöÀñßîd^¦µß8™)¹éÔlK, Ò[±­ãräQº¯/xM[ãoMËv+ñÊ'Á¿ÔÆj9nÅ~9Dø7ú˜-دÇ(ŸÿS廸åàßê`·b¿¢|ýL–üUã”Oƒ©€rÝŠür‰ðoõ0[ñWŽQ> þ¦Ëv+ñÊ'Á¿ÔÀ9nÅ~9Dø7ú˜-دÇ(¿ÿS廸åàßê`·â¯¢|ýL–ìWã”Oƒ©€rߊ¼r‰ðoõ0¥õšqsömÎËW„U8í6BPž-þ4Ÿü0o7£ˆ{ Uži[m;tU–ÚËÕJ¥:dô×½×)£¦Èd ¦ùÖ°%‰qàËÿx:Òêóï|}A¡ÐlÊzç8šM<¦ÜГ*kpÐI%Iy™+ejZ”“FÇ´ÛBØvþbÜjÍŒõ°OðÒ—ûV¿óÔá§sò=!4îÅ/ŒÔÖ¾ûÍ_ogíÆÆRèpoµ\÷ƒÒîV¤?JCŸ" Üë–â)(½¢NÊ‹Ûi¯ :ŒîJ°·ÙÈÔ ãÙ£WrÎd±áÕl;æÓqÖèH Ð^â^¤¢ ”캗\7”µ¸½¯Â^¨J»¯TªrÞýåT$Ën“šjžÃÏ-ÄÇlè±a¤¨ÌZú‰Ð}Äö½?(sS¸Õí2«W]>Ò½+ŒÌùJc2W2•6®ôSuöKŽ!*A¶µŸj¢2àXo ×ñ%?týÉïÈÑn"¸2MÛ‹é÷Jœ¹+FS5¶Èæ”h«–lÆQŸä)”$Ûÿ°iu7Ç[ø‹ná»î;‰z?eß÷šh7%2ר;&é¨Pá0ôù4È• Òé.R´J–§É\Y)$zpë·^¶.û+xé,c|'”0îïW%›#ÂËbþ”‰Pcܱ$¶q&SMU:‹ˆSì)Ht¶ˆ”e®œÔâÜMÍûÕïW^È7•Ó:ßÅ&*ñáUå§ī|›Bª%‡Æ«e”6–Õí &¿jf¾Úè qïEö™Ý¯öÁþŽøÖž‰þ&wÃcƒ% Ì¿ý«ÀHý¬4íøùJjðNc55׸?öŸ}Ÿ§ëƒúˆÀ(9;qÇziy*ø0cš­z¥‹ë.ÍLk}šEÈû]i!;Å8™N-Õ:•(ÍD’2J€Yú†,< –7/ÊVåûvׯÜÙu¿škuº´™LÜmV)NÌZž‚¥œfèüÃl¡)l‰%òF]ÞÙ½ßî|£kYÙßÊyªøM¸¹´¼ŽäÏ8Ðàœ‡u¹ÌC•Oiµ­gÅ%ǤÙ"J=S #v,~ÃÜox)ð+UZ}Á‰ªy$Þ’u:Lz3n9MS}Õ¸ž6"”HVÒÔ”ììë²D£âk+ e«Ût8x¡ütde<Ýszù5:ÍC4óìš´‰´Ê]:†Ï[“ Ùq'¡’’iÔ-ô÷D‹ó{*V»qÖDË8žÊÇLݳ1ž=˜«¨Ö*5"72ª®¿§-ÈÑške´%Ãüâµ2ÓP†ã4Ün@ËöÑfÞÖf,¤\¬IÁtÌ€ûrkQi3#íJ§©ÔI–¥3ô~kmÕÊôÚè‘òÖÖöz¯üÿÕ¨ Ü3ÿ)™ÿ}'ÿ\àÓ»ÕüHM±lf 7}päü'¯þ«Vù’ 4£u^^ðš·ÆÞ ‹aê—¬3Q°õKÖØGú¥ël#ýRõ€6þ©zÀÿT½` „ª^°Â?Õ/Xaê—¬°õKÖØGú¥ël#ýRõ€6þ©zÀÿT½` „ª^° C %>]^Ô¿öÉ>§ýÃPy¾?ƒU¯ÞºÇén{Ýrš:a{ÆJk»~Ü7¡ÞJlLW–-KW×i1cß6Ez“ó*0ª%=™-Îf·ÒZgÚ!Æô6Ï]²Y‘wÀ»Óå]×òJ·UßZdfi¯6Ó8¿0¡¦£RšŠië­²Ãj§¹±¢RIqœÚnFpÆ Ÿàö]Ž`0ûKeö+ o2²4© Mnq)*#á##- †ÍÿÈô„Ó»´3P­ï»[8Wq5Ûlej–$¼0ýB§P·. u6%MFº¤dDx”ÌÃâøI‘jGùGÁ®†AêaÝ×—ò%K2dl¯qgµ6àí>ë¯3 ze$Ý'×>ËëÝ]7Ô·i×IVIËÍP['Ùùb¦íMZE'vUÅ›»–Z‘kÁÐ#_¸õ3wÉo\Ò)§€®8w $"2ùMQ 9™pÍiâ‰DæÑ¨¶¿ž¨ +*nÍtÝu¬Û‰³UK _ i…Þó4ˆUÈÕSR%“CL’Ãí-g²ámzž×£´mÏ»Üýß·1ÞRÁ´N­ê÷sWEÀÔ ËFºŒç«­¥/¡Þ´RW%ÖÈ”é©*q\Df@)n?È饽íÝ×w¬Ë9¿)•^ߦ^˜Šãˆôº,:2v¬*¤Üª{*§7²Q ÎB”’jü¢ œfÛêYý¶33ÊU,-˜-zSÖúnØ0"Õ¢ThϻסN—£o!ûtÑLÌøOgd$œ?`ßv«"eê®d¹+ÎkÕêŒT¶"£‹Ci h¶6´5(ÍFff\ÖÖöz¯üÿÕ¨ Ü3ÿ)™ÿ}'ÿ\àÓ»ÕüHM±lf fÞ:«{ZLY·ýg¹{Õlù³^:#Nf¢•N• +áÓkeo¤Í:–¥¯ºktLØŸ÷„Õÿ,Qóß3{‚3#ÝúoüLº¸«(¿“–Õs®n÷wù½†]\,¢þEµ\}sw¸û¿Íì2êáeò-ªã뛽ÇÝþoa—W (¿‘mW\Ýî>ïó{ º¸YEü‹j¸úæïq÷›ØeÕÂÊ/ä[UÇ×7{»üÞÃ.®Q"Ú®>¹»Ü}ßæöup²‹ùÕqõÍÞãîÿ7°Ë«…”_ȶ«®n÷wù½†]\,¢þEµ\}sw¸û¿Íì2êáeò-ªã뛽ÇÝþoa—W (¿‘mW\Ýî>ïó{ º¸YEü‹j¸úæïq÷›ØeÕÂÊ/ä[UÇ×7{»üÞÃ.®Q"Ú®uõmí÷³¯S'Q_ÀSšfªÊ¢¸êa§T“…²fZ¿øÃ-ò-ªåÊܚĹl<8˜W]=tªµV­6¦ì?-²”ê$Ÿã-¡=Ê¢ª¦aÚbÈ\ D;ÁÜu«;fûºÛœªeÅkX-bƒRBRµG›—&DwI+%$Í!*ÑDeÁÂ@4 ¹¶ë¹÷||_[ËwØÈ,˜WLÚô·WU¬­åÇ‹QÉT•W!ž«ë½ &ƒüv]-§¢Ã;—Cœ:ý-?ü¶©ü¾3€z,3¹ôyïÓ×ÿËjŸËã8 mç]Þ/y9ÖÙÝÒÄÞ:êÞÊý§H”ÍrÈÒX¦Pf¯‹'Ù)2ªõ$m´†ÍSD„3²”)jq.!®£MÐm)6îXÊÆ›Sjµ.Î:‹&¬Á,™¸QÔãDâ²mFQ¶’VΛE®¢»‘ÿ‘èå+&!и÷¢ûLî×û`ÿG|kODÿ;á±Á’€f_þÕà¤þ‡Vvü|¥5x'1š€«0aGyéá°ÃòOY¶ÚR·£ªÔDFô€ö€uµŸýž«ÿÿõjC7 ÿÊfßIÿ×84îõ#ÒFì[¨Ó^Çß½§Ö -¿{O¬@[~öŸX€8¶ýí>±qmûÚ}bâÛ÷´úÄÅ·ïiõˆ‹oÞÓëß½§Ö -¿{O¬@[~öŸX€8¶ýí>±qmûÚ}bâÛ÷´úÄÅ·ïiõˆ›Ap’F]Ѐ~È´à..w©û0oô]x|Ë,æ^û)]¿Iµoš©6ä¿b½Üq¾¸rÅómAvmé—n ­ÅuÜÓø·$¤ª2œ™Ö”„#‹ŒÒÖfIá5¶Z•¢vCÄ6 ʵ‹ ÞBºé“W¯©4裷¯ýfihÚWfEü¦cNæÿäzBiÝŠLäÂ;Û³bö ÍG&üéÞÝ›µ90ŸçNöìØ½¨É„ÿ:w·fÅí@L'ùÓ½»6/jra?ÎíÙ±{P“ þtïn͋ڀ˜Oó§{vl^ÔäÂ;Û³bö &üéÞÝ›µ90ŸçNöìØ½¨É„ÿ:w·fÅí@L'ùÓ½»6/jra?ÎíÙ±{P“ þtïn͋ڀ(†~¶d[ÛÌîåÇ]U»ž«™$ªï´ñ7ù‡ÏTqm7 Öž‰þ&wÃhÃ%+Îx§.¯YÁ4æês(Ë‘S¥Jž´·%½š%Tý¢–•‘kÐ=SÐvü|¥5x2þL'ùÓ½»6/j Ôra?ÎíÙ±{P“ þtïn͋ڀ˜Oó§{vl^ÔäÂ;Û³bö &üéÞÝ›µ90ŸçNöìØ½¨É„ÿ:w·fÅí@L'ùÓ½»6/jra?ÎíÙ±{P“ þtïn͋ڀ˜Oó§{vl^ÔäÂ;Û³bö &üéÞÝ›µ90ŸçNöìØ½¨¯«ãÉ¥TÕÊ•ì{1=l]DGÿ ­nÁƦfêì¥1xMAÉ|ÉN8iuÂÚY‘ŸDøÞ¯äzBhÝ‹aƒ5 ]ê~ÌÇý^2ËAù—¾ÊWgÒm[æª@ ¹ðÈÿË¿ÿËWú fÄWÐlH”š½ÛF^¾™QR‰hWË3OCÑ'øFÍÿÈô„Ó»›Ëf)ñæ›î—ÒŒÔrÙŠ|y¦û¥ô ¶bŸi¾é}(-˜§ÇšoºWJËf)ñæ›î—Ò€rÙŠ|y¦û¥ô ¶bŸi¾é}(-˜§Çšoº_JËf)ñæ›î—Ò€rÙŠ|y¦û¥ô ¶bŸi¾é}(-˜§Çšoº_JËf)ñæ›î—Ò€rÙŠ|y¦û¥t ¶bŸi¾é}( ¼ëj]ÛÌîãàÕv5`ãUÌäsQì°ùº‘ ièŸâg|6ˆ2P½gjÅ2ZÁzÌÖ©ÔØ™=s1ã2B6è•T§]5è™è4íøùJjðf|¶bŸi¾é}(ÍG-˜§Çšoº_JËf)ñæ›î—Ò€rÙŠ|y¦û¥ô ¶bŸi¾é}(-˜§Çšoº_JËf)ñæ›î—Ò€rÙŠ|y¦û¥ô ¶bŸi¾é}(-˜§Çšoº_JËf)ñæ›î—Ò€rÙŠ|y¦û¥ô ¶bŸi¾é](-˜§Çšoº_JËf)ñæ›îÕÒ€ëªù«.•SBoŠi©Q$–Òú&ƒÿº«n&<Úf`—Ô¿Má5Øï'òV…:á¥Eü¤4îõ#ÒFì}[ ¨ïSö`Þ?èºðù–X ̽öQ»>“*ÿ5RmȆGþ]ÿþZ¿Ð`",Ã+Æ´Å-”)GU¯ðšHÏÿzœ4îoþG¤&Ø¥Þ¶ñvýÁ{5mâíû‚ö:Ú?ÅÛ÷ìu´‹·î ØëhÿoܰÖÑþ.߸/`­£ü]¿p^À[Gø»~ཀ¶ñvýÁ{mâíû‚ö:Ú?ÅÛ÷ìu´‹·î ØëhÿoܰÖÑþ.߸/`­£ü]¿p^À so@Ûmï3»^ÃiGþ°z줋ÿ³¿ø´ôOñ3¾(æ¥WV%( p‘–¥ÿ±ÕF¿)M^ »­£ü]¿p^ÀÍG[Gø»~ཀ¶ñvýÁ{mâíû‚ö:Ú?ÅÛ÷ìu´‹·î ØëhÿoܰÖÑþ.߸/`­£ü]¿p^À[Gø»~ཀ¶ñvýÁ{mâíû‚ö:Ú?ÅÛ÷ìu´‹·î Øëhÿoܰ¬¬ÆŽTНæÿÉ¿ÿ`½ìÿ '¸aDÌäE¡ç?B/þsƒNïWò=!4nÇÕ°Qš€.õ?f ãþ‹¯™e€ üËße+³é6­óU Ü€xŸ-¦^ItM "õ€jλ½~LÁî<¦`ºÝeš<ú³Š­© ºÜ¢—S•)¥´L¼f”›n§dJ×]H†ÕE5Û|"û‘ǃ ô†eï»Ý_±—ÕDä§õëðf›Hf^û½Õû}T2Súõø3MǤ3/}ÞêýŒ¾ª)ýzü¦ãÒ—¾ïu~Æ_U ”þ½~ Óqé Ëßwº¿c/ª†J^¿i¸ô†eï»Ý_±—ÕC%?¯_ƒ4ÜzC2÷Ýî¯ØËê¡’Ÿ×¯Ášnc19ϯY÷mbć†%É»¨6±@mµ*C /Š2ZÐOzœ{z—D¶‹_T2Súõø-›™7¤3/}ÞêýŒ¾ª)ýzü¦ãÒ—¾ïu~Æ_U ”þ½~ Óqé Ëßwº¿c/ª†J^¿i¸ô†eï»Ý_±—ÕC%?¯_ƒ4ÜzC2÷Ýî¯ØËê¡’Ÿ×¯Ášn=!™{î÷WìeõPÉOë×àÍ7̽÷{«ö2ú¨d§õëðf›˜½"e æ3æ#¯Ô±uJÏdTNLÙRØo‹âœF¦juJ33_àÓñŠœ±LÄM¤[3¹¹ŠÀËxéÕ«~•`ßKj]Üî?¹Ž·6m"Cì|›:'æÍõ¶j¹)3-uÓ]5=ôíÌ[ÿnMJ>ç8V]K‹InóXIŒ‰=n³Ó‡¡¯Â;’Ÿ×¯Ã™¦çãÒ—¾ïu~Æ_UÉOë×àÍ7̽÷{«ö2ú¨d§õëðf›Hf^û½Õû}T2Súõø3MǤ3/}ÞêýŒ¾ª)ýzü¦ãÒ—¾ïu~Æ_U ”þ½~ Óqé Ëßwº¿c/ª†J^¿i¸ô†eï»Ý_±—ÕC%?¯_ƒ4ÜzC2÷Ýî¯ØËê¡’Ÿ×¯Ášn=!™{î÷WìeõPÉOë×àÍ7̽÷{«ö2ú¨d§õëðf›Hf^û½Õû}T2Súõø3MǤ3/}ÞêýŒ¾ª)ýzü¦ãÒ—¾ïu~Æ_U ”þ½~ Óqé Ëßwº¿c/ª†J^¿i¹ëËçËÓ"ɉõ}«§®š[;]l¾ ´šuþ—ñŽä§õëðf›–pËzè¦Ù·µ~è¢H H»ëò*‘iò’Ip›yÅ«S$©d\ /Ts»15ÎŽÓBú Ôw©û0oô]x|Ë,æ^û(ÝŸI•š©6â×r$WU´ìfWúËBT~¹ÇÉð>#à“ì|Ÿâ1þ >ÀÉð>#à“ì|Ÿâ1þ >ÀÉð>#à“ìÕ¦÷\áwkÊtÄcü}€“à|F?Á'Øù>Äcü}€“à|F?Á'Øù>Äcü}€“à|F?Á'Øän,VOV£4Ñþ!)?úˆœåHJÈÒ´’Ò}¨µ ·Éð„á0fÿm>ÀÉð>#à“ì|Ÿâ1þ >ÀÉð>#à“ì|Ÿâ1þ >ÀÉð>#à“ì|Ÿâ1þ >ÀÉð>#à“ì|Ÿâ1þ >ÀÉð>#à“ì|Ÿâ1þ >ÀÉð>#à“ì|Ÿâ1þ >ÀÉð>#à“ì|Ÿâ1þ >ÀÉð>#à“ìöP„6’Kh$$º Ih^±ýw©û0oô]x|Ë,æ^û(ÝŸI•š©6äY{ÎspÙß-Qräg‘*µp^ÖÄü·»>kQݵ(±êm0…4äÖÐÙ¬ÜQ«i$¦žcÛ¥Àì7ˆÜÔ¼74§îõŽ^¨Î¯â6¤ÖpýNµ%—ç?Q'$Hr ™*(­s õ°_ÛFm/M–‰ >VlËî¿ï»ÚôWçÞ—=Yš%.ˆ¢âœëÇ&¶76I¤ õ7½ %)FDF`>×÷vÂöî˜jÆÄÛÝ}Óƒ±R¬)³iu Œ…©ùÓƒ[†Ž9÷¤ Ö­„ì¶Fd’5€w©û0oô]x|Ë,æ^û(ÝŸI•š©6âFøVÔ¶`óËQÓL¶åWi¤–‹ÿS©ÓèË1­%×ÎtµG_úÀ7,Ζ•bÿÂYŠÄ·Ó•ûÖǸh44>²i¥L©SdE`œYð%&ã…©ú„ç'w„s¤nõbL²1¯Ñ­‰õ™5‰1ª¶Üw$*kÍ1Õë4’á$Ñpiê–º€¹sçšó[;Éz`ysçšó[;Éz`.|ó>kfù/MåÏžgÍlß%é ¹óÍy­ä½0—>y¯5³¼—¦rçÏ3æ¶o’ôÐrçÏ5æ¶w’ôÀòçÏ5æ¶w’ôÀ\ùæ¼ÖÍò^˜ËŸ<ךÙÞKÓI{‡b]îªÛää=äwÇÏÚo\ƒ”ºÍblxôäÊ–¢§ÆˆÜHŒ+„ɘ­D’ÓUÚÓ´ÇÿÙkhronos-opencl-man-1.0~svn27110/xhtml/Opencl_tofc.html0000644000175000017500000024137011663317370022551 0ustar mathieumathieu Table of Contents

khronos-opencl-man-1.0~svn27110/xhtml/pdficon_small1.gif0000644000175000017500000000166311660441607023007 0ustar mathieumathieuGIF89a÷ä|ÝÐÒଯé@F┘߸»òU[{||ƒ„ðððÞÄÆåpu±áDKÛ>D777SFG…ë(/; ÏçX^§vX r>@obc㈌ædièLR¥¥¦nnoí$ÀÀÀÜÝÞÿÿÿ,˜GŒH¢ Áƒ! qÀƒÃ‡D@0„Å‹AtðÀ€‚Œ 7b¸0dÆ"R~0` ƒ0;HÐaAJz¸)€ž8uòäð“gÎ!vÞ$ ôhÒ¡š Mf£S{(ÐAÁM§JT(€Ã8€€ƒÏ› 6tР“@M _Z ‰7/R>LøA@;khronos-opencl-man-1.0~svn27110/xhtml/styles-css.xsl0000644000175000017500000001226111660441607022262 0ustar mathieumathieu /* This style sets a margin around the entire page */ html, body { margin: 10px; } p { font: normal 16px verdana, sans-serif; margin: 0; padding-bottom:12px; } h1 { font: bold 25px verdana, sans-serif; margin-top: 0; margin-bottom: 3px; padding-top: 0; padding-bottom: 0; } h2 { font: bold 19px verdana, sans-serif; margin-top: 28px; margin-bottom: 3px; padding-top: 0; padding-bottom: 0; } h3 { font: bold 19px verdana, sans-serif !important; margin-top: 28px; margin-bottom: 3px; padding-top: 0; padding-bottom: 0; } li { font: normal 16px verdana, sans-serif; margin-top: 0; margin-bottom: 18px; padding-top: 0; padding-bottom: 0; } .pdparam { font: italic 16px verdana, sans-serif; } .term { font: italic 16px verdana, sans-serif; font-weight: normal; } .type { font: normal 16px verdana, sans-serif !important; } .parameter { font-style: italic; } a:link, a:visited { color: blue; text-decoration: none; font: normal 16px; } a:hover { background-color: #FFFF99; font: normal 16px; } div.funcsynopsis { text-align: left; background-color: #e6e6e6; font: normal 16px verdana, sans-serif; padding-top: 10px; padding-bottom: 10px; } div.funcsynopsis table { border-collapse: separate; font: normal 16px verdana, sans-serif; } div.funcsynopsis td { background-color: #e6e6e6; border: 0 solid #000; padding: 1px; font: normal 16px verdana, sans-serif; } div.refsect1 { font-family: verdana, sans-serif; font-size: 16px; } code.constant { font: normal 16px courier new, monospace !important; } span.errorname { font: normal 16px verdana, sans-serif !important; } code.function { font: bold 16px verdana, sans-serif !important; } b.fsfunc { font: bold 16px verdana, sans-serif !important; } code.varname { font: italic 16px verdana, sans-serif; } code.replaceable { font: italic 16px courier new, monospace; } code.funcdef { font: normal 16px verdana, sans-serif !important; } .citerefentry { font: normal 16px verdana, sans-serif !important; } .parameter { font-style: italic; } code.fsfunc { font: normal 16px verdana, sans-serif !important; } /* PARAMETER: This style controls spacing between the terms in Parameter section */ dt { margin-top: 15px; } /* TABLES: These styles apply to all tables OTHER than the Synopsis and Example tables */ div.refsect1 table { width: 100%; margin-top: 10px; background-color: #FFF; border-collapse: collapse; border-color: #000; border-width: 1px; font: normal 16px verdana, sans-serif; } div.refsect1 th { border-collapse: collapse; border-color: #000; border-width: 1px; font: bold 16px verdana, sans-serif; } div.refsect1 td { background-color: #FFF; padding: 5px; vertical-align: text-top; border-collapse: collapse; border-color: #000; border-width: 1px; font: normal 16px verdana, sans-serif; } div.refsect1 p{ font: normal 16px verdana, sans-serif; margin-top: 8px; margin-bottom: 8px; padding-top: 0; padding-bottom: 0; } /* EXAMPLE: These styles apply only to the Example section */ div.refsect2 { font: normal 16px courier new, monospace !important; } div.refsect2 table { margin-top: 0; background-color: #e6e6e6; width: 100%; border: 0 solid #000; padding: 2px; font: normal 16px courier new, monospace !important; } div.refsect2 td { background-color: #e6e6e6; font: normal 16px courier new, monospace !important; white-space:pre; } /* COPYRIGHT: This style formats the text of the copyright statement at the bottom of the page */ div.refsect3 { font: normal 11px verdana, sans-serif; margin-top: 50px; margin-bottom: 20px; padding-top: 0; padding-bottom: 0; } khronos-opencl-man-1.0~svn27110/xhtml/pageNumberLookup.rb0000755000175000017500000004603212061211433023217 0ustar mathieumathieu#!/usr/bin/ruby # for Ruby 1.9 # Synopsis: # # pageNumberLookup.rb filename.html > outputFile.html # # This script is used to replace symbolic references to locations in the OpenCL # specification with page number references. This can be used when you want the # reference page to refer to section XYZ of the OpenCL spec with a link and have # the link open the spec document to section XYZ. This approach is based on the # "named destination" feature for PDF files. # # Ideally we wanted to link to the named destinations, but inconsistencies between # versions of MS Word and other limitations prevent us from doing that at this time. # So, this is a second-best solution in which we map symbolic names to page # numbers, then the link will open the spec to the specified page. To use this # solution, refer to a section in the spec using a symbolic name that you make up # in a element with a uri attribute that is the symbolic name. Then add # the keyword to the lookup table below with the corresponding page number from # the Spec. # # For example to link to the spec section for gl_sharing, use: # # OpenCL Specification # # The xsltproc program generates a temporary HTML file where the XML line above # is transformed into a line containing a placeholder URL: # # # OpenCL Specification # # When this lookup program is run on the temporary HTML file, it will look up the # keyword and replace the placeholder text in the HTML file with the final URL. # The final URL is specified below in Specnames. This transforms the placeholder # line into the final form, in this manner: # # # OpenCL Specification # # (You can control what the first part of the URL is by modifying the SpecBaseUrl # variable in the opencl-man.xsl file.) # Here are the real spec filenames of the OpenCL 1.2 spec documents (see comments above): Core = "opencl-1.2.pdf" Ext = "opencl-1.2-extensions.pdf" ############################################################################### # Spec page number mapping here. First string in quotes. Commas between values. # The comments are for reference to see where this content can be found in the spec. # Pagenums = { "classDiagram" => [Core, 20], # 2.1 - OpenCL Class Diagram "clGetPlatformIDs" => [Core, 33], # 4.1 - Querying Platform Info "clGetPlatformInfo" => [Core, 33], # 4.1 - Querying Platform Info "clGetDeviceIDs" => [Core, 35], # 4.2 - Querying Devices "clGetDeviceInfo" => [Core, 37], # 4.2 - Querying Devices "cl_khr_fp64" => [Core, 46], # 4.2 - Querying Devices "clCreateSubDevices" => [Core, 49], # 4.3 - Partitioning a Device "clRetainDevice" => [Core, 52], # 4.3 - Partitioning a Device "clReleaseDevice" => [Core, 52], # 4.3 - Partitioning a Device "clCreateContext" => [Core, 54], # 4.4 - Contexts "clCreateContextFromType" => [Core, 56], # 4.4 - Contexts "clRetainContext" => [Core, 57], # 4.4 - Contexts "clReleaseContext" => [Core, 57], # 4.4 - Contexts "clGetContextInfo" => [Core, 58], # 4.4 - Contexts "clCreateCommandQueue" => [Core, 61], # 5.1 - Command Queues "clRetainCommandQueue" => [Core, 62], # 5.1 - Command Queues "clReleaseCommandQueue" => [Core, 63], # 5.1 - Command Queues "clGetCommandQueueInfo" => [Core, 63], # 5.1 - Command Queues "clCreateBuffer" => [Core, 66], # 5.2.1 - Creating Buffer Objects "clCreateSubBuffer" => [Core, 69], # 5.2.1 - Creating Buffer Objects "clEnqueueReadBuffer" => [Core, 72], # 5.2.2 - Reading, Writing, Copying Buffer Objects "clEnqueueWriteBuffer" => [Core, 72], # 5.2.2 - Reading, Writing, Copying Buffer Objects "clEnqueueReadBufferRect" => [Core, 74], # 5.2.2 - Reading, Writing and Copying Buffer Objects "clEnqueueWriteBufferRect" => [Core, 75], # 5.2.2 - Reading, Writing and Copying Buffer Objects "clEnqueueCopyBuffer" => [Core, 79], # 5.2.2 - Reading, Writing, Copying Buffer Objects "clEnqueueCopyBufferRect" => [Core, 81], # 5.2.2 - Reading, Writing and Copying Buffer Objects "clEnqueueFillBuffer" => [Core, 84], # 5.2.2 - Reading, Writing and Copying Buffer Objects "clEnqueueMapBuffer" => [Core, 86], # 5.2.3 - Mapping Buffer Objects "clCreateImage" => [Core, 90], # 5.3.1 - Creating Image Objects "cl_image_format" => [Core, 92], # 5.3.1.1 - Image Format Descriptor "imageDescriptor" => [Core, 95], # 5.3.1.2 - Image Descriptor "clGetSupportedImageFormats" => [Core, 96], # 5.3.2 - Querying List of Supported Image Formats "supportedImageFormats" => [Core, 97], # 5.3.2.1 - Supported Image Formats "clEnqueueReadImage" => [Core, 98], # 5.3.3 - Reading, Writing and Copying Image Objects "clEnqueueWriteImage" => [Core, 99], # 5.3.3 - Reading, Writing and Copying Image Objects "clEnqueueCopyImage" => [Core, 104], # 5.3.3 - Reading, Writing and Copying Image Objects "clEnqueueFillImage" => [Core, 105], # 5.3.3 - Reading, Writing and Copying Image Objects "clEnqueueCopyImageToBuffer" => [Core, 107], # 5.3.4 - Copying between Image and Buffer Objects "clEnqueueCopyBufferToImage" => [Core, 110], # 5.3.4 - Copying between Image and Buffer Objects "clEnqueueMapImage" => [Core, 112], # 5.3.5 - Mapping Image Objects "clGetImageInfo" => [Core, 116], # 5.3.6 - Image Object Queries "clRetainMemObject" => [Core, 118], # 5.4.1 - Retaining and Releasing Memory Objects "clReleaseMemObject" => [Core, 118], # 5.4.1 - Retaining and Releasing Memory Objects "clSetMemObjectDestructorCallback" => [Core, 119], # 5.4.1 - Retaining and Releasing Memory Objects "clEnqueueUnmapMemObject" => [Core, 120], # 5.4.2 - Unmapping Mapped Memory Objects "clEnqueueMigrateMemObjects" => [Core, 123], # 5.4.4 - Migrating Memory Objects "clGetMemObjectInfo" => [Core, 125], # 5.4.5 - Memory Object Queries "clCreateSampler" => [Core, 128], # 5.5.1 - Creating Sampler Objects "clRetainSampler" => [Core, 129], # 5.5.1 - Creating Sampler Objects "clReleaseSampler" => [Core, 129], # 5.5.1 - Creating Sampler Objects "clGetSamplerInfo" => [Core, 130], # 5.5.2 - Sampler Object Queries "clCreateProgramWithSource" => [Core, 132], # 5.6.1 - Creating Program Objects "clCreateProgramWithBinary" => [Core, 133], # 5.6.1 - Creating Program Objects "clCreateProgramWithBuiltInKernels" => [Core, 135], # 5.6.1 - Creating Program Objects "clRetainProgram" => [Core, 136], # 5.6.1 - Creating Program Objects "clReleaseProgram" => [Core, 136], # 5.6.1 - Creating Program Objects "clBuildProgram" => [Core, 137], # 5.6.2 - Building Program Executables "clCompileProgram" => [Core, 139], # 5.6.3 - Separate Compilation and Linking of Programs "clLinkProgram" => [Core, 142], # 5.6.3 - Separate Compilation and Linking of Programs "clUnloadPlatformCompiler" => [Core, 149], # 5.6.6 - Unloading the OpenCL Compiler "clGetProgramInfo" => [Core, 150], # 5.6.7 - Program Object Queries (updated for 1.2 rev 14) "clGetProgramBuildInfo" => [Core, 153], # 5.6.7 - Program Object Queries "clCreateKernel" => [Core, 157], # 5.7.1 - Creating Kernel Objects "clCreateKernelsInProgram" => [Core, 158], # 5.7.1 - Creating Kernel Objects "clRetainKernel" => [Core, 159], # 5.7.1 - Creating Kernel Objects "clReleaseKernel" => [Core, 159], # 5.7.1 - Creating Kernel Objects "clSetKernelArg" => [Core, 160], # 5.7.2 - Setting Kernel Arguments "clGetKernelInfo" => [Core, 162], # 5.7.3 - Kernel Object Queries (updated for 1.2 rev 14) "clGetKernelWorkGroupInfo" => [Core, 164], # 5.7.3 - Kernel Object Queries "clGetKernelArgInfo" => [Core, 166], # 5.7.3 - Kernel Object Queries (updated for 1.2 rev 14) "clEnqueueNDRangeKernel" => [Core, 169], # 5.8 - Executing Kernels (updated for 1.2 rev 14) "clEnqueueTask" => [Core, 172], # 5.8 - Executing Kernels (updated for 1.2 rev 14) "clEnqueueNativeKernel" => [Core, 174], # 5.8 - Executing Kernels (updated for 1.2 rev 14) "clCreateUserEvent" => [Core, 178], # 5.9 - Event Objects "clSetUserEventStatus" => [Core, 178], # 5.9 - Event Objects "clWaitForEvents" => [Core, 179], # 5.9 - Event Objects "clGetEventInfo" => [Core, 180], # 5.9 - Event Objects "clSetEventCallback" => [Core, 183], # 5.9 - Event Objects "clRetainEvent" => [Core, 184], # 5.9 - Event Objects "clReleaseEvent" => [Core, 185], # 5.9 - Event Objects "clEnqueueMarkerWithWaitList" => [Core, 186], # 5.10 - Markers, Barriers and Waiting for Events "clEnqueueBarrierWithWaitList" => [Core, 187], # 5.10 - Markers, Barriers and Waiting for Events "clGetEventProfilingInfo" => [Core, 190], # 5.12 - Profiling Operations on Memory Objects and Kernels "clFlush" => [Core, 193], # 5.13 - Flush and Finish "clFinish" => [Core, 193], # 5.13 - Flush and Finish "scalarDataTypes" => [Core, 195], # 6.1.1 - Built-in Scalar Data Types "vectorDataTypes" => [Core, 198], # 6.1.2 - Built-in Vector Data Types "otherDataTypes" => [Core, 199], # 6.1.3 - Other Built-in Data Types "reservedDataTypes" => [Core, 200], # 6.1.4 - Reserved Data Types "convert_T" => [Core, 207], # 6.2.3 - Explicit Conversions "as_typen" => [Core, 212], # 6.2.4.2 - Reinterpreting Types Using as_typen() "operators" => [Core, 215], # 6.3 - Operators "addressSpaceQualifier" => [Core, 222], # 6.5 - Address Space Qualifiers "accessQualifiers" => [Core, 226], # 6.6 - Access Qualifiers "functionQualifiers" => [Core, 227], # 6.7 - Function Qualifiers "storageQualifiers" => [Core, 230], # 6.8 - Storage-class Qualifiers "restrictions" => [Core, 231], # 6.9 - Restrictions "preprocessorDirectives" => [Core, 234], # 6.10 - Preprocessor Directives and Macros "attribute" => [Core, 236], # 6.11. - Attribute Qualifiers "attributes-types" => [Core, 237], # 6.11.1 - Specifying Attributes of Types "attributes-variables" => [Core, 239], # 6.11.3 - Specifying Attributes of Variables "attributes-blocksAndControlFlow" => [Core, 241], # 6.11.4 - Specifying Attributes of Blocks and Control... "workItemFunctions" => [Core, 242], # 6.12.1 - Work-Item Functions "mathFunctions" => [Core, 244], # 6.12.2 - Math Functions "mathConstants" => [Core, 251], # 6.12.2 - Table at end of Math Functions "FP_CONTRACT" => [Core, 252], # 6.12.2.1 - Floating-point macros and pragmas "macroLimits" => [Core, 252], # 6.12.2.1 - Floating-point macros and pragmas "integerFunctions" => [Core, 256], # 6.12.3 - Integer Functions "commonFunctions" => [Core, 260], # 6.12.4 - Common Functions "geometricFunctions" => [Core, 262], # 6.12.5 - Geometric Functions "relationalFunctions" => [Core, 264], # 6.12.6 - Relational Functions "vectorDataLoadandStoreFunctions" => [Core, 267], # 6.12.7 - Vector Data Load and Store Functions "synchFunctions" => [Core, 274], # 6.12.8 - Synchronization Functions "explicitMemoryFenceFunctions" => [Core, 275], # 6.12.9 - Explicit Memory Fence Functions "asyncCopyFunctions" => [Core, 276], # 6.12.10 - Async Copies from Global to Local Memory... "atomicFunctions" => [Core, 279], # 6.12.11 - Atomic Functions for 32-bit integers "miscVectorFunctions" => [Core, 282], # 6.12.12 Miscellaneous Vector Functions "printfFunction" => [Core, 284], # 6.12.13 - printf "imageFunctions" => [Core, 292], # 6.12.14 - Image Read and Write Functions "sampler_t" => [Core, 292], # 6.12.14.1 - Samplers "imageQueryFunctions" => [Core, 311], # 6.12.14.5 - Built-in Image Query Functions "imageAddressFiltering" => [Core, 326], # 8 - Image Addressing and Filtering "referenceWong" => [Core, 355], # 11 - References (to Wong paper) "deprecated" => [Core, 373], # F - Changes "EXTENSION" => [Ext, 6], # 9.1 - Compiler Directives for Optional Extensions "clGetExtensionFunctionAddressForPlatform" => [Ext, 7], # 9.2 - Getting OpenCL API Extension Function Pointers "cl_khr_int64_base_atomics" => [Ext, 10], # 9.3 - 64-bit Atomics "cl_khr_int64_extended_atomics" => [Ext, 10], # 9.3 - 64-bit Atomics "atom_add" => [Ext, 10], # 9.3 - 64-bit Atomics "imageFunctions3D" => [Ext, 12], # 9.4 - Writing to 3D image memory objects "cl_khr_3d_image_writes" => [Ext, 12], # 9.4 - Writing to 3D image memory objects "cl_khr_fp16" => [Ext, 14], # 9.5 - Half Floating-Point "imageFunctionsHalf" => [Ext, 27], # 9.5.8 - Image Read and Write Functions (half) "cl_khr_gl_sharing" => [Ext, 39], # 9.6 - Creating CL context from a GL context or share group "clGetGLContextInfoKHR" => [Ext, 43], # 9.6.5 - Additions to section 9.8 of the... "clCreateFromGLBuffer" => [Ext, 49], # 9.7.2 - CL Buffer Objects -> GL Buffer Objects "clCreateFromGLTexture" => [Ext, 50], # 9.7.3 - CL Image Objects -> GL Textures "clCreateFromGLRenderbuffer" => [Ext, 53], # 9.7.4 - CL Image Objects -> GL Renderbuffers "clGetGLObjectInfo" => [Ext, 54], # 9.7.5 - Querying GL object information from a CL... "clGetGLTextureInfo" => [Ext, 55], # 9.7.5 - Querying GL object information from a CL... "clEnqueueAcquireGLObjects" => [Ext, 56], # 9.7.6 - Sharing memory objects that map to GL objects... "clEnqueueReleaseGLObjects" => [Ext, 58], # 9.7.6 - Sharing memory objects that map to GL objects... "cl_khr_gl_event" => [Ext, 61], # 9.8 - Creating CL event objets "clCreateEventFromGLsyncKHR" => [Ext, 62], # 9.8.4 - Additions to Chapter 5 "cl_khr_d3d10_sharing" => [Ext, 66], # 9.9 - Sharing Memory Objects with Direct3D 10 "clGetDeviceIDsFromD3D10KHR" => [Ext, 71], # 9.9.7.1 - Querying OpenCL Devices Corresponding to... 11... "clCreateFromD3D10BufferKHR" => [Ext, 73], # 9.9.7.3 - Sharing Direct3D 10 Buffer Resources as OpenCL... "clCreateFromD3D10Texture2DKHR" => [Ext, 74], # 9.9.7.4 - Sharing Direct3D 10 Texture and Resources... "clCreateFromD3D10Texture3DKHR" => [Ext, 75], # 9.9.7.4 - Sharing Direct3D 10 Texture and... "clEnqueueAcquireD3D10ObjectsKHR" => [Ext, 77], # 9.9.7.6 - Sharing memory objects created from Direct3D 10.. "clEnqueueReleaseD3D10ObjectsKHR" => [Ext, 79], # 9.9.7.6 - Sharing memory objects created from... "cl_khr_dx9_media_sharing" => [Ext, 83], # 9.10 - DX9 Media Surface Sharing "clGetDeviceIDsFromDX9MediaAdapterKHR" => [Ext, 88], # 9.10.7.1 - Querying OpenCL Devices corresponding.... "clCreateFromDX9MediaSurfaceKHR" => [Ext, 89], # 9.10.7.2 Creating Media Resources as OpenCL Image Objects "clEnqueueAcquireDX9MediaSurfacesKHR" => [Ext, 92], # 9.10.7.4 - Sharing Memory Objects created from Media Surfaces "clEnqueueReleaseDX9MediaSurfacesKHR" => [Ext, 93], # 9.10.7.4 - Sharing Memory Objects... "cl_khr_d3d11_sharing" => [Ext, 97], # 9.11 - Sharing Memory Objects with Direct3D 11 "clGetDeviceIDsFromD3D11KHR" => [Ext, 102], # 9.11.7.1 - Querying OpenCL Devices Corresponding to Direct3D "clCreateFromD3D11BufferKHR" => [Ext, 104], # 9.11.7.3 - Sharing Direct3D 11 Buffer Resources "clCreateFromD3D11Texture2DKHR" => [Ext, 105], # 9.11.7.4 - Sharing Direct3D 11 Texture and Resources... "clCreateFromD3D11Texture3DKHR" => [Ext, 106], # 9.11.7.4 - Sharing Direct3D 11 Texture and Resources.... "clEnqueueAcquireD3D11ObjectsKHR" => [Ext, 108], # 9.11.7.6 - Sharing memory objects created from Direct3D 11... "clEnqueueReleaseD3D11ObjectsKHR" => [Ext, 110], # 9.11.7.6 - Sharing memory objects created from Direct3D 11... "cl_khr_icd" => [Ext, 113], # 9.12 - OpenCL Installable Client Driver (ICD) "clIcdGetPlatformIDsKHR" => [Ext, 116], # 9.12.9 - Additions to chapter 4... } ############################################################################### # Copy the specified file to the output, substituting any references to spec page numbers # IO.foreach(ARGV[0]) do |line| if line.match("namedest=") keyword = line.sub(/^.*namedest=/, "").sub(/\".*$/, "").chomp.rstrip if Pagenums.has_key?(keyword) specName = Pagenums.fetch(keyword)[0] pageNum = Pagenums.fetch(keyword)[1] #puts "specName=" + specName + ", pageNum=" + pageNum.to_s puts line.sub(/namedest=[^\s]*\"/, "page=" + pageNum.to_s + '"').sub(/opencl-1.x-latest.pdf/, specName) else abort("Spec page number for keyword \"" + keyword + "\" not found in " + $0) + '"' end else puts line end end khronos-opencl-man-1.0~svn27110/xhtml/Makefile0000644000175000017500000004505412106540625021063 0ustar mathieumathieu#!gmake # This Makefile is used to transform OpenCL reference pages in DocBook XML format to HTML web pages. # Directory structure: # # man/ -- contains .xml input files # man/xhtml -- contains Makefile, CSS, build tools, and .html output files # XSLT processor - other possibilities like Saxon exist XSLT = xsltproc --nonet SED = sed MV = mv # Location of locally customized stylesheet, which imports # the Docbook modular stylesheets, and specifically the # stylesheet to convert Docbook+MathML => XHTML+MathML DB2XHTML = opencl-man.xsl # Additional global dependencies that should cause a re-build of all pages: ADDTL_DEPS = copyright.inc.xsl styles-css.xsl pageNumberLookup.rb # Filter program to fix up links to specification page numbers: PAGENUM_FIXUP = ./pageNumberLookup.rb .SUFFIXES: .gl .xml .html .xhtml .ck.xhtml .tex .pdf .3G .tar .tar.gz #.PHONY: man html HTMLFILES = \ abstractDataTypes.html \ abs.html \ accessQualifiers.html \ acos.html \ add_sat.html \ any.html \ as_typen.html \ asin.html \ asyncCopyFunctions.html \ async_work_group_copy.html \ async_work_group_strided_copy.html \ atan.html \ atomic_add.html \ atom_add.html \ atomic_and.html \ atom_and.html \ atomic_cmpxchg.html \ atom_cmpxchg.html \ atomic_dec.html \ atom_dec.html \ atomic_inc.html \ atom_inc.html \ atomic_max.html \ atom_max.html \ atomic_min.html \ atom_min.html \ atomic_or.html \ atom_or.html \ atom_sub.html \ atomic_sub.html \ atomic_xchg.html \ atom_xchg.html \ atomic_xor.html \ atom_xor.html \ atomicFunctions.html \ attribute.html \ attributes-blocksAndControlFlow.html \ attributes-types.html \ attributes-variables.html \ barrier.html \ bitselect.html \ cbrt.html \ ceil.html \ clamp.html \ classDiagram.html \ clBuildProgram.html \ clCompileProgram.html \ clCreateBuffer.html \ clCreateCommandQueue.html \ clCreateContext.html \ clCreateContextFromType.html \ clCreateEventFromGLsyncKHR.html \ clCreateFromD3D10Texture2DKHR.html \ clCreateFromD3D11Texture2DKHR.html \ clCreateFromD3D10Texture3DKHR.html \ clCreateFromD3D11Texture3DKHR.html \ clCreateFromD3D10BufferKHR.html \ clCreateFromD3D11BufferKHR.html \ clCreateFromGLBuffer.html \ clCreateFromGLRenderbuffer.html \ clCreateFromGLTexture.html \ clCreateFromDX9MediaSurfaceKHR.html \ clCreateImage.html \ clCreateKernel.html \ clCreateKernelsInProgram.html \ clCreateProgramWithBinary.html \ clCreateProgramWithSource.html \ clCreateProgramWithBuiltInKernels.html \ clCreateSampler.html \ clCreateSubBuffer.html \ clCreateSubDevices.html \ clCreateUserEvent.html \ clEnqueueAcquireD3D10ObjectsKHR.html \ clEnqueueAcquireD3D11ObjectsKHR.html \ clEnqueueAcquireGLObjects.html \ clEnqueueAcquireDX9MediaSurfacesKHR.html \ clEnqueueBarrierWithWaitList.html \ clEnqueueCopyBuffer.html \ clEnqueueCopyBufferRect.html \ clEnqueueCopyImage.html \ clEnqueueCopyBufferToImage.html \ clEnqueueCopyImageToBuffer.html \ clEnqueueFillBuffer.html \ clEnqueueFillImage.html \ clEnqueueMapBuffer.html \ clEnqueueMapImage.html \ clEnqueueMarkerWithWaitList.html \ clEnqueueMigrateMemObjects.html \ clEnqueueNDRangeKernel.html \ clEnqueueNativeKernel.html \ clEnqueueReadBuffer.html \ clEnqueueReadBufferRect.html \ clEnqueueReadImage.html \ clEnqueueReleaseD3D10ObjectsKHR.html \ clEnqueueReleaseD3D11ObjectsKHR.html \ clEnqueueReleaseDX9MediaSurfacesKHR.html \ clEnqueueWriteBuffer.html \ clEnqueueWriteBufferRect.html \ clEnqueueWriteImage.html \ clEnqueueReleaseGLObjects.html \ clEnqueueTask.html \ clEnqueueUnmapMemObject.html \ clFinish.html \ clFlush.html \ clGetCommandQueueInfo.html \ clGetContextInfo.html \ clGetDeviceIDs.html \ clGetDeviceIDsFromD3D10KHR.html \ clGetDeviceIDsFromD3D11KHR.html \ clGetDeviceIDsFromDX9MediaAdapterKHR.html \ clGetDeviceInfo.html \ clGetEventInfo.html \ clGetEventProfilingInfo.html \ clGetExtensionFunctionAddressForPlatform.html \ clGetGLContextInfoKHR.html \ clGetGLObjectInfo.html \ clGetGLTextureInfo.html \ clGetImageInfo.html \ clGetKernelInfo.html \ clGetKernelArgInfo.html \ clGetKernelWorkGroupInfo.html \ clGetMemObjectInfo.html \ clGetPlatformIDs.html \ clGetPlatformInfo.html \ clGetProgramBuildInfo.html \ clGetProgramInfo.html \ clGetSamplerInfo.html \ clGetSupportedImageFormats.html \ clIcdGetPlatformIDsKHR.html \ cl_image_format.html \ cl_khr_3d_image_writes.html \ cl_khr_dx9_media_sharing.html \ cl_khr_d3d10_sharing.html \ cl_khr_d3d11_sharing.html \ cl_khr_fp16.html \ cl_khr_fp64.html \ cl_khr_icd.html \ cl_khr_int64_base_atomics.html \ cl_khr_int64_extended_atomics.html \ clLinkProgram.html \ clReleaseCommandQueue.html \ clReleaseContext.html \ clReleaseDevice.html \ clReleaseEvent.html \ clReleaseKernel.html \ clReleaseMemObject.html \ clReleaseProgram.html \ clReleaseSampler.html \ clRetainCommandQueue.html \ clRetainContext.html \ clRetainDevice.html \ clRetainEvent.html \ clRetainKernel.html \ clRetainMemObject.html \ clRetainProgram.html \ clRetainSampler.html \ clSetEventCallback.html \ clSetMemObjectDestructorCallback.html \ clSetKernelArg.html \ clSetUserEventStatus.html \ clUnloadPlatformCompiler.html \ clWaitForEvents.html \ clz.html \ commonFunctions.html \ commonMin.html \ commonMax.html \ constant.html \ convert_T.html \ copysign.html \ cos.html \ cross.html \ dataTypes.html \ degrees.html \ deprecated.html \ distance.html \ divide.html \ dot.html \ enums.html \ erf.html \ exp.html \ explicitMemoryFenceFunctions.html \ EXTENSION.html \ fabs.html \ fast_distance.html \ fast_length.html \ fast_normalize.html \ fdim.html \ floor.html \ fma.html \ fmax.html \ fmin.html \ fmod.html \ FP_CONTRACT.html \ fract.html \ frexp.html \ functionQualifiers.html \ geometricFunctions.html \ get_global_id.html \ get_global_offset.html \ get_global_size.html \ get_group_id.html \ get_image_array_size.html \ get_image_channel_data_type.html \ get_image_channel_order.html \ get_image_depth.html \ get_image_dim.html \ get_image_height.html \ get_image_width.html \ get_local_id.html \ get_local_size.html \ get_num_groups.html \ get_work_dim.html \ cl_khr_gl_event.html \ cl_khr_gl_sharing.html \ global.html \ hadd.html \ hypot.html \ ilogb.html \ imageDescriptor.html \ imageFunctions.html \ integerClamp.html \ integerFunctions.html \ integerMax.html \ isequal.html \ isfinite.html \ isgreater.html \ isgreaterequal.html \ isinf.html \ isless.html \ islessequal.html \ islessgreater.html \ isnan.html \ isnormal.html \ isnotequal.html \ isordered.html \ isunordered.html \ ldexp.html \ length.html \ lgamma.html \ local.html \ log.html \ macroLimits.html \ mad.html \ mad24.html \ mad_hi.html \ mad_sat.html \ mag.html \ mathConstants.html \ mathFunctions.html \ mem_fence.html \ miscVectorFunctions.html \ mix.html \ modf.html \ mul24.html \ mul_hi.html \ nan.html \ nextafter.html \ normalize.html \ operators.html \ otherDataTypes.html \ popcount.html \ pow.html \ prefetch.html \ preprocessorDirectives.html \ printfFunction.html \ private.html \ qualifiers.html \ radians.html \ recip.html \ relationalFunctions.html \ read_imagef1d.html \ read_imagef2d.html \ read_imagef3d.html \ read_imagei1d.html \ read_imagei2d.html \ read_imagei3d.html \ read_imageh1d.html \ read_imageh2d.html \ read_imageh3d.html \ read_mem_fence.html \ remainder.html \ remquo.html \ reservedDataTypes.html \ restrictions.html \ rint.html \ rootn.html \ rotate.html \ round.html \ sampler_t.html \ scalarDataTypes.html \ select.html \ shuffle.html \ sign.html \ signbit.html \ sin.html \ smoothstep.html \ sqrt.html \ step.html \ storageQualifiers.html \ sub_sat.html \ supportedImageFormats.html \ tan.html \ tgamma.html \ trunc.html \ upsample.html \ vec_step.html \ vectorDataLoadandStoreFunctions.html \ vectorDataTypes.html \ vloadn.html \ vload_half.html \ vload_halfn.html \ vloada_halfn.html \ vstoren.html \ vstore_half.html \ vstore_halfn.html \ vstorea_halfn.html \ wait_group_events.html \ workItemFunctions.html \ write_image1d.html \ write_image2d.html \ write_image3d.html \ write_mem_fence.html # The following rule accomplishes several things: # 1. First, the xsltproc program transforms .xml into HTML format. # 2. Next, a certain string regarding "xml-stylesheet" is replaced. We # don't know why, but that's how the OpenGL build tools worked, so we # follow the same convention for OpenCL. # 2a. Replace all occurrences of 'fsfunc' with # ''. This works around a bug in the # docbook-xsl 1.76.1 stylesheets. More recent stylesheet releases # don't have this bug, but they aren't installed everywhere. See # http://sourceforge.net/tracker/?func=detail&aid=3481384&group_id=21935&atid=373747 # 3. Then we replace all occurrences of 'target="_top"' with # 'target="pagedisplay" so that linked pages will open in the same # frame. We couldn't figure out how to modify the Docbook rules to # change the target attribute, so we just do it here. # 4. Finally, we replace a particular string regarding # "xhtml1-transitional.dtd", again based on the OpenGL build. This # is so that references to the DTD don't cause spurious hits on # the W3C web server (IE does this, although it doesn't need to). %.html: ../%.xml $(DB2XHTML) $(ADDTL_DEPS) $(XSLT) --xinclude -o $@.tmp1 $(DB2XHTML) $< $(SED) 's/\nfsfunc//g' \ -e 's/target="_top"/target="pagedisplay"/' \ -e 's#http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd#xhtml1-transitional.dtd#g' > $@.tmp2 $(PAGENUM_FIXUP) $@.tmp2 > $@.tmp3 $(MV) $@.tmp3 $@ $(RM) $@.tmp[123] default: $(HTMLFILES) clean: $(RM) $(HTMLFILES) clobber: $(RM) $(HTMLFILES) # The following XML include files dependencies can be generated with: # cd ../man # grep '!ENTITY' *.xml | sed -e 's/:.*SYSTEM "/: ..\//' -e 's/">//' -e 's/\.xml:/.html:/' abs.html: ../integerFunctionsInc.xml acos.html: ../mathFunctionsInc.xml add_sat.html: ../integerFunctionsInc.xml any.html: ../relationalFunctionsInc1.xml any.html: ../relationalFunctionsIGEN.xml asin.html: ../mathFunctionsInc.xml atan.html: ../mathFunctionsInc.xml bitselect.html: ../relationalFunctionsInc1.xml bitselect.html: ../relationalFunctionsGEN.xml cbrt.html: ../mathFunctionsInc.xml ceil.html: ../mathFunctionsInc.xml clamp.html: ../commonFunctionsInc.xml clBuildProgram.html: ../buildOptionsInc.xml clCompileProgram.html: ../buildOptionsInc.xml clCreateBuffer.html: ../clCreate_memflagsInc.xml clCreateFromD3D10BufferKHR.html: ../sharingD3D10Inc.xml clCreateFromD3D10Texture2DKHR.html: ../sharingD3D10Inc.xml clCreateFromD3D10Texture3DKHR.html: ../sharingD3D10Inc.xml clCreateFromD3D11BufferKHR.html: ../sharingD3D11Inc.xml clCreateFromD3D11BufferKHR.html: ../accessMappedInc.xml clCreateFromD3D11Texture2DKHR.html: ../sharingD3D11Inc.xml clCreateFromD3D11Texture2DKHR.html: ../accessMappedInc.xml clCreateFromD3D11Texture3DKHR.html: ../sharingD3D11Inc.xml clCreateFromD3D11Texture3DKHR.html: ../accessMappedInc.xml clCreateFromDX9MediaSurfaceKHR.html: ../mediaSurfaceFormatsInc.xml clCreateFromDX9MediaSurfaceKHR.html: ../accessMappedInc.xml clCreateFromGLRenderbuffer.html: ../gl_formatsInc.xml clCreateImage.html: ../clCreate_memflagsInc.xml clCreateSubBuffer.html: ../clCreate_memflagsInc.xml clCreateSubDevices.html: ../clCreate_memflagsInc.xml clEnqueueAcquireD3D10ObjectsKHR.html: ../sharingD3D10Inc.xml clEnqueueAcquireD3D11ObjectsKHR.html: ../sharingD3D11Inc.xml clEnqueueAcquireD3D11ObjectsKHR.html: ../accessMappedInc.xml clEnqueueAcquireDX9MediaSurfacesKHR.html: ../mediaSurfaceFormatsInc.xml clEnqueueAcquireDX9MediaSurfacesKHR.html: ../accessMappedInc.xml clEnqueueAcquireGLObjects.html: ../gl_syncInc.xml clEnqueueReleaseD3D10ObjectsKHR.html: ../sharingD3D10Inc.xml clEnqueueReleaseD3D11ObjectsKHR.html: ../sharingD3D11Inc.xml clEnqueueReleaseD3D11ObjectsKHR.html: ../accessMappedInc.xml clEnqueueReleaseDX9MediaSurfacesKHR.html: ../mediaSurfaceFormatsInc.xml clEnqueueReleaseDX9MediaSurfacesKHR.html: ../accessMappedInc.xml clEnqueueReleaseGLObjects.html: ../gl_syncInc.xml clGetDeviceIDsFromD3D10KHR.html: ../sharingD3D10Inc.xml clGetDeviceIDsFromD3D11KHR.html: ../sharingD3D11Inc.xml clGetDeviceIDsFromD3D11KHR.html: ../accessMappedInc.xml clGetDeviceIDsFromDX9MediaAdapterKHR.html: ../mediaSurfaceFormatsInc.xml clGetDeviceIDsFromDX9MediaAdapterKHR.html: ../accessMappedInc.xml clGetSupportedImageFormats.html: ../clCreate_memflagsInc.xml cl_khr_gl_sharing.html: ../gl_formatsInc.xml cl_khr_gl_sharing.html: ../gl_syncInc.xml cl_khr_gl_sharing.html: ../gl_lifetimeInc.xml clz.html: ../integerFunctionsInc.xml commonFunctions.html: ../commonFunctionsInc.xml commonMax.html: ../commonFunctionsInc.xml commonMin.html: ../commonFunctionsInc.xml constant.html: ../qualifierInc.xml constant.html: ../qualifierExampleInc.xml copysign.html: ../mathFunctionsInc.xml cos.html: ../mathFunctionsInc.xml cross.html: ../geometricFunctionsInc.xml degrees.html: ../commonFunctionsInc.xml distance.html: ../geometricFunctionsInc.xml dot.html: ../geometricFunctionsInc.xml erf.html: ../mathFunctionsInc.xml exp.html: ../mathFunctionsInc.xml fabs.html: ../mathFunctionsInc.xml fast_distance.html: ../geometricFunctionsInc.xml fast_length.html: ../geometricFunctionsInc.xml fast_normalize.html: ../geometricFunctionsInc.xml fdim.html: ../mathFunctionsInc.xml floor.html: ../mathFunctionsInc.xml fma.html: ../mathFunctionsInc.xml fmax.html: ../mathFunctionsInc.xml fmin.html: ../mathFunctionsInc.xml fmod.html: ../mathFunctionsInc.xml fract.html: ../mathFunctionsInc.xml geometricFunctions.html: ../geometricFunctionsInc.xml global.html: ../qualifierInc.xml global.html: ../qualifierExampleInc.xml hadd.html: ../integerFunctionsInc.xml hypot.html: ../mathFunctionsInc.xml ilogb.html: ../mathFunctionsInc.xml imageFunctions.html: ../imageFunctionsInc.xml integerClamp.html: ../integerFunctionsInc.xml integerFunctions.html: ../integerFunctionsInc.xml integerMax.html: ../integerFunctionsInc.xml isequal.html: ../relationalFunctionsInc1.xml isequal.html: ../relationalFunctionsInc2.xml isequal.html: ../relationalFunctionsInc3.xml isfinite.html: ../relationalFunctionsInc1.xml isfinite.html: ../relationalFunctionsInc2.xml isgreaterequal.html: ../relationalFunctionsInc1.xml isgreaterequal.html: ../relationalFunctionsInc2.xml isgreaterequal.html: ../relationalFunctionsInc3.xml isgreater.html: ../relationalFunctionsInc1.xml isgreater.html: ../relationalFunctionsInc2.xml isgreater.html: ../relationalFunctionsInc3.xml isinf.html: ../relationalFunctionsInc1.xml isinf.html: ../relationalFunctionsInc2.xml islessequal.html: ../relationalFunctionsInc1.xml islessequal.html: ../relationalFunctionsInc2.xml islessequal.html: ../relationalFunctionsInc3.xml islessgreater.html: ../relationalFunctionsInc1.xml islessgreater.html: ../relationalFunctionsInc2.xml islessgreater.html: ../relationalFunctionsInc3.xml isless.html: ../relationalFunctionsInc1.xml isless.html: ../relationalFunctionsInc2.xml isless.html: ../relationalFunctionsInc3.xml isnan.html: ../relationalFunctionsInc1.xml isnan.html: ../relationalFunctionsInc2.xml isnormal.html: ../relationalFunctionsInc1.xml isnormal.html: ../relationalFunctionsInc2.xml isnotequal.html: ../relationalFunctionsInc1.xml isnotequal.html: ../relationalFunctionsInc2.xml isnotequal.html: ../relationalFunctionsInc3.xml isordered.html: ../relationalFunctionsInc1.xml isordered.html: ../relationalFunctionsInc2.xml isunordered.html: ../relationalFunctionsInc1.xml isunordered.html: ../relationalFunctionsInc2.xml length.html: ../geometricFunctionsInc.xml lgamma.html: ../mathFunctionsInc.xml local.html: ../qualifierInc.xml local.html: ../qualifierExampleInc.xml log.html: ../mathFunctionsInc.xml mad_hi.html: ../integerFunctionsInc.xml mad_sat.html: ../integerFunctionsInc.xml mad.html: ../mathFunctionsInc.xml mag.html: ../mathFunctionsInc.xml mathFunctions.html: ../mathFunctionsInc.xml mix.html: ../commonFunctionsInc.xml modf.html: ../mathFunctionsInc.xml mul_hi.html: ../integerFunctionsInc.xml nan.html: ../mathFunctionsInc.xml nextafter.html: ../mathFunctionsInc.xml normalize.html: ../geometricFunctionsInc.xml popcount.html: ../integerFunctionsInc.xml pow.html: ../mathFunctionsInc.xml private.html: ../qualifierInc.xml private.html: ../qualifierExampleInc.xml radians.html: ../commonFunctionsInc.xml read_imagef1d.html: ../imageFunctionsInc.xml read_imagef1d.html: ../imageMappingInc.xml read_imagef2d.html: ../imageFunctionsInc.xml read_imagef2d.html: ../imageMappingInc.xml read_imagef3d.html: ../imageFunctionsInc.xml read_imagef3d.html: ../imageMappingInc.xml read_imageh1d.html: ../imageFunctionsInc.xml read_imageh1d.html: ../imageMappingInc.xml read_imageh2d.html: ../imageFunctionsInc.xml read_imageh2d.html: ../imageMappingInc.xml read_imageh3d.html: ../imageFunctionsInc.xml read_imageh3d.html: ../imageMappingInc.xml read_imagei1d.html: ../imageFunctionsInc.xml read_imagei1d.html: ../imageMappingInc.xml read_imagei2d.html: ../imageFunctionsInc.xml read_imagei2d.html: ../imageMappingInc.xml read_imagei3d.html: ../imageFunctionsInc.xml read_imagei3d.html: ../imageMappingInc.xml relationalFunctions.html: ../relationalFunctionsInc1.xml remainder.html: ../mathFunctionsInc.xml remquo.html: ../mathFunctionsInc.xml rint.html: ../mathFunctionsInc.xml rootn.html: ../mathFunctionsInc.xml rotate.html: ../integerFunctionsInc.xml round.html: ../mathFunctionsInc.xml select.html: ../relationalFunctionsInc1.xml select.html: ../relationalFunctionsGEN.xml select.html: ../relationalFunctionsIGEN.xml select.html: ../relationalFunctionsUGEN.xml signbit.html: ../relationalFunctionsInc1.xml signbit.html: ../relationalFunctionsInc2.xml sign.html: ../commonFunctionsInc.xml sin.html: ../mathFunctionsInc.xml smoothstep.html: ../commonFunctionsInc.xml sqrt.html: ../mathFunctionsInc.xml step.html: ../commonFunctionsInc.xml sub_sat.html: ../integerFunctionsInc.xml tan.html: ../mathFunctionsInc.xml tgamma.html: ../mathFunctionsInc.xml trunc.html: ../mathFunctionsInc.xml upsample.html: ../integerFunctionsInc.xml vectorDataLoadandStoreFunctions.html: ../vectorFunctionsInc.xml vloada_halfn.html: ../vectorFunctionsInc.xml vload_halfn.html: ../vectorFunctionsInc.xml vload_half.html: ../vectorFunctionsInc.xml vloadn.html: ../vectorFunctionsInc.xml vloadn.html: ../vectorHalfFunctionsInc.xml vstorea_halfn.html: ../vectorFunctionsInc.xml vstore_halfn.html: ../vectorFunctionsInc.xml vstore_half.html: ../vectorFunctionsInc.xml vstoren.html: ../vectorFunctionsInc.xml vstoren.html: ../vectorHalfFunctionsInc.xml write_image1d.html: ../imageFunctionsInc.xml write_image2d.html: ../imageFunctionsInc.xml write_image3d.html: ../imageFunctionsInc.xml khronos-opencl-man-1.0~svn27110/deprecated.xml0000644000175000017500000000717511660441607021117 0ustar mathieumathieu Deprecated OpenCL Functions Deprecated OpenCL Functions 2007-2011 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. 3 Deprecated OpenCL Functions OpenCL 1.1 Features Deprecated in OpenCL 1.2 clEnqueueMarker, clEnqueueBarrier, clEnqueueWaitForEvents clCreateImage2D, clCreateImage3D clUnloadCompiler, clGetExtensionFunctionAddress clCreateFromGLTexture2D, clCreateFromGLTexture3D CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE value for the param_name argument to clGetDeviceInfo OpenCL 1.0 Features Deprecated in OpenCL 1.1 clSetCommandQueueProperty __ROUNDING_MODE__ macro -cl-strict-aliasing option for the options argument to clBuildProgram Specification OpenCL Specification khronos-opencl-man-1.0~svn27110/clCreateProgramWithSource.xml0000644000175000017500000002137311660441607024102 0ustar mathieumathieu clCreateProgramWithSource clCreateProgramWithSource 2007-2011 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. 3 clCreateProgramWithSource Creates a program object for a context, and loads the source code specified by the text strings in the strings array into the program object. cl_program clCreateProgramWithSource cl_contextcontext cl_uintcount const char**strings const size_t*lengths cl_int*errcode_ret Parameters context Must be a valid OpenCL context. strings An array of count pointers to optionally null-terminated character strings that make up the source code. lengths An array with the number of chars in each string (the string length). If an element in lengths is zero, its accompanying string is null-terminated. If lengths is NULL, all strings in the strings argument are considered null-terminated. Any length value passed in that is greater than zero excludes the null terminator in its count. errcode_ret Returns an appropriate error code. If errcode_ret is NULL, no error code is returned. Description This function creates a program object for a context, and loads the source code specified by the text strings in the strings array into the program object. The devices associated with the program object are the devices associated with context. The source code specified by strings is either an OpenCL C program source, header or implementation-defined source for custom devices that support an online compiler. Errors clCreateProgramWithSource returns a valid non-zero program object and errcode_ret is set to CL_SUCCESS if the program object is created successfully. Otherwise, it returns a NULL value with one of the following error values returned in errcode_ret: CL_INVALID_CONTEXT if context is not a valid context. CL_INVALID_VALUE if count is zero or if strings or any entry in strings is NULL. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clCreateProgramWithBinary, clReleaseProgram, clRetainProgram, Cardinality Diagram khronos-opencl-man-1.0~svn27110/atomic_sub.xml0000644000175000017500000001564111660441607021141 0ustar mathieumathieu atomic_sub atomic_sub 2007-2011 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. 3 atomic_sub atomic_sub functions. int atomic_sub volatile __global int*p intval unsigned int atomic_sub volatile __global unsigned int*p unsigned intval int atomic_sub volatile __local int*p intval unsigned int atomic_sub volatile __local unsigned int*p unsigned intval Description Read the 32-bit value (referred to as old) stored at location pointed by p. Compute (old - val) and store result at location pointed by p. The function returns old. A 64-bit version of this function, atom_sub, is enabled by cl_khr_int64_base_atomics. Specification OpenCL Specification Also see Atomic Functions, atom_sub khronos-opencl-man-1.0~svn27110/isnan.xml0000644000175000017500000001467511660441607020132 0ustar mathieumathieu ]> isnan isnan 2007-2011 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. 3 isnan Test for a NaN. int isnan float intn isnan floatn int isnan double longn isnan doublen int isnan (half) // if half extension enabled shortn isnan (halfn) // if half extension enabled Description Test for NaN. Notes &relationalFunctionsInc1; &relationalFunctionsInc2; Specification OpenCL Specification Also see Relational Functions khronos-opencl-man-1.0~svn27110/clCreateProgramWithBinary.xml0000644000175000017500000003276511660441607024075 0ustar mathieumathieu clCreateProgramWithBinary clCreateProgramWithBinary 2007-2011 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. 3 clCreateProgramWithBinary Creates a program object for a context, and loads the binary bits specified by binary into the program object. cl_program clCreateProgramWithBinary cl_contextcontext cl_uintnum_devices const cl_device_id*device_list const size_t*lengths const unsigned char**binaries cl_int*binary_status cl_int*errcode_ret Parameters context Must be a valid OpenCL context. device_list A pointer to a list of devices that are in context. device_list must be a non-NULL value. The binaries are loaded for devices specified in this list. num_devices The number of devices listed in device_list. The devices associated with the program object will be the list of devices specified by device_list. The list of devices specified by device_list must be devices associated with context. lengths An array of the size in bytes of the program binaries to be loaded for devices specified by device_list. binaries An array of pointers to program binaries to be loaded for devices specified by device_list. For each device given by device_list[i], the pointer to the program binary for that device is given by binaries[i] and the length of this corresponding binary is given by lengths[i]. lengths[i] cannot be zero and binaries[i] cannot be a NULL pointer. The program binaries specified by binaries contain the bits that describe one of the following: a program executable to be run on the device(s) associated with context. a compiled program for device(s) associated with context. a library of compiled programs for device(s) associated with context. The program binary can consist of either or both of device-specific code and/or implementation-specific intermediate representation (IR) which will be converted to the device-specific code. binary_status Returns whether the program binary for each device specified in device_list was loaded successfully or not. It is an array of num_devices entries and returns CL_SUCCESS in binary_status[i] if binary was successfully loaded for device specified by device_list[i]; otherwise returns CL_INVALID_VALUE if lengths[i] is zero or if binaries[i] is a NULL value or CL_INVALID_BINARY in binary_status[i] if program binary is not a valid binary for the specified device. If binary_status is NULL, it is ignored. errcode_ret Returns an appropriate error code. If errcode_ret is NULL, no error code is returned. Notes OpenCL allows applications to create a program object using the program source or binary and build appropriate program executables. This can be very useful as it allows applications to load program source and then compile and link to generate a program executable online on its first instance for appropriate OpenCL devices in the system. These executables can now be queried and cached by the application. Future instances of the application launching will no longer need to compile and link the program executables. The cached executables can be read and loaded by the application, which can help significantly reduce the application initialization time. Errors Returns a valid non-zero program object and errcode_ret is set to CL_SUCCESS if the program object is created successfully. Otherwise, it returns a NULL value with one of the following error values returned in errcode_ret: CL_INVALID_CONTEXT if context is not a valid context. CL_INVALID_VALUE if device_list is NULL or num_devices is zero; CL_INVALID_DEVICE if OpenCL devices listed in device_list are not in the list of devices associated with context. CL_INVALID_VALUE if or if lengths or binaries are NULL or if any entry in lengths[i] or binaries[i] is NULL. CL_INVALID_BINARY if an invalid program binary was encountered for any device. binary_status will return specific status for each device. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clCreateProgramWithSource, clReleaseProgram, clRetainProgram, Cardinality Diagram khronos-opencl-man-1.0~svn27110/mul24.xml0000644000175000017500000001233211660441607017751 0ustar mathieumathieu mul24 mul24 2007-2011 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. 3 mul24 Fast integer function to multiply 24-bit integer values. gentype mul24 gentypex gentypey Description mul24 multiplies two 24-bit integer values x and y. x and y are 32-bit integers but only the low 24-bits are used to perform the multiplication. mul24 should only be used when values in x and y are in the range [-223, 223-1] if x and y are signed integers and in the range [0, 224-1] if x and y are unsigned integers. If x and y are not in this range, the multiplication result is implementation-defined. Notes Fast integer functions can be used for optimizing performance of kernels. We use the generic type name gentype to indicate that the function can take int, int2, int3, int4, int8, int16, uint, uint2, uint3, uint4, uint8, or uint16 as the type for the arguments. Specification OpenCL Specification Also see Integer Functions khronos-opencl-man-1.0~svn27110/isfinite.xml0000644000175000017500000001471211660441607020624 0ustar mathieumathieu ]> isfinite isfinite 2007-2011 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. 3 isfinite Test for finite value. int isfinite float intn isfinite floatn int isfinite double longn isfinite doublen int isfinite (half) // if half extension enabled shortn isfinite (halfn) // if half extension enabled Description Test for finite value. Notes &relationalFunctionsInc1; &relationalFunctionsInc2; Specification OpenCL Specification Also see Relational Functions khronos-opencl-man-1.0~svn27110/ilogb.xml0000644000175000017500000001603311660441607020104 0ustar mathieumathieu ]> ilogb ilogb 2007-2011 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. 3 ilogb Exponent as an integer value. intn ilogb floatn x int ilogb float x intn ilogb doublen x int ilogb double x intn ilogb halfn x int ilogb half x Description Returns the exponent as an integer value. Notes &mathFunctionsInc; The following macros shall expand to integer constant expressions whose values are returned by ilogb(x) if x is zero or NaN, respectively. The value of FP_ILOGB0 shall be either {INT_MIN} or - {INT_MAX}. The value of FP_ILOGBNAN shall be either {INT_MAX} or {INT_MIN}. Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/accessQualifiers.xml0000644000175000017500000001303411660441607022274 0ustar mathieumathieu accessQualifiers accessQualifiers 2007-2011 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. 3 Access Qualifiers Access Qualifiers for image memory objects. __read_only __write_only read_only write_only Description Image objects specified as arguments to a kernel can be declared to be read-only or write-only. A kernel cannot read from and write to the same image object. The __read_only (or read_only) and __write_only (or write_only) qualifiers must be used with image object arguments to declare if the image object is being read or written by a kernel. The default qualifier is __read_only. Notes The __read_only, __write_only, __read_write, read_only, write_only and read_write names are reserved for use as access qualifiers and shall not be used otherwise. Example In the example below, imageA is a read-only 2D image object, and imageB is a write-only 2D image object. __kernel void foo (read_only image2d_t imageA, write_only image2d_t imageB) { ... } Specification OpenCL Specification khronos-opencl-man-1.0~svn27110/clCreateSampler.xml0000644000175000017500000002362711660441607022065 0ustar mathieumathieu clCreateSampler clCreateSampler 2007-2011 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. 3 clCreateSampler Creates a sampler object. cl_sampler clCreateSampler cl_contextcontext cl_boolnormalized_coords cl_addressing_modeaddressing_mode cl_filter_modefilter_mode cl_int*errcode_ret Parameters context Must be a valid OpenCL context. normalized_coords Determines if the image coordinates specified are normalized (if normalized_coords is CL_TRUE) or not (if normalized_coords is CL_FALSE). addressing_mode Specifies how out-of-range image coordinates are handled when reading from an image. This can be set to CL_ADDRESS_MIRRORED_REPEAT, CL_ADDRESS_REPEAT, CL_ADDRESS_CLAMP_TO_EDGE, CL_ADDRESS_CLAMP, and CL_ADDRESS_NONE. filter_mode Specifies the type of filter that must be applied when reading an image. This can be CL_FILTER_NEAREST or CL_FILTER_LINEAR. errcode_ret Returns an appropriate error code. If errcode_ret is NULL, no error code is returned. Notes A sampler object describes how to sample an image when the image is read in the kernel. The built-in functions to read from an image in a kernel take a sampler as an argument. The sampler arguments to the image read function can be sampler objects created using OpenCL functions and passed as argument values to the kernel or can be samplers declared inside a kernel. In this section we discuss how sampler objects are created using OpenCL functions. For more information about working with samplers, see sampler_t Errors Returns a valid non-zero sampler object and errcode_ret is set to CL_SUCCESS if the sampler object is created successfully. Otherwise, it returns a NULL value with one of the following error values returned in errcode_ret: CL_INVALID_CONTEXT if context is not a valid context. CL_INVALID_VALUE if addressing_mode, filter_mode, or normalized_coords or a combination of these argument values are not valid. CL_INVALID_OPERATION if images are not supported by any device associated with context (i.e. CL_DEVICE_IMAGE_SUPPORT specified in the table of OpenCL Device Queries for clGetDeviceInfo is CL_FALSE). CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clRetainSampler, clReleaseSampler, clGetSamplerInfo, Cardinality Diagram sampler_t khronos-opencl-man-1.0~svn27110/clCreateFromD3D11Texture3DKHR.xml0000644000175000017500000004526311660441607024137 0ustar mathieumathieu ]> clCreateFromD3D11Texture3DKHR clCreateFromD3D11Texture3DKHR 2007-2011 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. 3 clCreateFromD3D11Texture3DKHR Creates an OpenCL 3D image object from a subresource of a Direct3D 11 3D texture. cl_mem clCreateFromD3D11Texture3DKHR cl_contextcontext cl_mem_flagsflags ID3D11Texture3D*resource UINTsubresource cl_int *errcode_ret Parameters context A valid OpenCL context created from a Direct3D 11 device. flags A bit-field that is used to specify usage information. May be CL_MEM_READ_ONLY, CL_MEM_WRITE_ONLY, or CL_MEM_READ_WRITE. (See the table for clCreateBuffer for more information.) resource A pointer to the Direct3D 11 texture to share. subresource The subresource of resource to share. errcode_ret An appropriate error code. If errcode_ret is NULL, no error code is returned. Notes The width, height and depth of the returned OpenCL 3D image object are determined by the width, height and depth of subresource subresource of resource. The channel type and order of the returned OpenCL 3D image object is determined by the format of resource as shown in the table below. This call will increment the internal Direct3D reference count on resource. The internal Direct3D reference count on resource will be decremented when the OpenCL reference count on the returned OpenCL memory object drops to zero. DXGI format CL image format (channel order, channel data type) DXGI_FORMAT_R32G32B32A32_FLOAT CL_RGBA, CL_FLOAT DXGI_FORMAT_R32G32B32A32_UINT CL_RGBA, CL_UNSIGNED_INT32 DXGI_FORMAT_R32G32B32A32_SINT CL_RGBA, CL_SIGNED_INT32 DXGI_FORMAT_R16G16B16A16_FLOAT CL_RGBA, CL_HALF_FLOAT DXGI_FORMAT_R16G16B16A16_UNORM CL_RGBA, CL_UNORM_INT16 DXGI_FORMAT_R16G16B16A16_UINT CL_RGBA, CL_UNSIGNED_INT16 DXGI_FORMAT_R16G16B16A16_SNORM CL_RGBA, CL_SNORM_INT16 DXGI_FORMAT_R16G16B16A16_SINT CL_RGBA, CL_SIGNED_INT16 DXGI_FORMAT_R8G8B8A8_UNORM CL_RGBA, CL_UNORM_INT8 DXGI_FORMAT_R8G8B8A8_UINT CL_RGBA, CL_UNSIGNED_INT8 DXGI_FORMAT_R8G8B8A8_SNORM CL_RGBA, CL_SNORM_INT8 DXGI_FORMAT_R8G8B8A8_SINT CL_RGBA, CL_SIGNED_INT8 DXGI_FORMAT_R32G32_FLOAT CL_RG, CL_FLOAT DXGI_FORMAT_R32G32_UINT CL_RG, CL_UNSIGNED_INT32 DXGI_FORMAT_R32G32_SINT CL_RG, CL_SIGNED_INT32 DXGI_FORMAT_R16G16_FLOAT CL_RG, CL_HALF_FLOAT DXGI_FORMAT_R16G16_UNORM CL_RG, CL_UNORM_INT16 DXGI_FORMAT_R16G16_UINT CL_RG, CL_UNSIGNED_INT16 DXGI_FORMAT_R16G16_SNORM CL_RG, CL_SNORM_INT16 DXGI_FORMAT_R16G16_SINT CL_RG, CL_SIGNED_INT16 DXGI_FORMAT_R8G8_UNORM CL_RG, CL_UNORM_INT8 DXGI_FORMAT_R8G8_UINT CL_RG, CL_UNSIGNED_INT8 DXGI_FORMAT_R8G8_SNORM CL_RG, CL_SNORM_INT8 DXGI_FORMAT_R8G8_SINT CL_RG, CL_SIGNED_INT8 DXGI_FORMAT_R32_FLOAT CL_R, CL_FLOAT DXGI_FORMAT_R32_UINT CL_R, CL_UNSIGNED_INT32 DXGI_FORMAT_R32_SINT CL_R, CL_SIGNED_INT32 DXGI_FORMAT_R16_FLOAT CL_R, CL_HALF_FLOAT DXGI_FORMAT_R16_UNORM CL_R, CL_UNORM_INT16 DXGI_FORMAT_R16_UINT CL_R, CL_UNSIGNED_INT16 DXGI_FORMAT_R16_SNORM CL_R, CL_SNORM_INT16 DXGI_FORMAT_R16_SINT CL_R, CL_SIGNED_INT16 DXGI_FORMAT_R8_UNORM CL_R, CL_UNORM_INT8 DXGI_FORMAT_R8_UINT CL_R, CL_UNSIGNED_INT8 DXGI_FORMAT_R8_SNORM CL_R, CL_SNORM_INT8 DXGI_FORMAT_R8_SINT CL_R, CL_SIGNED_INT8 &sharingD3D11Inc; &accessMappedInc; Errors Returns CL_SUCCESS returns a valid non-zero OpenCL image object and errcode_ret is set to CL_SUCCESS if the image object is created successfully. Otherwise, it returns a NULL value with one of the following error values returned in errcode_ret: CL_INVALID_CONTEXT if context is not a valid context. CL_INVALID_VALUE if values specified in flags are not valid or if subresource is not a valid subresource index for resource. CL_INVALID_D3D11_RESOURCE_KHR if resource is not a Direct3D 11 texture resource, if resource was created with the D3D11_USAGE flag D3D11_USAGE_IMMUTABLE, if a resource is a multisampled texture, if cl_mem from subresource subresource of resource has already been created using clCreateFromD3D11Texture3DKHR, or if context was not created against the same Direct3D 11 device from which resource was created. CL_INVALID_D3D11_RESOURCE_KHR if resource is not a Direct3D 11 texture object. CL_INVALID_IMAGE_FORMAT_DESCRIPTOR if the Direct3D 11 texture format of resource is not a value listed in the table above of Direct3D 11 and corresponding OpenCL image formats for clCreateFromD3D11Texture3DKHR, or if the Direct3D 11 texture format of resource does not map to a supported OpenCL image format. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see cl_khr_d3d11_sharing, clGetDeviceIDsFromD3D11KHR, clCreateFromD3D11BufferKHR, clCreateFromD3D11Texture3DKHR, clEnqueueAcquireD3D11ObjectsKHR, clEnqueueReleaseD3D11ObjectsKHR khronos-opencl-man-1.0~svn27110/vec_step.xml0000644000175000017500000002562311660441607020625 0ustar mathieumathieu vec_step vec_step 2007-2011 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. 3 vec_step Takes a built-in scalar or vector data type argument and returns an integer value representing the number of elements in the scalar or vector. int vec_step gentypena int vec_step char3a int vec_step uchar3a int vec_step short3a int vec_step ushort3a int vec_step half3a int vec_step int3a int vec_step uint3a int vec_step long3a int vec_step ulong3a int vec_step float3a int vec_step double3a int vec_step type Description The vec_step built-in function takes a built-in scalar or vector data type argument and returns an integer value representing the number of elements in the scalar or vector. For all scalar types, vec_step returns 1. The vec_step built-in functions that take a 3-component vector return 4. vec_step may also take a pure type as an argument, e.g. vec_step(float2) We use the generic type name gentypen (or gentypem) to indicate the built-in data types char{2|4|8|16}, uchar{2|4|8|16}, short{2|4|8|16}, ushort{2|4|8|16}, int{2|4|8|16}, uint{2|4|8|16}, long{2|4|8|16}, ulong{2|4|8|16}, or float{2|4|8|16} as the type for the arguments unless otherwise stated. We use the generic name ugentypen to indicate the built-in unsigned integer data types. If the double is supported, then gentypen (or gentypem) also indicate the built-in data types double{2|4|8|16}. The generic type name gentypen (or gentypem) may indicate the data type half{2|4|8|16} if the cl_khr_fp16 extension is supported. Specification OpenCL Specification Also see Miscellaneous Vector Functions khronos-opencl-man-1.0~svn27110/round.xml0000644000175000017500000001000711660441607020132 0ustar mathieumathieu ]> round round 2007-2011 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. 3 round Rounding function. gentype round gentypex Description Return the integral value nearest to x rounding halfway cases away from zero, regardless of the current rounding direction. Notes &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/clEnqueueNDRangeKernel.xml0000644000175000017500000005572211660441607023306 0ustar mathieumathieu clEnqueueNDRangeKernel clEnqueueNDRangeKernel 2007-2011 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. 3 clEnqueueNDRangeKernel Enqueues a command to execute a kernel on a device. cl_int clEnqueueNDRangeKernel cl_command_queuecommand_queue cl_kernelkernel cl_uintwork_dim const size_t*global_work_offset const size_t*global_work_size const size_t*local_work_size cl_uintnum_events_in_wait_list const cl_event*event_wait_list cl_event*event Parameters command_queue A valid command-queue. The kernel will be queued for execution on the device associated with command_queue. kernel A valid kernel object. The OpenCL context associated with kernel and command_queue must be the same. work_dim The number of dimensions used to specify the global work-items and work-items in the work-group. work_dim must be greater than zero and less than or equal to CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS. global_work_offset global_work_offset can be used to specify an array of work_dim unsigned values that describe the offset used to calculate the global ID of a work-item. If global_work_offset is NULL, the global IDs start at offset (0, 0, ... 0). global_work_size Points to an array of work_dim unsigned values that describe the number of global work-items in work_dim dimensions that will execute the kernel function. The total number of global work-items is computed as global_work_size[0] *...* global_work_size[work_dim - 1]. local_work_size Points to an array of work_dim unsigned values that describe the number of work-items that make up a work-group (also referred to as the size of the work-group) that will execute the kernel specified by kernel. The total number of work-items in a work-group is computed as local_work_size[0] *... * local_work_size[work_dim - 1]. The total number of work-items in the work-group must be less than or equal to the CL_DEVICE_MAX_WORK_GROUP_SIZE value specified in table of OpenCL Device Queries for clGetDeviceInfo and the number of work-items specified in local_work_size[0],... local_work_size[work_dim - 1] must be less than or equal to the corresponding values specified by CL_DEVICE_MAX_WORK_ITEM_SIZES[0],.... CL_DEVICE_MAX_WORK_ITEM_SIZES[work_dim - 1]. The explicitly specified local_work_size will be used to determine how to break the global work-items specified by global_work_size into appropriate work-group instances. If local_work_size is specified, the values specified in global_work_size[0],... global_work_size[work_dim - 1] must be evenly divisible by the corresponding values specified in local_work_size[0],... local_work_size[work_dim - 1]. local_work_size can also be a NULL value in which case the OpenCL implementation will determine how to be break the global work-items into appropriate work-group instances. event_wait_list and num_events_in_wait_list Specify events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event_wait_list act as synchronization points. The context associated with events in event_wait_list and command_queue must be the same. The memory associated with event_wait_list can be reused or freed after the function returns. event Returns an event object that identifies this particular kernel execution instance. Event objects are unique and can be used to identify a particular kernel execution instance later on. If event is NULL, no event will be created for this kernel execution instance and therefore it will not be possible for the application to query or queue a wait for this particular kernel execution instance. Notes The work-group size to be used for kernel can also be specified in the program source using the __attribute__ ((reqd_work_group_size(X, Y, Z))) qualifier. In this case the size of work group specified by local_work_size must match the value specified by the reqd_work_group_size __attribute__ qualifier. These work-group instances are executed in parallel across multiple compute units or concurrently on the same compute unit. Each work-item is uniquely identified by a global identifier. The global ID, which can be read inside the kernel, is computed using the value given by global_work_size and global_work_offset. In addition, a work-item is also identified within a work-group by a unique local ID. The local ID, which can also be read by the kernel, is computed using the value given by local_work_size. The starting local ID is always (0, 0, ... 0). Errors Returns CL_SUCCESS if the kernel execution was successfully queued. Otherwise, it returns one of the following errors: CL_INVALID_PROGRAM_EXECUTABLE if there is no successfully built program executable available for device associated with command_queue. CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_KERNEL if kernel is not a valid kernel object. CL_INVALID_CONTEXT if context associated with command_queue and kernel is not the same or if the context associated with command_queue and events in event_wait_list are not the same. CL_INVALID_KERNEL_ARGS if the kernel argument values have not been specified. CL_INVALID_WORK_DIMENSION if work_dim is not a valid value (i.e. a value between 1 and 3). CL_INVALID_GLOBAL_WORK_SIZE if global_work_size is NULL, or if any of the values specified in global_work_size[0], ...global_work_size [work_dim - 1] are 0 or exceed the range given by the sizeof(size_t) for the device on which the kernel execution will be enqueued. CL_INVALID_GLOBAL_OFFSET if the value specified in global_work_size + the corresponding values in global_work_offset for any dimensions is greater than the sizeof(size_t) for the device on which the kernel execution will be enqueued. CL_INVALID_WORK_GROUP_SIZE if local_work_size is specified and number of work-items specified by global_work_size is not evenly divisable by size of work-group given by local_work_size or does not match the work-group size specified for kernel using the __attribute__ ((reqd_work_group_size(X, Y, Z))) qualifier in program source. CL_INVALID_WORK_GROUP_SIZE if local_work_size is specified and the total number of work-items in the work-group computed as local_work_size[0] *... local_work_size[work_dim - 1] is greater than the value specified by CL_DEVICE_MAX_WORK_GROUP_SIZE in the table of OpenCL Device Queries for clGetDeviceInfo. CL_INVALID_WORK_GROUP_SIZE if local_work_size is NULL and the __attribute__ ((reqd_work_group_size(X, Y, Z))) qualifier is used to declare the work-group size for kernel in the program source. CL_INVALID_WORK_ITEM_SIZE if the number of work-items specified in any of local_work_size[0], ... local_work_size[work_dim - 1] is greater than the corresponding values specified by CL_DEVICE_MAX_WORK_ITEM_SIZES[0], .... CL_DEVICE_MAX_WORK_ITEM_SIZES[work_dim - 1]. CL_MISALIGNED_SUB_BUFFER_OFFSET if a sub-buffer object is specified as the value for an argument that is a buffer object and the offset specified when the sub-buffer object is created is not aligned to CL_DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue. CL_INVALID_IMAGE_SIZE if an image object is specified as an argument value and the image dimensions (image width, height, specified or compute row and/or slice pitch) are not supported by device associated with queue. CL_INVALID_IMAGE_FORMAT if an image object is specified as an argument value and the image format (image channel order and data type) is not supported by device associated with queue. CL_OUT_OF_RESOURCES if there is a failure to queue the execution instance of kernel on the command-queue because of insufficient resources needed to execute the kernel. For example, the explicitly specified local_work_size causes a failure to execute the kernel because of insufficient resources such as registers or local memory. Another example would be the number of read-only image args used in kernel exceed the CL_DEVICE_MAX_READ_IMAGE_ARGS value for device or the number of write-only image args used in kernel exceed the CL_DEVICE_MAX_WRITE_IMAGE_ARGS value for device or the number of samplers used in kernel exceed CL_DEVICE_MAX_SAMPLERS for device. CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with image or buffer objects specified as arguments to kernel. CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clCreateCommandQueue , clGetDeviceInfo, clEnqueueNativeKernel, clEnqueueTask, Work-Item Functions khronos-opencl-man-1.0~svn27110/relationalFunctionsInc1.xml0000644000175000017500000000120011660441607023534 0ustar mathieumathieu If an implementation extends this specification to support IEEE-754 flags or exceptions, then all built-in relational functions shall proceed without raising the invalid floating-point exception when one or more of the operands are NaNs. The built-in relational functions are extended with cl_khr_fp16 to include appropriate versions of functions that take half, and half{2|3|4|8|16} as arguments and return values. khronos-opencl-man-1.0~svn27110/clFlush.xml0000644000175000017500000001620011660441607020404 0ustar mathieumathieu clFlush clFlush 2007-2011 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. 3 clFlush Issues all previously queued OpenCL commands in a command-queue to the device associated with the command-queue. cl_int clFlush cl_command_queue command_queue Notes Issues all previously queued OpenCL commands in command_queue to the device associated with command_queue. clFlush only guarantees that all queued commands to command_queue will eventually be submitted to the appropriate device There is no guarantee that they will be complete after clFlush returns. Any blocking commands queued in a command-queue and clReleaseCommandQueue perform an implicit flush of the command-queue. These blocking commands are clEnqueueReadBuffer, clEnqueueReadBufferRect, or clEnqueueReadImage with blocking_read set to CL_TRUE; clEnqueueWriteBuffer, clEnqueueWriteBufferRect, or clEnqueueWriteImage with blocking_write set to CL_TRUE; clEnqueueMapBuffer or clEnqueueMapImage with blocking_map set to CL_TRUE; or clWaitForEvents. To use event objects that refer to commands enqueued in a command-queue as event objects to wait on by commands enqueued in a different command-queue, the application must call a clFlush or any blocking commands that perform an implicit flush of the command-queue where the commands that refer to these event objects are enqueued. Errors Returns CL_SUCCESS if the function call was executed successfully. Otherwise, it returns one of the following: CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. Specification OpenCL Specification Also see clFinish khronos-opencl-man-1.0~svn27110/atom_and.xml0000644000175000017500000001726411660441607020601 0ustar mathieumathieu atom_and atom_and 2007-2011 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. 3 atom_and 64-bit atom_and functions. long atom_and volatile __global long*p longval long atom_and volatile __local long*p longval ulong atom_and volatile __global ulong*p ulongval ulong atom_and volatile __local ulong*p ulongval Description Read the 64-bit value (referred to as old) stored at location pointed by p. Compute (old & val) and store result at location pointed by p. The function returns old. An application that wants to use this extension will need to include the #pragma OPENCL EXTENSION cl_khr_int64_extended_atomics : enable in the OpenCL program source. This function is performed in one atomic transaction. These transactions are atomic for the device executing these atomic functions. There is no guarantee of atomicity if the atomic operations to the same memory location are being performed by kernels executing on multiple devices. Atomic operations on 64-bit integers and 32-bit integers (and float) are also atomic with regard to each other. Specification OpenCL Specification Also see Atomic Functions, atomic_and, cl_khr_int64_extended_atomics khronos-opencl-man-1.0~svn27110/fmin.xml0000644000175000017500000001441711660441607017745 0ustar mathieumathieu ]> fmin fmin 2007-2011 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. 3 fmin Returns the lessor of either x or y. gentype fmin gentypex gentypey gentypef fmin gentypefx floaty gentyped fmin gentypedx doubley gentype fmin (gentype x, half y) // if half extension enabled Description Returns y if y less than x, otherwise it returns x. If one argument is a NaN, fmin() returns the other argument. If both arguments are NaNs, fmin() returns a NaN. Notes fmin and fmax behave as defined by C99 and may not match the IEEE 754-2008 definition for minNum and maxNum with regard to signaling NaNs. Specifically, signaling NaNs may behave as quiet NaNs. &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/remquo.xml0000644000175000017500000005325011660441607020322 0ustar mathieumathieu ]> remquo remquo 2007-2011 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. 3 remquo Floating point remainder and quotient function. floatn remquo floatn x floatn y __global intn *quo floatn remquo floatn x floatn y __local intn *quo floatn remquo floatn x floatn y __private intn *quo float remquo float x float y __global int *quo float remquo float x float y __local int *quo float remquo float x float y __private int *quo doublen remquo doublen x doublen y __global intn *quo doublen remquo doublen x doublen y __local intn *quo doublen remquo doublen x doublen y __private intn *quo double remquo double x double y __global int *quo double remquo double x double y __local int *quo double remquo double x double y __private int *quo halfn remquo halfn x halfn y __global intn *quo halfn remquo halfn x halfn y __local intn *quo halfn remquo halfn x halfn y __private intn *quo half remquo half x half y __global int *quo half remquo half x half y __local int *quo half remquo half x half y __private int *quo Description The remquo function computes the value r such that r = x - n*y, where k is the integer nearest the exact value of x/y. If there are two integers closest to x/y, k shall be the even one. If r is zero, it is given the same sign as x. This is the same value that is returned by the remainder function. remquo also calculates the lower seven bits of the integral quotient x/y, and gives that value the same sign as x/y. It stores this signed value in the object pointed to by quo. Notes &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/sin.xml0000644000175000017500000002023311660441607017576 0ustar mathieumathieu ]> sin, sincos, sinh, sinpi sin, sincos, sinh, sinpi 2007-2011 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. 3 sin, sincos, sinh, sinpi, half_sin, native_sin Sine functions. gentype sin gentype gentype sincos gentypex __global gentype*cosval gentype sincos gentypex __local gentype*cosval gentype sincos gentypex __private gentype*cosval gentype sinh gentype gentype sinpi gentypex gentype half_sin gentypex gentype native_sin gentypex Description sin computes the sine. sincos computes sine and cosine of x. The computed sine is the return value and computed cosine is returned in cosval. sinh computes the hyperbolic sine. sinpi computes sin (pi * x). half_sin computes sine. x must be in the range -216... +216. native_sin computes sine over an implementation-defined range. The maximum error is implementation-defined. Notes &mathFunctionsInc; Functions with the half_ prefix are implemented with a minimum of 10-bits of accuracy i.e. an ULP value ≤ 8192 ulp. Functions with the native__ prefix may map to one or more native device instructions and will typically have better performance compared to the corresponding functions (without the native__ prefix). The accuracy (and in some cases the input range(s)) of these functions is implementation-defined. Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/sign.xml0000644000175000017500000001065511660441607017754 0ustar mathieumathieu ]> sign sign 2007-2011 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. 3 sign Sign of a value. gentype sign gentypex Description Returns 1.0 if x > 0, -0.0 if x = -0.0, +0.0 if x = +0.0, or -1.0 if x < 0. Returns 0.0 if x is a NaN. Notes &commonFunctionsInc; If extended with cl_khr_fp16, generic type name gentype may indicate half and half{2|3|4|8|16} as arguments and return values. Specification OpenCL Specification Also see Common Functions khronos-opencl-man-1.0~svn27110/clGetGLObjectInfo.xml0000644000175000017500000001602311660441607022233 0ustar mathieumathieu clGetGLObjectInfo clGetGLObjectInfo 2007-2011 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. 3 clGetGLObjectInfo Query an OpenGL memory object used to create an OpenCL memory object. cl_int clGetGLObjectInfo cl_memmemobj cl_gl_object_type*gl_object_type GLuint*gl_object_name Parameters gl_object_type Returns the type of GL object attached to memobj and can be CL_GL_OBJECT_BUFFER, CL_GL_OBJECT_TEXTURE2D, CL_GL_OBJECT_TEXTURE3D, CL_GL_OBJECT_TEXTURE2D_ARRAY, CL_GL_OBJECT_TEXTURE1D, CL_GL_OBJECT_TEXTURE1D_ARRAY, CL_GL_OBJECT_TEXTURE_BUFFER, or CL_GL_OBJECT_RENDERBUFFER. If gl_object_type is NULL, it is ignored. gl_object_name Returns the GL object name used to create memobj. If gl_object_name is NULL, it is ignored. Description The OpenGL object used to create the OpenCL memory object and information about the object type i.e. whether it is a texture, renderbuffer, or buffer object can be queried using this function. Errors Returns CL_SUCCESS if the call was executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_MEM_OBJECT if memobj is not a valid OpenCL memory object. CL_INVALID_GL_OBJECT if there is no GL object associated with memobj. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see cl_khr_gl_sharing, clGetGLTextureInfo khronos-opencl-man-1.0~svn27110/README0000644000175000017500000000113611660441607017144 0ustar mathieumathieuSVN objects to checking in these files due to some property of the .xml file type it assumes. So first check them in via svn add --force * then force proper attributes: svn propset --force svn:mime-type application/xml *.xml svn propset --force svn:eol-style native *.xml and in the xhtml/ subdirectory: cd xhtml svn propset svn:mime-type text/html *.html svn propset svn:mime-type text/plain *.css *.xsl Makefile *.rb svn propset svn:mime-type image/jpeg *.jpg svn propset svn:mime-type image/gif *.gif svn propset svn:eol-style native *.html *.css *.xsl Makefile *.rb khronos-opencl-man-1.0~svn27110/read_imagef1d.xml0000644000175000017500000002430511660441607021461 0ustar mathieumathieu [ ]> read_imagef (1D) read_imagef (1D) 2007-2011 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. 3 read_imagef (1D) Do an element lookup in the 1D image object, returning floating-point values. float4 read_imagef image1d_t image sampler_t sampler int coord float4 read_imagef image1d_t image sampler_t sampler float coord float4 read_imagef image1d_t image int coord float4 read_imagef image1d_buffer_t image int coord float4 read_imagef image1d_array_t image int2 coord float4 read_imagef image1d_array_t image sampler_t sampler float4 coord Functions to read 1D images and image arrays For forms that take image1d_t, use coord to do an element lookup in the 1D image object specified by image. For forms that take image1d_array_t, use coord.x to do an element lookup in the 1D image identified by coord.y in the 1D image array specified by image. The samplerless read image functions behave exactly as the corresponding read image functions that take integer coordinates and a sampler with filter mode set to CLK_FILTER_NEAREST, normalized coordinates set to CLK_NORMALIZED_COORDS_FALSE and addressing mode to CLK_ADDRESS_NONE. read_imagef returns floating-point values in the range [0.0... 1.0] for image objects created with image_channel_data_type set to one of the predefined packed formats or CL_UNORM_INT8 or CL_UNORM_INT16. read_imagef returns floating-point values in the range [-1.0... 1.0] for image objects created with image_channel_data_type set to CL_SNORM_INT8, or CL_SNORM_INT16. read_imagef returns floating-point values for image objects created with image_channel_data_type set to CL_HALF_FLOAT or CL_FLOAT. The read_imagef calls that take integer coordinates must use a sampler with filter mode set to CLK_FILTER_NEAREST, normalized coordinates set to CLK_NORMALIZED_COORDS_FALSE and addressing mode set to CLK_ADDRESS_CLAMP_TO_EDGE, CLK_ADDRESS_CLAMP or CLK_ADDRESS_NONE; otherwise the values returned are undefined. Values returned by read_imagef for image objects with image_channel_data_type values not specified in the description above are undefined. Notes General information about the read_image* functions follows. &imageFunctionsInc; &imageMappingInc; Specification OpenCL Specification Also see Image Functions khronos-opencl-man-1.0~svn27110/clCreateCommandQueue.xml0000644000175000017500000003614211660441607023041 0ustar mathieumathieu clCreateCommandQueue clCreateCommandQueue 2007-2011 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. 3 clCreateCommandQueue Create a command-queue on a specific device. cl_command_queue clCreateCommandQueue cl_contextcontext cl_device_iddevice cl_command_queue_propertiesproperties cl_int*errcode_ret Parameters context Must be a valid OpenCL context. device Must be a device associated with context. It can either be in the list of devices specified when context is created using clCreateContext or have the same device type as the device type specified when the context is created using clCreateContextFromType. properties Specifies a list of properties for the command-queue. This is a bit-field described in the table below. Only command-queue properties specified in the table below can be set in properties; otherwise the value specified in properties is considered to be not valid. Command-Queue Properties Description CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE Determines whether the commands queued in the command-queue are executed in-order or out-of-order. If set, the commands in the command-queue are executed out-of-order. Otherwise, commands are executed in-order. See note below for more information. CL_QUEUE_PROFILING_ENABLE Enable or disable profiling of commands in the command-queue. If set, the profiling of commands is enabled. Otherwise profiling of commands is disabled. See clGetEventProfilingInfo for more information. errcode_ret Returns an appropriate error code. If errcode_ret is NULL, no error code is returned. Notes OpenCL objects such as memory, program and kernel objects are created using a context. Operations on these objects are performed using a command-queue. The command-queue can be used to queue a set of operations (referred to as commands) in order. Having multiple command-queues allows applications to queue multiple independent commands without requiring synchronization. Note that this should work as long as these objects are not being shared. Sharing of objects across multiple command-queues will require the application to perform appropriate synchronization. This is described in Appendix A of the specification. Out-of-order Execution of Kernels and Memory Object Commands The OpenCL functions that are submitted to a command-queue are enqueued in the order the calls are made but can be configured to execute in-order or out-of-order. The properties argument in clCreateCommandQueue can be used to specify the execution order. If the CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE property of a command-queue is not set, the commands enqueued to a command-queue execute in order. For example, if an application calls clEnqueueNDRangeKernel to execute kernel A followed by a clEnqueueNDRangeKernel to execute kernel B, the application can assume that kernel A finishes first and then kernel B is executed. If the memory objects output by kernel A are inputs to kernel B then kernel B will see the correct data in memory objects produced by execution of kernel A. If the CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE property of a commandqueue is set, then there is no guarantee that kernel A will finish before kernel B starts execution. Applications can configure the commands enqueued to a command-queue to execute out-of-order by setting the CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE property of the command-queue. This can be specified when the command-queue is created. In out-of-order execution mode there is no guarantee that the enqueued commands will finish execution in the order they were queued. As there is no guarantee that kernels will be executed in order, that is based on when the clEnqueueNDRangeKernel calls are made within a command-queue, it is therefore possible that an earlier clEnqueueNDRangeKernel call to execute kernel A identified by event A may execute and/or finish later than a clEnqueueNDRangeKernel call to execute kernel B which was called by the application at a later point in time. To guarantee a specific order of execution of kernels, a wait on a particular event (in this case event A) can be used. The wait for event A can be specified in the event_wait_list argument to clEnqueueNDRangeKernel for kernel B. In addition, a wait for events (clEnqueueMarkerWithWaitList) or a barrier (clEnqueueBarrierWithWaitList) command can be enqueued to the command-queue. The wait for events command ensures that previously enqueued commands identified by the list of events to wait for have finished before the next batch of commands is executed. The barrier command ensures that all previously enqueued commands in a command-queue have finished execution before the next batch of commands is executed. Similarly, commands to read, write, copy or map memory objects that are enqueued after clEnqueueNDRangeKernel, clEnqueueTask or clEnqueueNativeKernel commands are not guaranteed to wait for kernels scheduled for execution to have completed (if the CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE property is set). To ensure correct ordering of commands, the event object returned by clEnqueueNDRangeKernel, clEnqueueTask or clEnqueueNativeKernel can be used to enqueue a wait for event or a barrier command can be enqueued that must complete before reads or writes to the memory object(s) occur. Errors clCreateCommandQueue returns a valid non-zero command-queue and errcode_ret is set to CL_SUCCESS if the command-queue is created successfully. Otherwise, it returns a NULL value with one of the following error values returned in errcode_ret: CL_INVALID_CONTEXT if context is not a valid context. CL_INVALID_DEVICE if device is not a valid device or is not associated with context. CL_INVALID_VALUE if values specified in properties are not valid. CL_INVALID_QUEUE_PROPERTIES if values specified in properties are valid but are not supported by the device. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clGetCommandQueueInfo, clReleaseCommandQueue, clRetainCommandQueue, clCreateContext, clCreateContextFromType, Cardinality Diagram khronos-opencl-man-1.0~svn27110/macroLimits.xml0000644000175000017500000002454611660441607021303 0ustar mathieumathieu macros, limits macros and limits 2007-2011 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. 3 Macros and Limits Macros for math limits. Description The macro names given in the following list must use the values specified. These constant expressions are suitable for use in #if preprocessing directives. #define FLT_DIG 6 #define FLT_MANT_DIG 24 #define FLT_MAX_10_EXP +38 #define FLT_MAX_EXP +128 #define FLT_MIN_10_EXP -37 #define FLT_MIN_EXP -125 #define FLT_RADIX 2 #define FLT_MAX 0x1.fffffep127f #define FLT_MIN 0x1.0p-126f #define FLT_EPSILON 0x1.0p-23f The macro names given in the following list (available if the double option is supported) must use the values specified. These constant expressions are suitable for use in #if preprocessing directives. #define DBL_DIG 15 #define DBL_MANT_DIG 53 #define DBL_MAX_10_EXP +308 #define DBL_MAX_EXP +1024 #define DBL_MIN_10_EXP -307 #define DBL_MIN_EXP -1021 #define DBL_MAX 0x1.fffffffffffffp1023 #define DBL_MIN 0x1.0p-1022 #define DBL_EPSILON 0x1.0p-52 The macro names given in the following list must use the values specified. These constant expressions are suitable for use in #if preprocessing directives. An application that wants to use half and halfn types will need to include the #pragma OPENCL EXTENSION cl_khr_fp16 : enable directive. #define HALF_DIG 3 #define HALF_MANT_DIG 11 #define HALF_MAX_10_EXP +4 #define HALF_MAX_EXP +16 #define HALF_MIN_10_EXP -4 #define HALF_MIN_EXP -13 #define HALF_MAX 0x1.ffcp15h #define HALF_MIN 0x1.0p-14h #define HALF_EPSILON 0x1.0p-10h The macro names given in the following list must use the values specified. These constant expressions are suitable for use in #if preprocessing directives. #define CHAR_BIT 8 #define CHAR_MAX SCHAR_MAX #define CHAR_MIN SCHAR_MIN #define INT_MAX 2147483647 #define INT_MIN (-2147483647- 1) #define LONG_MAX 0x7fffffffffffffffL #define LONG_MIN (-0x7fffffffffffffffL- 1) #define SCHAR_MAX 127 #define SCHAR_MIN (-127 - 1) #define SHRT_MAX 32767 #define SHRT_MIN (-32767- 1) #define UCHAR_MAX 255 #define USHRT_MAX 65535 #define UINT_MAX 0xffffffff #define ULONG_MAX 0xffffffffffffffffUL Specification OpenCL Specification Also see Math Functions, Symbolic Math Constants, Floating Point Pragma, Scalar Data Types, Vector Data Types, Reserved Data Types, Other Data Types khronos-opencl-man-1.0~svn27110/qualifierExampleInc.xml0000644000175000017500000000310711660441607022735 0ustar mathieumathieu There is no generic address space name for program scope variables. All program scope variables must be declared in the __constant address space. For example: // declares a pointer p in the __private address space that // points to an int object in address space __global __global int *p; // declares an array of 4 floats in the __private address space. float x[4]; There is no address space for function return values. Using an address space qualifier in a function return type declaration will generate a compilation error, unless the return type is declared as a pointer type and the qualifier is used on the points-to address space. For example: __private int f() { ... } // should generate an error __local int *f() { ... } // allowed __local int * __private f() { ... }; // should generate an error. khronos-opencl-man-1.0~svn27110/gl_formatsInc.xml0000644000175000017500000000740411660441607021601 0ustar mathieumathieu The table below (Table 9.4) describes the list of GL texture internal formats and the corresponding CL image formats. If a GL texture object with an internal format from the table below is successfully created by OpenGL, then there is guaranteed to be a mapping to one of the corresponding CL image format(s) in that table. Texture objects created with other OpenGL internal formats may (but are not guaranteed to) have a mapping to a CL image format; if such mappings exist, they are guaranteed to preserve all color components, data types, and at least the number of bits/component actually allocated by OpenGL for that format. GL internal format CL image format (channel order, channel data type) GL_RGBA8 CL_RGBA, CL_UNORM_INT8 or CL_BGRA, CL_UNORM_INT8 GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV CL_RGBA, CL_UNORM_INT8 GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV CL_BGRA, CL_UNORM_INT8 GL_RGBA16 CL_RGBA, CL_UNORM_INT16 GL_RGBA8I, GL_RGBA8I_EXT CL_RGBA, CL_SIGNED_INT8 GL_RGBA16I, GL_RGBA16I_EXT CL_RGBA, CL_SIGNED_INT16 GL_RGBA32I, GL_RGBA32I_EXT CL_RGBA, CL_SIGNED_INT32 GL_RGBA8UI, GL_RGBA8UI_EXT CL_RGBA, CL_UNSIGNED_INT8 GL_RGBA16UI, GL_RGBA16UI_EXT CL_RGBA, CL_UNSIGNED_INT16 GL_RGBA32UI, GL_RGBA32UI_EXT CL_RGBA, CL_UNSIGNED_INT32 GL_RGBA16F, GL_RGBA16F_ARB CL_RGBA, CL_HALF_FLOAT GL_RGBA32F, GL_RGBA32F_ARB CL_RGBA, CL_FLOAT khronos-opencl-man-1.0~svn27110/clCreateFromD3D11Texture2DKHR.xml0000644000175000017500000002514611660441607024134 0ustar mathieumathieu ]> clCreateFromD3D11Texture2DKHR clCreateFromD3D11Texture2DKHR 2007-2011 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. 3 clCreateFromD3D11Texture2DKHR Creates an OpenCL 2D image object from a subresource of a Direct3D 11 2D texture. cl_mem clCreateFromD3D11Texture2DKHR cl_contextcontext cl_mem_flagsflags ID3D11Texture2D*resource UINTsubresource cl_int *errcode_ret Parameters context A valid OpenCL context created from a Direct3D 11 device. flags A bit-field that is used to specify usage information. May be CL_MEM_READ_ONLY, CL_MEM_WRITE_ONLY, or CL_MEM_READ_WRITE. (See the table for clCreateBuffer for more information.) resource A pointer to the Direct3D 11 2D texture to share. subresource The subresource of resource to share. errcode_ret An appropriate error code. If errcode_ret is NULL, no error code is returned. Notes The width, height and depth of the returned OpenCL 2D image object are determined by the width, height and depth of subresource subresource of resource. The channel type and order of the returned OpenCL 2D image object is determined by the format of resource as shown in of Direct3D 11 and corresponding OpenCL image formats of resource in clCreateFromD3D11Texture3DKHR. This call will increment the internal Direct3D reference count on resource. The internal Direct3D reference count on resource will be decremented when the OpenCL reference count on the returned OpenCL memory object drops to zero. &sharingD3D11Inc; &accessMappedInc; Errors Returns CL_SUCCESS returns a valid non-zero OpenCL image object and errcode_ret is set to CL_SUCCESS if the image object is created successfully. Otherwise, it returns a NULL value with one of the following error values returned in errcode_ret: CL_INVALID_CONTEXT if context is not a valid context. CL_INVALID_VALUE if values specified in flags are not valid or if subresource is not a valid subresource index for resource. CL_INVALID_D3D11_RESOURCE_KHR if resource is not a Direct3D 11 texture resource, if resource was created with the D3D11_USAGE flag D3D11_USAGE_IMMUTABLE, if a resource is a multisampled texture, if cl_mem from subresource subresource of resource has already been created using clCreateFromD3D11Texture2DKHR, or if context was not created against the same Direct3D 11 device from which resource was created. CL_INVALID_D3D11_RESOURCE_KHR if resource is not a Direct3D 11 texture object. CL_INVALID_IMAGE_FORMAT_DESCRIPTOR if the Direct3D 11 texture format of resource is not a value listed in the table of Direct3D 11 and corresponding OpenCL image formats for clCreateFromD3D11Texture3DKHR, or if the Direct3D 11 texture format of resource does not map to a supported OpenCL image format. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see cl_khr_d3d11_sharing, clGetDeviceIDsFromD3D11KHR, clCreateFromD3D11BufferKHR, clCreateFromD3D11Texture3DKHR, clEnqueueAcquireD3D11ObjectsKHR, clEnqueueReleaseD3D11ObjectsKHR khronos-opencl-man-1.0~svn27110/clCreateFromGLTexture.xml0000644000175000017500000003334111660441607023163 0ustar mathieumathieu clCreateFromGLTexture clCreateFromGLTexture 2007-2011 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. 3 clCreateFromGLTexture Creates an OpenCL image object, image array object, or image buffer object from an OpenGL texture object, texture array object, texture buffer object, or a single face of an OpenGL cubemap texture object. cl_mem clCreateFromGLTexture cl_contextcontext cl_mem_flagsflags GLenumtexture_target GLintmiplevel GLuinttexture cl_int* errcode_ret Parameters context A valid OpenCL context created from an OpenGL context. flags A bit-field that is used to specify usage information. Refer to the table for clCreateBuffer for a description of flags. Only the values CL_MEM_READ_ONLY, CL_MEM_WRITE_ONLY and CL_MEM_READ_WRITE can be used. texture_target texture_target This value must be one of GL_TEXTURE_1D, GL_TEXTURE_1D_ARRAY, GL_TEXTURE_BUFFER, GL_TEXTURE_2D, GL_TEXTURE_2D_ARRAY, GL_TEXTURE_3D, GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z, GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, or GL_TEXTURE_RECTANGLE. This requires OpenGL 3.1. Alternatively, GL_TEXTURE_RECTANGLE_ARB may be specified if the OpenGL extension GL_ARB_texture_rectangle is supported. texture_target is used only to define the image type of texture. No reference to a bound GL texture object is made or implied by this parameter. miplevel The mipmap level to be used. If texture_target is GL_TEXTURE_BUFFER, miplevel must be 0. Implementations may return CL_INVALID_OPERATION for miplevel values > 0 texture The name of a GL 1D, 2D, 3D, 1D array, 2D array, cubemap, rectangle or buffer texture object. The texture object must be a complete texture as per OpenGL rules on texture completeness. The texture format and dimensions defined by OpenGL for the specified miplevel of the texture will be used to create the OpenCL image memory object. Only GL texture objects with an internal format that maps to appropriate image channel order and data type specified in tables 5.5 and 5.6 may be used to create the OpenCL image memory object. errcode_ret Returns an appropriate error code as described below. If errcode_ret is NULL, no error code is returned. Notes If the state of a GL texture object is modified through the GL API (e.g. glTexImage2D, glTexImage3D or the values of the texture parameters GL_TEXTURE_BASE_LEVEL or GL_TEXTURE_MAX_LEVEL are modified) while there exists a corresponding CL image object, subsequent use of the CL image object will result in undefined behavior. The clRetainMemObject and clReleaseMemObject functions can be used to retain and release the image objects. Errors Returns a valid non-zero OpenCL image object and errcode_ret is set to CL_SUCCESS if the image object is created successfully. Otherwise, it returns a NULL value with one of the following error values returned in errcode_ret: CL_INVALID_CONTEXT if context is not a valid context or was not created from a GL context. CL_INVALID_VALUE if values specified in flags are not valid or if value specified in texture_target is not one of the values specified in the description of texture_target. CL_INVALID_MIP_LEVEL if miplevel is less than the value of levelbase (for OpenGL implementations) or zero (for OpenGL ES implementations); or greater than the value of q (for both OpenGL and OpenGL ES). levelbase and q are defined for the texture in section 3.8.10 (Texture Completeness) of the OpenGL 2.1 specification and section 3.7.10 of the OpenGL ES 2.0. CL_INVALID_MIP_LEVEL if miplevel is greater than zero and the OpenGL implementation does not support creating from non-zero mipmap levels. CL_INVALID_GL_OBJECT if texture is not a GL texture object whose type matches texture_target, if the specified miplevel of texture is not defined, or if the width or height of the specified miplevel is zero. CL_INVALID_IMAGE_FORMAT_DESCRIPTOR if the OpenGL texture internal format does not map to a supported OpenCL image format. CL_INVALID_OPERATION if texture is a GL texture object created with a border width value greater than zero. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see obsolete page replaced by clCreateFromGLTexture cl_khr_gl_sharing, clCreateBuffer, clCreateFromGLTexture khronos-opencl-man-1.0~svn27110/clGetEventInfo.xml0000644000175000017500000003535411660441607021673 0ustar mathieumathieu clGetEventInfo clGetEventInfo 2007-2011 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. 3 clGetEventInfo Returns information about the event object. cl_int clGetEventInfo cl_eventevent cl_event_infoparam_name size_tparam_value_size void*param_value size_t*param_value_size_ret Parameters event Specifies the event object being queried. param_value A pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored. param_value_size Specifies the size in bytes of memory pointed to by param_value. This size must be ≥ size of the return type as described in the table below. param_value_size_ret Returns the actual size in bytes of data copied to param_value. If param_value_size_ret is NULL, it is ignored. param_name Specifies the information to query. The list of supported param_name types and the information returned in param_value by clGetEventInfo is described in the table below: cl_event_info Return Type Information returned in param_value CL_EVENT_COMMAND_QUEUE cl_command_queue Return the command-queue associated with event. For user event objects, a NULL value is returned. CL_EVENT_CONTEXT cl_context Return the context associated with event. CL_EVENT_COMMAND_TYPE cl_command_type Return the command associated with event. Can be one of the following values: CL_COMMAND_NDRANGE_KERNEL CL_COMMAND_TASK CL_COMMAND_NATIVE_KERNEL CL_COMMAND_READ_BUFFER CL_COMMAND_WRITE_BUFFER CL_COMMAND_COPY_BUFFER CL_COMMAND_READ_IMAGE CL_COMMAND_WRITE_IMAGE CL_COMMAND_COPY_IMAGE CL_COMMAND_COPY_BUFFER_TO_IMAGE CL_COMMAND_COPY_IMAGE_TO_BUFFER CL_COMMAND_MAP_BUFFER CL_COMMAND_MAP_IMAGE CL_COMMAND_UNMAP_MEM_OBJECT CL_COMMAND_MARKER CL_COMMAND_ACQUIRE_GL_OBJECTS CL_COMMAND_RELEASE_GL_OBJECTS CL_COMMAND_READ_BUFFER_RECT CL_COMMAND_WRITE_BUFFER_RECT CL_COMMAND_COPY_BUFFER_RECT CL_COMMAND_USER CL_COMMAND_BARRIER CL_COMMAND_MIGRATE_MEM_OBJECTS CL_COMMAND_FILL_BUFFER CL_COMMAND_FILL_IMAGE CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR (if cl_khr_gl_event is enabled) CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR (if cl_khr_d3d10_sharing is enabled) CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR (if cl_khr_d3d10_sharing is enabled) CL_COMMAND_ACQUIRE_DX9_MEDIA_SURFACES_KHR (if cl_khr_dx9_media_sharing is enabled) CL_COMMAND_RELEASE_DX9_MEDIA_SURFACES_KHR (if cl_khr_dx9_media_sharing is enabled) CL_COMMAND_ACQUIRE_D3D11_OBJECTS_KHR (if cl_khr_d3d11_sharing is enabled) CL_COMMAND_RELEASE_D3D11_OBJECTS_KHR (if cl_khr_d3d11_sharing is enabled) CL_EVENT_COMMAND_ EXECUTION_STATUS cl_int Return the execution status of the command identified by event. The valid values are: CL_QUEUED (command has been enqueued in the command-queue), CL_SUBMITTED (enqueued command has been submitted by the host to the device associated with the command-queue), CL_RUNNING (device is currently executing this command), CL_COMPLETE (the command has completed), or Error code given by a negative integer value. (command was abnormally terminated – this may be caused by a bad memory access etc.) These error codes come from the same set of error codes that are returned from the platform or runtime API calls as return values or errcode_ret values. The error code values are negative, and event state values are positive. The event state values are ordered from the largest value (CL_QUEUED) for the first or initial state to the smallest value (CL_COMPLETE or negative integer value) for the last or complete state. The value of CL_COMPLETE and CL_SUCCESS are the same. CL_EVENT_REFERENCE_COUNT cl_uint Return the event reference count. The reference count returned should be considered immediately stale. It is unsuitable for general use in applications. This feature is provided for identifying memory leaks. Notes Using clGetEventInfo to determine if a command identified by event has finished execution (i.e. CL_EVENT_COMMAND_EXECUTION_STATUS returns CL_COMPLETE) is not a synchronization point. There are no guarantees that the memory objects being modified by command associated with event will be visible to other enqueued commands. Errors Returns CL_SUCCESS if the function executed successfully, or one of the errors below: CL_INVALID_VALUE if param_name is not valid, or if size in bytes specified by param_value_size is < size of return type as described in the table above and param_value is not NULL. CL_INVALID_VALUE if information to query given in param_name cannot be queried for event. CL_INVALID_EVENT if event is not a valid event object. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clReleaseEvent, clRetainEvent, clWaitForEvents, cl_khr_gl_event khronos-opencl-man-1.0~svn27110/fast_normalize.xml0000644000175000017500000001415111660441607022024 0ustar mathieumathieu ]> fast_normalize fast_normalize 2007-2011 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. 3 fast_normalize Normal vector length 1. floatn fast_normalize floatnp Description Returns a vector in the same direction as p but with a length of 1. fast_normalize is computed as: p * half_sqrt(p.x2 + p.y2 +...) The result shall be within 8192 ulps error from the infinitely precise result of: if ( all(p == 0.0f)) result = p; else result = p / sqrt(p.x2 + p.y2 +...); with the following exceptions: If the sum of squares is greater than FLT_MAX then the value of the floating-point values in the result vector are undefined. If the sum of squares is less than FLT_MIN then the implementation may return back p. If the device is in 'denorms are flushed to zero' mode, individual operand elements with magnitude less than sqrt(FLT_MIN) may be flushed to zero before proceeding with the calculation. Notes &geometricFunctionsInc; Specification OpenCL Specification Also see Geometric Functions khronos-opencl-man-1.0~svn27110/otherDataTypes.xml0000644000175000017500000002044311660441607021750 0ustar mathieumathieu Other Data Types Other Built-in Data Types 2007-2011 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. 3 Other Data Types Other Built-in Data Types Description The following table describes other data types supported by OpenCL: Type Description image2d_t A 2D image. See individual Image Functions for more information. image3d_t A 3D image. See individual Image Functions for more information. image2d_array_t A 2D image array. See individual Image Functions for more information. image1d_t A 1D image. See individual Image Functions for more information. image1d_buffer_t A 1D image created from a buffer object. See individual Image Functions for more information. image1d_array_t A 1D image array. See individual Image Functions for more information. sampler_t A sampler type. event_t An event. This can be used to identify async copies from global to local memory and vice-versa. See individual Async Copy and Prefetch Functions for more information. NOTE: The image2d_t, image3d_t, image2d_array_t, image1d_t, image1d_buffer_t, image1d_array_t, and sampler_t types are only defined if the device supports images i.e. CL_DEVICE_IMAGE_SUPPORT is CL_TRUE. See the table for param_name for clGetDeviceInfo for details. The C99 derived types (arrays, structs, union, function, and pointers), constructed from the built-in data types described in Scalar Data Types, Vector Data Types, and Other Data Types are also supported with certain restrictions. Specification OpenCL Specification Also see Macros and Limits, Scalar Data Types, Vector Data Types, Reserved Data Types, Abstract Data Types, Enumerated Data Types, khronos-opencl-man-1.0~svn27110/vstore_half.xml0000644000175000017500000003677111660441607021337 0ustar mathieumathieu ]> vstore_half vstore_half 2007-2011 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. 3 vstore_half Convert float to half and write to a pointer to memory. void vstore_half floatdata size_toffset __global half*p void vstore_half_rte floatdata size_toffset __global half*p void vstore_half_rtz floatdata size_toffset __global half*p void vstore_half_rtp floatdata size_toffset __global half*p void vstore_half_rtn floatdata size_toffset __global half*p void vstore_half floatdata size_toffset __local half*p void vstore_half_rte floatdata size_toffset __local half*p void vstore_half_rtz floatdata size_toffset __local half*p void vstore_half_rtp floatdata size_toffset __local half*p void vstore_half_rtn floatdata size_toffset __local half*p void vstore_half floatdata size_toffset __private half*p void vstore_half_rte floatdata size_toffset __private half*p void vstore_half_rtz floatdata size_toffset __private half*p void vstore_half_rtp floatdata size_toffset __private half*p void vstore_half_rtn floatdata size_toffset __private half*p If the optional double is supported, you may use double instead of float. Description The float (or double if optional double is supported) value given by data is first converted to a half value using the appropriate rounding mode. The half value is then written to address computed as (p + offset). The address computed as (p + offset) must be 16-bit aligned. vstore_half uses the current rounding mode. The default current rounding mode is round to nearest even. Notes &vectorFunctionsInc; Specification OpenCL Specification Also see Vector Data Load and Store Functions khronos-opencl-man-1.0~svn27110/fdim.xml0000644000175000017500000001032711660441607017727 0ustar mathieumathieu ]> fdim fdim 2007-2011 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. 3 fdim Positive difference between x and y. gentype fdim gentypex gentypey Description fdim computes x - y if x is greater than y, +0 if x is less than or equal to y. Notes &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/read_imagei3d.xml0000644000175000017500000002516111660441607021467 0ustar mathieumathieu [ ]> read_imagei (3D) read_imagei (3D) 2007-2011 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. 3 read_imagei (3D) Do an element lookup in the 3D image object, returning unnormalized signed integer and unsigned integer values int4 read_imagei image3d_t image sampler_t sampler int4 coord int4 read_imagei image3d_t image sampler_t sampler float4 coord uint4 read_imageui image3d_t image sampler_t sampler int4 coord uint4 read_imageui image3d_t image sampler_t sampler float4 coord int4 read_imagei image3d_t image int4 coord uint4 read_imageui image3d_t image int4 coord Description The forms that take a sampler_t use the coordinate (coord.x, coord.y, coord.z)) to do an element lookup in the 3D image object specified by image. coord.w is ignored. The samplerless read image functions behave exactly as the corresponding read image functions that take integer coordinates and a sampler with filter mode set to CLK_FILTER_NEAREST, normalized coordinates set to CLK_NORMALIZED_COORDS_FALSE and addressing mode to CLK_ADDRESS_NONE. read_imagei and read_imageui return unnormalized signed integer and unsigned integer values respectively. Each channel will be stored in a 32-bit integer. read_imagei can only be used with image objects created with image_channel_data_type set to one of the following values: CL_SIGNED_INT8, CL_SIGNED_INT16, or CL_SIGNED_INT32. If the image_channel_data_type is not one of the above values, the values returned by read_imagei are undefined. read_imageui can only be used with image objects created with image_channel_data_type set to one of the following values: CL_UNSIGNED_INT8, CL_UNSIGNED_INT16, and CL_UNSIGNED_INT32. If the image_channel_data_type is not one of the above values, the values returned by read_imageui are undefined. The read_imageui calls support a nearest filter only. The filter_mode specified in sampler must be set to CLK_FILTER_NEAREST; otherwise the values returned are undefined. Furthermore, the read_image{i|ui} calls that take integer coordinates must use a sampler with normalized coordinates set to CLK_NORMALIZED_COORDS_FALSE and addressing mode set to CLK_ADDRESS_CLAMP_TO_EDGE, CLK_ADDRESS_CLAMP or CLK_ADDRESS_NONE; otherwise the values returned are undefined. Notes &imageFunctionsInc; &imageMappingInc; Specification OpenCL Specification Also see Image Functions khronos-opencl-man-1.0~svn27110/mix.xml0000644000175000017500000001553611660441607017614 0ustar mathieumathieu ]> mix mix 2007-2011 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. 3 mix Linear blend of x and y. gentype mix gentypex gentypey gentypea gentypef mix gentypefx gentypefy floata gentyped mix gentypedx gentypedy doublea gentype mix (gentype x, gentype y, half a) // if half extension enabled Description Returns the linear blend of x and y implemented as: x + (y - x) * a a must be a value in the range 0.0 ... 1.0. If a is not in the range 0.0 ... 1.0, the return values are undefined. Notes &commonFunctionsInc; If extended with cl_khr_fp16, generic type name gentype may indicate half and half{2|3|4|8|16} as arguments and return values. The mix function can be implemented using contractions such as mad or fma. Specification OpenCL Specification Also see Common Functions khronos-opencl-man-1.0~svn27110/clGetGLTextureInfo.xml0000644000175000017500000002464011660441607022471 0ustar mathieumathieu clGetGLTextureInfo clGetGLTextureInfo 2007-2011 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. 3 clGetGLTextureInfo Returns additional information about the GL texture object associated with a memory object. cl_int clGetGLTextureInfo cl_mem memobj cl_gl_texture_info param_name size_t param_value_size void *param_value size_t *param_value_size_ret Parameters param_name Specifies what additional information about the GL texture object associated with memobj to query. The list of supported param_name types and the information returned in param_value by clGetGLTextureInfo is described in the table below. param_value A pointer to memory where the result being queried is returned. If param_value is NULL, it is ignored. param_value_size Specifies the size in bytes of memory pointed to by param_value. This size must be ≥ size of return type as described in the table below. param_value_size_ret Returns the actual size in bytes of data copied to param_value. If param_value_size_ret is NULL, it is ignored. cl_gl_texture_info Return Type Information returned in param_value CL_GL_TEXTURE_TARGET GLenum The texture_target argument specified in clCreateFromGLTexture. CL_GL_MIPMAP_LEVEL GLint The miplevel argument specified in clCreateFromGLTexture. Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_MEM_OBJECT if memobj is not a valid OpenCL memory object CL_INVALID_GL_OBJECT if there is no GL texture object associated with memobj. CL_INVALID_VALUE if param_name is not valid, or if size in bytes specified by param_value_size is < size of return type as described in the table above and param_value is not NULL, or if param_value and param_value_size_ret are NULL. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see cl_khr_gl_sharing, clGetGLObjectInfo, clCreateFromGLTexture, clCreateFromGLTexture khronos-opencl-man-1.0~svn27110/degrees.xml0000644000175000017500000001054411660441607020427 0ustar mathieumathieu ]> degrees degrees 2007-2011 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. 3 degrees Converts radians to degrees. gentype degrees gentyperadians Description Converts radians to degrees, i.e. (180 / pi) * radians. Notes &commonFunctionsInc; If extended with cl_khr_fp16, generic type name gentype may indicate half and half{2|3|4|8|16} as arguments and return values. Specification OpenCL Specification Also see Common Functions, radians khronos-opencl-man-1.0~svn27110/clEnqueueReleaseGLObjects.xml0000644000175000017500000003122411660441607023773 0ustar mathieumathieu ]> clEnqueueReleaseGLObjects clEnqueueReleaseGLObjects 2007-2011 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. 3 clEnqueueReleaseGLObjects Release OpenCL memory objects that have been created from OpenGL objects. cl_int clEnqueueReleaseGLObjects cl_command_queue command_queue cl_uint num_objects const cl_mem *mem_objects cl_uint num_events_in_wait_list const cl_event *event_wait_list cl_event *event Parameters command_queue A valid command-queue. num_objects The number of memory objects to be released in mem_objects. mem_objects A pointer to a list of CL memory objects that correspond to GL objects. event_wait_list num_events_in_wait_list These parameters specify events that need to complete before this command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event_wait_list act as synchronization points. event Returns an event object that identifies this particular read/write command and can be used to query or queue a wait for the command to complete. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If the cl_khr_gl_sharing extension is supported and if an OpenGL context is bound to the current thread, then any OpenGL commands which does: affect or access the contents of a memory object listed in the mem_objects list, and are issued on that context after the call to clEnqueueReleaseGLObjects will not execute until after execution of any OpenCL commands preceding the clEnqueueReleaseGLObjects which affect or access any of those memory objects. If a non-NULL event object is returned, it will report completion before execution of such OpenGL commands. Description Release OpenCL memory objects that have been created from OpenGL objects. These objects need to be released before they can be used by OpenGL. The OpenGL objects are released by the OpenCL context associated with command_queue. Notes &gl_syncInc; Errors clEnqueueReleaseGLObjects returns CL_SUCCESS if the function is executed successfully. If num_objects is 0 and mem_objects is NULL the function does nothing and returns CL_SUCCESS. Otherwise, it returns one of the following errors: CL_INVALID_VALUE if num_objects is zero and mem_objects is not a NULL value or if num_objects > 0 and mem_objects is NULL. CL_INVALID_MEM_OBJECT if memory objects in mem_objects are not valid OpenCL memory objects. CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_CONTEXT if context associated with command_queue was not created from an OpenGL context. CL_INVALID_GL_OBJECT if memory objects in mem_objects have not been created from a GL object(s). CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see cl_khr_gl_sharing, clEnqueueAcquireGLObjects, cl_khr_gl_event khronos-opencl-man-1.0~svn27110/sqrt.xml0000644000175000017500000001610011660441607017774 0ustar mathieumathieu ]> sqrt, rsqrt, half_sqrt, native_sqrt, half_sqrt, native_sqrt sqrt, rsqrt, half_sqrt, native_sqrt, half_sqrt, native_sqrt 2007-2011 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. 3 sqrt, rsqrt, half_sqrt, native_sqrt, half_sqrt, native_sqrt Square root functions. gentype sqrt gentype gentype half_sqrt gentypex gentype native_sqrt gentypex gentype rsqrt gentype gentype half_rsqrt gentypex gentype native_rsqrt gentypex Description sqrt computes square root. half_sqrt computes square root. native_sqrt computes square root over an implementation-defined range. The maximum error is implementation-defined. rsqrt computes inverse square root. half_rsqrt computes inverse square root. native_rsqrt computes inverse square root over an implementation-defined range. The maximum error is implementation-defined. Notes &mathFunctionsInc; Functions with the half_ prefix are implemented with a minimum of 10-bits of accuracy i.e. an ULP value less than or equal to 8192 ulp. Functions with the native_ prefix may map to one or more native device instructions and will typically have better performance compared to the corresponding functions (without the native__ prefix). The accuracy (and in some cases the input range(s)) of these functions is implementation-defined. Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/clEnqueueFillImage.xml0000644000175000017500000003732311660441607022515 0ustar mathieumathieu clEnqueueFillImage clEnqueueFillImage 2007-2011 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. 3 clEnqueueFillImage Enqueues a command to fill an image object with a specified color. cl_int clEnqueueFillImage cl_command_queuecommand_queue cl_memimage const void*fill_color const size_t*origin const size_t*region cl_uintnum_events_in_wait_list const cl_event*event_wait_list cl_event*event Parameters command_queue Refers to the command-queue in which the fill command will be queued. The OpenCL context associated with command_queue and image must be the same. image A valid image object. fill_color The fill color. The fill color is a four component RGBA floating-point color value if the image channel data type is not an unnormalized signed and unsigned integer type, is a four component signed integer value if the image channel data type is an unnormalized signed integer type and is a four component unsigned integer value if the image channel data type is an unormalized unsigned integer type. The fill color will be converted to the appropriate image channel format and order associated with image. origin Defines the (x, y, z) offset in pixels in the 1D, 2D, or 3D image, the (x, y) offset and the image index in the image array or the (x) offset and the image index in the 1D image array. If image is a 2D image object, origin[2] must be 0. If image is a 1D image or 1D image buffer object, origin[1] and origin[2] must be 0. If image is a 1D image array object, origin[2] must be 0. If image is a 1D image array object, origin[1] describes the image index in the 1D image array. If image is a 2D image array object, origin[2] describes the image index in the 2D image array. region Defines the (width, height, depth) in pixels of the 1D, 2D or 3D rectangle, the (width, height) in pixels of the 2D rectangle and the number of images of a 2D image array or the (width) in pixels of the 1D rectangle and the number of images of a 1D image array. If image is a 2D image object, region[2] must be 1. If image is a 1D image or 1D image buffer object, region[1] and region[2] must be 1. If image is a 1D image array object, region[2] must be 1. event_wait_list , num_events_in_wait_list Specify events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event_wait_list act as synchronization points. The context associated with events in event_wait_list and command_queue must be the same. The memory associated with event_wait_list can be reused or freed after the function returns. event Returns an event object that identifies this particular write command and can be used to query or queue a wait for this particular command to complete. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. clEnqueueBarrierWithWaitList can be used instead. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the event_wait_list array. Notes The usage information which indicates whether the memory object can be read or written by a kernel and/or the host and is given by the cl_mem_flags argument value specified when image is created is ignored by clEnqueueFillImage. Errors clEnqueueFillImage return CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors. CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_CONTEXT if the context associated with command_queue and image are not the same or if the context associated with command_queue and events in event_wait_list are not the same. CL_INVALID_MEM_OBJECT if image is not a valid image object. CL_INVALID_VALUE if fill_color is NULL. CL_INVALID_VALUE if the region being written specified by origin and region is out of bounds or if ptr is a NULL value. CL_INVALID_VALUE if values in origin and region do not follow rules described in the argument description for origin and region. CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_INVALID_IMAGE_SIZE if image dimensions (image width, height, specified or compute row and/or slice pitch) for image are not supported by device associated with queue. CL_INVALID_IMAGE_FORMAT if image format (image channel order and data type) for image are not supported by device associated with queue. CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with image. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clEnqueueReadImage, clEnqueueWriteImage, clEnqueueCopyImage, clEnqueueBarrierWithWaitList khronos-opencl-man-1.0~svn27110/relationalFunctionsUGEN.xml0000644000175000017500000000074711660441607023517 0ustar mathieumathieu The argument type ugentype refers to unsigned integer types, i.e. uchar, ucharn, ushort, ushortn, uint, uintn, ulong, and ulongn. n is 2, 3, 4, 8, or 16. khronos-opencl-man-1.0~svn27110/explicitMemoryFenceFunctions.xml0000644000175000017500000000667411660441607024666 0ustar mathieumathieu Explicit Memory Fence Functions Explicit Memory Fence Functions 2007-2011 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. 3 Explicit Memory Fence Functions Click an item in the table below for details about that function. mem_fence Orders loads and stores of a work-item executing a kernel read_mem_fence Read memory barrier that orders only loads write_mem_fence Write memory barrier that orders only stores Description These functions provide ordering between memory operations of a work-item. Specification OpenCL Specification Also see barrier khronos-opencl-man-1.0~svn27110/cbrt.xml0000644000175000017500000000761611660441607017751 0ustar mathieumathieu ]> cbrt cbrt 2007-2011 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. 3 cbrt Computes cube-root. gentype cbrt gentype Description cbrt computes the cube-root. Notes &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/cl_khr_d3d11_sharing.xml0000644000175000017500000003016111660441607022657 0ustar mathieumathieu cl_khr_d3d11_sharing cl_khr_d3d11_sharing 2007-2011 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. 3 cl_khr_d3d11_sharing Provide interoperability between OpenCL and Direct3D 11. #pragma OPENCL EXTENSION cl_khr_d3d11_sharing : enable Description The goal of this extension is to provide interoperability between OpenCL and Direct3D 11. This is designed to function analogously to the OpenGL interoperability as defined in sections 9.7 and 9.8. If this extension is supported by an implementation, the string "cl_khr_d3d11_sharing" will be present in the CL_PLATFORM_EXTENSIONS or CL_DEVICE_EXTENSIONS string described in the table of allowed values for param_name for clGetDeviceInfo. The interfaces for this extension are provided in the header file cl_d3d11.h. If the cl_khr_d3d11_sharing extension is supported, then the following functions are enabled: clGetDeviceIDsFromD3D11KHR clCreateFromD3D11BufferKHR clCreateFromD3D11Texture2DKHR clCreateFromD3D11Texture3DKHR clEnqueueAcquireD3D11ObjectsKHR clEnqueueReleaseD3D11ObjectsKHR The OpenCL functions enabled by the cl_khr_d3d11_sharing extension allow applications to use Direct3D 11 resources as OpenCL memory objects. This allows efficient sharing of data between OpenCL and Direct3D 11. The OpenCL API may be used to execute kernels that read and/or write memory objects that are also Direct3D 11 resources. An OpenCL image object may be created from a Direct3D 11 texture resource. An OpenCL buffer object may be created from a Direct3D 11 buffer resource. OpenCL memory objects may be created from Direct3D 11 objects if and only if the OpenCL context has been created from a Direct3D 11 device. Specification OpenCL Specification Also see EXTENSION, clGetDeviceIDsFromD3D11KHR, clCreateFromD3D11BufferKHR, clCreateFromD3D11Texture2DKHR, clCreateFromD3D11Texture3DKHR, clEnqueueAcquireD3D10ObjectsKHR, clEnqueueReleaseD3D11ObjectsKHR khronos-opencl-man-1.0~svn27110/fract.xml0000644000175000017500000001300511660441607020103 0ustar mathieumathieu ]> fract fract 2007-2011 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. 3 fract Fractional value in x. gentype fract gentypex __global gentype*itpr gentype fract gentypex __local gentype*itpr gentype fract gentypex __private gentype*itpr Description Returns fmin( x - floor(x), 0x1.fffffep-1f ). floor(x) is returned in iptr. Notes The min() operator is there to prevent fract(-small ) from returning 1.0. It returns the largest positive floating-point number less than 1.0. &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/barrier.xml0000644000175000017500000001453411660441607020442 0ustar mathieumathieu Synchronization, barrier barrier 2007-2011 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. 3 barrier All work-items in a work-group executing the kernel on a processor must execute this function before any are allowed to continue execution beyond the barrier. void barrier cl_mem_fence_flagsflags Description All work-items in a work-group executing the kernel on a processor must execute this function before any are allowed to continue execution beyond the barrier. This function must be encountered by all work-items in a work-group executing the kernel. If barrier is inside a conditional statement, then all work-items must enter the conditional if any work-item enters the conditional statement and executes the barrier. If barrier is inside a loop, all work-items must execute the barrier for each iteration of the loop before any are allowed to continue execution beyond the barrier. The barrier function also queues a memory fence (reads and writes) to ensure correct ordering of memory operations to local or global memory. The flags argument specifies the memory address space and can be set to a combination of the following literal values. CLK_LOCAL_MEM_FENCE - The barrier function will either flush any variables stored in local memory or queue a memory fence to ensure correct ordering of memory operations to local memory. CLK_GLOBAL_MEM_FENCE - The barrier function will queue a memory fence to ensure correct ordering of memory operations to global memory. This can be useful when work-items, for example, write to buffer or image objects and then want to read the updated data. Specification OpenCL Specification khronos-opencl-man-1.0~svn27110/fma.xml0000644000175000017500000001077111660441607017556 0ustar mathieumathieu ]> fma fma 2007-2011 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. 3 fma Multiply and add, then round. gentype fma gentypea gentypeb gentypec Description Returns the correctly rounded floating-point representation of the sum of c with the infinitely precise product of a and b. Rounding of intermediate products shall not occur. Edge case behavior is per the IEEE 754-2008 standard. Notes &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions, FP_CONTRACT, FP_FAST_FMA khronos-opencl-man-1.0~svn27110/get_image_width.xml0000644000175000017500000001264511660441607022135 0ustar mathieumathieu get_image_width get_image_width 2007-2011 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. 3 get_image_width Return the image width in pixels. int get_image_width image1d_timage int get_image_width image1d_buffer_timage int get_image_width image2d_timage int get_image_width image3d_timage int get_image_width image1d_array_timage int get_image_width image2d_array_timage Description Return the image width in pixels. Specification OpenCL Specification Also see Image Functions khronos-opencl-man-1.0~svn27110/atomic_or.xml0000644000175000017500000001621111660441607020762 0ustar mathieumathieu atomic_or atomic_or 2007-2011 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. 3 atomic_or atomic_or functions. int atomic_or volatile __global int*p intval unsigned int atomic_or volatile __global unsigned int*p unsigned intval int atomic_or volatile __local int*p intval unsigned int atomic_or volatile __local unsigned int*p unsigned intval Description Read the 32-bit value (referred to as old) stored at location pointed by p. Compute (old | val) and store result at location pointed by p. The function returns old. A 64-bit version of this function, atom_or, is enabled by cl_khr_int64_extended_atomics. Specification OpenCL Specification Also see Atomic Functions, atom_or khronos-opencl-man-1.0~svn27110/relationalFunctionsGEN.xml0000644000175000017500000000150211660441607023360 0ustar mathieumathieu The argment type gentype can be char, charn,uchar, ucharn, short, shortn, ushort, ushortn, int, intn, uint, uintn, long, longn, ulong, ulongn, float, floatn, double, and doublen. khronos-opencl-man-1.0~svn27110/shuffle.xml0000644000175000017500000002004711660441607020444 0ustar mathieumathieu shuffle, shuffle2 shuffle, shuffle2 2007-2011 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. 3 shuffle Constructs a permutation of elements from one (or two) input vectors. gentypen shuffle gentypemx ugentypenmask gentypen shuffle2 gentypemx gentypemy ugentypenmask Description The shuffle and shuffle2 built-in functions construct a permutation of elements from one or two input vectors respectively that are of the same type, returning a vector with the same element type as the input and length that is the same as the shuffle mask. The size of each element in the mask must match the size of each element in the result. For shuffle, only the ilogb(2m-1) least significant bits of each mask element are considered. For shuffle2, only the ilogb(2m-1)+1 least significant bits of each mask element are considered. Other bits in the mask shall be ignored. The elements of the input vectors are numbered from left to right across one or both of the vectors. For this purpose, the number of elements in a vector is given by vec_step(gentypem). The shuffle mask operand specifies, for each element of the result vector, which element of the one or two input vectors the result element gets. We use the generic type name gentypen (or gentypem) to indicate the built-in data types char{2|4|8|16}, uchar{2|4|8|16}, short{2|4|8|16}, ushort{2|4|8|16}, int{2|4|8|16}, uint{2|4|8|16}, long{2|4|8|16}, ulong{2|4|8|16}, or float{2|4|8|16} as the type for the arguments unless otherwise stated. We use the generic name ugentypen to indicate the built-in unsigned integer data types. If the double is supported, then gentypen (or gentypem) also indicate the built-in data types double{2|4|8|16}. The generic type name gentypen (or gentypem) may indicate the data type half{2|4|8|16} if the cl_khr_fp16 extension is supported. Example uint4 mask = (uint4)(3, 2, 1, 0); float4 a; float4 r = shuffle(a, mask); // r.s0123 = a.wzyx uint8 mask = (uint8)(0, 1, 2, 3, 4, 5, 6, 7); float4 a, b; float8 r = shuffle2(a, b, mask); // r.s0123 = a.xyzw // r.s4567 = b.xyzw uint4 mask; float8 a; float4 b; b = shuffle(a, mask); Examples that are not valid are: uint8 mask; short16 a; short8 b; b = shuffle(a, mask); Specification OpenCL Specification Also see Miscellaneous Vector Functions khronos-opencl-man-1.0~svn27110/smoothstep.xml0000644000175000017500000001657111660441607021224 0ustar mathieumathieu ]> smoothstep smoothstep 2007-2011 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. 3 smoothstep Step and interpolate. gentype smoothstep gentypeedge0 gentypeedge1 gentypex gentypef smoothstep floatedge0 floatedge1 gentypefx gentyped smoothstep doubleedge0 doubleedge1 gentypedx gentype smoothstep (half edge0, half edge1, gentype x) // if half extension enabled Description Returns 0.0 if xedge0 and 1.0 if xedge1 and performs smooth Hermite interpolation between 0 and 1 when edge0 < x < edge1. This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to: gentype t; t = clamp((x - edge0) / (edge1 - edge0), 0, 1); return t * t * (3 - 2 * t); Results are undefined if edge0edge1 or if x, edge0 or edge1 is a NaN. Notes &commonFunctionsInc; If extended with cl_khr_fp16, generic type name gentype may indicate half and half{2|3|4|8|16} as arguments and return values. This function can be implemented using contractions such as mad or fma. Specification OpenCL Specification Also see Common Functions khronos-opencl-man-1.0~svn27110/isequal.xml0000644000175000017500000001710711660441607020456 0ustar mathieumathieu ]> isequal isequal 2007-2011 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. 3 isequal Compare of x == y. int isequal floatx floaty intn isequal floatnx floatny int isequal doublex doubley longn isequal doublenx doubleny int isequal (half x, half y) // if half extension enabled shortn isequal (halfn x, halfn y) // if half extension enabled Description Returns the component-wise compare of x == y. Notes &relationalFunctionsInc1; &relationalFunctionsInc2; &relationalFunctionsInc3; Specification OpenCL Specification Also see Relational Functions khronos-opencl-man-1.0~svn27110/cl_image_format.xml0000644000175000017500000003151011660441607022115 0ustar mathieumathieu cl_image_format cl_image_format 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. 3 cl_image_format The image format descriptor structure is defined as: typedef struct _cl_image_format { cl_channel_order image_channel_order; cl_channel_type image_channel_data_type; } cl_image_format; Members image_channel_order Specifies the number of channels and the channel layout i.e. the memory layout in which channels are stored in the image. Valid values are described in the table below. Format Description CL_R, CL_Rx, or CL_A CL_INTENSITY This format can only be used if channel data type = CL_UNORM_INT8, CL_UNORM_INT16, CL_SNORM_INT8, CL_SNORM_INT16, CL_HALF_FLOAT, or CL_FLOAT. CL_LUMINANCE This format can only be used if channel data type = CL_UNORM_INT8, CL_UNORM_INT16, CL_SNORM_INT8, CL_SNORM_INT16, CL_HALF_FLOAT, or CL_FLOAT. CL_RG, CL_RGx, or CL_RA CL_RGB or CL_RGBx This format can only be used if channel data type = CL_UNORM_SHORT_565, CL_UNORM_SHORT_555 or CL_UNORM_INT101010. CL_RGBA CL_ARGB, CL_BGRA. This format can only be used if channel data type = CL_UNORM_INT8, CL_SNORM_INT8, CL_SIGNED_INT8 or CL_UNSIGNED_INT8. image_channel_data_type Describes the size of the channel data type. The number of bits per element determined by the image_channel_data_type and image_channel_order must be a power of two. The list of supported values is described in the table below. Image Channel Data Type Description CL_SNORM_INT8 Each channel component is a normalized signed 8-bit integer value. CL_SNORM_INT16 Each channel component is a normalized signed 16-bit integer value. CL_UNORM_INT8 Each channel component is a normalized unsigned 8-bit integer value. CL_UNORM_INT16 Each channel component is a normalized unsigned 16-bit integer value. CL_UNORM_SHORT_565 Represents a normalized 5-6-5 3-channel RGB image. The channel order must be CL_RGB or CL_RGBx. CL_UNORM_SHORT_555 Represents a normalized x-5-5-5 4-channel xRGB image. The channel order must be CL_RGB or CL_RGBx. CL_UNORM_INT_101010 Represents a normalized x-10-10-10 4-channel xRGB image. The channel order must be CL_RGB or CL_RGBx. CL_SIGNED_INT8 Each channel component is an unnormalized signed 8-bit integer value. CL_SIGNED_INT16 Each channel component is an unnormalized signed 16-bit integer value. CL_SIGNED_INT32 Each channel component is an unnormalized signed 32-bit integer value. CL_UNSIGNED_INT8 Each channel component is an unnormalized unsigned 8-bit integer value. CL_UNSIGNED_INT16 Each channel component is an unnormalized unsigned 16-bit integer value. CL_UNSIGNED_INT32 Each channel component is an unnormalized unsigned 32-bit integer value. CL_HALF_FLOAT Each channel component is a 16-bit half-float value. CL_FLOAT Each channel component is a single precision floating-point value. Description For example, to specify a normalized unsigned 8-bit / channel RGBA image: image_channel_order = CL_RGBA image_channel_data_type = CL_UNORM_INT8 image_channel_data_type values of CL_UNORM_SHORT_565, CL_UNORM_SHORT_555 and CL_UNORM_INT_101010 are special cases of packed image formats where the channels of each element are packed into a single unsigned short or unsigned int. For these special packed image formats, the channels are normally packed with the first channel in the most significant bits of the bitfield, and successive channels occupying progressively less significant locations. For CL_UNORM_SHORT_565, R is in bits 15:11, G is in bits 10:5 and B is in bits 4:0. For CL_UNORM_SHORT_555, bit 15 is undefined, R is in bits 14:10, G in bits 9:5 and B in bits 4:0. For CL_UNORM_INT_101010, bits 31:30 are undefined, R is in bits 29:20, G in bits 19:10 and B in bits 9:0. OpenCL implementations must maintain the minimum precision specified by the number of bits in image_channel_data_type. If the image format specified by image_channel_order, and image_channel_data_type cannot be supported by the OpenCL implementation, then the call to clCreateImage will return a NULL memory object. Specification OpenCL Specification Also see cl_image_desc Image Descriptor, EXTENSION, clGetSupportedImageFormats, clCreateImage khronos-opencl-man-1.0~svn27110/clSetEventCallback.xml0000644000175000017500000003340211660441607022500 0ustar mathieumathieu clSetEventCallback clSetEventCallback clSetEventCallback 2007-2011 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. 3 clSetEventCallback Registers a user callback function for a specific command execution status. cl_int clSetEventCallback cl_eventevent cl_int command_exec_callback_type void (CL_CALLBACK *pfn_event_notify) (cl_event event, cl_int event_command_exec_status, void *user_data) void*user_data Parameters event A valid event object. command_exec_callback_type The command execution status for which the callback is registered. The command execution callback value for which a callback can be registered is CL_SUBMITTED, CL_RUNNING, or CL_COMPLETE. There is no guarantee that the callback functions registered for various execution status values for an event will be called in the exact order that the execution status of a command changes. Furthermore, it should be noted that receiving a call back for an event with a status other than CL_COMPLETE, in no way implies that the memory model or execution model as defined by the OpenCL specification has changed. For example, it is not valid to assume that a corresponding memory transfer has completed unless the event is in a state CL_COMPLETE. The callback function registered for a command_exec_callback_type value of CL_COMPLETE will be called when the command has completed successfully or is abnormally terminated. pfn_event_notify The event callback function that can be registered by the application. This callback function may be called asynchronously by the OpenCL implementation. It is the application's responsibility to ensure that the callback function is thread-safe. The parameters to this callback function are: event is the event object for which the callback function is invoked. event_command_exec_status represents the execution status of command for which this callback function is invoked. See the table of values for param_value for clGetEventInfo for the command execution status values. If the callback is called as the result of the command associated with event being abnormally terminated, an appropriate error code for the error that caused the termination will be passed to event_command_exec_status instead. user_data is a pointer to user supplied data. user_data Will be passed as the user_data argument when pfn_notify is called. user_data can be NULL. Notes The registered callback function will be called when the execution status of command associated with event changes to an execution status equal to or past the status specified by command_exec_status. Each call to clSetEventCallback registers the specified user callback function on a callback stack associated with event. The order in which the registered user callback functions are called is undefined. All callbacks registered for an event object must be called. All enqueued callbacks shall be called before the event object is destroyed. Callbacks must return promptly. The behavior of calling expensive system routines, OpenCL API calls to create contexts or command-queues, or blocking OpenCL operations from the following list below, in a callback is undefined. clFinish clWaitForEvents blocking calls to clEnqueueReadBuffer, clEnqueueReadBufferRect, clEnqueueWriteBuffer, and clEnqueueWriteBufferRect blocking calls to clEnqueueReadImage and clEnqueueWriteImage blocking calls to clEnqueueMapBuffer and clEnqueueMapImage blocking calls to clBuildProgram, clCompileProgram, or clLinkProgram. If an application needs to wait for completion of a routine from the above list in a callback, please use the non-blocking form of the function, and assign a completion callback to it to do the remainder of your work. Note that when a callback (or other code) enqueues commands to a command-queue, the commands are not required to begin execution until the queue is flushed. In standard usage, blocking enqueue calls serve this role by implicitly flushing the queue. Since blocking calls are not permitted in callbacks, those callbacks that enqueue commands on a command queue should either call clFlush on the queue before returning or arrange for clFlush to be called later on another thread. Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_EVENT if event is not a valid event object. CL_INVALID_VALUE if pfn_event_notify is NULL or if command_exec_callback_type is not CL_COMPLETE. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification khronos-opencl-man-1.0~svn27110/clEnqueueUnmapMemObject.xml0000644000175000017500000003123611660441607023527 0ustar mathieumathieu clEnqueueUnmapMemObject clEnqueueUnmapMemObject 2007-2011 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. 3 clEnqueueUnmapMemObject Enqueues a command to unmap a previously mapped region of a memory object. cl_int clEnqueueUnmapMemObject cl_command_queue command_queue cl_mem memobj void *mapped_ptr cl_uint num_events_in_wait_list const cl_event *event_wait_list cl_event *event Parameters command_queue Must be a valid command-queue. memobj A valid memory object. The OpenCL context associated with command_queue and memobj must be the same. mapped_ptr The host address returned by a previous call to clEnqueueMapBuffer or clEnqueueMapImage for memobj. event_wait_list , num_events_in_wait_list Specify events that need to complete before clEnqueueUnmapMemObject can be executed. If event_wait_list is NULL, then clEnqueueUnmapMemObject does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event_wait_list act as synchronization points. The context associated with events in event_wait_list and command_queue must be the same. The memory associated with event_wait_list can be reused or freed after the function returns. event Returns an event object that identifies this particular copy command and can be used to query or queue a wait for this particular command to complete. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. clEnqueueBarrierWithWaitList can be used instead. Notes Reads or writes from the host using the pointer returned by clEnqueueMapBuffer or clEnqueueMapImage are considered to be complete. clEnqueueMapBuffer and clEnqueueMapImage increment the mapped count of the memory object. The initial mapped count value of a memory object is zero. Multiple calls to clEnqueueMapBuffer or clEnqueueMapImage on the same memory object will increment this mapped count by appropriate number of calls. clEnqueueUnmapMemObject decrements the mapped count of the memory object. clEnqueueMapBuffer and clEnqueueMapImage act as synchronization points for a region of the buffer object being mapped. Errors clEnqueueUnmapMemObject returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:. CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_MEM_OBJECT if memobj is not a valid memory object. CL_INVALID_VALUE if mapped_ptr is not a valid pointer returned by clEnqueueMapBuffer or clEnqueueMapImage for memobj. CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. CL_INVALID_CONTEXT if the context associated with command_queue and memobj are not the same or if the context associated with command_queue and events in event_wait_list are not the same. Specification OpenCL Specification Also see clEnqueueMapBuffer, clEnqueueMapImage khronos-opencl-man-1.0~svn27110/read_imageh3d.xml0000644000175000017500000002073511660441607021470 0ustar mathieumathieu [ ]> read_imageh (3D) read_imageh (3D) 2007-2011 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. 3 read_imageh (3D) Do an element lookup in the 3D image object, returning half floating-point values. half4 read_imageh image3d_t image sampler_t sampler int4 coord half4 read_imageh image3d_t image sampler_t sampler float4 coord half4 read_imageh image3d_t image int4 coord Description Use the coordinate (coord.x, coord.y, coord.z) to do an element lookup in the 3D image object specified by image. coord.w is ignored. The samplerless read image functions behave exactly as the corresponding read image functions that take integer coordinates and a sampler with filter mode set to CLK_FILTER_NEAREST, normalized coordinates set to CLK_NORMALIZED_COORDS_FALSE and addressing mode to CLK_ADDRESS_NONE. read_imageh returns half floating-point values in the range [0.0... 1.0] for image objects created with image_channel_data_type set to one of the predefined packed formats or CL_UNORM_INT8 or CL_UNORM_INT16. read_imageh returns half floating-point values in the range [-1.0... 1.0] for image objects created with image_channel_data_type set to CL_SNORM_INT8, or CL_SNORM_INT16. read_imageh returns half floating-point values for image objects created with image_channel_data_type set to CL_HALF_FLOAT. The read_imageh calls that take integer coordinates must use a sampler with filter mode set to CLK_FILTER_NEAREST, normalized coordinates set to CLK_NORMALIZED_COORDS_FALSE and addressing mode set to CLK_ADDRESS_CLAMP_TO_EDGE, CLK_ADDRESS_CLAMP or CLK_ADDRESS_NONE; otherwise the values returned are undefined. Values returned by read_imageh for image objects with image_channel_data_type values not specified in the description above are undefined. Notes General information about the read_image* functions follows. &imageFunctionsInc; &imageMappingInc; Specification OpenCL Specification Also see Image Functions khronos-opencl-man-1.0~svn27110/copysign.xml0000644000175000017500000001014711660441607020643 0ustar mathieumathieu ]> copysign copysign 2007-2011 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. 3 copysign x with sign changed to sign of y. gentype copysign gentypex gentypey Description Returns x with its sign changed to match the sign of y. Notes &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/cl_khr_d3d10_sharing.xml0000644000175000017500000002601311660441607022657 0ustar mathieumathieu cl_khr_d3d10_sharing cl_khr_d3d10_sharing 2007-2011 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. 3 cl_khr_d3d10_sharing Provide interoperability between OpenCL and Direct3D 10. #pragma OPENCL EXTENSION cl_khr_d3d10_sharing : enable Description The goal of this extension is to provide interoperability between OpenCL and Direct3D 10. This is designed to function analogously to the OpenGL interoperability as defined in sections 9.7 and 9.8. If this extension is supported by an implementation, the string "cl_khr_d3d10_sharing" will be present in the CL_PLATFORM_EXTENSIONS or CL_DEVICE_EXTENSIONS string described in the table of allowed values for param_name for clGetDeviceInfo. As currently proposed the interfaces for this extension would be provided in cl_d3d10.h. If the cl_khr_d3d10_sharing extension is supported, then the following functions are enabled: clGetDeviceIDsFromD3D10KHR clCreateFromD3D10BufferKHR clCreateFromD3D10Texture2DKHR clCreateFromD3D10Texture3DKHR clEnqueueAcquireD3D10ObjectsKHR clEnqueueReleaseD3D10ObjectsKHR The OpenCL functions enabled by the cl_khr_d3d10_sharing extension allow applications to use Direct3D 10 resources as OpenCL memory objects. This allows efficient sharing of data between OpenCL and Direct3D 10. The OpenCL API may be used to execute kernels that read and/or write memory objects that are also Direct3D 10 resources. An OpenCL image object may be created from a Direct3D 10 texture resource. An OpenCL buffer object may be created from a Direct3D 10 buffer resource. OpenCL memory objects may be created from Direct3D 10 objects if and only if the OpenCL context has been created from a Direct3D 10 device. Specification OpenCL Specification Also see EXTENSION, clGetDeviceIDsFromD3D10KHR, clCreateFromD3D10BufferKHR, clCreateFromD3D10Texture2DKHR, clCreateFromD3D10Texture3DKHR, clEnqueueAcquireD3D10ObjectsKHR, clEnqueueReleaseD3D10ObjectsKHR khronos-opencl-man-1.0~svn27110/attribute.xml0000644000175000017500000001476711660441607021027 0ustar mathieumathieu __attribute__ __attribute__ 2007-2011 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. 3 __attribute__ __attribute__ ((attribute-list)) attribute-list: attributeopt attribute-list, attributeopt attribute: attribute-token attribute-argument-clauseopt attribute-token: identifier attribute-argument-clause: ( attribute-argument-list ) attribute-argument-list: attribute-argument attribute-argument-list, attribute-argument attribute-argument: assignment-expression Description This section describes the syntax with which __attribute__ may be used, and the constructs to which attribute specifiers bind. An attribute specifier is of the form __attribute__ ((attribute-list)). This syntax is taken directly from GCC but unlike GCC, which allows attributes to be applied only to functions, types, and variables, OpenCL attributes can be associated with: types functions variables blocks control-flow statements In general, the rules for how an attribute binds for a given context are non-trivial and the reader is pointed to GCC's documentation and Maurer and Wong's paper (See the "References" section in the OpenCL specification for details.) Specification OpenCL Specification Also see Type Attributes, Variable Attributes, Block and Control-Flow Statement Attributes, Function Qualifiers khronos-opencl-man-1.0~svn27110/read_imagef3d.xml0000644000175000017500000002021611660441607021460 0ustar mathieumathieu [ ]> read_imagef (3D) read_imagef (3D) 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. 3 read_imagef (3D) Do an element lookup in the 3D image object, returning floating-point values. float4 read_imagef image3d_t image sampler_t sampler int4 coord float4 read_imagef image3d_t image sampler_t sampler float4 coord float4 read_imagef image3d_t image int4 coord Description For the forms that take an image3d_t, use the coordinate (coord.x, coord.y, coord.z) to do an element lookup in the 3D image object specified by image. coord.w is ignored. For the forms that take an image3d_array_t, use coord.xy to do an element lookup in the 2D image identified by coord.z in the 2D image array specified by image. The samplerless read image functions behave exactly as the corresponding read image functions that take integer coordinates and a sampler with filter mode set to CLK_FILTER_NEAREST, normalized coordinates set to CLK_NORMALIZED_COORDS_FALSE and addressing mode to CLK_ADDRESS_NONE. read_imagef returns floating-point values in the range [0.0... 1.0] for image objects created with image_channel_data_type set to one of the predefined packed formats or CL_UNORM_INT8 or CL_UNORM_INT16. read_imagef returns floating-point values in the range [-1.0... 1.0] for image objects created with image_channel_data_type set to CL_SNORM_INT8, or CL_SNORM_INT16. read_imagef returns floating-point values for image objects created with image_channel_data_type set to CL_HALF_FLOAT or CL_FLOAT. The read_imagef calls that take integer coordinates must use a sampler with filter mode set to CLK_FILTER_NEAREST, normalized coordinates set to CLK_NORMALIZED_COORDS_FALSE and addressing mode set to CLK_ADDRESS_CLAMP_TO_EDGE, CLK_ADDRESS_CLAMP or CLK_ADDRESS_NONE; otherwise the values returned are undefined. Values returned by read_imagef for image objects with image_channel_data_type values not specified in the description above are undefined. Notes General information about the read_image* functions follows. &imageFunctionsInc; &imageMappingInc; Specification OpenCL Specification Also see Image Functions khronos-opencl-man-1.0~svn27110/clEnqueueAcquireGLObjects.xml0000644000175000017500000003171211660441607024006 0ustar mathieumathieu ]> clEnqueueAcquireGLObjects clEnqueueAcquireGLObjects 2007-2011 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. 3 clEnqueueAcquireGLObjects Acquire OpenCL memory objects that have been created from OpenGL objects. cl_int clEnqueueAcquireGLObjects cl_command_queuecommand_queue cl_uintnum_objects const cl_mem*mem_objects cl_uintnum_events_in_wait_list const cl_event*event_wait_list cl_event*event Parameters command_queue A valid command-queue. All devices used to create the OpenCL context associated with command_queue must support acquiring shared CL/GL objects. This constraint is enforced at context creation time. num_objects The number of memory objects to be acquired in mem_objects. mem_objects A pointer to a list of CL memory objects that correspond to GL objects. event_wait_list and num_events_in_wait_list Specify events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event_wait_list act as synchronization points. event Returns an event object that identifies this command and can be used to query or queue a wait for the command to complete. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the event_wait_list array If the cl_khr_gl_sharing extension is supported, if an OpenGL context is bound to the current thread, then any OpenGL commands which affect or access the contents of a memory object listed in the mem_objects list, and were issued on that OpenGL context prior to the call to clEnqueueAcquireGLObjects will complete before execution of any OpenCL commands following the clEnqueueAcquireGLObjects which affect or access any of those memory objects. If a non-NULL event object is returned, it will report completion only after completion of such OpenGL commands. Description These objects need to be acquired before they can be used by any OpenCL commands queued to a command-queue. The OpenGL objects are acquired by the OpenCL context associated with command_queue and can therefore be used by all command-queues associated with the OpenCL context. Notes &gl_syncInc; Errors Returns CL_SUCCESS if the function is executed successfully. If num_objects is 0 and mem_objects is NULL the function does nothing and returns CL_SUCCESS. Otherwise, it returns one of the following errors: CL_INVALID_VALUE if num_objects is zero and mem_objects is not a NULL value or if num_objects > 0 and mem_objects is NULL. CL_INVALID_MEM_OBJECT if memory objects in mem_objects are not valid OpenCL memory objects. CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_CONTEXT if context associated with command_queue was not created from an OpenGL context. CL_INVALID_GL_OBJECT if memory objects in mem_objects have not been created from a GL object(s). CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see cl_khr_gl_sharing, clEnqueueReleaseGLObjects, cl_khr_gl_event khronos-opencl-man-1.0~svn27110/clReleaseDevice.xml0000644000175000017500000001363711660441607022036 0ustar mathieumathieu clReleaseDevice clReleaseDevice 2007-2011 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. 3 clReleaseDevice Decrements the device reference count. cl_int clReleaseDevice cl_device_iddevice Notes Decrements the device reference count if device is a valid sub-device created by a call to clCreateSubDevices. If device is a root level device i.e. a cl_device_id returned by clGetDeviceIDs, the device reference count remains unchanged. After the device reference count becomes zero and all the objects attached to device (such as command-queues) are released, the device object is deleted. Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_DEVICE if device is not a valid sub-device created by a call to clCreateSubDevices. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clCreateSubDevices, clGetDeviceIDs, clRetainDevice khronos-opencl-man-1.0~svn27110/operators.xml0000644000175000017500000001246011660441607021026 0ustar mathieumathieu Operators Operators 2007-2011 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. 3 Operators Operators used in OpenCL. The following operators are used in OpenCL. For information about the usage of these operators, please refer to the OpenCL specification. add+ subtract- multiply* divide/ remainder% unary plus+ unary minus- post- and pre-increment++ post- and pre-decrement-- relational greater-than> relational less-than< relational greater-than or equal-to>= relational less-than or equal-to<= equal== not equal!= bitwise and& bitwise or| bitwise not^ bitwise not~ logical and&& logical or|| logical exclusive or^^ logical unary not! ternary selection?: right shift>> left shift << size ofsizeof comma, dereference* address-of& assignment = Note Except for the sizeof operator, the half data type cannot be used with any of the operators described in this section. Specification OpenCL Specification khronos-opencl-man-1.0~svn27110/atom_min.xml0000644000175000017500000001742311660441607020617 0ustar mathieumathieu atom_min atom_min 2007-2011 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. 3 atom_min 64-bit atom_min functions. long atom_min volatile __global long*p longval long atom_min volatile __local long*p longval ulong atom_min volatile __global ulong*p ulongval ulong atom_min volatile __local ulong*p ulongval Description Read the 64-bit value (referred to as old) stored at location pointed by p. Compute min (old, val) and store minimum value at location pointed by p. The function returns old. An application that wants to use this extension will need to include the #pragma OPENCL EXTENSION cl_khr_int64_extended_atomics : enable in the OpenCL program source. This function is performed in one atomic transaction. These transactions are atomic for the device executing these atomic functions. There is no guarantee of atomicity if the atomic operations to the same memory location are being performed by kernels executing on multiple devices. Atomic operations on 64-bit integers and 32-bit integers (and float) are also atomic with regard to each other. Specification OpenCL Specification Also see Atomic Functions, atomic_min, cl_khr_int64_extended_atomics khronos-opencl-man-1.0~svn27110/abs.xml0000644000175000017500000001132111660441607017550 0ustar mathieumathieu ]> abs, abs_diff abs, abs_diff 2007-2011 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. 3 abs, abs_diff Absolute value functions. ugentype abs gentypex ugentype abs_diff gentypex gentypey Description abs returns |x|. abs_diff returns |x-y| without modulo overflow. Notes &integerFunctionsInc; Specification OpenCL Specification Also see Integer Functions khronos-opencl-man-1.0~svn27110/atom_cmpxchg.xml0000644000175000017500000002035211660441607021460 0ustar mathieumathieu atom_cmpxchg atom_cmpxchg 2007-2011 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. 3 atom_cmpxchg 64-bit atom_cmpxchg functions. long atom_cmpxchg volatile __global long*p longcmp longval long atom_cmpxchg volatile __local long*p longcmp longval ulong atom_cmpxchg volatile __global ulong*p ulongcmp ulongval ulong atom_cmpxchg volatile __local ulong*p ulongcmp ulongval Description Read the 64-bit value (referred to as old) stored at location pointed by p. Compute (old == cmp) ? val : old and store result at location pointed by p. The function returns old. An application that wants to use this extension will need to include the #pragma OPENCL EXTENSION cl_khr_int64_base_atomics : enable in the OpenCL program source. This function is performed in one atomic transaction. These transactions are atomic for the device executing these atomic functions. There is no guarantee of atomicity if the atomic operations to the same memory location are being performed by kernels executing on multiple devices. Atomic operations on 64-bit integers and 32-bit integers (and float) are also atomic with regard to each other. Specification OpenCL Specification Also see Atomic Functions, atomic_cmpxchg, cl_khr_int64_base_atomics khronos-opencl-man-1.0~svn27110/asin.xml0000644000175000017500000001174311660441607017745 0ustar mathieumathieu ]> asin, asinh, asinpi asin 2007-2011 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. 3 asin, asinh, asinpi Sine functions. gentype asin gentype gentype asinh gentype gentype asinpi gentypex Description asin is the arc sine function. asinh is the inverse hyperbolic sine function. asinpi computes asin (x) / π. Notes &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/sub_sat.xml0000644000175000017500000001017411660441607020450 0ustar mathieumathieu ]> sub_sat sub_sat 2007-2011 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. 3 sub_sat Returns x - y and saturates the result. gentype sub_sat gentypex gentypey Description sub_sat returns x - y and saturates the result. Notes &integerFunctionsInc; Specification OpenCL Specification Also see Integer Functions khronos-opencl-man-1.0~svn27110/imageMappingInc.xml0000644000175000017500000000637111660441607022044 0ustar mathieumathieu The following table describes the mapping of the number of channels of an image element to the appropriate components in the float4, int4 or uint4 vector data type for the color values returned by read_image{f|i|ui} or supplied to write_image{f|i|ui}. The unmapped components will be set to 0.0 for red, green and blue channels and will be set to 1.0 for the alpha channel. Channel Order float4, int4 or uint4 components of channel data CL_R, CL_Rx (r, 0.0, 0.0, 1.0) CL_A (0.0, 0.0, 0.0, a) CL_RG, CL_RGx (r, g, 0.0, 1.0) CL_RA (r, 0.0, 0.0, a) CL_RGB, CL_RGBx (r, g, b, 1.0) CL_RGBA, CL_BGRA, CL_ARGB (r, g, b, a) CL_INTENSITY (I, I, I, I) CL_LUMINANCE (L, L, L, 1.0) A kernel that uses a sampler with the CL_ADDRESS_CLAMP addressing mode with multiple images may result in additional samplers being used internally by an implementation. If the same sampler is used with multiple images called via read_image{f|i|ui}, then it is possible that an implementation may need to allocate an additional sampler to handle the different border color values that may be needed depending on the image formats being used. These implementation allocated samplers will count against the maximum sampler values supported by the device and given by CL_DEVICE_MAX_SAMPLERS. Enqueuing a kernel that requires more samplers than the implementation can support will result in a CL_OUT_OF_RESOURCES error being returned. khronos-opencl-man-1.0~svn27110/atomic_cmpxchg.xml0000644000175000017500000001734111660441607022000 0ustar mathieumathieu atomic_cmpxchg atomic_cmpxchg 2007-2011 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. 3 atomic_cmpxchg atomic_cmpxchg functions. int atomic_cmpxchg volatile __global int*p intcmp intval unsigned int atomic_cmpxchg volatile __global unsigned int*p unsigned intcmp unsigned intval int atomic_cmpxchg volatile __local int*p intcmp intval unsigned int atomic_cmpxchg volatile __local unsigned int*p unsigned intcmp unsigned intval Description Read the 32-bit value (referred to as old) stored at location pointed by p. Compute (old == cmp) ? val : old and store result at location pointed by p. The function returns old. A 64-bit version of this function, atom_cmpxchg, is enabled by cl_khr_int64_base_atomics. Specification OpenCL Specification Also see Atomic Functions, atom_cmpxchg khronos-opencl-man-1.0~svn27110/step.xml0000644000175000017500000001375711660441607017775 0ustar mathieumathieu ]> step step 2007-2011 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. 3 step Returns 0.0 if x < edge, else 1.0. gentype step gentypeedge gentypex gentypef step floatedge gentypefx gentyped step doubleedge gentypedx gentype step (half edge, gentype x) // if half extension enabled Description Returns 0.0 if x < edge, else 1.0. Notes &commonFunctionsInc; If extended with cl_khr_fp16, generic type name gentype may indicate half and half{2|3|4|8|16} as arguments and return values. Specification OpenCL Specification Also see Common Functions khronos-opencl-man-1.0~svn27110/cl_khr_int64_base_atomics.xml0000644000175000017500000001664111660441607024014 0ustar mathieumathieu cl_khr_int64_base_atomics cl_khr_int64_base_atomics 2007-2011 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. 3 cl_khr_int64_base_atomics Optional extensions that implement atomic operations on 64-bit signed and unsigned integers to locations in __global and __local memory. #pragma OPENCL EXTENSION cl_khr_int64_base_atomics : enable Description An application that wants to use this extension will need to include the #pragma OPENCL EXTENSION cl_khr_int64_base_atomics : enable directive in the OpenCL program source. The atomic functions supported by the cl_khr_int64_base_atomics extension are described in the following table. All of the functions listed in the following table are performed in one atomic transaction. These transactions are atomic for the device executing these atomic functions. There is no guarantee of atomicity if the atomic operations to the same memory location are being performed by kernels executing on multiple devices. Atomic operations on 64-bit integers and 32-bit integers (and float) are also atomic w.r.t. each other. Function Description atom_add Compute (old + val) atom_sub Compute (old - val) atom_xchg Swaps the 32-bit value (old) stored at location p with new value val. atom_inc Compute (old + 1) atom_dec Compute (old - 1) atom_cmpxchg Compute (old == cmp) ? val : old Specification OpenCL Specification Also see EXTENSION, cl_khr_int64_extended_atomics, Atomic Functions khronos-opencl-man-1.0~svn27110/modf.xml0000644000175000017500000001362711660441607017743 0ustar mathieumathieu ]> modf modf 2007-2011 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. 3 modf Decompose a floating-point number. gentype modf gentypex __global gentype*iptr gentype modf gentypex __local gentype*iptr gentype modf gentypex __private gentype*iptr Description Decompose a floating-point number. The modf function breaks the argument x into integral and fractional parts, each of which has the same sign as the argument. It stores the integral part in the object pointed to by iptr. Notes modf behaves as though implemented by: gentype modf ( gentype value, gentype *iptr ) { *iptr = trunc( value ); return copysign( isinf( value ) ? 0.0 : value - *iptr, value ); } &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/fast_length.xml0000644000175000017500000001052711660441607021310 0ustar mathieumathieu ]> fast_length fast_length 2007-2011 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. 3 fast_length Vector length. float fast_length floatnp Description Returns the length of vector p computed as: half_sqrt(p.x2 + p.y2 + ...) Notes &geometricFunctionsInc; Specification OpenCL Specification Also see Geometric Functions khronos-opencl-man-1.0~svn27110/mathConstants.xml0000644000175000017500000003541311660441607021641 0ustar mathieumathieu Symbolic Math Constants Symbolic Math Constants 2007-2011 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. 3 Symbolic Math Constants The following symbolic constants are available. Built-in Math Constants The following symbolic constants are available. Their values are of type float and are accurate within the precision of a single precision floating-point number. Constant Name Description MAXFLOAT Value of maximum non-infinite single-precision floating-point number. HUGE_VALF A positive float constant expression. HUGE_VALF evaluates to +infinity. Used as an error value returned by the built-in math functions. INFINITY A constant expression of type float representing positive or unsigned infinity. NAN A constant expression of type float representing a quiet NaN. If double precision is supported by the device, the following symbolic constant will also be available: Constant Name Description HUGE_VAL A positive double constant expression. HUGE_VAL evaluates to +infinity. Used as an error value returned by the built-in math functions. The following constants are also available. They are of type float and are accurate within the precision of the float type. Constant Name Description M_E_F Value of e M_LOG2E_F Value of log2e M_LOG10E_F Value of log10e M_LN2_F Value of loge2 M_LN10_F Value of loge10 M_PI_F Value of pi M_PI_2_F Value of pi / 2 M_PI_4_F Value of pi / 4 M_1_PI_F Value of 1 / pi M_2_PI_F Value of 2 / pi M_2_SQRTPI_F Value of 2 / (square root of pi) M_SQRT2_F Value of square root of 2 M_SQRT1_2_F Value of 1 / (square root of 2) If double precision is supported by the device, the following macros and constants are also available. They are of type double and are accurate within the precision of the double type. Constant Name Description M_E Value of e M_LOG2E Value of log2e M_LOG10E Value of log10e M_LN2 Value of loge2 M_LN10 Value of loge10 M_PI Value of pi M_PI_2 Value of pi / 2 M_PI_4 Value of pi / 4 M_1_PI Value of 1 / pi M_2_PI Value of 2 / pi M_2_SQRTPI Value of 2 / (square root of pi) M_SQRT2 Value of square root of 2 M_SQRT1_2 Value of 1 / (square root of 2) The following constants are also available. They are of type half and are accurate within the precision of the half type. An application that wants to use half and halfn types will need to include the #pragma OPENCL EXTENSION cl_khr_fp16 : enable directive. Constant Description M_E_H Value of e M_LOG2E_H Value of log2e M_LOG10E_H Value of log10e M_LN2_H Value of loge2 M_LN10_H Value of loge10 M_PI_H Value of pi M_PI_2_H Value of pi / 2 M_PI_4_H Value of pi / 4 M_1_PI_H Value of 1 / pi M_2_PI_H Value of 2 / pi M_2_SQRTPI_H Value of 2 / (square root of pi) M_SQRT2_H Value of square root of 2 M_SQRT1_2_H Value of 1 / (square root of 2) Specification OpenCL Specification Also see Math Functions, Floating Point Pragma, Macros and Limits khronos-opencl-man-1.0~svn27110/private.xml0000644000175000017500000001216011660441607020457 0ustar mathieumathieu ]> __private __private 2007-2011 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. 3 __private Address Space Qualifier. __private private Description &qualifierInc; Notes Variables inside a __kernel function not declared with an address space qualifier, all variables inside non-kernel functions, and all function arguments are in the __private or private address space. Variables declared as pointers are considered to point to the __private address space if an address space qualifier is not specified. The __global, __constant, __local, __private, global, constant, local, and private names are reserved for use as address space qualifiers and shall not be used otherwise. Example &qualifierExampleInc; // declares a pointer p in the __private address space that // points to an int object in address space __global __global int *p; // declares an array of 4 floats in the __private address space. float x[4]; Specification OpenCL Specification Also see __global, __local, __constant khronos-opencl-man-1.0~svn27110/global.xml0000644000175000017500000001450711660441607020254 0ustar mathieumathieu [ ]> __global __global 2007-2011 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. 3 __global Address space qualifier. __global global Description &qualifierInc; Notes The __global or global address space name is used to refer to memory objects (buffer or image objects) allocated from the global memory pool. A buffer memory object can be declared as a pointer to a scalar, vector or user-defined struct. This allows the kernel to read and/or write any location in the buffer. The actual size of the array memory object is determined when the memory object is allocated via appropriate API calls in the host code. If an image object is attached to an argument declared with this qualifier, the argument must be declared as type image2d_t for a 2D image object, as type image3d_t for a 3D image object, as type image2d_array_t for a 2D image array object, as type image1d_t for a 1D image object, as type image1d_buffer_t for a 1D image buffer object, and as type image1d_array_t for a 1D image array object. The elements of an image object cannot be directly accessed. Built-in functions to read from and write to an image object are provided. The const qualifier can also be used with the __global qualifier to specify a read-only buffer memory object. Examples &qualifierExampleInc; __global float4 *color; // An array of float4 elements typedef struct { float a[3]; int b[2]; } foo_t; __global foo_t *my_info; // An array of foo_t elements. Specification OpenCL Specification Also see __local, __constant, __private khronos-opencl-man-1.0~svn27110/clEnqueueAcquireDX9MediaSurfacesKHR.xml0000644000175000017500000003071711660441607025603 0ustar mathieumathieu ]> clEnqueueAcquireDX9MediaSurfacesKHR clEnqueueAcquireDX9MediaSurfacesKHR 2007-2011 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. 3 clEnqueueAcquireDX9MediaSurfacesKHR Acquire OpenCL memory objects that have been created from a media surface. cl_int clEnqueueAcquireDX9MediaSurfacesKHR cl_command_queue command_queue cl_uint num_objects const cl_mem*mem_objects cl_uintnum_events_in_wait_list const cl_event *event_wait_list cl_event*event Parameters command_queue A valid command-queue. num_objects The number of memory objects to be acquired in mem_objects. mem_objects A pointer to a list of OpenCL memory objects that were created from media surfaces. num_events_in_wait_list, event_wait_list Specify events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event_wait_list act as synchronization points. event Returns n event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. Notes Used to acquire OpenCL memory objects that have been created from a media surface. The media surfaces are acquired by the OpenCL context associated with command_queue and can therefore be used by all command-queues associated with the OpenCL context. OpenCL memory objects created from media surfaces must be acquired before they can be used by any OpenCL commands queued to a command-queue. If an OpenCL memory object created from a media surface is used while it is not currently acquired by OpenCL, the call attempting to use that OpenCL memory object will return CL_DX9_MEDIA_SURFACE_NOT_ACQUIRED_KHR. If CL_CONTEXT_INTEROP_USER_SYNC is not specified as CL_TRUE during context creation, clEnqueueAcquireDX9MediaSurfacesKHR provides the synchronization guarantee that any media adapter API calls involving the interop device(s) used in the OpenCL context made before clEnqueueAcquireDX9MediaSurfacesKHR is called will complete executing before event reports completion and before the execution of any subsequent OpenCL work issued in command_queue begins. If the context was created with properties specifying CL_CONTEXT_INTEROP_USER_SYNC as CL_TRUE, the user is responsible for guaranteeing that any media adapter API calls involving the interop device(s) used in the OpenCL context made before clEnqueueAcquireDX9MediaSurfacesKHR is called have completed before calling clEnqueueAcquireDX9MediaSurfacesKHR. &mediaSurfaceFormatsInc; &accessMappedInc; Errors Returns CL_SUCCESS returns CL_SUCCESS if the function is executed successfully. If num_objects is 0 and mem_objects is NULL then the function does nothing and returns CL_SUCCESS. Otherwise it returns one of the following errors: CL_INVALID_VALUE if num_objects is zero and mem_objects is not a NULL value or if num_objects > 0 and mem_objects is NULL. CL_INVALID_MEM_OBJECT if memory objects in mem_objects are not valid OpenCL memory objects or if memory objects in mem_objects have not been created from media surfaces. CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_CONTEXT if context associated with command_queue was not created from a device that can share the media surface referenced by mem_objects. CL_DX9_MEDIA_SURFACE_ALREADY_ACQUIRED_KHR if memory objects in mem_objects have previously been acquired using clEnqueueAcquireDX9MediaSurfacesKHR but have not been released using clEnqueueReleaseDX9MediaSurfacesKHR. CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_event_in_wait_list > 0, or event_wait_list is not NULL and num_event_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see cl_khr_dx9_media_sharing, clGetDeviceIDsFromDX9MediaAdapterKHR, clCreateFromDX9MediaSurfaceKHR, clEnqueueReleaseDX9MediaSurfacesKHR, clEnqueueAcquireDX9MediaSurfacesKHR khronos-opencl-man-1.0~svn27110/imageFunctions.xml0000644000175000017500000002355711660441607021774 0ustar mathieumathieu [ ]> Image Read and Write Functions Image Read, Write, and Query Functions 2007-2011 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. 3 Image Read and Write Functions Built-in functions to read, write, and query image memory objects. Click an item in the table below for details about that function. read_imagef for 1D Do an element lookup in the 1D image object with or without a sampler, returning floating-point values. read_image{i|ui} for 1D Do an element lookup in the 1D image object with or without a sampler, returning unnormalized signed integer and unsigned integer values. read_imageh for 1D OPTIONAL function to do an element lookup in the 1D image object with or without a sampler, returning floating-point values. Enabled with cl_khr_fp16. write_image {f|i|ui|h} for 1D Write color value to location in the 2D image object. The half type is enabled with cl_khr_fp16. read_imagef for 2D Do an element lookup in the 2D image object with or without a sampler, returning floating-point values. read_image{i|ui} for 2D Do an element lookup in the 2D image object with or without a sampler, returning unnormalized signed integer and unsigned integer values. read_imageh for 2D OPTIONAL function to do an element lookup in the 2D image object with or without a sampler, returning floating-point values. Enabled with cl_khr_fp16. write_image {f|i|ui|h} for 2D Write color value to location in the 2D image object. The half type is enabled with cl_khr_fp16. read_imagef for 3D Do an element lookup in the 3D image object with or without a sampler, returning floating-point values. read_image{i|ui} for 3D Do an element lookup in the 3D image object with or without a sampler, returning unnormalized signed integer and unsigned integer values. read_imageh for 3D OPTIONAL function to do an element lookup in the 3D image object with or without a sampler, returning floating-point values. Enabled with cl_khr_fp16. write_image {f|i|ui|h} for 3D Write color value to location in the 2D image object. The half type is enabled with cl_khr_fp16. get_image_width Return the image width in pixels get_image_height Return the image height in pixels. get_image_depth Return the 3D image depth in pixels get_image_channel_data_type Return the image channel data type get_image_channel_order Return the image channel order get_image_dim Return the image dimensions get_image_array_size Return the number of images in an image array Notes &imageFunctionsInc; Specification OpenCL Specification Also see sampler_t, cl_khr_3d_image_writes khronos-opencl-man-1.0~svn27110/isinf.xml0000644000175000017500000001526611660441607020127 0ustar mathieumathieu ]> isinf isinf 2007-2011 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. 3 isinf Test for infinity value. int isinf float intn isinf floatn int isinf double longn isinf doublen int isinf (half) // if half extension enabled shortn isinf (halfn) // if half extension enabled Description Test for infinity value (positive or negative). Notes &relationalFunctionsInc1; &relationalFunctionsInc2; Specification OpenCL Specification Also see Relational Functions khronos-opencl-man-1.0~svn27110/clEnqueueReleaseD3D11ObjectsKHR.xml0000644000175000017500000003024411660441607024553 0ustar mathieumathieu ]> clEnqueueReleaseD3D11ObjectsKHR clEnqueueReleaseD3D11ObjectsKHR 2007-2011 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. 3 clEnqueueReleaseD3D11ObjectsKHR Release OpenCL memory objects that have been created from Direct3D 11 resources. cl_int clEnqueueReleaseD3D11ObjectsKHR cl_command_queue command_queue cl_uint num_objects const cl_mem*mem_objects cl_uintnum_events_in_wait_list const cl_event*event_wait_list cl_event*event Parameters num_objects The number of memory objects to be released in mem_objects. mem_objects A pointer to a list of OpenCL memory objects that were created from Direct3D 11 resources. num_events_in_wait_list, event_wait_list Specify events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the event_wait_list array Notes The Direct3D 11 objects are released by the OpenCL context associated with command_queue. OpenCL memory objects created from Direct3D 11 resources which have been acquired by OpenCL must be released by OpenCL before they may be accessed by Direct3D 11. Accessing a Direct3D 11 resource while its corresponding OpenCL memory object is acquired is in error and will result in undefined behavior, including but not limited to possible OpenCL errors, data corruption, and program termination. If CL_CONTEXT_INTEROP_USER_SYNC is not specified as CL_TRUE during context creation, clEnqueueReleaseD3D11ObjectsKHR provides the synchronization guarantee that any calls to Direct3D 11 calls involving the interop device(s) used in the OpenCL context made after the call to clEnqueueReleaseD3D11ObjectsKHR will not start executing until after all events in event_wait_list are complete and all work already submitted to command_queue completes execution. If the context was created with properties specifying CL_CONTEXT_INTEROP_USER_SYNC as CL_TRUE, the user is responsible for guaranteeing that any Direct3D 11 calls involving the interop device(s) used in the OpenCL context made after clEnqueueReleaseD3D11ObjectsKHR will not start executing until after event returned by clEnqueueReleaseD3D11ObjectsKHR reports completion. &sharingD3D11Inc; &accessMappedInc; Errors Returns CL_SUCCESS returns CL_SUCCESS if the function is executed successfully. If num_objects is 0 and mem_objects is NULL then the function does nothing and returns CL_SUCCESS. Otherwise it returns one of the following errors: CL_INVALID_VALUE if num_objects is zero and mem_objects is not a NULL value or if num_objects > 0 and mem_objects is NULL. CL_INVALID_MEM_OBJECT if memory objects in mem_objects are not valid OpenCL memory objects or if memory objects in mem_objects have not been created from Direct3D 11 resources. CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_CONTEXT if context associated with command_queue was not created from a Direct3D 11 context. CL_D3D11_RESOURCE_NOT_ACQUIRED_KHR if memory objects in mem_objects have not previously been acquired using clEnqueueAcquireD3D11ObjectsKHR, or have been released using clEnqueueReleaseD3D11ObjectsKHR since the last time that they were acquired. CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_event_in_wait_list > 0, or event_wait_list is not NULL and num_event_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see cl_khr_d3d11_sharing, clGetDeviceIDsFromD3D11KHR, clCreateFromD3D11BufferKHR, clCreateFromD3D11Texture2DKHR, clCreateFromD3D11Texture3DKHR, clEnqueueAcquireD3D11ObjectsKHR khronos-opencl-man-1.0~svn27110/clUnloadPlatformCompiler.xml0000644000175000017500000001235011660441607023747 0ustar mathieumathieu clUnloadPlatformCompiler clUnloadPlatformCompiler 2007-2011 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. 3 clUnloadPlatformCompiler Allows the implementation to release the resources allocated by the OpenCL compiler for platform. cl_int clUnloadPlatformCompiler cl_platform_idplatform Notes This is a hint from the application and does not guarantee that the compiler will not be used in the future or that the compiler will actually be unloaded by the implementation. Calls to clBuildProgram, clCompileProgram, or clLinkProgram after clUnloadPlatformCompiler will reload the compiler, if necessary, to build the appropriate program executable. Errors clUnloadPlatformCompiler returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_PLATFORM if platform is not a valid platform. Specification OpenCL Specification khronos-opencl-man-1.0~svn27110/clRetainEvent.xml0000644000175000017500000001253011660441607021551 0ustar mathieumathieu clRetainEvent clRetainEvent 2007-2011 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. 3 clRetainEvent Increments the event reference count. cl_int clRetainEvent cl_eventevent Parameters event Event object being retained. Notes The OpenCL commands that return an event perform an implicit retain. Errors Returns CL_SUCCESS if the function executed successfully, or one of the errors below: CL_INVALID_EVENT if event is not a valid event object. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clGetEventInfo, clReleaseEvent, clWaitForEvents khronos-opencl-man-1.0~svn27110/workItemFunctions.xml0000644000175000017500000001130011660441607022472 0ustar mathieumathieu Work-Item Built-In Functions Work-Item Built-In Functions 2007-2011 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. 3 Work-Item Built-In Functions Click an item in the table below for details about that function. get_work_dim Number of dimensions in use get_global_size Number of global work items get_global_id Global work item ID value get_local_size Number of local work items get_local_id Local work item ID get_num_groups Number of work groups get_group_id Work group ID get_global_offset Work offset Description Built-in work-item functions can be used to query the number of dimensions, the global and local work size specified to clEnqueueNDRangeKernel, and the global and local identifier of each work-item when this kernel is being executed on a device. The number of dimensions, the global and local work size when executing a kernel using the function clEnqueueTask is one. Specification OpenCL Specification Also see clEnqueueNDRangeKernel, clEnqueueTask khronos-opencl-man-1.0~svn27110/mad.xml0000644000175000017500000001152511660441607017552 0ustar mathieumathieu ]> mad mad 2007-2011 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. 3 mad Approximates a * b + c. gentype mad gentypea gentypeb gentypec Description mad approximates a * b + c. Whether or how the product of a * b is rounded and how supernormal or subnormal intermediate products are handled is not defined. mad is intended to be used where speed is preferred over accuracy. Notes For some usages, e.g. mad(a, b, -a*b), the definition of mad() is loose enough that almost any result is allowed from mad() for some values of a and b. &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/FP_CONTRACT.xml0000644000175000017500000001650111660441607020612 0ustar mathieumathieu FP_CONTRACT, FP_FAST_FMAF, FP_FAST_FMA_HALF FP_CONTRACT, FP_FAST_FMAF, FP_FAST_FMA_HALF 2007-2011 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. 3 FP_CONTRACT, FP_FAST_FMAF, FP_FAST_FMA_HALF Control expression contraction; fast fma() #pragma OPENCL FP_CONTRACT on-off-switch on-off-switch is one of: ON, OFF or DEFAULT. The DEFAULT value is ON. FP_FAST_FMAF FP_FAST_FMA FP_FAST_FMA_HALF FP_CONTRACT The FP_CONTRACT pragma takes the form: #pragma OPENCL FP_CONTRACT on-off-switch FP_CONTRACT can be used to allow (if the state is on) or disallow (if the state is off) the implementation to contract expressions. Each pragma can occur either outside external declarations or preceding all explicit declarations and statements inside a compound statement. The parameter on-off-switch is one of ON, OFF or DEFAULT. The DEFAULT value is ON. When outside external declarations, the pragma takes effect from its occurrence until another FP_CONTRACT pragma is encountered, or until the end of the translation unit. When inside a compound statement, the pragma takes effect from its occurrence until another FP_CONTRACT pragma is encountered (including within a nested compound statement), or until the end of the compound statement; at the end of a compound statement the state for the pragma is restored to its condition just before the compound statement. If this pragma is used in any other context, the behavior is undefined. FP_FAST_FMAF and FP_FAST_FMA The FP_FAST_FMAF macro indicates whether the fma function is fast compared with direct code for single precision floating-point. If defined, the FP_FAST_FMAF macro shall indicate that the fma() function generally executes about as fast as, or faster than, a multiply and an add of float operands. The FP_FAST_FMA macro indicates whether the fma family of functions are fast compared with direct code for double precision floating-point. If defined, the FP_FAST_FMA macro shall indicate that the fma() function generally executes about as fast as, or faster than, a multiply and an add of double operands. The FP_FAST_FMA_HALF macro indicates whether the fma() family of functions are fast compared with direct code for half precision floating-point. If defined, the FP_FAST_FMA_HALF macro shall indicate that the fma() function generally executes about as fast as, or faster than, a multiply and an add of half operands Specification OpenCL Specification Also see Math Functions, Symbolic Math Constants, Macros and Limits khronos-opencl-man-1.0~svn27110/ceil.xml0000644000175000017500000000775311660441607017735 0ustar mathieumathieu ]> ceil ceil 2007-2011 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. 3 ceil Round to integer toward + infinity. gentype ceil gentype Description ceil rounds to integral value using the round to +ve infinity rounding mode. Notes &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/get_global_size.xml0000644000175000017500000001125011660441607022135 0ustar mathieumathieu get_global_size get_global_size 2007-2011 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. 3 get_global_size Returns the number of global work-items specified for dimension identified by dimindx. size_t get_global_size uintdimindx Description This value is given by the global_work_size argument to clEnqueueNDRangeKernel. Valid values of dimindx are 0 to get_work_dim() - 1. For other values of dimindx, get_global_size() returns 1. For clEnqueueTask, this always returns 1. Specification OpenCL Specification Also see Work-Item Functions, clEnqueueNDRangeKernel, clEnqueueTask khronos-opencl-man-1.0~svn27110/integerClamp.xml0000644000175000017500000001232011660441607021415 0ustar mathieumathieu ]> clamp clamp 2007-2011 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. 3 clamp Clamp x to range given by minval, maxval. gentype clamp gentypex gentypeminval gentypemaxval gentype clamp gentypex sgentypeminval sgentypemaxval Description clamp returns min (min( x, minval), maxval). Results are undefined if minval > maxval. Notes &integerFunctionsInc; Specification OpenCL Specification Also see Integer Functions khronos-opencl-man-1.0~svn27110/length.xml0000644000175000017500000001327611660441607020277 0ustar mathieumathieu ]> length length 2007-2011 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. 3 length Vector length. float length floatnp double length doublenp half length (gentype p) // if half extension enabled Description Returns the length of vector p, i.e., the square root of (p.x2 + p.y2 + ...) Notes &geometricFunctionsInc; If extended with cl_khr_fp16, generic type name gentype may indicate half and half{2|3|4} as arguments. Specification OpenCL Specification Also see Geometric Functions khronos-opencl-man-1.0~svn27110/clEnqueueBarrierWithWaitList.xml0000644000175000017500000002456511660441607024573 0ustar mathieumathieu clEnqueueBarrierWithWaitList clEnqueueBarrierWithWaitList 2007-2011 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. 3 clEnqueueBarrierWithWaitList A synchronization point that enqueues a barrier operation. cl_int clEnqueueBarrierWithWaitList cl_command_queue command_queue cl_uint num_events_in_wait_list const cl_event *event_wait_list cl_event *event Parameters command_queue A valid command queue. event_wait_list , num_events_in_wait_list Specify events that need to complete before this particular command can be executed. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event_wait_list act as synchronization points. The context associated with events in event_wait_list and command_queue must be the same. The memory associated with event_wait_list can be reused or freed after the function returns. If event_wait_list is NULL, then this particular command waits until all previous enqueued commands to command_queue have completed. event Returns an event object that identifies this particular command. Event objects are unique and can be used to identify this barrier command later on. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the event_wait_list array. Notes Enqueues a barrier command which waits for either a list of events to complete, or if the list is empty it waits for all commands previously enqueued in command_queue to complete before it completes. This command blocks command execution, that is, any following commands enqueued after it do not execute until it completes. This command returns an event which can be waited on, i.e. this event can be waited on to insure that all events either in the event_wait_list or all previously enqueued commands, queued before this command to command_queue, have completed. Errors Returns CL_SUCCESS if the function was successfully executed. Otherwise, it returns one of the following errors: CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clEnqueueFillBuffer, clEnqueueCopyBuffer, clEnqueueCopyBufferRect, clEnqueueFillImage, clEnqueueCopyImage, clEnqueueCopyImageToBuffer, clEnqueueCopyBufferToImage, clEnqueueUnmapMemObject khronos-opencl-man-1.0~svn27110/clCreateFromD3D10Texture3DKHR.xml0000644000175000017500000004134311660441607024131 0ustar mathieumathieu ]> clCreateFromD3D10Texture3DKHR clCreateFromD3D10Texture3DKHR 2007-2011 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. 3 clCreateFromD3D10Texture3DKHR Creates an OpenCL 3D image object from a subresource of a Direct3D 10 3D texture. cl_mem clCreateFromD3D10Texture3DKHR cl_contextcontext cl_mem_flagsflags ID3D10Texture3D*resource UINTsubresource cl_int *errcode_ret Parameters context A valid OpenCL context created from a Direct3D 10 device. flags A bit-field that is used to specify usage information. May be CL_MEM_READ_ONLY, CL_MEM_WRITE_ONLY, or CL_MEM_READ_WRITE. (See the table for clCreateBuffer for more information.) resource A pointer to the Direct3D 10 3D texture to share. subresource The subresource of resource to share. errcode_ret An appropriate error code. If errcode_ret is NULL, no error code is returned. Notes The width, height and depth of the returned OpenCL 3D image object are determined by the width, height and depth of subresource subresource of resource. The channel type and order of the returned OpenCL 3D image object is determined by the format of resource as shown below in the table of Direct3D 10 and corresponding OpenCL image formats. This call will increment the internal Direct3D reference count on resource. The internal Direct3D reference count on resource will be decremented when the OpenCL reference count on the returned OpenCL memory object drops to zero. Following is a list of Direct3D 10 and corresponding OpenCL image formats. DXGI format CL image format (channel order, channel data type) DXGI_FORMAT_R32G32B32A32_FLOAT CL_RGBA, CL_FLOAT DXGI_FORMAT_R32G32B32A32_UINT CL_RGBA, CL_UNSIGNED_INT32 DXGI_FORMAT_R32G32B32A32_SINT CL_RGBA, CL_SIGNED_INT32 DXGI_FORMAT_R16G16B16A16_FLOAT CL_RGBA, CL_HALF_FLOAT DXGI_FORMAT_R16G16B16A16_UNORM CL_RGBA, CL_UNORM_INT16 DXGI_FORMAT_R16G16B16A16_UINT CL_RGBA, CL_UNSIGNED_INT16 DXGI_FORMAT_R16G16B16A16_SNORM CL_RGBA, CL_SNORM_INT16 DXGI_FORMAT_R16G16B16A16_SINT CL_RGBA, CL_SIGNED_INT16 DXGI_FORMAT_R8G8B8A8_UNORM CL_RGBA, CL_UNORM_INT8 DXGI_FORMAT_R8G8B8A8_UINT CL_RGBA, CL_UNSIGNED_INT8 DXGI_FORMAT_R8G8B8A8_SNORM CL_RGBA, CL_SNORM_INT8 DXGI_FORMAT_R8G8B8A8_SINT CL_RGBA, CL_SIGNED_INT8 DXGI_FORMAT_R32G32_FLOAT CL_RG, CL_FLOAT DXGI_FORMAT_R32G32_UINT CL_RG, CL_UNSIGNED_INT32 DXGI_FORMAT_R32G32_SINT CL_RG, CL_SIGNED_INT32 DXGI_FORMAT_R16G16_FLOAT CL_RG, CL_HALF_FLOAT DXGI_FORMAT_R16G16_UNORM CL_RG, CL_UNORM_INT16 DXGI_FORMAT_R16G16_UINT CL_RG, CL_UNSIGNED_INT16 DXGI_FORMAT_R16G16_SNORM CL_RG, CL_SNORM_INT16 DXGI_FORMAT_R16G16_SINT CL_RG, CL_SIGNED_INT16 DXGI_FORMAT_R8G8_UNORM CL_RG, CL_UNORM_INT8 DXGI_FORMAT_R8G8_UINT CL_RG, CL_UNSIGNED_INT8 DXGI_FORMAT_R8G8_SNORM CL_RG, CL_SNORM_INT8 DXGI_FORMAT_R8G8_SINT CL_RG, CL_SIGNED_INT8 DXGI_FORMAT_R32_FLOAT CL_R, CL_FLOAT DXGI_FORMAT_R32_UINT CL_R, CL_UNSIGNED_INT32 DXGI_FORMAT_R32_SINT CL_R, CL_SIGNED_INT32 DXGI_FORMAT_R16_FLOAT CL_R, CL_HALF_FLOAT DXGI_FORMAT_R16_UNORM CL_R, CL_UNORM_INT16 DXGI_FORMAT_R16_UINT CL_R, CL_UNSIGNED_INT16 DXGI_FORMAT_R16_SNORM CL_R, CL_SNORM_INT16 DXGI_FORMAT_R16_SINT CL_R, CL_SIGNED_INT16 DXGI_FORMAT_R8_UNORM CL_R, CL_UNORM_INT8 DXGI_FORMAT_R8_UINT CL_R, CL_UNSIGNED_INT8 DXGI_FORMAT_R8_SNORM CL_R, CL_SNORM_INT8 DXGI_FORMAT_R8_SINT CL_R, CL_SIGNED_INT8 &sharingD3D10Inc; Errors Returns CL_SUCCESS returns a valid non-zero OpenCL buffer object and errcode_ret is set to CL_SUCCESS if the buffer object is created successfully. Otherwise, it returns a NULL value with one of the following error values returned in errcode_ret: CL_INVALID_CONTEXT if context is not a valid context. CL_INVALID_VALUE if values specified in flags are not valid or if subresource is not a valid subresource index for resource. CL_INVALID_D3D10_RESOURCE_KHR if resource is not a Direct3D 10 texture resource, if resource was created with the D3D10_USAGE flag D3D10_USAGE_IMMUTABLE, if a resource is a multisampled texture, if cl_mem from subresource subresource of resource has already been created using clCreateFromD3D10Texture3DKHR, or if context was not created against the same Direct3D 10 device from which resource was created. CL_INVALID_IMAGE_FORMAT_DESCRIPTOR if the Direct3D 10 texture format of resource is not a value listed in the above table of Direct3D 10 and corresponding OpenCL image formats, or if the Direct3D 10 texture format of resource does not map to a supported OpenCL image format. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see cl_khr_d3d10_sharing, clGetDeviceIDsFromD3D10KHR, clCreateFromD3D10BufferKHR, clCreateFromD3D10Texture2DKHR, clEnqueueAcquireD3D10ObjectsKHR, clEnqueueReleaseD3D10ObjectsKHR khronos-opencl-man-1.0~svn27110/clEnqueueMarkerWithWaitList.xml0000644000175000017500000002375611660441607024427 0ustar mathieumathieu clEnqueueMarkerWithWaitList clEnqueueMarkerWithWaitList 2007-2011 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. 3 clEnqueueMarkerWithWaitList Enqueues a marker command which waits for either a list of events to complete, or all previously enqueued commands to complete. cl_int clEnqueueMarkerWithWaitList cl_command_queue command_queue cl_uint num_events_in_wait_list const cl_event *event_wait_list cl_event *event Parameters command_queue A valid command-queue. event_wait_list num_events_in_wait_list These functions specify events that need to complete before this particular command can be executed. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event_wait_list act as synchronization points. The context associated with events in event_wait_list and command_queue must be the same. The memory associated with event_wait_list can be reused or freed after the function returns. If event_wait_list is NULL, then this particular command waits until all previous enqueued commands to command_queue have completed. event Returns an event object that identifies this particular command. Event objects are unique and can be used to identify this marker command later on. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the event_wait_list array. Description Enqueues a marker command which waits for either a list of events to complete, or if the list is empty it waits for all commands previously enqueued in command_queue to complete before it completes. This command returns an event which can be waited on, i.e. this event can be waited on to insure that all events either in the event_wait_list or all previously enqueued commands, queued before this command to command_queue, have completed. Errors Returns CL_SUCCESS if the function executed successfully, or one of the errors below: CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clWaitForEvents, clEnqueueBarrierWithWaitList khronos-opencl-man-1.0~svn27110/hypot.xml0000644000175000017500000001032711660441607020153 0ustar mathieumathieu ]> hypot hypot 2007-2011 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. 3 hypot Square root of x2 + y2. gentype hypot gentypex gentypey Description Computes the value of the square root of x2 + y2 without undue overflow or underflow. Notes &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/clCreateFromD3D10BufferKHR.xml0000644000175000017500000002071711660441607023515 0ustar mathieumathieu ]> clCreateFromD3D10BufferKHR clCreateFromD3D10BufferKHR 2007-2011 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. 3 clCreateFromD3D10BufferKHR Creates an OpenCL buffer object from a Direct3D 10 buffer. cl_mem clCreateFromD3D10BufferKHR cl_contextcontext cl_mem_flagsflags ID3D10Buffer*resource cl_int *errcode_ret Parameters context A valid OpenCL context created from a Direct3D 10 device. flags A bit-field that is used to specify usage information. May be CL_MEM_READ_ONLY, CL_MEM_WRITE_ONLY, or CL_MEM_READ_WRITE. (See the table for clCreateBuffer for more information.) resource A pointer to the Direct3D 10 buffer to share. errcode_ret An appropriate error code. If errcode_ret is NULL, no error code is returned. Notes The size of the returned OpenCL buffer object is the same as the size of resource. This call will increment the internal Direct3D reference count on resource. The internal Direct3D reference count on resource will be decremented when the OpenCL reference count on the returned OpenCL memory object drops to zero. &sharingD3D10Inc; Errors Returns CL_SUCCESS returns a valid non-zero OpenCL buffer object and errcode_ret is set to CL_SUCCESS if the buffer object is created successfully. Otherwise, it returns a NULL value with one of the following error values returned in errcode_ret: CL_INVALID_CONTEXT if context is not a valid context. CL_INVALID_VALUE if values specified in flags are not valid. CL_INVALID_D3D10_RESOURCE_KHR if resource is not a Direct3D 10 buffer resource, if resource was created with the D3D10_USAGE flag D3D10_USAGE_IMMUTABLE, if a cl_mem from resource has already been created using clCreateFromD3D10BufferKHR, or if context was not created against the same Direct3D 10 device from which resource was created. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see cl_khr_d3d10_sharing, clGetDeviceIDsFromD3D10KHR, clCreateFromD3D10Texture2DKHR, clCreateFromD3D10Texture3DKHR, clEnqueueAcquireD3D10ObjectsKHR, clEnqueueReleaseD3D10ObjectsKHR khronos-opencl-man-1.0~svn27110/clEnqueueCopyBuffer.xml0000644000175000017500000003502311660441607022723 0ustar mathieumathieu clEnqueueCopyBuffer clEnqueueCopyBuffer 2007-2011 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. 3 clEnqueueCopyBuffer Enqueues a command to copy from one buffer object to another. cl_int clEnqueueCopyBuffer cl_command_queuecommand_queue cl_memsrc_buffer cl_memdst_buffer size_tsrc_offset size_tdst_offset size_tsize cl_uintnum_events_in_wait_list const cl_event*event_wait_list cl_event*event Parameters command_queue The command-queue in which the copy command will be queued. The OpenCL context associated with command_queue, src_buffer, and dst_buffer must be the same. src_offset The offset where to begin copying data from src_buffer. dst_offset The offset where to begin copying data into dst_buffer. size Refers to the size in bytes to copy. event_wait_list num_events_in_wait_list Specify events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event_wait_list act as synchronization points. The context associated with events in event_wait_list and command_queue must be the same. The memory associated with event_wait_list can be reused or freed after the function returns. event Returns an event object that identifies this particular copy command and can be used to query or queue a wait for this particular command to complete. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. clEnqueueBarrierWithWaitList can be used instead. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the event_wait_list array. Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_CONTEXT if the context associated with command_queue, src_buffer, and dst_buffer are not the same or if the context associated with command_queue and events in event_wait_list are not the same. CL_INVALID_MEM_OBJECT if src_buffer and dst_buffer are not valid buffer objects. CL_INVALID_VALUE if src_offset, dst_offset, size, src_offset + size, or dst_offset + size require accessing elements outside the src_buffer and dst_buffer buffer objects respectively. CL_INVALID_VALUE if size is 0. CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list is > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_MISALIGNED_SUB_BUFFER_OFFSET if src_buffer is a sub-buffer object and offset specified when the sub-buffer object is created is not aligned to CL_DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue. CL_MISALIGNED_SUB_BUFFER_OFFSET if dst_buffer is a sub-buffer object and offset specified when the sub-buffer object is created is not aligned to CL_DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue. CL_MEM_COPY_OVERLAP if src_buffer and dst_buffer are the same buffer or subbuffer object and the source and destination regions overlap or if src_buffer and dst_buffer are different sub-buffers of the same associated buffer object and they overlap. The regions overlap if src_offset ≤ to dst_offset ≤ to src_offset + size - 1, or if dst_offset ≤ to src_offset ≤ to dst_offset + size - 1. CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with src_buffer or dst_buffer. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clEnqueueReadBuffer, clEnqueueWriteBuffer, clCreateBuffer, clCreateSubBuffer, clEnqueueCopyBufferToImage, clEnqueueCopyImageToBuffer khronos-opencl-man-1.0~svn27110/atom_sub.xml0000644000175000017500000001725011660441607020623 0ustar mathieumathieu atom_sub atom_sub 2007-2011 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. 3 atom_sub 64-bit atom_sub functions. long atom_sub volatile __global long*p longval long atom_sub volatile __local long*p longval ulong atom_sub volatile __global ulong*p ulongval ulong atom_sub volatile __local ulong*p ulongval Description Read the 64-bit value (referred to as old) stored at location pointed by p. Compute (old - val) and store result at location pointed by p. The function returns old. An application that wants to use this extension will need to include the #pragma OPENCL EXTENSION cl_khr_int64_base_atomics : enable in the OpenCL program source. This function is performed in one atomic transaction. These transactions are atomic for the device executing these atomic functions. There is no guarantee of atomicity if the atomic operations to the same memory location are being performed by kernels executing on multiple devices. Atomic operations on 64-bit integers and 32-bit integers (and float) are also atomic with regard to each other. Specification OpenCL Specification Also see Atomic Functions, atomic_sub, cl_khr_int64_base_atomics khronos-opencl-man-1.0~svn27110/atom_or.xml0000644000175000017500000001724611660441607020457 0ustar mathieumathieu atom_or atom_or 2007-2011 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. 3 atom_or 64-bit atom_or functions. long atom_or volatile __global long*p longval long atom_or volatile __local long*p longval ulong atom_or volatile __global ulong*p ulongval ulong atom_or volatile __local ulong*p ulongval Description Read the 64-bit value (referred to as old) stored at location pointed by p. Compute (old | val) and store result at location pointed by p. The function returns old. An application that wants to use this extension will need to include the #pragma OPENCL EXTENSION cl_khr_int64_extended_atomics : enable in the OpenCL program source. This function is performed in one atomic transaction. These transactions are atomic for the device executing these atomic functions. There is no guarantee of atomicity if the atomic operations to the same memory location are being performed by kernels executing on multiple devices. Atomic operations on 64-bit integers and 32-bit integers (and float) are also atomic with regard to each other. Specification OpenCL Specification Also see Atomic Functions, atomic_or, cl_khr_int64_extended_atomics khronos-opencl-man-1.0~svn27110/clGetKernelArgInfo.xml0000644000175000017500000004076611660441607022467 0ustar mathieumathieu clGetKernelArgInfo clGetKernelArgInfo 2007-2011 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. 3 clGetKernelArgInfo Returns information about the arguments of a kernel. cl_int clGetKernelArgInfo cl_kernel kernel cl_uint arg_indx cl_kernel_arg_info param_name size_t param_value_size void *param_value size_t *param_value_size_ret Parameters kernel Specifies the kernel object being queried. arg_indx The argument index. Arguments to the kernel are referred by indices that go from 0 for the leftmost argument to n - 1, where n is the total number of arguments declared by a kernel. param_name Specifies the argument information to query. The list of supported param_name types and the information returned in param_value by clGetKernelArgInfo is described in the table below. param_value A pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored. param_value_size Used to specify the size in bytes of memory pointed to by param_value. This size must be > size of return type as described in the table below. cl_kernel_arg_info Return Type Info. returned in param_value CL_KERNEL_ARG_ADDRESS_QUALIFIER cl_kernel_arg_- address_qualifier Returns the address qualifier specified for the argument given by arg_indx. This can be one of the following values: CL_KERNEL_ARG_ADDRESS_GLOBAL CL_KERNEL_ARG_ADDRESS_LOCAL CL_KERNEL_ARG_ADDRESS_CONSTANT CL_KERNEL_ARG_ADDRESS_PRIVATE If no address qualifier is specified, the default address qualifier which is CL_KERNEL_ARG_ADDRESS_PRIVATE is returned. CL_KERNEL_ARG_ACCESS_QUALIFIER cl_kernel_arg_- access_qualifier Returns the access qualifier specified for the argument given by arg_indx. This can be one of the following values: CL_KERNEL_ARG_ACCESS_READ_ONLY CL_KERNEL_ARG_ACCESS_WRITE_ONLY CL_KERNEL_ARG_ACCESS_READ_WRITE CL_KERNEL_ARG_ACCESS_NONE If argument is not an image type, CL_KERNEL_ARG_ACCESS_NONE is returned. If argument is an image type, the access qualifier specified or the default access qualifier is returned. CL_KERNEL_ARG_TYPE_NAME char[] Returns the type name specified for the argument given by arg_indx. The type name returned will be the argument type name as it was declared with any whitespace removed. If argument type name is an unsigned scalar type (i.e. unsigned char, unsigned short, unsigned int, unsigned long), uchar, ushort, uint and ulong will be returned. The argument type name returned does not include any type qualifiers. CL_KERNEL_ARG_TYPE_QUALIFIER cl_kernel_arg- type_qualifier Returns the type qualifier specified for the argument given by arg_indx. The returned value can be: CL_KERNEL_ARG_TYPE_CONST, CL_KERNEL_ARG_TYPE_RESTRICT, CL_KERNEL_ARG_TYPE_VOLATILE, a combination of the above enums or CL_KERNEL_ARG_TYPE_NONE. NOTE: CL_KERNEL_ARG_TYPE_VOLATILE is returned if the argument is a pointer and the pointer is declared with the volatile qualifier. CL_KERNEL_ARG_NAME char[] Returns the name specified for the argument given by arg_indx. param_value_size_ret Returns the actual size in bytes of data copied to param_value. If param_value_size_ret is NULL, it is ignored. Notes Kernel argument information is only available if the program object associated with kernel is created with clCreateProgramWithSource and the program executable is built with the -cl-kernel-arg-info option specified in options argument to clBuildProgram or clCompileProgram. Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_ARG_INDEX if arg_indx is not a valid argument index. CL_INVALID_VALUE if param_name is not valid, or if size in bytes specified by param_value_size is < size of return type as described in the table above and param_value is not NULL CL_KERNEL_ARG_INFO_NOT_AVAILABLE if the argument information is not available for kernel. CL_INVALID_KERNEL if kernel is not a valid kernel object. Specification OpenCL Specification Also see clCreateKernel, clGetKernelInfo, clCreateKernelsInProgram, clRetainKernel, clReleaseKernel, clSetKernelArg, clGetKernelWorkGroupInfo khronos-opencl-man-1.0~svn27110/cl_khr_icd.xml0000644000175000017500000001200311660441607021062 0ustar mathieumathieu cl_khr_icd cl_khr_icd 2007-2011 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. 3 cl_khr_icd Provide interoperability between OpenCL and Direct3D 10. #pragma OPENCL EXTENSION cl_khr_icd : enable Description This is a platform extension which defines a simple mechanism through which the Khronos OpenCL installable client driver loader (ICD Loader) may expose multiple separate vendor installable client drivers (Vendor ICDs) for OpenCL. An application written against the ICD Loader will be able to access all cl_platform_ids exposed by all vendor implementations with the ICD Loader acting as a demultiplexor. If this extension is supported by an implementation, the string cl_khr_icd will be present in the CL_PLATFORM_EXTENSIONS string described in the table of allowed values for param_name for clGetDeviceInfo. If the cl_khr_icd extension is supported, then the clIcdGetPlatformIDsKHR function is enabled. Specification OpenCL Specification Also see EXTENSION, clIcdGetPlatformIDsKHR khronos-opencl-man-1.0~svn27110/vload_halfn.xml0000644000175000017500000001714711660441607021274 0ustar mathieumathieu ]> vload_halfn vload_halfn 2007-2011 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. 3 vload_halfn Read a half float vector from a pointer to memory. floatn vload_halfn size_toffset const __global half*p floatn vload_halfn size_toffset const __local half*p floatn vload_halfn size_toffset const __constant half*p floatn vload_halfn size_toffset const __private half*p Description Read sizeof(halfn) bytes of data from address (p + (offset * n)). The data read is interpreted as a halfn value. The halfn value read is converted to a floatn value and the floatn value is returned. The read address computed as (p + (offset * n)) must be 16-bit aligned. Notes &vectorFunctionsInc; When extended by the cl_khr_fp16 extension, the generic type gentypen is extended to include half, half2, half3, half4, half8, and half16. vload3 and vload_half3 read x, y, z components from address (p + (offset * 3)) into a 3-component vector. Specification OpenCL Specification Also see Vector Data Load and Store Functions khronos-opencl-man-1.0~svn27110/vectorFunctionsInc.xml0000644000175000017500000000365411660441607022642 0ustar mathieumathieu Vector Data Load and Store Functions allow you to read and write vector types from a pointer to memory. The generic type gentype is used to indicate the built-in data types char, uchar, short, ushort, int, uint, long, ulong, float, or double. The generic type name gentypen represents n-element vectors of gentype elements. The suffix n is also used in the function names (i.e. vloadn, vstoren, etc.), where n = 2, 3, 4, 8, or 16. The results of vector data load and store functions are undefined if the address being read from or written to is not correctly aligned. The pointer argument p can be a pointer to __global, __local, or __private memory for store functions. The pointer argument p can be a pointer to __global, __local, __constant or __private memory for load functions. khronos-opencl-man-1.0~svn27110/usr/0000755000175000017500000000000012350363105017065 5ustar mathieumathieukhronos-opencl-man-1.0~svn27110/usr/include/0000755000175000017500000000000012350363105020510 5ustar mathieumathieukhronos-opencl-man-1.0~svn27110/usr/include/make/0000755000175000017500000000000012350363105021425 5ustar mathieumathieukhronos-opencl-man-1.0~svn27110/usr/include/make/commonrules0000644000175000017500000000522111761374767023740 0ustar mathieumathieu# Copyright (c) 1991-2000 Silicon Graphics, Inc. # This document is licensed under the SGI Free Software B license. # For details, see # # http://oss.sgi.com/projects/FreeB # # $Date$ $Revision$ # $Header: //depot/main/tools/include/commonrules#21 $ # # Notes: # - After including $(ROOT)/usr/include/make/commondefs, a makefile may # say ``include $(COMMONRULES)'' to get this file. # - It is up to the including makefile to define a default rule before # including $(COMMONRULES). # - The parent makefile must define TARGETS in order for clobber to work. # - If the parent makefile must overload the common targets with special # rules (e.g. to perform recursive or subdirectory makes), then set # COMMONPREF to some unique prefix before including $(COMMONRULES), # and make sure that each common target depends on its prefixed name. # For example, a makefile which passes common targets and install on # to makes in subdirectories listed in DIRS might say # # COMMONPREF=xxx # include $(COMMONRULES) # # $(COMMONTARGS) install: $(COMMONPREF)$$@ # @for d in $(DIRS); do \ # $(ECHO) "\tcd $$d; $(MAKE) $@"; \ # cd $$d; $(MAKE) $@; cd ..; \ # done # # Thus, all of the common rules plus install are passed to sub-makes # *and* executed in the current makefile (as xxxclean, xxxclobber, # xxxinstall, etc). SUBDIRS_MAKERULE in commondefs is a convenience # macro that expands to the above loop. # # # cleaning targets # $(COMMONPREF)clobber: $(COMMONPREF)clean $(COMMONPREF)rmtargets ifdef MKDEPFILE $(RM) -r $(MKDEPFILE) endif $(COMMONPREF)clean: ifdef DIRT $(RM) -r $(DIRT) endif $(COMMONPREF)rmtargets: ifdef TARGETS $(RM) -r $(TARGETS) endif # # targets to build distributions # -include $(DISTFILE) # build SI distribution $(COMMONPREF)distsi: @$(INSTALL) $(INSTALLFLAGS) -F $(DIST)/$(DISTDIR_SI) $(DISTFILES_SI) @$(ECHO) "" # build OSS distribution $(COMMONPREF)distoss: @$(INSTALL) $(INSTALLFLAGS_OSS) -F $(DIST)/$(DISTDIR_OSS) $(DISTFILES_OSS) @$(ECHO) "" # # additional target for .cxx files. (gmake only likes .C and .cc) # %.o : %.cxx $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@ # # preprocessor only target # %.i : %.c $(CC) -E $(CPPFLAGS) $(CFLAGS) $< | $(SED) -e 's/^ $$//' | $(UNIQ) > $@ %.i : %.cc %.C %.cxx $(CXX) -E $(CPPFLAGS) $(CXXFLAGS) $< | $(SED) -e 's/^ $$//' | $(UNIQ) > $@ # # include the make dependency file(s), if they exist # -include $(MKDEPFILE) # # Local make rules # -include $(LOCALRULES) khronos-opencl-man-1.0~svn27110/usr/include/make/commondefs0000644000175000017500000002525611761374767023541 0ustar mathieumathieu# Copyright (c) 1991-2000 Silicon Graphics, Inc. # This document is licensed under the SGI Free Software B license. # For details, see # # http://oss.sgi.com/projects/FreeB # # $Date$ $Revision$ # $Header: //depot/main/tools/include/commondefs#43 $ COMMONRULES=$(ROOT)/usr/include/make/commonrules # what OS are we running on OS=$(shell uname) ifeq ($(subst 64,,$(OS)), IRIX) OS=IRIX endif ifeq (CYGWIN,$(findstring CYGWIN,$(OS))) OS=Linux endif # various source-level directories TOOLSSRC = $(TOPDIR)/tools GFXINCLUDESRC = $(TOPDIR)/gfx/include OGLLIBSRC = $(TOPDIR)/gfx/lib/opengl GLXLIBSRC = $(TOPDIR)/glx # SGI Free Software B license OSSCOPYRIGHT = $(TOPDIR)/doc/release/OSSCOPYRIGHT # shell-related defs SHELL = /bin/sh AWK = awk ifeq ($(OS),IRIX) ECHO = /bin/echo endif ifeq ($(OS),Linux) ECHO = /bin/echo -e endif RM = rm -f MV = mv PERL = perl SED = sed UNIQ = uniq # M4 options - run GNU M4 in compatibility mode # rdist options - Red Hat 5.2 must have daemon location specified ifeq ($(OS),IRIX) M4OPTS = endif ifeq ($(OS),Linux) M4OPTS = -G RDIST_OPTS = -p /usr/sbin/rdistd endif # override default gmake CXX with what we have ifeq ($(OS),IRIX) CXX = CC endif # what language are we using? Default to ansi with extended defines ifeq ($(OS),IRIX) CVERSION = -xansi endif ifeq ($(OS),Linux) CVERSION= -ansi -include $(ROOT)/usr/include/make/linuxdefs endif # WARN is the warning option ifeq ($(OS),IRIX) # # Turn of explicitly some warnings on IRIX. Specifically: # 1155: unrecognized #pragma # 1174: parameter/variable "???" was declared but never referenced # 1201: trailing comma is nonstandard (last element in struct assnment) # 1209: controlling expression is constant # 1506: implicit conversion from "???" to "???": rounding, sign # extension, or loss of accuracy may result # 3170: "???" not marked as intrinsic because it is not declared # as a function # WARN = -fullwarn \ -woff 1155,1174,1506,1201,1209,3170 endif ifeq ($(OS),Linux) WARN = -Wimplicit \ -Wreturn-type \ -Wswitch \ -Wcomment \ -Wformat \ -Wchar-subscripts \ -Wparentheses \ -Wpointer-arith \ -Wcast-qual \ -Wmissing-prototypes \ -Wmissing-declarations \ $(NULL) endif # default optimization ifeq ($(subst y,1,$(GLDEBUG)),1) OPTIMIZER=-g else OPTIMIZER=-O2 ifeq ($(OS),Linux) WARN += -Wuninitialized endif endif # how to make dependencies ifeq ($(OS),IRIX) MKDEPOPT = -MDupdate Makedepend endif ifeq ($(OS),Linux) MKDEPOPT = -MD endif override GCOPTS = $(OPTIMIZER) $(MKDEPOPT) $(WARN) override GCXXOPTS = $(OPTIMIZER) $(MKDEPOPT) $(WARN) # where is the default include directory? # (we don't grab it off $ROOT, to avoid populating $ROOT with system # includes. Yes, I know... You don't like the idea. INCLDIR = /usr/include # where to install include files? INCLUDE_LOCATION = $(ROOT)/usr/include # we would like to use nostdinc on Linux, but unfortunately, it also # removes include directories with no well-known fixed path (ie. the # gcc install directory). ifeq ($(OS),IRIX) override GCINCS = -nostdinc -I$(ROOT)$(INCLDIR) -I$(INCLDIR) override GCXXINCS = -nostdinc -I$(ROOT)$(INCLDIR) -I$(INCLDIR) endif ifeq ($(OS),Linux) override GCINCS = -I$(ROOT)$(INCLDIR) override GCXXINCS = -I$(ROOT)$(INCLDIR) -I$(INCLDIR) endif ifeq ($(GLDEBUG),1) override GCDEFS = -DDEBUG -UNDEBUG override GCXXDEFS = -DDEBUG -UNDEBUG else override GCDEFS = -UDEBUG -DNDEBUG override GCXXDEFS = -UDEBUG -DNDEBUG endif # # Cc flags, composed of: # variable (V*) (set on the command line) # local (L*) (set in the makefile) # global (G*) (defined in this file, not overrideable) # in that order. This is done so that the locally defined includes # are searched before the globally defined ones. # CFLAGS = $(CVERSION) $(VCFLAGS) $(LCFLAGS) $(GCFLAGS) # # Each of these three components is divided into defines (-D's and -U's), # includes (-I's), and other options. By segregating the different # classes of flag to cc, the defines (CDEFS) and includes (CINCS) can be # easily given to other programs, e.g., lint. # # Notes: # - The local assignments should be to LCOPTS, LCDEFS, and LCINCS, not to # LCFLAGS, although CFLAGS will be correctly set if this is done. # - If a program cannot be optimized, it should override the setting of # OPTIMIZER with a line such as "OPTIMIZER=" in its make file. # - If a program cannot be compiled with ANSI C, its makefile # should set CVERSION=-cckr # VCFLAGS = $(VCDEFS) $(VCINCS) $(VCOPTS) LCFLAGS = $(LCDEFS) $(LCINCS) $(LCOPTS) GCFLAGS = $(GCDEFS) $(GCINCS) $(GCOPTS) COPTS = $(VCOPTS) $(LCOPTS) $(GCOPTS) CDEFS = $(VCDEFS) $(LCDEFS) $(GCDEFS) CINCS = $(VCINCS) $(LCINCS) $(GCINCS) # # CXX flags are decomposed using the same hierarchy as C flags. # CXXFLAGS = $(CVERSION) $(VCXXFLAGS) $(LCXXFLAGS) $(GCXXFLAGS) VCXXFLAGS = $(VCXXDEFS) $(VCXXINCS) $(VCXXOPTS) LCXXFLAGS = $(LCXXDEFS) $(LCXXINCS) $(LCXXOPTS) GCXXFLAGS = $(GCXXDEFS) $(GCXXINCS) $(GCXXOPTS) CXXOPTS = $(VCXXOPTS) $(LCXXOPTS) $(GCXXOPTS) CXXDEFS = $(VCXXDEFS) $(LCXXDEFS) $(GCXXDEFS) CXXINCS = $(VCXXINCS) $(LCXXINCS) $(GCXXINCS) # # Do something for the linker # # # Library paths (-L's) are part of LDOPTS. # Libraries (-l's) are part of LDLIBS. # This is done so that there is a guarantee that all library paths are # included before the libraries. # override GLDOPTS= override GLDDSOOPTS= ifeq ($(OS),IRIX) override GLDOPTS += -L$(ROOT)/usr/lib32 override GLDDSOOPTS += -L$(ROOT)/usr/lib32 endif ifeq ($(OS),Linux) override GLDOPTS += -L$(ROOT)/usr/lib -L$(XTOPDIR)/xc/exports/lib override GLDDSOOPTS += -L$(ROOT)/usr/lib -L$(XTOPDIR)/xc/exports/lib endif # options used for DSO's. ifeq ($(OS),IRIX) DSONAMEOPT = -soname $(DSONAME) ifneq ($(DSOEXPORTS),) DSOEXPORTSOPT = -exports_file $(DSOEXPORTS) endif override GLDDSOOPTS += -elf -shared -all $(DSOEXPORTSOPT) $(DSONAMEOPT) endif ifeq ($(OS),Linux) DSONAMEOPT = -soname=$(DSONAME) ifneq ($(DSOEXPORTS),) DSOEXPORTSOPT = $(addprefix -u ,$(shell cat $(DSOEXPORTS))) else DSOEXPORTSOPT = --whole-archive endif override GLDDSOOPTS += -shared $(DSOEXPORTSOPT) $(DSONAMEOPT) endif LDDSOOPTS = $(VLDDSOOPTS) $(LLDDSOOPTS) $(GLDDSOOPTS) LDDSOLIBS = $(VLDDSOLIBS) $(LLDDSOLIBS) $(GLDDSOLIBS) LDDSOFLAGS = $(LDDSOOPTS) $(LDDSOLIBS) $(ENDIAN) LDOPTS = $(VLDOPTS) $(LLDOPTS) $(GLDOPTS) LDLIBS = $(VLDLIBS) $(LLDLIBS) $(GLDLIBS) LDFLAGS = $(LDOPTS) $(LDLIBS) $(ENDIAN) # where to install libraries ifeq ($(OS),IRIX) OBJECT_STYLE = N32 LIB_LOCATION = $(ROOT)/usr/lib32 endif ifeq ($(OS),Linux) LIB_LOCATION = $(ROOT)/usr/lib endif # # as flags are just like cc flags. # By default, ASTYLE is the same as CSTYLE, but some may need to make # the asm more aggressive than 'C' and can set ASTYLE. Users of 'make' # always get ASTYLE == CSTYLE # ASFLAGS = $(VASFLAGS) $(LASFLAGS) $(GASFLAGS) VASFLAGS = $(VASDEFS) $(VASINCS) $(VASOPTS) LASFLAGS = $(LASDEFS) $(LASINCS) $(LASOPTS) GASFLAGS = $(GASDEFS) $(GASINCS) $(GASOPTS) ASOPTS = $(VASOPTS) $(LASOPTS) $(GASOPTS) ASDEFS = $(VASDEFS) $(LASDEFS) $(GASDEFS) ASINCS = $(VASINCS) $(LASINCS) $(GASINCS) override GASOPTS = $(OPTIMIZER) $(MKDEPOPT) override GASDEFS = $(GCDEFS) override GASINCS = $(GCINCS) # # the install command to use # INSTALL = $(ROOT)/usr/bin/gfxinstall INSTALLFLAGS = -v -m 0444 # # Convenient command macros that include the flags macros. # # You should always invoke make in makefiles via $(MAKE), as make passes # all command-line variables through the environment to sub-makes. # # Never use just $(CCF), etc. in rules that link executables; LDFLAGS # needs to be included after your objects in the command line. # ASF = $(AS) $(ASFLAGS) CXXF = $(CXX) $(CXXFLAGS) C++F = $(CXXF) CCF = $(CC) $(CFLAGS) LDF = $(LD) $(LDFLAGS) LEXF = $(LEX) $(LFLAGS) YACCF = $(YACC) $(YFLAGS) # Targets COMMONTARGS = clobber clean rmtargets ALLTARGS = headers headers_install libs libs_install install apps distsi \ $(COMMONTARGS) # # Rule macros for nonterminal makefiles that iterate over subdirectories, # making the current target. Set *SUBDIRS to the relevant list of kids. # # Set NOSUBMESG to any value to suppress a warning that subdirectories # are not present. This is useful with mandefs/rules # SUBDIR_MAKERULE= \ if test ! -d $$d; then \ if test "$(NOSUBMESG)" = "" ; then \ echo "SKIPPING $$d: No such directory."; \ fi \ else \ $(ECHO) "\t$(MAKE) -C $$d $${RULE:=$@}"; \ $(MAKE) -C $$d $${RULE:=$@}; \ fi SUBDIRS_MAKERULE= \ +@for d in $(SUBDIRS); do $(SUBDIR_MAKERULE); done # # One problem with the above rules is that if a make fails, and -k is # set, the entire for loop might stop. This is because make still can # (and XPG requires it) exit with an error status if the -k option is set. # This is an alternate rule for SUBDIRS when it is desired that -k keep # working on the next SUBDIR if the previous one failed. Its not quite # as compact a rule as the previous ones. # A standard usage would be: # default install $(COMMONTARGS): $(_FORCE) # $(MAKE) __DORULE=$@ $(SUBDIRS) # $(SUBDIRS): $(_FORCE) # @$(NSUBDIR_MAKERULE) NSUBDIR_MAKERULE= \ if test ! -d $@; then \ if test "$(NOSUBMESG)" = "" ; then \ echo "SKIPPING $@: No such directory."; \ fi \ else \ echo "\t(cd $@; $(MAKE) $(__DORULE))"; \ (cd $@; ${MAKE} $(__DORULE)); \ fi # # Convenience file list macros: # - Commondefs defines the following lists: SOURCES, enumerating all # source files; OBJECTS, the .o files derived from compilable source; # and DIRT, which lists intermediates and temporary files to be # removed by clean. # - The including (parent) makefile may define source file lists for # the standard suffixes: CFILES for .c, ASFILES for .s, YFILES for # .y, etc. We combine all such lists into SOURCES. The including # makefile need not define CFILES &c before including commondefs. # SOURCES=$(HFILES) $(ASFILES) $(CCFILES) $(C++FILES) $(CXXFILES) $(CFILES) \ $(EFILES) $(FFILES) $(LFILES) $(PFILES) $(RFILES) $(SHFILES) $(YFILES) CXXO1=$(CXXFILES:.c++=.o) $(C++FILES:.c++=.o) $(CCFILES:.c++=.o) CXXO2=$(CXXO1:.cxx=.o) CXXO3=$(CXXO2:.C=.o) CXXO4=$(CXXO3:.cc=.o) CXXOALL=$(CXXO4) YO1=$(YFILES:.y=.o) YO2=$(YO1:.yxx=.o) YO3=$(YO2:.Y=.o) YOALL=$(YO3) LO1=$(LFILES:.l=.o) LO2=$(LO1:.lxx=.o) LO3=$(LO2:.L=.o) LOALL=$(LO3) OBJECTS=$(ASFILES:.s=.o) $(CXXOALL) $(CFILES:.c=.o) $(EFILES:.e=.o) \ $(FFILES:.f=.o) $(LOALL) $(PFILES:.p=.o) $(RFILES:.r=.o) \ $(YOALL) # # dependency file(s) # ifeq ($(OS),IRIX) MKDEPFILE = Makedepend endif ifeq ($(OS),Linux) MKDEPFILE = $(OBJECTS:.o=.d) endif # # distribution file # DISTFILE_EXT = Distfile DISTFILE_INT = Distfile.int ifeq ($(OS),IRIX) DISTFILE = $(DISTFILE_EXT) else ifeq ($(OS),Linux) DISTFILE = $(DISTFILE_EXT) else DISTFILE = $(DISTFILE_EXT) $(DISTFILE_INT) endif endif # # dirt stuff # DIRT=$(GDIRT) $(VDIRT) $(LDIRT) override GDIRT=*.o a.out core lex.yy.[co] y.tab.[cho] ar.tmp.* so_locations LOCALDEFS = ./localdefs LOCALRULES = ./localrules -include $(LOCALDEFS) khronos-opencl-man-1.0~svn27110/usr/include/make/commonrules.win320000644000175000017500000000403111761374477024675 0ustar mathieumathieu .SUFFIXES: .l .y .o # # targets for lex and yacc # .l.c: $(RM) $@ $(LEX) $(LFLAGS) $< $(MV) lex.yy.c $@ .y.c: $(RM) $@ $(YACC) $(YFLAGS) $< $(MV) y.tab.c $@ .o.obj: ; # # target to create preprocessor output file from .c file (for debugging) # .c.i: $(RM) $@ $(CC) $(USER_C_FLAGS) -E $< > $*.i # # main target (first) resolves to makefile.def's main target # default: all # # This has to be here, for dependencies # INCLUDES = $(VCINCS); $(LCINCS); $(GCINCS) # # cleaning targets # $(COMMONPREF)clobber: $(COMMONPREF)clobber_subdirs $(RM) $(DIRT) $(TARGETS) obj$(BUILD_ALT_DIR) $(COMMONPREF)clean: $(COMMONPREF)clean_subdirs $(RM) $(DIRT) $(COMMONPREF)rmtargets: $(COMMONPREF)rmtargets_subdirs $(RM) $(TARGETS) # # targets to build distributions # !IF EXIST($(DISTFILE)) !INCLUDE $(DISTFILE) !ENDIF $(COMMONPREF)distddk: $(COMMONPREF)distddk_subdirs @$(INSTALL) $(INSTALLFLAGS) -F $(DIST)$(DISTDIR_DDK) $(DISTFILES_DDK) @$(INSTALL) $(INSTALLFLAGS) -F $(DIST)$(DISTDIR_DDK) $(DISTFILES_DDK2) @$(ECHO) "" $(COMMONPREF)clobber_subdirs: !IFDEF DIRS # # DIRS defined. We have to do subdirectories # CLOBBER_SUBDIRS=$(DIRS:.dir=.clobber) CLEAN_SUBDIRS=$(DIRS:.dir=.clean) RMTARGETS_SUBDIRS=$(DIRS:.dir=.rmtargets) DISTDDK_SUBDIRS=$(DIRS:.dir=.distddk) $(COMMONPREF)clobber_subdirs: $(CLOBBER_SUBDIRS) $(COMMONPREF)clean_subdirs: $(CLEAN_SUBDIRS) $(COMMONPREF)rmtargets_subdirs: $(RMTARGETS_SUBDIRS) $(COMMONPREF)distddk_subdirs: $(DISTDDK_SUBDIRS) $(CLOBBER_SUBDIRS): @cd $* @echo === clobbering $* === @$(MAKE) -nologo -f Makefile.win32 clobber @cd .. $(CLEAN_SUBDIRS): @cd $* @echo === cleaning $* === @$(MAKE) -nologo -f Makefile.win32 clean @cd .. $(RMTARGETS_SUBDIRS): @cd $* @echo === removing targets in $* === @$(MAKE) -nologo -f Makefile.win32 rmtargets @cd .. $(DISTDDK_SUBDIRS): @cd $* @echo === making DDK distribution in $* === @$(MAKE) -nologo -f Makefile.win32 distddk @cd .. !ELSE $(COMMONPREF)clobber_subdirs $(COMMONPREF)clean_subdirs $(COMMONPREF)rmtargets_subdirs $(COMMONPREF)distddk_subdirs: !ENDIF khronos-opencl-man-1.0~svn27110/usr/include/make/linuxdefs0000644000175000017500000000074411761374767023403 0ustar mathieumathieu /* * ident "$Header$" * * Copyright (c) 1991-2000 Silicon Graphics, Inc. * This document is licensed under the SGI Free Software B license. * For details, see * * http://oss.sgi.com/projects/FreeB * */ /* * defines to make gcc's -ansi more-or-less equivalent to SGI's -xansi */ #if defined(__i386__) #define i386 1 #endif #if defined(__linux__) #define linux 1 #endif #if defined(__unix__) #define unix 1 #endif #if !defined(_BSD_SOURCE) #define _BSD_SOURCE 1 #endif khronos-opencl-man-1.0~svn27110/clEnqueueAcquireD3D10ObjectsKHR.xml0000644000175000017500000003023411660441607024562 0ustar mathieumathieu ]> clEnqueueAcquireD3D10ObjectsKHR clEnqueueAcquireD3D10ObjectsKHR 2007-2011 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. 3 clEnqueueAcquireD3D10ObjectsKHR Acquire OpenCL memory objects that have been created from Direct3D 10 resources cl_int clEnqueueAcquireD3D10ObjectsKHR cl_command_queue command_queue cl_uint num_objects const cl_mem*mem_objects cl_uintnum_events_in_wait_list const cl_event *event_wait_list cl_event*event Parameters command_queue A valid command-queue. num_objects The number of memory objects to be acquired in mem_objects. mem_objects A pointer to a list of OpenCL memory objects that were created from Direct3D 10 resources. num_events_in_wait_list, event_wait_list Specify events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event_wait_list act as synchronization points. event Returns n event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. Notes The Direct3D 10 objects are acquired by the OpenCL context associated with command-queue and can therefore be used by all command-queues associated with the OpenCL context. OpenCL memory objects created from Direct3D 10 resources must be acquired before they can be used by any OpenCL commands queued to a command-queue. If an OpenCL memory object created from a Direct3D 10 resource is used while it is not currently acquired by OpenCL, the call attempting to use that OpenCL memory object will return CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR. If CL_CONTEXT_INTEROP_USER_SYNC is not specified as CL_TRUE during context creation, clEnqueueAcquireD3D10ObjectsKHR provides the synchronization guarantee that any Direct3D 10 calls involving the interop device(s) used in the OpenCL context made before clEnqueueAcquireD3D10ObjectsKHR is called will complete executing before event reports completion and before the execution of any subsequent OpenCL work issued in command_queue begins. If the context was created with properties specifying CL_CONTEXT_INTEROP_USER_SYNC as CL_TRUE, the user is responsible for guaranteeing that any Direct3D 10 calls involving the interop device(s) used in the OpenCL context made before clEnqueueAcquireD3D10ObjectsKHR is called have completed before calling clEnqueueAcquireD3D10ObjectsKHR. &sharingD3D10Inc; Errors Returns CL_SUCCESS returns CL_SUCCESS if the function is executed successfully. If num_objects is 0 and mem_objects is NULL then the function does nothing and returns CL_SUCCESS. Otherwise it returns one of the following errors: CL_INVALID_VALUE if num_objects is zero and mem_objects is not a NULL value or if num_objects > 0 and mem_objects is NULL. CL_INVALID_MEM_OBJECT if memory objects in mem_objects are not valid OpenCL memory objects or if memory objects in mem_objects have not been created from Direct3D 10 resources. CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_CONTEXT if context associated with command_queue was not created from an Direct3D 10 context. CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR if memory objects in mem_objects is not have previously been acquired using clEnqueueAcquireD3D10ObjectsKHR but have not been released using clEnqueueReleaseD3D10ObjectsKHR. CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_event_in_wait_list > 0, or event_wait_list is not NULL and num_event_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see cl_khr_d3d10_sharing, clGetDeviceIDsFromD3D10KHR, clCreateFromD3D10BufferKHR, clCreateFromD3D10Texture2DKHR, clCreateFromD3D10Texture3DKHR, clEnqueueReleaseD3D10ObjectsKHR khronos-opencl-man-1.0~svn27110/distance.xml0000644000175000017500000001375711660441607020614 0ustar mathieumathieu ]> distance distance 2007-2011 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. 3 distance Vector distance. float distance floatnp0 floatnp1 double distance doublenp0 doublenp1 half distance (gentype p0, gentype p1) // if half extension enabled Description Returns the distance between p0 and p1. This is calculated as length(p0 - p1). Notes &geometricFunctionsInc; If extended with cl_khr_fp16, generic type name gentype may indicate half and half{2|3|4} as arguments. Specification OpenCL Specification Also see Geometric Functions khronos-opencl-man-1.0~svn27110/clFinish.xml0000644000175000017500000001242511660441607020550 0ustar mathieumathieu clFinish clFinish 2007-2011 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. 3 clFinish Blocks until all previously queued OpenCL commands in a command-queue are issued to the associated device and have completed. cl_int clFinish cl_command_queuecommand_queue Notes Blocks until all previously queued OpenCL commands in command_queue are issued to the associated device and have completed. clFinish does not return until all previously queued commands in command_queue have been processed and completed. clFinish is also a synchronization point. Errors Returns CL_SUCCESS if the function call was executed successfully. Otherwise, it returns one of the following: CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. Specification OpenCL Specification Also see clFlush khronos-opencl-man-1.0~svn27110/add_sat.xml0000644000175000017500000001035111660441607020404 0ustar mathieumathieu ]> add_sat add_sat 2007-2011 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. 3 add_sat Add two values and saturate the result. gentype add_sat gentypex gentypey Description add_sat returns x+y and saturates result. Notes &integerFunctionsInc; Specification OpenCL Specification Also see Integer Functions khronos-opencl-man-1.0~svn27110/clCreateBuffer.xml0000644000175000017500000002334511660441607021670 0ustar mathieumathieu ]> clCreateBuffer clCreateBuffer clCreateBuffer 2007-2011 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. 3 clCreateBuffer Creates a buffer object. cl_mem clCreateBuffer cl_contextcontext cl_mem_flagsflags size_tsize void*host_ptr cl_int*errcode_ret Parameters context A valid OpenCL context used to create the buffer object. flags A bit-field that is used to specify allocation and usage information such as the memory arena that should be used to allocate the buffer object and how it will be used. The following table describes the possible values for flags. If value specified for flags is 0, the default is used which is CL_MEM_READ_WRITE. &clCreate_memflagsInc; size The size in bytes of the buffer memory object to be allocated. host_ptr A pointer to the buffer data that may already be allocated by the application. The size of the buffer that host_ptr points to must be ≥ size bytes. errcode_ret Returns an appropriate error code. If errcode_ret is NULL, no error code is returned. Errors Returns a valid non-zero buffer object and errcode_ret is set to CL_SUCCESS if the buffer object is created successfully. Otherwise, it returns a NULL value with one of the following error values returned in errcode_ret: CL_INVALID_CONTEXT if context is not a valid context. CL_INVALID_VALUE if values specified in flags are not valid as defined in the table above. CL_INVALID_BUFFER_SIZE if size is 0. Implementations may return CL_INVALID_BUFFER_SIZE if size is greater than the CL_DEVICE_MAX_MEM_ALLOC_SIZE value specified in the table of allowed values for param_name for clGetDeviceInfo for all devices in context. CL_INVALID_HOST_PTR if host_ptr is NULL and CL_MEM_USE_HOST_PTR or CL_MEM_COPY_HOST_PTR are set in flags or if host_ptr is not NULL but CL_MEM_COPY_HOST_PTR or CL_MEM_USE_HOST_PTR are not set in flags. CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for buffer object. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clEnqueueReadBuffer, clEnqueueWriteBuffer, clEnqueueCopyBuffer, clCreateSubBuffer, Cardinality Diagram khronos-opencl-man-1.0~svn27110/clGetExtensionFunctionAddressForPlatform.xml0000644000175000017500000002257611660441607027144 0ustar mathieumathieu clGetExtensionFunctionAddressForPlatform clGetExtensionFunctionAddressForPlatform 2007-2011 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. 3 clGetExtensionFunctionAddressForPlatform Returns the address of the extension function named by funcname for a given platform. void* clGetExtensionFunctionAddressForPlatform cl_platform_id platform const char *funcname Parameters funcname Name of an extension function. Description The function clGetExtensionFunctionAddressForPlatform returns the address of the extension function named by funcname for a given platform. The pointer returned should be cast to a function pointer type matching the extension function's definition defined in the appropriate extension specification and header file. A return value of NULL indicates that the specified function does not exist for the implementation or platform is not a valid platform. A non-NULL return value for clGetExtensionFunctionAddressForPlatform does not guarantee that an extension function is actually supported by the platform. The application must also make a corresponding query using clGetPlatformInfo (platform, CL_PLATFORM_EXTENSIONS, ... ) or clGetDeviceInfo (device,CL_DEVICE_EXTENSIONS, ... ) to determine if an extension is supported by the OpenCL implementation. clGetExtensionFunctionAddressForPlatform may not be queried for core (non-extension) functions in OpenCL. For functions that are queryable with clGetExtensionFunctionAddressForPlatform, implementations may choose to also export those functions statically from the object libraries implementing those functions. However, portable applications cannot rely on this behavior. Function pointer typedefs must be declared for all extensions that add API entrypoints. These typedefs are a required part of the extension interface, to be provided in an appropriate header (such as cl_ext.h if the extension is an OpenCL extension, or cl_gl_ext.h if the extension is an OpenCL/OpenGL sharing extension). Notes Since there is no way to qualify the query with a device, the function pointer returned must work for all implementations of that extension on different devices for a platform. The behavior of calling a device extension function on a device not supporting that extension is undefined. Example The following convention must be followed for all extensions affecting the host API, where TAG can be KHR, EXT or vendor-specific: #ifndef extension_name #define extension_name 1 // all data typedefs, token #defines, prototypes, and // function pointer typedefs for this extension // function pointer typedefs must use the // following naming convention typedef CL_API_ENTRY return type (CL_API_CALL *clextension_func_nameTAG_fn)(...); #endif // extension_name Consider, for example, the cl_khr_gl_sharing extension. This extension would add the following to cl_gl_ext.h:: #ifndef cl_khr_gl_sharing #define cl_khr_gl_sharing 1 // all data typedefs, token #defines, prototypes, and // function pointer typedefs for this extension #define CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR -1000 #define CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR 0x2006 #define CL_DEVICES_FOR_GL_CONTEXT_KHR 0x2007 #define CL_GL_CONTEXT_KHR 0x2008 #define CL_EGL_DISPLAY_KHR 0x2009 #define CL_GLX_DISPLAY_KHR 0x200A #define CL_WGL_HDC_KHR 0x200B #define CL_CGL_SHAREGROUP_KHR 0x200C // function pointer typedefs must use the // following naming convention typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetGLContextInfoKHR_fn)( const cl_context_properties * /* properties */, cl_gl_context_info /* param_name */, size_t /* param_value_size */, void * /* param_value */, size_t * /*param_value_size_ret*/); #endif // cl_khr_gl_sharing Specification OpenCL Specification Also see EXTENSION khronos-opencl-man-1.0~svn27110/clEnqueueWriteBufferRect.xml0000644000175000017500000005605311660441607023727 0ustar mathieumathieu clEnqueueWriteBufferRect clEnqueueWriteBufferRect 2007-2011 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. 3 clEnqueueWriteBufferRect Enqueue commands to write a 2D or 3D rectangular region to a buffer object from host memory. cl_int clEnqueueWriteBufferRect cl_command_queue command_queue cl_mem buffer cl_bool blocking_write const size_t * buffer_origin const size_t * host_origin const size_t*region size_t buffer_row_pitch size_t buffer_slice_pitch size_t host_row_pitch size_t host_slice_pitch void *ptr cl_uint num_events_in_wait_list const cl_event *event_wait_list cl_event *event Parameters command_queue Refers to the command-queue in which the write command will be queued. command_queue and buffer must be created with the same OpenCL context. buffer Refers to a valid buffer object. blocking_write Indicates if the write operations are blocking or non-blocking. If blocking_write is CL_TRUE, the OpenCL implementation copies the data referred to by ptr and enqueues the write operation in the command-queue. The memory pointed to by ptr can be reused by the application after the clEnqueueWriteBufferRect call returns. If blocking_write is CL_FALSE, the OpenCL implementation will use ptr to perform a nonblocking write. As the write is non-blocking the implementation can return immediately. The memory pointed to by ptr cannot be reused by the application after the call returns. The event argument returns an event object which can be used to query the execution status of the write command. When the write command has completed, the memory pointed to by ptr can then be reused by the application. buffer_origin The (x, y, z) offset in the memory region associated with buffer. For a 2D rectangle region, the z value given by buffer_origin[2] should be 0. The offset in bytes is computed as buffer_origin[2] * buffer_slice_pitch + buffer_origin[1] * buffer_row_pitch + buffer_origin[0]. host_origin The (x, y, z) offset in the memory region pointed to by ptr. For a 2D rectangle region, the z value given by host_origin[2] should be 0. The offset in bytes is computed as host_origin[2] * host_slice_pitch + host_origin[1] * host_row_pitch + host_origin[0]. region The (width, height, depth) in bytes of the 2D or 3D rectangle being read or written. For a 2D rectangle copy, the depth value given by region[2] should be 1. buffer_row_pitch The length of each row in bytes to be used for the memory region associated with buffer. If buffer_row_pitch is 0, buffer_row_pitch is computed as region[0]. buffer_slice_pitch The length of each 2D slice in bytes to be used for the memory region associated with buffer. If buffer_slice_pitch is 0, buffer_slice_pitch is computed as region[1] * buffer_row_pitch. host_row_pitch The length of each row in bytes to be used for the memory region pointed to by ptr. If host_row_pitch is 0, host_row_pitch is computed as region[0]. host_slice_pitch The length of each 2D slice in bytes to be used for the memory region pointed to by ptr. If host_slice_pitch is 0, host_slice_pitch is computed as region[1] * host_row_pitch. ptr The pointer to buffer in host memory where data is to be written from. event_wait_list num_events_in_wait_list event_wait_list and num_events_in_wait_list specify events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event_wait_list act as synchronization points. The context associated with events in event_wait_list and command_queue must be the same. The memory associated with event_wait_list can be reused or freed after the function returns. event Returns an event object that identifies this particular write command and can be used to query or queue a wait for this particular command to complete. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. Notes Calling clEnqueueWriteBufferRect to update the latest bits in a region of the buffer object with the ptr argument value set to host_ptr and host_origin, buffer_origin values are the same, where host_ptr is a pointer to the memory region specified when the buffer object being written is created with CL_MEM_USE_HOST_PTR, must meet the following requirements in order to avoid undefined behavior: The host memory region given by (buffer_origin region) contains the latest bits when the enqueued write command begins execution. The buffer object or memory objects created from this buffer object are not mapped. The buffer object or memory objects created from this buffer object are not used by any command-queue until the write command has finished execution. Errors clEnqueueWriteBufferRect returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_CONTEXT if the context associated with command_queue and buffer are not the same or if the context associated with command_queue and events in event_wait_list are not the same. CL_INVALID_MEM_OBJECT if buffer is not a valid buffer object. CL_INVALID_VALUE if the region being read specified by (buffer_origin, region, buffer_row_pitch, buffer_slice_pitch) is out of bounds. CL_INVALID_VALUE if ptr is a NULL value. CL_INVALID_VALUE if any region array element is 0. CL_INVALID_VALUE if buffer_row_pitch is not 0 and is less than region[0]. CL_INVALID_VALUE if host_row_pitch is not 0 and is less than region[0]. CL_INVALID_VALUE if buffer_slice_pitch is not 0 and is less than region[1] * buffer_row_pitch and not a multiple of buffer_row_pitch. CL_INVALID_VALUE if host_slice_pitch is not 0 and is less than region[1] * host_row_pitch and not a multiple of host_row_pitch. CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_MISALIGNED_SUB_BUFFER_OFFSET if buffer is a sub-buffer object and offset specified when the sub-buffer object is created is not aligned to CL_DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue. CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the read and write operations are blocking and the execution status of any of the events in event_wait_list is a negative integer value. CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer. CL_INVALID_OPERATION if clEnqueueWriteBufferRect is called on buffer which has been created with CL_MEM_HOST_READ_ONLY or CL_MEM_HOST_NO_ACCESS. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clEnqueueCopyBuffer, clEnqueueCopyBufferRect, clEnqueueWriteBuffer, clEnqueueReadBufferRect, clEnqueueReadBuffer khronos-opencl-man-1.0~svn27110/restrictions.xml0000644000175000017500000003262311660441607021543 0ustar mathieumathieu restrictions restrictions 2007-2011 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. 3 Restrictions The use of pointers is somewhat restricted. The following rules apply: Arguments to __kernel functions declared in a program that are pointers must be declared with the __global, __constant, or __local qualifier. A pointer declared with the __constant, __local, or __global qualifier can only be assigned to a pointer declared with the __constant, __local, or __global qualifier respectively. Pointers to functions are not allowed. Arguments to __kernel functions in a program cannot be declared as a pointer to a pointer(s). Variables inside a function or arguments to non-kernel functions in a program can be declared as a pointer to a pointer(s). An image type ( image2d_t, image3d_t, image2d_array_t, image1d_t, image1d_buffer_t, or image1d_array_t) can only be used as the type of a function argument. An image function argument cannot be modified. Elements of an image can only be accessed using the Built-in Image Functions. An image type cannot be used to declare a variable, a structure or union field, an array of images, a pointer to an image, or the return type of a function. An image type cannot be used with the __private, __local and __constant address space qualifiers. The image3d_t type cannot be used with the __write_only access qualifier unless the cl_khr_3d_image_writes extension is enabled. An image type cannot be used with the __read_write access qualifer which is reserved for future use. The sampler type (sampler_t) can only be used as the type of a function argument or a variable declared in the program scope or the outermost scope of a kernel function. The behavior of a sampler variable declared in a non-outermost scope of a kernel function is implementation-defined. A sampler argument or variable cannot be modified. The sampler type cannot be used to declare a structure or union field, an array of samplers, a ponter to a sampler, or the return type of a function. The sampler type cannot be used with the __local and __global address space qualifiers. Bit-fields struct members are currently not supported. Variable length arrays and structures with flexible (or unsized) arrays are not supported. Variadic macros and functions are not supported. The library functions defined in the C99 standard headers assert.h, ctype.h, complex.h, errno.h, fenv.h, float.h, inttypes.h, limits.h, locale.h, setjmp.h, signal.h, stdarg.h, stdio.h, stdlib.h, string.h, tgmath.h, time.h, wchar.h, and wctype.h are not available and cannot be included by a program. The auto and register storage-class specifiers are not supported. Recursion is not supported. The function using the __kernel qualifier can only have return type void in the source code. Arguments to kernel functions in a program cannot be declared with the built-in scalar types bool, half, size_t, ptrdiff_t, intptr_t, and uintptr_t, or a struct and/or union that contain fields declared to be one of these built-in scalar types. The size in bytes of these types except half are implementation-defined and in addition can also be different for the OpenCL device and the host processor making it difficult to allocate buffer objects to be passed as arguments to a kernel declared as pointer to these types. half is not supported as half can be used as a storage format only (unless the cl_khr_fp16 extension is supported) and is not a data type on which floating-point arithmetic can be performed. Whether or not irreducible control flow is illegal is implementation defined. Arguments to kernel functions in a program cannot be declared to be of type event_t. Elements of a struct or union must belong to the same address space. Declaring a struct or union whose elements are in different address spaces is illegal. Arguments to kernel functions that are declared to be a struct or union do not allow OpenCL objects to be passed as elements of the struct or union. The type qualifiers const, restrict, and volatile as defined by the C99 specification are supported. These qualifiers cannot be used with image2d_t, image3d_t, image2d_array_t, image1d_t, image1d_buffer_t, and image1d_array_t types. Types other than pointer types shall not use the restrict qualifier. The event type (event_t) cannot be used as the type of a kernel function argument. The event type cannot be used to declare a program scope variable. The event type cannot be used to declare a structure or union field. The event type cannot be used with the __local, __constant, and __global address space qualifiers. Specification OpenCL Specification Also see Image Functions, Function Qualifiers khronos-opencl-man-1.0~svn27110/isunordered.xml0000644000175000017500000001715411660441607021340 0ustar mathieumathieu ]> isunordered isunordered 2007-2011 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. 3 isunordered Test if arguments are unordered. int isunordered floatx floaty intn isunordered floatnx floatny int isunordered doublex doubley longn isunordered doublenx doubleny int isunordered (half x, half y) // if half extension enabled shortn isunordered (halfn x, halfn y) // if half extension enabled Description Test if arguments are unordered. isunordered() takes arguments x and y, returning non-zero if x or y is NaN, and zero otherwise. Notes &relationalFunctionsInc1; &relationalFunctionsInc2; Specification OpenCL Specification Also see Relational Functions khronos-opencl-man-1.0~svn27110/get_image_depth.xml0000644000175000017500000000650511660441607022120 0ustar mathieumathieu get_image_depth get_image_depth 2007-2011 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. 3 get_image_depth Return the 3D image depth in pixels. int get_image_depth image3d_timage Description Return the image depth in pixels. Specification OpenCL Specification Also see Image Functions khronos-opencl-man-1.0~svn27110/clEnqueueMigrateMemObjects.xml0000644000175000017500000004065211660441607024224 0ustar mathieumathieu clEnqueueMigrateMemObjects clEnqueueMigrateMemObjects 2007-2011 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. 3 clEnqueueMigrateMemObjects Enqueues a command to indicate which device a set of memory objects should be associated with. cl_int clEnqueueMigrateMemObjects cl_command_queue command_queue cl_uint num_mem_objects const cl_mem *mem_objects cl_mem_migration_flags flags cl_uint num_events_in_wait_list const cl_event *event_wait_list cl_event *event Parameters command_queue A valid command-queue. The specified set of memory objects in mem_objects will be migrated to the OpenCL device associated with command_queue or to the host if the CL_MIGRATE_MEM_OBJECT_HOST has been specified. num_mem_objects The number of memory objects specified in mem_objects. mem_objects A pointer to a list of memory objects. flags A bit-field that is used to specify migration options. The table below describes the possible values for flags. cl_mem_migration flags Description CL_MIGRATE_MEM_OBJECT_HOST This flag indicates that the specified set of memory objects are to be migrated to the host, regardless of the target command-queue. CL_MIGRATE_MEM_OBJECT_- CONTENT_UNDEFINED This flag indicates that the contents of the set of memory objects are undefined after migration. The specified set of memory objects are migrated to the device associated with command_queue without incurring the overhead of migrating their contents. event_wait_list, num_events_in_wait_list Specify events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event_wait_list act as synchronization points. The context associated with events in event_wait_list and command_queue must be the same. The memory associated with event_wait_list can be reused or freed after the function returns. event Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the event_wait_list array. Notes This section describes a mechanism for assigning which device an OpenCL memory object resides. A user may wish to have more explicit control over the location of their memory objects on creation. This could be used to: Ensure that an object is allocated on a specific device prior to usage. Preemptively migrate an object from one device to another. Typically, memory objects are implicitly migrated to a device for which enqueued commands, using the memory object, are targeted. clEnqueueMigrateMemObjects allows this migration to be explicitly performed ahead of the dependent commands. This allows a user to preemptively change the association of a memory object, through regular command queue scheduling, in order to prepare for another upcoming command. This also permits an application to overlap the placement of memory objects with other unrelated operations before these memory objects are needed potentially hiding transfer latencies. Once the event, returned from clEnqueueMigrateMemObjects, has been marked CL_COMPLETE the memory objects specified in mem_objects have been successfully migrated to the device associated with command_queue. The migrated memory object shall remain resident on the device until another command is enqueued that either implicitly or explicitly migrates it away. clEnqueueMigrateMemObjects can also be used to direct the initial placement of a memory object, after creation, possibly avoiding the initial overhead of instantiating the object on the first enqueued command to use it. The user is responsible for managing the event dependencies, associated with this command, in order to avoid overlapping access to memory objects. Improperly specified event dependencies passed to clEnqueueMigrateMemObjects could result in undefined results. Errors clEnqueueMigrateMemObjects returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command_queue. CL_INVALID_CONTEXT if the context associated with command_queue and memory objects in memobj are not the same or if the context associated with command_queue and events in event_wait_list are not the same. CL_INVALID_MEM_OBJECT if any of the memory objects in mem_objs is not a valid memory object. CL_INVALID_VALUE if num_mem_objects is zero or if mem_objects is NULL. CL_INVALID_VALUE if flags is not 0 or is not any of the values described in the table above. CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for the specified set of memory objects in mem_objects. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clEnqueueMapBuffer, clEnqueueMapImage khronos-opencl-man-1.0~svn27110/clGetGLContextInfoKHR.xml0000644000175000017500000004316411660441607023024 0ustar mathieumathieu clGetGLContextInfoKHR clGetGLContextInfoKHR 2007-2011 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. 3 clGetGLContextInfoKHR Get OpenGL context information. cl_int clGetGLContextInfoKHR const cl_context_properties *properties cl_gl_context_info param_name size_t param_value_size void *param_value size_t *param_value_size_ret Parameters properties Points to an attribute list whose format and valid contents are identical to the properties argument of clCreateContext. properties must identify a single valid GL context or GL share group object. param_name A constant that specifies the GL context information to query, and must be one of the values shown in the table below. param_value_size Specifies the size in bytes of memory pointed to by param_value. This size must be greater than or equal to the size of the return type described in the table below. param_value A pointer to memory where the result of the query is returned as described in the table below. If param_value is NULL, it is ignored. param_value_size_ret Returns the actual size in bytes of data being queried by param_value. If param_value_size_ret is NULL, it is ignored. param_name Return Type Information returned in param_value CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR cl_device_id Return the CL device currently associated with the specified OpenGL context. CL_DEVICES_FOR_GL_CONTEXT_KHR cl_device_id[] List of all CL devices which may be associated with the specified OpenGL context. Description The OpenGL object used to create the OpenCL memory object and information about the object type i.e. whether it is a texture, renderbuffer, or buffer object can be queried using this function. Notes The OpenCL specification in section 9.7 defines how to share data with texture and buffer objects in a parallel OpenGL implementation, but does not define how the association between an OpenCL context and an OpenGL context or share group is established. This extension defines optional attributes to OpenCL context creation routines which associate a GL context or share group object with a newly created OpenCL context. If this extension is supported by an implementation, the string "cl_khr_gl_sharing" will be present in the CL_PLATFORM_EXTENSIONS or CL_DEVICE_EXTENSIONS string described in the table of allowed values for param_name for clGetDeviceInfo. An OpenGL implementation supporting buffer objects and sharing of texture and buffer object images with OpenCL is required by this extension. OpenCL device(s) corresponding to an OpenGL context may be queried. Such a device may not always exist (for example, if an OpenGL context is specified on a GPU not supporting OpenCL command queues, but which does support shared CL/GL objects), and if it does exist, may change over time. When such a device does exist, acquiring and releasing shared CL/GL objects may be faster on a command queue corresponding to this device than on command queues corresponding to other devices available to an OpenCL context. Errors Returns CL_SUCCESS if the function is executed successfully. If no device(s) exist corresponding to param_name, the call will not fail, but the value of param_value_size_ret will be zero. Otherwise returns one of the following: CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR when an invalid OpenGL context or share group object handle is specified in properties. CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR if a context was specified by any of the following means: A context was specified for an EGL-based OpenGL ES or OpenGL implementation by setting the attributes CL_GL_CONTEXT_KHR and CL_EGL_DISPLAY_KHR A context was specified for a GLX-based OpenGL implementation by setting the attributes CL_GL_CONTEXT_KHR and CL_GLX_DISPLAY_KHR A context was specified for a WGL-based OpenGL implementation by setting the attributes CL_GL_CONTEXT_KHR and CL_WGL_HDC_KHR and any of the following conditions hold: The specified display and context attributes do not identify a valid OpenGL or OpenGL ES context. The specified context does not support buffer and renderbuffer objects. The specified context is not compatible with the OpenCL context being created (for example, it exists in a physically distinct address space, such as another hardware device; or it does not support sharing data with OpenCL due to implementation restrictions). CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR if a share group was specified for a CGL-based OpenGL implementation by setting the attribute CL_CGL_SHAREGROUP_KHR, and the specified share group does not identify a valid CGL share group object. CL_INVALID_OPERATION if a context was specified as described above and any of the following conditions hold: A context or share group object was specified for one of CGL, EGL, GLX, or WGL and the OpenGL implementation does not support that window-system binding API. More than one of the attributes CL_CGL_SHAREGROUP_KHR, CL_EGL_DISPLAY_KHR, CL_GLX_DISPLAY_KHR, and CL_WGL_HDC_KHR is set to a non-default value. Both of the attributes CL_CGL_SHAREGROUP_KHR and CL_GL_CONTEXT_KHR are set to non-default values. Any of the devices specified in the devices argument cannot support OpenCL objects which share the data store of an OpenGL object. CL_INVALID_VALUE if an attribute name other than those specified in the table of supported properties for clCreateContext is specified in properties. CL_INVALID_VALUE if param_name is not CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR or CL_DEVICES_FOR_GL_CONTEXT_KHR; or if the size in bytes specified by param_value_size is less than the size of the return type shown above for CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR or CL_DEVICES_FOR_GL_CONTEXT_KHR; and param_value is not a NULL value. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clCreateContext cl_khr_gl_sharing khronos-opencl-man-1.0~svn27110/atom_xchg.xml0000644000175000017500000001713711660441607020767 0ustar mathieumathieu atom_xchg atom_xchg 2007-2011 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. 3 atom_xchg 64-bit atom_xchg functions. long atom_xchg volatile __global long*p longval long atom_xchg volatile __local long*p longval ulong atom_xchg volatile __global ulong*p ulongval ulong atom_xchg volatile __local ulong*p ulongval Description Swaps the 32-bit value (referred to as old) stored at location pointed by p with new value given by val. The function returns old. An application that wants to use this extension will need to include the #pragma OPENCL EXTENSION cl_khr_int64_base_atomics : enable in the OpenCL program source. This function is performed in one atomic transaction. These transactions are atomic for the device executing these atomic functions. There is no guarantee of atomicity if the atomic operations to the same memory location are being performed by kernels executing on multiple devices. Atomic operations on 64-bit integers and 32-bit integers (and float) are also atomic with regard to each other. Specification OpenCL Specification Also see Atomic Functions, atomic_xchg, cl_khr_int64_base_atomics khronos-opencl-man-1.0~svn27110/tgamma.xml0000644000175000017500000000765011660441607020263 0ustar mathieumathieu ]> tgamma tgamma 2007-2011 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. 3 tgamma Gamma function. gentype tgamma gentype Description tgamma computes the gamma. Notes &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/vstoren.xml0000644000175000017500000001570511660441607020515 0ustar mathieumathieu ]> vstoren vstoren 2007-2011 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. 3 vstoren Write sizeof bytes (gentypen) to memory. void vstoren gentypendata size_toffset __global gentype*p void vstoren gentypendata size_toffset __local gentype*p void vstoren gentypendata size_toffset __private gentype*p Description Write sizeof(gentypen) bytes given by data to address (p + (offset * n)). The address computed as (p + (offset * n)) must be 8-bit aligned if gentype is char or uchar; 16-bit aligned if gentype is short, ushort, or half; 32-bit aligned if gentype is int, uint, or float; 64-bit aligned if gentype is long or ulong. Notes &vectorFunctionsInc; &vectorHalfFunctionsInc; vstore3, and vstore_half3 write x, y, z components from a 3-component vector to address (p + (offset * 3)). Specification OpenCL Specification Also see Vector Data Load and Store Functions khronos-opencl-man-1.0~svn27110/clWaitForEvents.xml0000644000175000017500000001625311660441607022073 0ustar mathieumathieu clWaitForEvents clWaitForEvents 2007-2011 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. 3 clWaitForEvents Waits on the host thread for commands identified by event objects to complete. cl_int clWaitForEvents cl_uintnum_events const cl_event*event_list Parameters event_list The events specified in event_list act as synchronization points. Notes Waits on the host thread for commands identified by event objects in event_list to complete. A command is considered complete if its execution status is CL_COMPLETE or a negative value. The events specified in event_list act as synchronization points. If the cl_khr_gl_event extension is enabled, event objects can also be used to reflect the status of an OpenGL sync object. The sync object in turn refers to a fence command executing in an OpenGL command stream. This provides another method of coordinating sharing of buffers and images between OpenGL and OpenCL. Errors Returns CL_SUCCESS if the execution status of all events in event_list is CL_COMPLETE. Otherwise, it returns one of the following errors: CL_INVALID_VALUE if num_events is zero or event_list is NULL.. CL_INVALID_CONTEXT if events specified in event_list do not belong to the same context. CL_INVALID_EVENT if event objects specified in event_list are not valid event objects. CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the execution status of any of the events in event_list is a negative integer value. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clGetEventInfo, clReleaseEvent, clRetainEvent, cl_khr_gl_event khronos-opencl-man-1.0~svn27110/clRetainContext.xml0000644000175000017500000001454011660441607022117 0ustar mathieumathieu clRetainContext clRetainContext 2007-2011 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. 3 clRetainContext Increment the context reference count. cl_int clRetainContext cl_contextcontext Parameters context The context to retain. Notes clCreateContext and clCreateContextFromType perform an implicit retain. This is very helpful for 3rd party libraries, which typically get a context passed to them by the application. However, it is possible that the application may delete the context without informing the library. Allowing functions to attach to (i.e. retain) and release a context solves the problem of a context being used by a library no longer being valid. Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following values: CL_INVALID_CONTEXT if context is not a valid OpenCL context. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clCreateContext, clCreateContextFromType, clGetContextInfo, clReleaseContext, clGetContextInfo khronos-opencl-man-1.0~svn27110/relationalFunctionsInc3.xml0000644000175000017500000000111211660441607023540 0ustar mathieumathieu The relational functions isequal, isgreater, isgreaterequal, isless, islessequal, and islessgreater always return 0 if either argument is not a number (NaN). isnotequal returns 1 if one or both arguments are not a number (NaN) and the argument type is a scalar and returns -1 if one or both arguments are not a number (NaN) and the argument type is a vector. khronos-opencl-man-1.0~svn27110/clRetainKernel.xml0000644000175000017500000001347611660441607021722 0ustar mathieumathieu clRetainKernel clRetainKernel 2007-2011 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. 3 clRetainKernel Increments the kernel object reference count. cl_int clRetainKernel cl_kernelkernel Notes clCreateKernel or clCreateKernelsInProgram do an implicit retain. Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_KERNEL if kernel is not a valid kernel object. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clCreateKernel, clCreateKernelsInProgram, clReleaseKernel, clSetKernelArg, clGetKernelInfo, clGetKernelWorkGroupInfo khronos-opencl-man-1.0~svn27110/atomic_dec.xml0000644000175000017500000001465011660441607021102 0ustar mathieumathieu atomic_dec atomic_dec 2007-2011 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. 3 atomic_dec atomic_dec functions. int atomic_dec volatile __global int*p unsigned int atomic_dec volatile __global unsigned int*p int atomic_dec volatile __local int*p unsigned int atomic_dec volatile __local unsigned int*p Description Read the 32-bit value (referred to as old) stored at location pointed by p. Compute (old - 1) and store result at location pointed by p. The function returns old. A 64-bit version of this function, atom_dec, is enabled by cl_khr_int64_base_atomics. Specification OpenCL Specification Also see Atomic Functions, atom_dec khronos-opencl-man-1.0~svn27110/cl_khr_3d_image_writes.xml0000644000175000017500000001216211660441607023376 0ustar mathieumathieu cl_khr_3d_image_writes cl_khr_3d_image_writes 2007-2011 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. 3 cl_khr_3d_image_writes Extension to enable writes to 3D image memory objects. #pragma OPENCL EXTENSION cl_khr_3d_image_writes : enable Description OpenCL supports 2D image memory objects that can be read or written by kernels. Reads and writes to the same 2D image memory object are not supported in a kernel. OpenCL also supports reads to 3D image memory objects in kernels. Writes to a 3D image memory object are not supported unless the cl_khr_3d_image_writes extension is implemented. Reads and writes to the same 3D image memory object are not allowed in a kernel. An application that wants to use this extension to write to 3D image memory objects will need to include the #pragma OPENCL EXTENSION cl_khr_3d_image_writes : enable directive in the OpenCL program source. The built-in 3d image write functions are implemented by the cl_khr_3d_image_writes extension. Specification OpenCL Specification Also see EXTENSION, cl_image_format, Image Functions khronos-opencl-man-1.0~svn27110/atomic_xchg.xml0000644000175000017500000002047211660441607021277 0ustar mathieumathieu atomic_xchg atomic_xchg 2007-2011 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. 3 atomic_xchg atomic_xchg functions. int atomic_xchg volatile __global int*p intval unsigned int atomic_xchg volatile __global unsigned int*p unsigned intval float atomic_xchg volatile __global float*p floatval int atomic_xchg volatile __local int*p intval unsigned int atomic_xchg volatile __local unsigned int*p unsigned intval float atomic_xchg volatile __local float*p floatval Description Swaps the old value stored at location p with new value given by val. The function returns old. A 64-bit version of this function, atom_xchg, is enabled by cl_khr_int64_base_atomics. Specification OpenCL Specification Also see Atomic Functions, atom_xchg khronos-opencl-man-1.0~svn27110/atom_add.xml0000644000175000017500000001725011660441607020562 0ustar mathieumathieu atom_add atom_add 2007-2011 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. 3 atom_add 64-bit atom_add functions. long atom_add volatile __global long*p longval long atom_add volatile __local long*p longval ulong atom_add volatile __global ulong*p ulongval ulong atom_add volatile __local ulong*p ulongval Description Read the 64-bit value (referred to as old) stored at location pointed by p. Compute (old + val) and store result at location pointed by p. The function returns old. An application that wants to use this extension will need to include the #pragma OPENCL EXTENSION cl_khr_int64_base_atomics : enable in the OpenCL program source. This function is performed in one atomic transaction. These transactions are atomic for the device executing these atomic functions. There is no guarantee of atomicity if the atomic operations to the same memory location are being performed by kernels executing on multiple devices. Atomic operations on 64-bit integers and 32-bit integers (and float) are also atomic with regard to each other. Specification OpenCL Specification Also see Atomic Functions, atomic_add, cl_khr_int64_base_atomics khronos-opencl-man-1.0~svn27110/classDiagram.xml0000644000175000017500000001077411660441607021410 0ustar mathieumathieu class diagram rint 2007-2011 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. 3 Class diagram OpenCL UML Class Diagram Description The diagram above represents the OpenCL specification as a class diagram using the Unified Modeling Language* (UML) notation. The diagram shows both nodes and edges which are classes and their relationships. As a simplification it shows only classes, and no attributes or operations. As for relationships it shows aggregations (annotated with a solid diamond), associations (no annotation), and inheritance (annotated with an open arrowhead). The cardinality of a relationship is shown on each end of it. A cardinality of "*" represents "many", a cardinality of "1" represents "one and only one" and a cardinality of "0:1" represents "optionally one". The navigability of a relationship is shown using a regular arrowhead. *Unified Modeling Language (http://www.uml.org/) is a trademark of Object Management Group (OMG). Specification OpenCL Specification khronos-opencl-man-1.0~svn27110/clGetSupportedImageFormats.xml0000644000175000017500000003056711660441607024263 0ustar mathieumathieu ]> clGetSupportedImageFormats clGetSupportedImageFormats 2007-2011 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. 3 clGetSupportedImageFormats Get the list of image formats supported by an OpenCL implementation. cl_int clGetSupportedImageFormats cl_contextcontext cl_mem_flagsflags cl_mem_object_typeimage_type cl_uintnum_entries cl_image_format*image_formats cl_uint*num_image_formats Parameters context A valid OpenCL context on which the image object(s) will be created. flags A bit-field that is used to specify allocation and usage information about the image memory object being created and is described in the table below. &clCreate_memflagsInc; image_type Describes the image type and must be either CL_MEM_OBJECT_IMAGE1D, CL_MEM_OBJECT_IMAGE1D_BUFFER, CL_MEM_OBJECT_IMAGE2D, CL_MEM_OBJECT_IMAGE3D, CL_MEM_OBJECT_IMAGE1D_ARRAY or CL_MEM_OBJECT_IMAGE2D_ARRAY. num_entries Specifies the number of entries that can be returned in the memory location given by image_formats. image_formats A pointer to a memory location where the list of supported image formats are returned. Each entry describes a cl_image_format structure supported by the OpenCL implementation. If image_formats is NULL, it is ignored. num_image_formats The actual number of supported image formats for a specific context and values specified by flags. If num_image_formats is NULL, it is ignored. Notes clGetSupportedImageFormats can be used to get the list of image formats supported by an OpenCL implementation when the following information about an image memory object is specified: Context Image type - 1D, 2D, or 3D image, 1D image buffer, 1D or 2D image array. Image object allocation information clGetSupportedImageFormats returns a union of image formats supported by all devices in the context. For 2D and 3D image objects, the mandated minimum list of image formats that must be supported by all devices (for reading and writing) that support images is described in the table below: image_num_channels image_channel_order image_channel_data_type 4 CL_RGBA CL_UNORM_INT8 CL_UNORM_INT16 CL_SIGNED_INT8 CL_SIGNED_INT16 CL_SIGNED_INT32 CL_UNSIGNED_INT8 CL_UNSIGNED_INT16 CL_UNSIGNED_INT32 CL_HALF_FLOAT CL_FLOAT 4 CL_BGRA CL_UNORM_INT8 If CL_DEVICE_IMAGE_SUPPORT specified in the table of OpenCL Device Queries for clGetDeviceInfo is CL_TRUE, the values assigned to CL_DEVICE_MAX_READ_IMAGE_ARGS, CL_DEVICE_MAX_WRITE_IMAGE_ARGS, CL_DEVICE_IMAGE2D_MAX_WIDTH, CL_DEVICE_IMAGE2D_MAX_HEIGHT, CL_DEVICE_IMAGE3D_MAX_WIDTH, CL_DEVICE_IMAGE3D_MAX_HEIGHT, CL_DEVICE_IMAGE3D_MAX_DEPTH, and CL_DEVICE_MAX_SAMPLERS by the implementation must be greater than or equal to the minimum values specified in the table of allowed values for param_name for clGetDeviceInfo Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns a NULL value with one of the following errors: CL_INVALID_CONTEXT if context is not a valid context. CL_INVALID_VALUE if flags or image_type are not valid, or if num_entries is 0 and image_formats is not NULL. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see cl_image_format khronos-opencl-man-1.0~svn27110/asyncCopyFunctions.xml0000644000175000017500000001006411660441607022647 0ustar mathieumathieu Async Copy and Prefetch Functions Async Copy and Prefetch Functions 2007-2011 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. 3 Async Copy and Prefetch Functions Asynchronous copies between global and local memory and a prefetch from global memory. async_work_group_copy Perform an async copy async_work_group_strided_copy Performs an async gather of num_elements gentype elements from source to destination. wait_group_events Wait for events that identify the async_work_group_copy operations to complete. prefetch Prefetch bytes into the global cache. Description The OpenCL C programming language implements these functions that provide asynchronous copies between global and local memory and a prefetch from global memory. Specification OpenCL Specification khronos-opencl-man-1.0~svn27110/clLinkProgram.xml0000644000175000017500000004376711660441607021572 0ustar mathieumathieu ]> clLinkProgram clLinkProgram 2007-2011 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. 3 clLinkProgram Links a set of compiled program objects and libraries for all the devices or a specific device(s) in the OpenCL context and creates an executable. cl_program clLinkProgram cl_contextcontext cl_uintnum_devices const cl_device_id*device_list const char*options cl_uintnum_input_programs const cl_program*input_programs void(CL_CALLBACK *pfn_notify) (cl_program program, void *user_data) void*user_data cl_int*errcode_ret Parameters context Must be a valid OpenCL context. device_list A pointer to a list of devices that are in context. If device_list is a NULL value, the link is performed for all devices associated with context for which a compiled object is available. If device_list is a non-NULL value, the compile is performed for devices specified in this list for which a source has been loaded. num_devices The number of devices listed in device_list. options A pointer to a null-terminated string of characters that describes the link options to be used for building the program executable. See clBuildProgram for a list of supported compiler and linker options. num_input_programs Specifies the number of programs in array referenced by input_programs. input_programs An array of program objects that are compiled binaries or libraries that are to be linked to create the program executable. For each device in device_list or if device_list is NULL the list of devices associated with context, the following cases occur: All programs specified by input_programs contain a compiled binary or library for the device. In this case, a link is performed to generate a program executable for this device. None of the programs contain a compiled binary or library for that device. In this case, no link is performed and there will be no program executable generated for this device. All other cases will return a CL_INVALID_OPERATION error. pfn_notify A function pointer to a notification routine. The notification routine is a callback function that an application can register and which will be called when the program executable has been built (successfully or unsuccessfully). If pfn_notify is not NULL, clLinkProgram does not need to wait for the linker to complete and can return immediately once the linking operation can begin. Once the linker has completed, the pfn_notify callback function is called which returns the program object returned by clLinkProgram. The application can query the link status and log for this program object. This callback function may be called asynchronously by the OpenCL implementation. It is the application’s responsibility to ensure that the callback function is thread-safe. If pfn_notify is NULL, clLinkProgram does not return until the linker has completed. user_data Will be passed as an argument when pfn_notify is called. user_data can be NULL. Notes clLinkProgram creates a new program object which contains this executable. The executable binary can be queried using clGetProgramInfo(program, CL_PROGRAM_BINARIES, ...) and can be specified to clCreateProgramWithBinary to create a new program object. The devices associated with the returned program object will be the list of devices specified by device_list or if device_list is NULL it will be the list of devices associated with context. The linking operation can begin if the context, list of devices, input programs and linker options specified are all valid and appropriate host and device resources needed to perform the link are available. If the linking operation can begin, clLinkProgram returns a valid non-zero program object. Errors If pfn_notify is NULL, the errcode_ret will be set to CL_SUCCESS if the link operation was successful and CL_LINK_FAILURE if there is a failure to link the compiled binaries and/or libraries. If pfn_notify is not NULL, clLinkProgram does not have to wait until the linker to complete and can return CL_SUCCESS in errcode_ret if the linking operation can begin. The pfn_notify callback function will return a CL_SUCCESS or CL_LINK_FAILURE if the linking operation was successful or not. Otherwise clLinkProgram returns a NULL program object with an appropriate error in errcode_ret. The application should query the linker status of this program object to check if the link was successful or not. The list of errors that can be returned are: CL_INVALID_CONTEXT if context is not a valid context. CL_INVALID_VALUE if device_list is NULL and num_devices is greater than zero, or if device_list is not NULL and num_devices is zero. CL_INVALID_VALUE if num_input_programs is zero and input_programs is NULL or if num_input_programs is zero and input_programs is not NULL or if num_input_programs is not zero and input_programs is NULL. CL_INVALID_PROGRAM if programs specified in input_programs are not valid program objects. CL_INVALID_VALUE if pfn_notify is NULL but user_data is not NULL. CL_INVALID_DEVICE if OpenCL devices listed in device_list are not in the list of devices associated with context. CL_INVALID_LINKER_OPTIONS if the linker options specified by options are invalid CL_INVALID_OPERATION if the compilation or build of a program executable for any of the devices listed in device_list by a previous call to clCompileProgram or clBuildProgram for program has not completed. CL_INVALID_OPERATION if the rules for devices containing compiled binaries or libraries as described in input_programs argument above are not followed. CL_LINKER_NOT_AVAILABLE if a linker is not available i.e. CL_DEVICE_LINKER_AVAILABLE specified in the table of allowed values for param_name for clGetDeviceInfo is set to CL_FALSE. CL_LINK_PROGRAM_FAILURE if there is a failure to link the compiled binaries and/or libraries. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clGetDeviceInfo khronos-opencl-man-1.0~svn27110/read_imageh1d.xml0000644000175000017500000002756011660441607021471 0ustar mathieumathieu [ ]> read_imageh (1D, Half) read_image (1D, Half) 2007-2011 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. 3 read_imageh (1D, Half) Do an element lookup in the 1D image object, returning half floating-point values. half4 read_imageh image1d_t image sampler_t sampler int coord half4 read_imageh image1d_t image sampler_t sampler float coord half4 read_imageh image1d_t image int coord half4 read_imageh image1d_buffer_t image int coord half4 read_imageh image1d_array_t image int2 coord half4 read_imageh image1d_array_t image sampler_t sampler int2 coord half4 read_imageh image1d_array_t image sampler_t sampler float4 coord Description For forms that take an image1d_t, use the coordinate (x, y) to do an element lookup in the 1D image object specified by image. For forms that take an image1d_array_t, Use coord.x to do an element lookup in the 1D image identified by coord.y in the 1D image array specified by image. The samplerless read image functions behave exactly as the corresponding read image functions that take integer coordinates and a sampler with filter mode set to CLK_FILTER_NEAREST, normalized coordinates set to CLK_NORMALIZED_COORDS_FALSE and addressing mode to CLK_ADDRESS_NONE. read_imageh returns half floating-point values in the range [0.0... 1.0] for image objects created with image_channel_data_type set to one of the predefined packed formats or CL_UNORM_INT8 or CL_UNORM_INT16. read_imageh returns half floating-point values in the range [-1.0... 1.0] for image objects created with image_channel_data_type set to CL_SNORM_INT8, or CL_SNORM_INT16. read_imageh returns half floating-point values for image objects created with image_channel_data_type set to CL_HALF_FLOAT. The read_imageh calls that take integer coordinates must use a sampler with filter mode set to CLK_FILTER_NEAREST, normalized coordinates set to CLK_NORMALIZED_COORDS_FALSE and addressing mode set to CLK_ADDRESS_CLAMP_TO_EDGE, CLK_ADDRESS_CLAMP or CLK_ADDRESS_NONE; otherwise the values returned are undefined. Values returned by read_imageh for image objects with image_channel_data_type values not specified in the description above are undefined. Notes General information about the read_image* functions follows. &imageFunctionsInc; &imageMappingInc; Specification OpenCL Specification Also see Image Functions khronos-opencl-man-1.0~svn27110/reservedDataTypes.xml0000644000175000017500000002045611660441607022452 0ustar mathieumathieu Reserved Data Types Reserved Data Types 2007-2011 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. 3 Reserved Data Types Built-in reserved Data Types. Description The data type names described in the table below are reserved and cannot be used by applications as user-defined type names. The vector data type names defined in Vector Data Types, but where n is any value other than 2, 3, 4, 8 and 16, are also reserved. Type Description booln A boolean vector. halfn A 16-bit float vector. quad, quadn A 128-bit floating-point number and vectors. complex half, complex halfn, imaginary half, imaginary halfn Complex and imaginary 16-bit floating-point scalar and vector. complex float, complex floatn, imaginary float, imaginary floatn Complex and imaginary 32-bit floating-point scalar and vector. complex double, complex doublen, imaginary double, imaginary doublen Complex and imaginary 64-bit floating-point scalar and vector. complex quad, complex quadn, imaginary quad, imaginary quadn Complex and imaginary 128-bit floating-point scalar and vector. floatnxm An n x m matrix of single precision floating-point values stored in column-major order. doublenxm An n x m matrix of double precision floating-point values stored in column-major order. long double, long doublen A floating-point scalar and vector type with at long doublen least as much precision and range as a double and no more precision and range than a quad. long long, long longn A 128-bit signed integer scalar and vector. unsigned long long, ulong long, ulong longn A 128-bit unsigned integer scalar and vector. Specification OpenCL Specification Also see Macros and Limits, Scalar Data Types, Vector Data Types, Other Data Types, Abstract Data Types, Enumerated Data Types, khronos-opencl-man-1.0~svn27110/gl_syncInc.xml0000644000175000017500000000730011660441607021075 0ustar mathieumathieu In order to ensure data integrity, the application is responsible for synchronizing access to shared CL/GL objects by their respective APIs. Failure to provide such synchronization may result in race conditions and other undefined behavior including non-portability between implementations. Prior to calling clEnqueueAcquireGLObjects, the application must ensure that any pending GL operations which access the objects specified in mem_objects have completed. This may be accomplished portably by issuing and waiting for completion of a glFinish command on all GL contexts with pending references to these objects. Implementations may offer more efficient synchronization methods; for example on some platforms calling glFlush may be sufficient, or synchronization may be implicit within a thread, or there may be vendor-specific extensions that enable placing a fence in the GL command stream and waiting for completion of that fence in the CL command queue. Note that no synchronization methods other than glFinish are portable between OpenGL implementations at this time. Similarly, after calling clEnqueueReleaseGLObjects, the application is responsible for ensuring that any pending OpenCL operations which access the objects specified in mem_objects have completed prior to executing subsequent GL commands which reference these objects. This may be accomplished portably by calling clWaitForEvents with the event object returned by clEnqueueReleaseGLObjects, or by calling clFinish. As above, some implementations may offer more efficient methods. The application is responsible for maintaining the proper order of operations if the CL and GL contexts are in separate threads. If a GL context is bound to a thread other than the one in which clEnqueueReleaseGLObjects is called, changes to any of the objects in mem_objects may not be visible to that context without additional steps being taken by the application. For an OpenGL 3.1 (or later) context, the requirements are described in Appendix D ("Shared Objects and Multiple Contexts") of the OpenGL 3.1 Specification. For prior versions of OpenGL, the requirements are implementation-dependent. Attempting to access the data store of an OpenGL object after it has been acquired by OpenCL and before it has been released will result in undefined behavior. Similarly, attempting to access a shared CL/GL object from OpenCL before it has been acquired by the OpenCL command queue, or after it has been released, will result in undefined behavior. If the cl_khr_gl_event extension is supported, then the OpenCL implementation will ensure that any such pending OpenGL operations are complete for an OpenGL context bound to the same thread as the OpenCL context. This is referred to as implicit synchronization. khronos-opencl-man-1.0~svn27110/miscVectorFunctions.xml0000644000175000017500000000674311660441607023026 0ustar mathieumathieu Miscellaneous Vector Functions Miscellaneous Vector Functions 2007-2011 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. 3 Miscellaneous Vector Functions The table below describes the list of built-in miscelaneous vector functions. vec_step Takes a built-in scalar or vector data type argument and returns an integer value representing the number of elements in the scalar or vector. shuffle, shuffle2 Constructs a permutation of elements from one (or two) input vectors Specification OpenCL Specification Also see cl_khr_fp16 khronos-opencl-man-1.0~svn27110/frexp.xml0000644000175000017500000004147511660441607020144 0ustar mathieumathieu frexp frexp 2007-2011 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. 3 frexp Extract mantissa and exponent. floatn frexp floatn x __global intn *exp floatn frexp floatn x __local intn *exp floatn frexp floatn x __private intn *exp float frexp float x __global int *exp float frexp float x __local int *exp float frexp float x __private int *exp doublen frexp doublen x __global intn *exp doublen frexp doublen x __local intn *exp doublen frexp doublen x __private intn *exp double frexp double x __global int *exp double frexp double x __local int *exp double frexp double x __private int *exp halfn frexp halfn x __global intn *exp halfn frexp halfn x __local intn *exp halfn frexp halfn x __private intn *exp half frexp half x __global int *exp half frexp half x __local int *exp half frexp half x __private int *exp Description Extract mantissa and exponent from x. For each component the mantissa returned is a float with magnitude in the interval [1/2, 1) or 0. Each component of x equals mantissa returned * 2exp. Notes The built-in math functions are not affected by the prevailing rounding mode in the calling environment, and always return the same value as they would if called with the round to nearest even rounding mode. An application that wants to use half and halfn types will need to include the #pragma OPENCL EXTENSION cl_khr_fp16 : enable directive. Specification OpenCL Specification Also see Math Functions khronos-opencl-man-1.0~svn27110/clCreateUserEvent.xml0000644000175000017500000001425011660441607022372 0ustar mathieumathieu clCreateUserEvent clCreateUserEvent 2007-2011 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. 3 clCreateUserEvent Creates a user event object. cl_event clCreateUserEvent cl_contextcontext cl_int*errcode_ret Parameters context A valid OpenCL context used to create the user event object. errcode_ret Returns an appropriate error code. If errcode_ret is NULL, no error code is returned. Notes User events allow applications to enqueue commands that wait on a user event to finish before the command is executed by the device. The execution status of the user event object created is set to CL_SUBMITTED. Errors Returns a valid non-zero buffer object and errcode_ret is set to CL_SUCCESS if the user event object is created successfully. Otherwise, it returns a NULL value with one of the following error values returned in errcode_ret: CL_INVALID_CONTEXT if context is not a valid context. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see Cardinality Diagram khronos-opencl-man-1.0~svn27110/clEnqueueCopyBufferToImage.xml0000644000175000017500000004444311660441607024177 0ustar mathieumathieu clEnqueueCopyBufferToImage clEnqueueCopyBufferToImage 2007-2011 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. 3 clEnqueueCopyBufferToImage Enqueues a command to copy a buffer object to an image object. cl_int clEnqueueCopyBufferToImage cl_command_queuecommand_queue cl_memsrc_buffer cl_mem dst_image size_tsrc_offset const size_t*dst_origin const size_t*region cl_uintnum_events_in_wait_list const cl_event*event_wait_list cl_event*event Parameters command_queue A valid command-queue. The OpenCL context associated with command_queue, src_buffer, and dst_image must be the same. src_buffer A valid buffer object. dst_image A valid image object. src_offset The offset where to begin copying data from src_buffer. dst_origin Defines the (x, y, z) offset in pixels in the 1D, 2D or 3D image, the (x, y) offset and the image index in the 2D image array or the (x) offset and the image index in the 1D image array. If dst_image is a 2D image object, dst_origin[2] must be 0. If dst_image is a 1D image or 1D image buffer object, dst_origin[1] and dst_origin[2] must be 0. If dst_image is a 1D image array object, dst_origin[2] must be 0. If dst_image is a 1D image array object, dst_origin[1] describes the image index in the 1D image array. If dst_image is a 2D image array object, dst_origin[2] describes the image index in the 2D image array. region Defines the (width, height, depth) in pixels of the 1D, 2D or 3D rectangle, the (width, height) in pixels of the 2D rectangle and the number of images of a 2D image array or the (width) in pixels of the 1D rectangle and the number of images of a 1D image array. If dst_image is a 2D image object, region[2] must be 1. If dst_image is a 1D image or 1D image buffer object, region[1] and region[2] must be 1. If dst_image is a 1D image array object, region[2] must be 1. The size in bytes of the region to be copied from src_buffer referred to as src_cb is computed as width * height * depth * bytes/image_element if dst_image is a 3D image object, is computed as width * height * bytes/image_element if dst_image is a 2D image, is computed as width * height * arraysize * bytes/image_element if dst_image is a 2D image array object, is computed as width * bytes/image_element if dst_image is a 1D image or 1D image buffer object and is computed as width * arraysize * bytes/image_element if dst_image is a 1D image array object. event_wait_list , num_events_in_wait_list Specify events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event_wait_list act as synchronization points. The context associated with events in event_wait_list and command_queue must be the same. The memory associated with event_wait_list can be reused or freed after the function returns. event Returns an event object that identifies this particular copy command and can be used to query or queue a wait for this particular command to complete. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. clEnqueueBarrierWithWaitList can be used instead. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the event_wait_list array. Errors clEnqueueCopyBufferToImage returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_CONTEXT if the context associated with command_queue, src_buffer and dst_image are not the same or if the context associated with command_queue and events in event_wait_list are not the same. CL_INVALID_MEM_OBJECT if src_buffer is not a valid buffer object and dst_image is not a valid image object or if dst_image is a 1D image buffer object created from src_buffer. CL_INVALID_VALUE if the 1D, 2D, or 3D rectangular region specified by dst_origin and dst_origin + region refers to a region outside dst_origin, or if the region specified by src_offset and src_offset + src_cb refers to a region outside src_buffer. CL_INVALID_VALUE if values in dst_origin and region do not follow rules described in the argument description for dst_origin and region. CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_MISALIGNED_SUB_BUFFER_OFFSET if src_buffer is a sub-buffer object and offset specified when the sub-buffer object is created is not aligned to CL_DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue. CL_INVALID_IMAGE_SIZE if image dimensions (image width, height, specified or compute row and/or slice pitch) for dst_image are not supported by device associated with queue. CL_INVALID_IMAGE_FORMAT if image format (image channel order and data type) for dst_image are not supported by device associated with queue. CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with src_buffer or dst_image. CL_INVALID_OPERATION if the device associated with command_queue does not support images (i.e. CL_DEVICE_IMAGE_SUPPORT specified in the table of OpenCL Device Queries for clGetDeviceInfo is CL_FALSE). CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clEnqueueReadBuffer, clEnqueueWriteBuffer, clCreateBuffer, clEnqueueCopyBuffer, clEnqueueCopyImageToBuffer khronos-opencl-man-1.0~svn27110/read_imagei2d.xml0000644000175000017500000004077411660441607021475 0ustar mathieumathieu [ ]> read_imagei (2D) read_imagei (2D) 2007-2011 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. 3 read_image{i|ui} (2D) Do an element lookup in the 2D image object, returning unnormalized signed integer and unsigned integer values. int4 read_imagei image2d_t image sampler_t sampler int2 coord int4 read_imagei image2d_t image sampler_t sampler float2 coord uint4 read_imageui image2d_t image sampler_t sampler int2 coord int4 read_imagei image2d_t image int2 coord uint4 read_imageui image2d_t image int2 coord int4 read_imagei image2d_array_t image int4 coord uint4 read_imageui image2d_array_t image int4 coord int4 read_imagei image2d_array_t image sampler_t sampler int4 coord int4 read_imagei image2d_array_t image sampler_t sampler float4 coord int4 read_imageui image2d_array_t image sampler_t sampler int4 coord int4 read_imageui image2d_array_t image sampler_t sampler float4 coord uint4 read_imageui image2d_array_t image sampler_t sampler int4 coord uint4 read_imageui image2d_array_t image sampler_t sampler float4 coord Description For the forms that take an image2d_t object, use the coordinate (coord.x, coord.y) to do an element lookup in the 2D image object specified by image. For the forms that take an image2d_array_t object, use coord.xy to do an element lookup in the 2D image identified by coord.z in the 2D image array specified by image. The samplerless read image functions behave exactly as the corresponding read image functions that take integer coordinates and a sampler with filter mode set to CLK_FILTER_NEAREST, normalized coordinates set to CLK_NORMALIZED_COORDS_FALSE and addressing mode to CLK_ADDRESS_NONE. read_imagei and read_imageui return unnormalized signed integer and unsigned integer values respectively. Each channel will be stored in a 32-bit integer. read_imagei can only be used with image objects created with image_channel_data_type set to one of the following values: CL_SIGNED_INT8, CL_SIGNED_INT16, or CL_SIGNED_INT32. If the image_channel_data_type is not one of the above values, the values returned by read_imagei are undefined. read_imageui can only be used with image objects created with image_channel_data_type set to one of the following values: CL_UNSIGNED_INT8, CL_UNSIGNED_INT16, and CL_UNSIGNED_INT32. If the image_channel_data_type is not one of the above values, the values returned by read_imageui are undefined. The read_imagei and read_imageui calls support a nearest filter only. The filter_mode specified in sampler must be set to CLK_FILTER_NEAREST; otherwise the values returned are undefined. Furthermore, the read_imagei and read_imageui calls that take integer coordinates must use a sampler with normalized coordinates set to CLK_NORMALIZED_COORDS_FALSE and addressing mode set to CLK_ADDRESS_CLAMP_TO_EDGE, CLK_ADDRESS_CLAMP or CLK_ADDRESS_NONE; otherwise the values returned are undefined. Notes &imageFunctionsInc; &imageMappingInc; Specification OpenCL Specification Also see Image Functions khronos-opencl-man-1.0~svn27110/clRetainDevice.xml0000644000175000017500000001403211660441607021666 0ustar mathieumathieu clRetainDevice clRetainDevice 2007-2011 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. 3 clRetainDevice Increments the devices reference count. cl_int clRetainDevice cl_device_id device Notes Increments the device reference count if device is a valid sub-device created by a call to clCreateSubDevices. If device is a root level device i.e. a cl_device_id returned by clGetDeviceIDs, the device reference count remains unchanged. Errors Returns CL_SUCCESS if the function is executed successfully or the device is a root-level device. Otherwise, it returns one of the following errors: CL_INVALID_DEVICE if device is not a valid sub-device created by a call to clCreateSubDevices. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clCreateSubDevices, clGetDeviceIDs, clReleaseDevice khronos-opencl-man-1.0~svn27110/rint.xml0000644000175000017500000001021711660441607017762 0ustar mathieumathieu ]> rint rint 2007-2011 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. 3 rint Round to nearest even integer. gentype rint gentype Description Round to integral value (using round to nearest even rounding mode) in floating-point format. Notes rint always rounds according to round to nearest even rounding mode even if the caller is in some other rounding mode. &mathFunctionsInc; Specification OpenCL Specification Also see Math Functions, khronos-opencl-man-1.0~svn27110/mul_hi.xml0000644000175000017500000001031111660441607020256 0ustar mathieumathieu ]> mul_hi mul_hi 2007-2011 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. 3 mul_hi Returns the high half of the product of x and y. gentype mul_hi gentypex gentypey Description mul_hi computes x * y and returns the high half of the product of x and y. Notes &integerFunctionsInc; Specification OpenCL Specification Also see Integer Functions khronos-opencl-man-1.0~svn27110/clIcdGetPlatformIDsKHR.xml0000644000175000017500000001560311660441607023142 0ustar mathieumathieu clIcdGetPlatformIDsKHR clIcdGetPlatformIDsKHR 2007-2011 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. 3 clIcdGetPlatformIDsKHR Obtain the list of platforms accessible through the Khronos ICD Loader. cl_int clIcdGetPlatformIDsKHR cl_uint num_entries cl_platform_id *platforms cl_uint *num_platforms Parameters num_entries The number of cl_platform_id entries that can be added to platforms. If platforms is not NULL, then num_entries must be greater than zero. platforms Returns a list of OpenCL platforms available for access through the Khronos ICD Loader. The cl_platform_id values returned in platforms are ICD compatible and can be used to identify a specific OpenCL platform. If the platforms argument is NULL, then this argument is ignored. The number of OpenCL platforms returned is the minimum of the value specified by num_entries or the number of OpenCL platforms available. num_platforms Returns the number of OpenCL platforms available. If num_platforms is NULL, then this argument is ignored. Notes This function is enabled by the cl_khr_icd extension. Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns the following: CL_PLATFORM_NOT_FOUND_KHR if zero platforms are available. CL_INVALID_VALUE if num_entries is equal to zero and platforms is not NULL or if both num_platforms and platforms are NULL. Specification OpenCL Specification Also see clGetPlatformIDs, cl_khr_icd khronos-opencl-man-1.0~svn27110/clReleaseCommandQueue.xml0000644000175000017500000001331111660441607023207 0ustar mathieumathieu clReleaseCommandQueue clReleaseCommandQueue 2007-2011 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. 3 clReleaseCommandQueue Decrements the command_queue reference count. cl_int clReleaseCommandQueue cl_command_queuecommand_queue Parameters command_queue Specifies the command-queue to release. Notes After the command_queue reference count becomes zero and all commands queued to command_queue have finished (e.g., kernel executions, memory object updates, etc.), the command-queue is deleted. clReleaseCommandQueue performs an implicit flush to issue any previously queued OpenCL commands in command_queue. Errors Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following: CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command queue. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. Specification OpenCL Specification Also see clCreateCommandQueue, clGetCommandQueueInfo, clRetainCommandQueue khronos-opencl-man-1.0~svn27110/clEnqueueCopyImage.xml0000644000175000017500000004754311660441607022546 0ustar mathieumathieu clEnqueueCopyImage clEnqueueCopyImage 2007-2011 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. 3 clEnqueueCopyImage Enqueues a command to copy image objects. cl_int clEnqueueCopyImage cl_command_queuecommand_queue cl_memsrc_image cl_memdst_image const size_t*src_origin const size_t*dst_origin const size_t*region cl_uintnum_events_in_wait_list const cl_event*event_wait_list cl_event*event Parameters command_queue Refers to the command-queue in which the copy command will be queued. The OpenCL context associated with command_queue, src_image and dst_image must be the same. src_image, dst_image, Can be 1D, 2D, 3D image or a 1D, 2D image array objects allowing us to perform the following actions: Copy a 1D image object to a 1D image object. Copy a 1D image object to a scanline of a 2D image object and vice-versa. Copy a 1D image object to a scanline of a 2D slice of a 3D image object and vice-versa. Copy a 1D image object to a scanline of a specific image index of a 1D or 2D image array object and vice-versa. Copy a 2D image object to a 2D image object. Copy a 2D image object to a 2D slice of a 3D image object and vice-versa. Copy a 2D image object to a specific image index of a 2D image array object and vice versa. Copy images from a 1D image array object to a 1D image array object. Copy images from a 2D image array object to a 2D image array object. Copy a 3D image object to a 3D image object. src_origin Defines the (x, y, z) offset in pixels in the 1D, 2D or 3D image, the (x, y) offset and the image index in the 2D image array or the (x) offset and the image index in the 1D image array. If image is a 2D image object, src_origin[2] must be 0. If src_image is a 1D image object, src_origin[1] and src_origin[2] must be 0. If src_image is a 1D image array object, src_origin[2] must be 0. If src_image is a 1D image array object, src_origin[1] describes the image index in the 1D image array. If src_image is a 2D image array object, src_origin[2] describes the image index in the 2D image array. dst_origin Defines the (x, y, z) offset in pixels in the 1D, 2D or 3D image, the (x, y) offset and the image index in the 2D image array or the (x) offset and the image index in the 1D image array. If dst_image is a 2D image object, dst_origin[2] must be 0. If dst_image is a 1D image or 1D image buffer object, dst_origin[1] and dst_origin[2] must be 0. If dst_image is a 1D image array object, dst_origin[2] must be 0. If dst_image is a 1D image array object, dst_origin[1] describes the image index in the 1D image array. If dst_image is a 2D image array object, dst_origin[2] describes the image index in the 2D image array. region Defines the (width, height, depth) in pixels of the 1D, 2D or 3D rectangle, the (width, height) in pixels of the 2D rectangle and the number of images of a 2D image array or the (width) in pixels of the 1D rectangle and the number of images of a 1D image array. If src_image or dst_image is a 2D image object, region[2] must be 1. If src_image or dst_image is a 1D image or 1D image buffer object, region[1] and region[2] must be 1. If src_image or dst_image is a 1D image array object, region[2] must be 1. event_wait_list , num_events_in_wait_list Specify events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event_wait_list act as synchronization points. The context associated with events in event_wait_list and command_queue must be the same. The memory associated with event_wait_list can be reused or freed after the function returns. event Returns an event object that identifies this particular copy command and can be used to query or queue a wait for this particular command to complete. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. clEnqueueBarrierWithWaitList can be used instead. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the event_wait_list array. Notes It is currently a requirement that the src_image and dst_image image memory objects for clEnqueueCopyImage must have the exact same image format (i.e. the cl_image_format descriptor specified when src_image and dst_image are created must match). Errors clEnqueueCopyImage returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue. CL_INVALID_CONTEXT if the context associated with command_queue, src_image and dst_image are not the same or if the context associated with command_queue and events in event_wait_list are not the same. CL_INVALID_MEM_OBJECT if src_image and dst_image are not valid image objects. CL_IMAGE_FORMAT_MISMATCH if src_image and dst_image do not use the same image format. CL_INVALID_VALUE if the 2D or 3D rectangular region specified by src_origin and src_origin + region refers to a region outside src_image, or if the 2D or 3D rectangular region specified by dst_origin and dst_origin + region refers to a region outside dst_image. CL_INVALID_VALUE if values in src_origin, dst_origin and region do not follow rules described in the argument description for src_origin, dst_origin and region. CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events. CL_INVALID_IMAGE_SIZE if image dimensions (image width, height, specified or compute row and/or slice pitch) for src_image or dst_image are not supported by device associated with queue. CL_INVALID_IMAGE_FORMAT if image format (image channel order and data type) for src_image or dst_image are not supported by device associated with queue. CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with src_image or dst_image. CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. CL_INVALID_OPERATION if the device associated with command_queue does not support images (i.e. CL_DEVICE_IMAGE_SUPPORT specified in the table of OpenCL Device Queries for clGetDeviceInfo is CL_FALSE). CL_MEM_COPY_OVERLAP if src_image and dst_image are the same image object and the source and destination regions overlap. Specification OpenCL Specification Also see clEnqueueReadImage, clEnqueueWriteImage khronos-opencl-man-1.0~svn27110/sampler_t.xml0000644000175000017500000003415111660441607020777 0ustar mathieumathieu sampler_t sampler_t 2007-2011 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. 3 sampler_t A type used to control how elements of an image object are read by read_image{f|i|ui}. const sampler_t <sampler name> = <value> constant sampler_t <sampler name> = <value> __constant sampler_t <sampler name> = <value> Description The image read functions take a sampler argument. The sampler can be passed as an argument to the kernel using clSetKernelArg, or can be declared in the outermost scope of kernel functions, or it can be a constant variable of type sampler_t declared in the program source. Sampler variables in a program are declared to be of type sampler_t. A variable of sampler_t type declared in the program source must be initialized with a 32-bit unsigned integer constant, which is interpreted as a bit-field specifiying the following properties: Addressing Mode Filter Mode Normalized Coordinates These properties control how elements of an image object are read by read_image{f|i|ui}. Samplers can also be declared as global constants in the program source using the syntax shown at the top of this page. The sampler fields are described in the table below: Sampler State Description <normalized coords> Specifies whether the x, y and z coordinates are passed in as normalized or unnormalized values. This must be a literal value and can be one of the following predefined enums: CLK_NORMALIZED_COORDS_TRUE or CLK_NORMALIZED_COORDS_FALSE. The samplers used with an image in multiple calls to read_image{f|i|ui} declared in a kernel must use the same value for <normalized coords>. <addressing mode> Specifies the image addressing-mode i.e. how out-of-range image coordinates are handled. This must be a literal value and can be one of the following predefined enums: CLK_ADDRESS_MIRRORED_REPEAT - Flip the image coordinate at every integer junction. This addressing mode can only be used with normalized coordinates. If normalized coordinates are not used, this addressing mode may generate image coordinates that are undefined. CLK_ADDRESS_REPEAT - out-of-range image coordinates are wrapped to the valid range. This address mode can only be used with normalized coordinates. If normalized coordinates are not used, this addressing mode may generate image coordinates that are undefined. CLK_ADDRESS_CLAMP_TO_EDGE - out-of-range image coordinates are clamped to the extent. CLK_ADDRESS_CLAMP - out-of-range image coordinates will return a border color. This is similar to the GL_ADDRESS_CLAMP_TO_BORDER addressing mode. CLK_ADDRESS_NONE - for this addressing mode the programmer guarantees that the image coordinates used to sample elements of the image refer to a location inside the image; otherwise the results are undefined. For 1D and 2D image arrays, the addressing mode applies only to the x and (x, y) coordinates. The addressing mode for the coordinate which specifies the array index is always CLK_ADDRESS_CLAMP_TO_EDGE <filter mode> Specifies the filtering mode to use. This must be a literal value and can be one of the following predefined enums: CLK_FILTER_NEAREST or CLK_FILTER_LINEAR. Refer to section 8.2 for a description of these filter modes. Notes Note that samplers declared using the constant qualifier are not counted towards the maximum number of arguments pointing to the constant address space or the maximum size of the constant address space allowed per device (i.e. CL_DEVICE_MAX_CONSTANT_ARGS and CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE as described in table 4.3). The maximum number of samplers that can be declared in a kernel can be queried using the CL_DEVICE_MAX_SAMPLERS token in clGetDeviceInfo. If <addressing mode> in sampler is CLK_ADDRESS_CLAMP, then out-of-range image coordinates return the border color. The border color selected depends on the image channel order and can be one of the following values: If the image channel order is CL_A, CL_INTENSITY, CL_Rx, CL_RA, CL_RGx, CL_RGBx, CL_ARGB, CL_BGRA, or CL_RGBA, the border color is (0.0f, 0.0f,0.0f, 0.0f). If the image channel order is CL_R, CL_RG, CL_RGB, or CL_LUMINANCE, the border color is (0.0f, 0.0f, 0.0f, 1.0f) A kernel that uses a sampler with the CL_ADDRESS_CLAMP addressing mode with multiple images may result in additional samplers being used internally by an implementation. If the same sampler is used with multiple images called via read_image{f|i|ui}, then it is possible that an implementation may need to allocate an additional sampler to handle the different border color values that may be needed depending on the image formats being used. These implementation allocated samplers will count against the maximum sampler values supported by the device and given by CL_DEVICE_MAX_SAMPLERS. Enqueuing a kernel that requires more samplers than the implementation can support will result in a CL_OUT_OF_RESOURCES error being returned. Example const sampler_t samplerA = CLK_NORMALIZED_COORDS_TRUE | CLK_ADDRESS_REPEAT | CLK_FILTER_NEAREST; samplerA specifies a sampler that uses normalized coordinates, the repeat addressing mode and a nearest filter. Specification OpenCL Specification Also see Other Data Types, Image Read and Write Functions, Cardinality Diagram khronos-opencl-man-1.0~svn27110/Makefile0000644000175000017500000000344212276126073017727 0ustar mathieumathieu# Copyright (c) 2013 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 following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Materials. # # THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. LDIRT := $(wildcard gl*.xml) COMMONPREF = standard include $(ROOT)/usr/include/make/commondefs SUBDIRS = \ html \ $(NULL) default $(ALLTARGS): $(_FORCE) $(SUBDIRS_MAKERULE) distoss: $(MAKE) $(COMMONPREF)$@ $(SUBDIRS_MAKERULE) include $(COMMONRULES) XIFILES = baseformattable.xml \ compressedformattable.xml \ internalformattable.xml \ texboformattable.xml \ funchead.xml \ varhead.xml \ version.xml # Docbook 5 Relax-NG with XInclude schema URLs and local filenames DB5XIRNCURL = http://docbook.org/xml/5.0/rng/docbookxi.rnc DB5XIRNC = /usr/share/xml/docbook/schema/rng/5.0/docbookxi.rnc XML = $(filter-out $(XIFILES),$(wildcard *.xml)) validate: jing -c $(DB5XIRNC) $(XML)