khronos-opencl-man-1.0~svn33624/ 0000755 0001750 0001750 00000000000 13223132743 016265 5 ustar mathieu mathieu khronos-opencl-man-1.0~svn33624/commonMin.xml 0000644 0001750 0001750 00000014176 11660441607 020761 0 ustar mathieu mathieu
]>
min
min2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3min
Returns the lesser of two values.
gentype
min
gentypexgentypey
gentypef
min
gentypefxfloaty
gentyped
min
gentypedxdoubleygentypemin (gentypex,
halfy) // if half extension enabled
Descriptionmin 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.
SpecificationOpenCL SpecificationAlso seeCommon Functions
khronos-opencl-man-1.0~svn33624/upsample.xml 0000644 0001750 0001750 00000026467 11660441607 020661 0 ustar mathieu mathieu
]>
upsampleupsample2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3upsample
result[i] = ((gentype)hi[i] << 8|16|32) | lo[i]
short
upsample
charhiucharlo
ushort
upsample
ucharhiucharlo
shortn
upsample
charnhiucharnlo
ushortn
upsample
ucharnhiucharnlo
int
upsample
shorthiushortlo
uint
upsample
ushorthiushortlo
intn
upsample
shortnhiushortnlo
uintn
upsample
ushortnhiushortnlo
long
upsample
inthiuintlo
ulong
upsample
uinthiuintlo
longn
upsample
intnhiuintnlo
ulongn
upsample
uintnhiuintnloDescriptionresult[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;
SpecificationOpenCL SpecificationAlso seeInteger Functions
khronos-opencl-man-1.0~svn33624/clSetEventCallback.xml 0000644 0001750 0001750 00000033402 11660441607 022507 0 ustar mathieu mathieu
clSetEventCallback
clSetEventCallback
clSetEventCallback
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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 clSetEventCallbackcl_eventevent
cl_int
command_exec_callback_typevoid (CL_CALLBACK *pfn_event_notify)
(cl_event event, cl_int event_command_exec_status,
void *user_data)void*user_dataParameterseventA 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.
clFinishclWaitForEvents
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.
SpecificationOpenCL Specification
khronos-opencl-man-1.0~svn33624/clGetKernelInfo.xml 0000644 0001750 0001750 00000032676 11660441607 022045 0 ustar mathieu mathieu
clGetKernelInfo
clGetKernelInfo
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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_retParameters 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_infoReturn TypeInfo. returned in param_valueCL_KERNEL_FUNCTION_NAMEchar[]
Return the kernel function name.
CL_KERNEL_NUM_ARGScl_uint
Return the number of arguments to kernel.
CL_KERNEL_REFERENCE_COUNTcl_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_CONTEXTcl_context
Return the context associated with kernel.
CL_KERNEL_PROGRAMcl_program
Return the program object associated with kernel.
CL_KERNEL_ATTRIBUTESchar[]
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.
SpecificationOpenCL SpecificationAlso seeclCreateKernel,
clCreateKernelsInProgram,
clGetKernelArgInfo,
clRetainKernel,
clReleaseKernel,
clSetKernelArg,
clGetKernelWorkGroupInfo
khronos-opencl-man-1.0~svn33624/restrictions.xml 0000644 0001750 0001750 00000032623 11660441607 021552 0 ustar mathieu mathieu
restrictionsrestrictions2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3RestrictionsThe 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.
SpecificationOpenCL SpecificationAlso seeImage Functions,
Function Qualifiers
khronos-opencl-man-1.0~svn33624/degrees.xml 0000644 0001750 0001750 00000010544 11660441607 020436 0 ustar mathieu mathieu
]>
degreesdegrees2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3degrees
Converts radians to degrees.
gentype
degrees
gentyperadiansDescriptionConverts 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.
SpecificationOpenCL SpecificationAlso seeCommon Functions,
radians
khronos-opencl-man-1.0~svn33624/fma.xml 0000644 0001750 0001750 00000010771 11660441607 017565 0 ustar mathieu mathieu
]>
fmafma2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3fma
Multiply and add, then round.
gentype
fma
gentypeagentypebgentypecDescription
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;
SpecificationOpenCL SpecificationAlso seeMath Functions,
FP_CONTRACT,
FP_FAST_FMA
khronos-opencl-man-1.0~svn33624/fast_normalize.xml 0000644 0001750 0001750 00000014151 11660441607 022033 0 ustar mathieu mathieu
]>
fast_normalizefast_normalize2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3fast_normalize
Normal vector length 1.
floatn
fast_normalize
floatnpDescription
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;
SpecificationOpenCL SpecificationAlso seeGeometric Functions
khronos-opencl-man-1.0~svn33624/scalarDataTypes.xml 0000644 0001750 0001750 00000037653 11660441607 022116 0 ustar mathieu mathieu
Scalar Data TypesScalar Data Types2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3Scalar 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 LanguageDescriptionAPI type for applicationbool
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_charunsigned char,
uchar An unsigned 8-bit integer. cl_ucharshort A signed two's complement 16-bit integer. cl_shortunsigned short,
ushort An unsigned 16-bit integer. cl_ushortint A signed two's complement 32-bit integer. cl_intunsigned int,
uint An unsigned 32-bit integer. cl_uintlong A signed two's complement 64-bit integer. cl_longunsigned long,
ulong An unsigned 64-bit integer. cl_ulongfloat
A 32-bit floating point. The float data type must conform to the
IEEE 754 single precision storage format.
cl_floatdouble
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_doublehalf
A 16-bit float. The half data type must conform to the IEEE 754-2008
half precision storage format.
cl_halfsize_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.
voidOptional 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 LanguageDescriptionAPI type for applicationhalf2A 2-component half-precision floating-point vector.cl_half2half3A 3-component half-precision floating-point vector.cl_half3half4A 4-component half-precision floating-point vector.cl_half4half8An 8-component half-precision floating-point vector.cl_half8half16A 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.
SpecificationOpenCL SpecificationAlso seeMacros 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~svn33624/isnormal.xml 0000644 0001750 0001750 00000014757 11660441607 020656 0 ustar mathieu mathieu
]>
isnormalisnormal2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3isnormal
Test for a normal value.
int
isnormal
float
intn
isnormal
floatn
int
isnormal
double
longn
isnormal
doublenintisnormal (half) // if half extension enabled
shortnisnormal (halfn) // if half extension enabled
Description
Test for a normal value.
Notes
&relationalFunctionsInc1;
&relationalFunctionsInc2;
SpecificationOpenCL SpecificationAlso seeRelational Functions
khronos-opencl-man-1.0~svn33624/cl_khr_gl_sharing.xml 0000644 0001750 0001750 00000024254 11663317370 022464 0 ustar mathieu mathieu
]>
cl_khr_gl_sharingcl_khr_gl_sharing2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3cl_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.
clGetGLContextInfoKHRQuery the device.clCreateFromGLBufferCreates an OpenCL buffer object from an OpenGL buffer object.clCreateFromGLTextureCreates 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.clCreateFromGLRenderbufferCreates an OpenCL 2D image object from an OpenGL renderbuffer object.clGetGLObjectInfoQuery an OpenGL memory object used to create an OpenCL memory object.clGetGLTextureInfoGet additional information about the GL texture object associated with a memory object.clEnqueueAcquireGLObjectsAcquire OpenCL memory objects that have been created from OpenGL objects.clEnqueueReleaseGLObjectsRelease OpenCL memory objects that have been created from OpenGL objects.SpecificationOpenCL SpecificationAlso seeEXTENSION,
clGetGLContextInfoKHR
khronos-opencl-man-1.0~svn33624/fract.xml 0000644 0001750 0001750 00000013005 11660441607 020112 0 ustar mathieu mathieu
]>
fractfract2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3fract
Fractional value in x.
gentype
fract
gentypex__global gentype*itpr
gentype
fract
gentypex__local gentype*itpr
gentype
fract
gentypex__private gentype*itprDescription
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;
SpecificationOpenCL SpecificationAlso seeMath Functions
khronos-opencl-man-1.0~svn33624/clEnqueueMarkerWithWaitList.xml 0000644 0001750 0001750 00000023756 11660441607 024436 0 ustar mathieu mathieu
clEnqueueMarkerWithWaitList
clEnqueueMarkerWithWaitList
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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_listconst
cl_event
*event_wait_list
cl_event
*eventParameters 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.
SpecificationOpenCL SpecificationAlso seeclWaitForEvents,
clEnqueueBarrierWithWaitList
khronos-opencl-man-1.0~svn33624/FP_CONTRACT.xml 0000644 0001750 0001750 00000016501 11660441607 020621 0 ustar mathieu mathieu
FP_CONTRACT, FP_FAST_FMAF, FP_FAST_FMA_HALFFP_CONTRACT, FP_FAST_FMAF, FP_FAST_FMA_HALF2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3FP_CONTRACT, FP_FAST_FMAF, FP_FAST_FMA_HALF
Control expression contraction; fast fma()
#pragma OPENCL FP_CONTRACT on-off-switchon-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
SpecificationOpenCL SpecificationAlso seeMath Functions,
Symbolic Math Constants,
Macros and Limits
khronos-opencl-man-1.0~svn33624/private.xml 0000644 0001750 0001750 00000012160 11660441607 020466 0 ustar mathieu mathieu
]>
__private__private2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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];
SpecificationOpenCL SpecificationAlso see__global,
__local,
__constant
khronos-opencl-man-1.0~svn33624/divide.xml 0000644 0001750 0001750 00000013740 11660441607 020265 0 ustar mathieu mathieu
half_divide, native_dividehalf_divide, native_divide2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3half_divide, native_divide
Division functions.
gentype
half_divide
gentypexgentypey
gentype
native_divide
gentypexgentypeyDescriptionhalf_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.
SpecificationOpenCL SpecificationAlso seeMath Functions
khronos-opencl-man-1.0~svn33624/relationalFunctionsInc1.xml 0000644 0001750 0001750 00000001200 11660441607 023543 0 ustar mathieu mathieu
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~svn33624/clGetDeviceIDsFromD3D10KHR.xml 0000644 0001750 0001750 00000030063 11660441607 023421 0 ustar mathieu mathieu
]>
clGetDeviceIDsFromD3D10KHRclGetDeviceIDsFromD3D10KHR2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3clGetDeviceIDsFromD3D10KHRQuerying OpenCL Devices Corresponding to Direct3D 10 Devices.
cl_int
clGetDeviceIDsFromD3D10KHRcl_platform_idplatformcl_d3d10_device_source_khrd3d_device_sourcevoid*d3d_objectcl_d3d10_device_set_khrd3d_device_setcl_uintnum_entriescl_device_id*devicescl_uint*num_devicesParametersplatform
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_khrType of d3d_objectCL_D3D10_DEVICE_KHRID3D10Device *CL_D3D10_DXGI_ADAPTER_KHRIDXGIAdapter *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_khrDevices returned in devicesCL_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.
SpecificationOpenCL SpecificationAlso seecl_khr_d3d10_sharing,
clCreateFromD3D10BufferKHR,
clCreateFromD3D10Texture2DKHR,
clCreateFromD3D10Texture3DKHR,
clEnqueueAcquireD3D10ObjectsKHR,
clEnqueueReleaseD3D10ObjectsKHR
khronos-opencl-man-1.0~svn33624/mad.xml 0000644 0001750 0001750 00000011525 11660441607 017561 0 ustar mathieu mathieu
]>
madmad2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3mad
Approximates a * b + c.
gentype
mad
gentypeagentypebgentypecDescriptionmad 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;
SpecificationOpenCL SpecificationAlso seeMath Functions
khronos-opencl-man-1.0~svn33624/atom_and.xml 0000644 0001750 0001750 00000017264 11660441607 020610 0 ustar mathieu mathieu
atom_andatom_and2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3atom_and
64-bit atom_and functions.
long
atom_and
volatile __global
long*plongval
long
atom_and
volatile __local
long*plongval
ulong
atom_and
volatile __global
ulong*pulongval
ulong
atom_and
volatile __local
ulong*pulongvalDescription
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.
SpecificationOpenCL SpecificationAlso seeAtomic Functions,
atomic_and,
cl_khr_int64_extended_atomics
khronos-opencl-man-1.0~svn33624/reservedDataTypes.xml 0000644 0001750 0001750 00000020456 11660441607 022461 0 ustar mathieu mathieu
Reserved Data TypesReserved Data Types2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3Reserved 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.
TypeDescriptionbooln 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.SpecificationOpenCL SpecificationAlso seeMacros and Limits,
Scalar Data Types,
Vector Data Types,
Other Data Types,
Abstract Data Types,
Enumerated Data Types,
khronos-opencl-man-1.0~svn33624/isnan.xml 0000644 0001750 0001750 00000014675 11660441607 020141 0 ustar mathieu mathieu
]>
isnanisnan2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3isnan
Test for a NaN.
int
isnan
float
intn
isnan
floatn
int
isnan
double
longn
isnan
doublenintisnan (half) // if half extension enabled
shortnisnan (halfn) // if half extension enabled
Description
Test for NaN.
Notes
&relationalFunctionsInc1;
&relationalFunctionsInc2;
SpecificationOpenCL SpecificationAlso seeRelational Functions
khronos-opencl-man-1.0~svn33624/atomic_dec.xml 0000644 0001750 0001750 00000014650 11660441607 021111 0 ustar mathieu mathieu
atomic_decatomic_dec2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3atomic_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*pDescription
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.
SpecificationOpenCL SpecificationAlso seeAtomic Functions,
atom_dec
khronos-opencl-man-1.0~svn33624/mad24.xml 0000644 0001750 0001750 00000011464 11660441607 017731 0 ustar mathieu mathieu
mad24mad242007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3mad24
Fast integer function to multiply 24-bit integers and add a 32-bit value.
gentype
mad24
gentypexgentypeygentypezDescriptionmad24 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.
SpecificationOpenCL SpecificationAlso seeInteger Functions
khronos-opencl-man-1.0~svn33624/rootn.xml 0000644 0001750 0001750 00000017474 11660441607 020172 0 ustar mathieu mathieu
]>
rootnrootn2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3rootn
Compute x to the power 1/y.
floatn
rootn
floatnx
intny
float
rootn
float
x
int
y
doublen
rootn
doublenx
intny
double
rootn
double
x
int
y
halfn
rootn
halfnx
intny
half
rootn
half
x
int
yDescription
Compute x to the power 1/y.
Notes
&mathFunctionsInc;
SpecificationOpenCL SpecificationAlso seeMath Functions
khronos-opencl-man-1.0~svn33624/clEnqueueReadBufferRect.xml 0000644 0001750 0001750 00000057144 11660441607 023521 0 ustar mathieu mathieu
clEnqueueReadBufferRect
clEnqueueReadBufferRect
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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_readconst
size_t
*buffer_originconst
size_t
*host_originconst
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_listconst
cl_event
*event_wait_list
cl_event
*eventParameterscommand_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.
bufferRefers 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_originregion) 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.
ErrorsclEnqueueReadBufferRect 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.
SpecificationOpenCL SpecificationAlso seeclEnqueueCopyBuffer,
clEnqueueCopyBufferRect,
clEnqueueWriteBuffer,
clEnqueueWriteBufferRect,
clEnqueueReadBuffer
khronos-opencl-man-1.0~svn33624/clCreateFromD3D10Texture2DKHR.xml 0000644 0001750 0001750 00000024141 11660441607 024134 0 ustar mathieu mathieu
]>
clCreateFromD3D10Texture2DKHRclCreateFromD3D10Texture2DKHR2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3clCreateFromD3D10Texture2DKHRCreates an OpenCL 2D image object from a subresource of a Direct3D 10 2D texture.
cl_mem
clCreateFromD3D10Texture2DKHRcl_contextcontextcl_mem_flagsflagsID3D10Texture2D*resourceUINTsubresource
cl_int
*errcode_retParameterscontext
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.
SpecificationOpenCL SpecificationAlso seecl_khr_d3d10_sharing,
clGetDeviceIDsFromD3D10KHR,
clCreateFromD3D10BufferKHR,
clCreateFromD3D10Texture3DKHR,
clEnqueueAcquireD3D10ObjectsKHR,
clEnqueueReleaseD3D10ObjectsKHR
khronos-opencl-man-1.0~svn33624/get_image_width.xml 0000644 0001750 0001750 00000012645 11660441607 022144 0 ustar mathieu mathieu
get_image_widthget_image_width2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3get_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_timageDescription
Return the image width in pixels.
SpecificationOpenCL SpecificationAlso seeImage Functions
khronos-opencl-man-1.0~svn33624/atomic_min.xml 0000644 0001750 0001750 00000016360 11660441607 021141 0 ustar mathieu mathieu
atomic_minatomic_min2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3atomic_min
atomic_min functions.
int
atomic_min
volatile __global
int*pintval
unsigned int
atomic_min
volatile __global
unsigned int*punsigned intval
int
atomic_min
volatile __local
int*pintval
unsigned int
atomic_min
volatile __local
unsigned int*punsigned intvalDescription
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.
SpecificationOpenCL SpecificationAlso seeAtomic Functions,
atom_min
khronos-opencl-man-1.0~svn33624/imageMappingInc.xml 0000644 0001750 0001750 00000006371 11660441607 022053 0 ustar mathieu mathieu
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 Orderfloat4, int4 or uint4 components of channel dataCL_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~svn33624/isnotequal.xml 0000644 0001750 0001750 00000017145 11660441607 021210 0 ustar mathieu mathieu
]>
isnotequalisnotequal2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3isnotequal
Compare of x != y.
int
isnotequal
floatxfloaty
intn
isnotequal
floatnxfloatny
int
isnotequal
doublexdoubley
longn
isnotequal
doublenxdoublenyintisnotequal
(halfx,
halfy) // if half extension enabled
shortnisnotequal
(halfnx,
halfny) // if half extension enabled
Description
Returns the component-wise compare of x != y.
Notes
&relationalFunctionsInc1;
&relationalFunctionsInc2;
&relationalFunctionsInc3;
SpecificationOpenCL SpecificationAlso seeRelational Functions
khronos-opencl-man-1.0~svn33624/prefetch.xml 0000644 0001750 0001750 00000012031 11660441607 020611 0 ustar mathieu mathieu
prefetchprefetch2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3prefetch
Prefetch bytes into the global cache.
void
prefetch
const __global gentype*psize_tnum_gentypesDescription
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.
SpecificationOpenCL SpecificationAlso seeAsync Copy and Prefetch Functions
khronos-opencl-man-1.0~svn33624/asin.xml 0000644 0001750 0001750 00000011743 11660441607 017754 0 ustar mathieu mathieu
]>
asin, asinh, asinpiasin2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3asin, asinh, asinpi
Sine functions.
gentype
asin
gentype
gentype
asinh
gentype
gentype
asinpi
gentypexDescriptionasin is the arc sine function. asinh is the inverse hyperbolic sine function. asinpi computes asin (x) / π. Notes
&mathFunctionsInc;
SpecificationOpenCL SpecificationAlso seeMath Functions
khronos-opencl-man-1.0~svn33624/abs.xml 0000644 0001750 0001750 00000011321 11660441607 017557 0 ustar mathieu mathieu
]>
abs, abs_diffabs, abs_diff2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3abs, abs_diff
Absolute value functions.
ugentype
abs
gentypex
ugentype
abs_diff
gentypexgentypeyDescriptionabs returns |x|.
abs_diff returns |x-y| without modulo overflow.
Notes
&integerFunctionsInc;
SpecificationOpenCL SpecificationAlso seeInteger Functions
khronos-opencl-man-1.0~svn33624/signbit.xml 0000644 0001750 0001750 00000015460 11660441607 020461 0 ustar mathieu mathieu
]>
signbitsignbit2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3signbit
Test for sign bit.
int
signbit
float
intn
signbit
floatn
int
signbit
double
longn
signbit
doublenintsignbit (half) // if half extension enabled
shortnsignbit (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;
SpecificationOpenCL SpecificationAlso seeRelational Functions
khronos-opencl-man-1.0~svn33624/get_local_size.xml 0000644 0001750 0001750 00000011640 11660441607 022001 0 ustar mathieu mathieu
get_local_sizeget_local_size2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3get_local_size
Returns the number of local work-items.
size_t
get_local_size
uintdimindxDescription
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.
SpecificationOpenCL SpecificationAlso seeWork-Item Functions,
clEnqueueNDRangeKernel,
clEnqueueTask
khronos-opencl-man-1.0~svn33624/step.xml 0000644 0001750 0001750 00000013757 11660441607 020004 0 ustar mathieu mathieu
]>
stepstep2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3step
Returns 0.0 if x < edge, else 1.0.
gentype
step
gentypeedgegentypex
gentypef
step
floatedgegentypefx
gentyped
step
doubleedgegentypedxgentypestep (halfedge,
gentypex) // 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.
SpecificationOpenCL SpecificationAlso seeCommon Functions
khronos-opencl-man-1.0~svn33624/acos.xml 0000644 0001750 0001750 00000011474 11660441607 017750 0 ustar mathieu mathieu
]>
acos, acosh, acospiacos2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3acos, acosh, acospi
Arc cosine functions.
gentype
acos
gentype
gentype
acosh
gentype
gentype
acospi
gentypexDescriptionacos is the arc cosine function. acosh is the inverse hyperbolic cosine function. acospi computes acos (x) / π. Notes
&mathFunctionsInc;
SpecificationOpenCL SpecificationAlso seeMath Functions
khronos-opencl-man-1.0~svn33624/clEnqueueAcquireDX9MediaSurfacesKHR.xml 0000644 0001750 0001750 00000030717 11660441607 025612 0 ustar mathieu mathieu
]>
clEnqueueAcquireDX9MediaSurfacesKHRclEnqueueAcquireDX9MediaSurfacesKHR2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3clEnqueueAcquireDX9MediaSurfacesKHRAcquire OpenCL memory objects that have been created from a media surface.
cl_int
clEnqueueAcquireDX9MediaSurfacesKHRcl_command_queue
command_queuecl_uint
num_objectsconst cl_mem*mem_objectscl_uintnum_events_in_wait_list
const cl_event
*event_wait_listcl_event*eventParameterscommand_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.
SpecificationOpenCL SpecificationAlso seecl_khr_dx9_media_sharing,
clGetDeviceIDsFromDX9MediaAdapterKHR,
clCreateFromDX9MediaSurfaceKHR,
clEnqueueReleaseDX9MediaSurfacesKHR,
clEnqueueAcquireDX9MediaSurfacesKHR
khronos-opencl-man-1.0~svn33624/lgamma.xml 0000644 0001750 0001750 00000044227 11660441607 020263 0 ustar mathieu mathieu
]>
lgamma, lgamma_rlgamma, lgamma_r2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3lgamma, lgamma_r
Log gamma functions.
gentype
lgamma
gentypex
floatn
lgamma_r
floatnx__global
intn*signp
floatn
lgamma_r
floatnx__local
intn*signp
floatn
lgamma_r
floatnx__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
doublenx__global
intn*signp
doublen
lgamma_r
doublenx__local
intn*signp
doublen
lgamma_r
doublenx__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
halfnx__global
intn*signp
halfn
lgamma_r
halfnx__local
intn*signp
halfn
lgamma_r
halfnx__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
*signpDescription
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;
SpecificationOpenCL SpecificationAlso seeMath Functions
khronos-opencl-man-1.0~svn33624/frexp.xml 0000644 0001750 0001750 00000041475 11660441607 020153 0 ustar mathieu mathieu
frexpfrexp2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3frexp
Extract mantissa and exponent.
floatn
frexp
floatnx__global
intn*exp
floatn
frexp
floatnx__local
intn*exp
floatn
frexp
floatnx__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
doublenx__global
intn*exp
doublen
frexp
doublenx__local
intn*exp
doublen
frexp
doublenx__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
halfnx__global
intn*exp
halfn
frexp
halfnx__local
intn*exp
halfn
frexp
halfnx__private
intn*exp
half
frexp
half
x__global
int
*exp
half
frexp
half
x__local
int
*exp
half
frexp
half
x__private
int
*expDescription
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.
SpecificationOpenCL SpecificationAlso seeMath Functions
khronos-opencl-man-1.0~svn33624/enums.xml 0000644 0001750 0001750 00000073543 11660441607 020157 0 ustar mathieu mathieu
Enumerated TypesEnumerated Types2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3Enumerated TypesFollowing are the enumerated types and their permitted values.
Enumerated TypePermitted Valuescl_addressing_modeCL_ADDRESS_NONECL_ADDRESS_CLAMP_TO_EDGECL_ADDRESS_CLAMPCL_ADDRESS_REPEATCL_ADDRESS_MIRRORED_REPEATcl_boolCL_FALSECL_TRUECL_BLOCKING = CL_TRUECL_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_typeCL_BUFFER_CREATE_TYPE_REGIONcl_build_statusCL_BUILD_SUCCESSCL_BUILD_NONECL_BUILD_ERRORCL_BUILD_IN_PROGRESScl_channel_orderCL_ACL_RCL_RGCL_RACL_RGBCL_RGBACL_BGRACL_ARGBCL_INTENSITYCL_LUMINANCECL_RxCL_RGxCL_RGBxcl_channel_typeCL_SNORM_INT8CL_SNORM_INT16CL_UNORM_INT8CL_UNORM_INT16CL_UNORM_SHORT_565CL_UNORM_SHORT_555CL_UNORM_INT_101010CL_SIGNED_INT8CL_SIGNED_INT16CL_SIGNED_INT32CL_UNSIGNED_INT8CL_UNSIGNED_INT16CL_UNSIGNED_INT32CL_HALF_FLOATCL_FLOATcl_command_queue_infoCL_QUEUE_CONTEXTCL_QUEUE_DEVICECL_QUEUE_REFERENCE_COUNTCL_QUEUE_PROPERTIEScl_command_queue_propertiesCL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLECL_QUEUE_PROFILING_ENABLEcl_command_typeCL_COMMAND_NDRANGE_KERNELCL_COMMAND_TASKCL_COMMAND_NATIVE_KERNELCL_COMMAND_READ_BUFFERCL_COMMAND_WRITE_BUFFERCL_COMMAND_COPY_BUFFERCL_COMMAND_READ_IMAGECL_COMMAND_WRITE_IMAGECL_COMMAND_COPY_IMAGECL_COMMAND_COPY_IMAGE_TO_BUFFERCL_COMMAND_COPY_BUFFER_TO_IMAGECL_COMMAND_MAP_BUFFERCL_COMMAND_MAP_IMAGECL_COMMAND_UNMAP_MEM_OBJECTCL_COMMAND_MARKERCL_COMMAND_ACQUIRE_GL_OBJECTSCL_COMMAND_RELEASE_GL_OBJECTSCL_COMMAND_READ_BUFFER_RECTCL_COMMAND_WRITE_BUFFER_RECTCL_COMMAND_COPY_BUFFER_RECTCL_COMMAND_USERCL_COMMAND_BARRIERCL_COMMAND_MIGRATE_MEM_OBJECTSCL_COMMAND_FILL_BUFFERCL_COMMAND_FILL_IMAGECL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHRCL_COMMAND_RELEASE_D3D10_OBJECTS_KHRCL_COMMAND_ACQUIRE_D3D11_OBJECTS_KHRCL_COMMAND_RELEASE_D3D11_OBJECTS_KHRCL_COMMAND_ACQUIRE_DX9_MEDIA_SURFACES_KHRCL_COMMAND_RELEASE_DX9_MEDIA_SURFACES_KHRcl_context_infoCL_CONTEXT_REFERENCE_COUNTCL_CONTEXT_DEVICESCL_CONTEXT_PROPERTIESCL_CONTEXT_NUM_DEVICESCL_CONTEXT_D3D10_DEVICE_KHRCL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHRCL_CONTEXT_D3D11_DEVICE_KHRCL_CONTEXT_D3D11_PREFER_SHARED_RESOURCES_KHRCL_CONTEXT_D3D9_DEVICE_KHRCL_CONTEXT_D3D9EX_DEVICE_KHRCL_CONTEXT_DXVA_DEVICE_KHRCL_GL_CONTEXT_KHRCL_EGL_DISPLAY_KHRCL_GLX_DISPLAY_KHRCL_WGL_HDC_KHRCL_CGL_SHAREGROUP_KHRcl_context_propertiesCL_CONTEXT_PLATFORMCL_CONTEXT_INTEROP_USER_SYNCCL_GL_CONTEXT_KHRCL_EGL_DISPLAY_KHRCL_GLX_DISPLAY_KHRCL_WGL_HDC_KHRCL_CGL_SHAREGROUP_KHRcl_d3d10_device_set_khr// cl_d3d10_device_set_nvCL_PREFERRED_DEVICES_FOR_D3D10_KHRCL_ALL_DEVICES_FOR_D3D10_KHRcl_d3d10_device_source_khr// cl_d3d10_device_source_nvCL_D3D10_DEVICE_KHRCL_D3D10_DXGI_ADAPTER_KHRcl_d3d11_device_set_khrCL_PREFERRED_DEVICES_FOR_D3D10_KHRCL_ALL_DEVICES_FOR_D3D10_KHRcl_d3d11_device_source_khrCL_D3D11_DEVICE_KHRCL_D3D11_DXGI_ADAPTER_KHRcl_device_affinity_domainCL_DEVICE_AFFINITY_DOMAIN_NUMACL_DEVICE_AFFINITY_DOMAIN_L4_CACHECL_DEVICE_AFFINITY_DOMAIN_L3_CACHECL_DEVICE_AFFINITY_DOMAIN_L2_CACHECL_DEVICE_AFFINITY_DOMAIN_L1_CACHECL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLEcl_device_exec_capabilitiesCL_EXEC_KERNELCL_EXEC_NATIVE_KERNELcl_device_fp_configCL_FP_DENORMCL_FP_INF_NANCL_FP_ROUND_TO_NEARESTCL_FP_ROUND_TO_ZERO CL_FP_ROUND_TO_INFCL_FP_FMACL_FP_SOFT_FLOATCL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRTcl_device_infoCL_DEVICE_TYPECL_DEVICE_VENDOR_IDCL_DEVICE_MAX_COMPUTE_UNITSCL_DEVICE_MAX_WORK_ITEM_DIMENSIONSCL_DEVICE_MAX_WORK_GROUP_SIZECL_DEVICE_MAX_WORK_ITEM_SIZESCL_DEVICE_PREFERRED_VECTOR_WIDTH_CHARCL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORTCL_DEVICE_PREFERRED_VECTOR_WIDTH_INTCL_DEVICE_PREFERRED_VECTOR_WIDTH_LONGCL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOATCL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLECL_DEVICE_MAX_CLOCK_FREQUENCYCL_DEVICE_ADDRESS_BITSCL_DEVICE_MAX_READ_IMAGE_ARGSCL_DEVICE_MAX_WRITE_IMAGE_ARGSCL_DEVICE_MAX_MEM_ALLOC_SIZECL_DEVICE_IMAGE2D_MAX_WIDTHCL_DEVICE_IMAGE2D_MAX_HEIGHTCL_DEVICE_IMAGE3D_MAX_WIDTHCL_DEVICE_IMAGE3D_MAX_HEIGHTCL_DEVICE_IMAGE3D_MAX_DEPTHCL_DEVICE_IMAGE_SUPPORTCL_DEVICE_MAX_PARAMETER_SIZECL_DEVICE_MAX_SAMPLERSCL_DEVICE_MEM_BASE_ADDR_ALIGNCL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZECL_DEVICE_SINGLE_FP_CONFIGCL_DEVICE_GLOBAL_MEM_CACHE_TYPECL_DEVICE_GLOBAL_MEM_CACHELINE_SIZECL_DEVICE_GLOBAL_MEM_CACHE_SIZECL_DEVICE_GLOBAL_MEM_SIZECL_DEVICE_MAX_CONSTANT_BUFFER_SIZECL_DEVICE_MAX_CONSTANT_ARGSCL_DEVICE_LOCAL_MEM_TYPECL_DEVICE_LOCAL_MEM_SIZECL_DEVICE_ERROR_CORRECTION_SUPPORTCL_DEVICE_PROFILING_TIMER_RESOLUTIONCL_DEVICE_ENDIAN_LITTLECL_DEVICE_AVAILABLECL_DEVICE_COMPILER_AVAILABLECL_DEVICE_EXECUTION_CAPABILITIESCL_DEVICE_QUEUE_PROPERTIESCL_DEVICE_NAMECL_DEVICE_VENDORCL_DRIVER_VERSIONCL_DEVICE_PROFILECL_DEVICE_VERSIONCL_DEVICE_EXTENSIONSCL_DEVICE_PLATFORMCL_DEVICE_DOUBLE_FP_CONFIGCL_DEVICE_PREFERRED_VECTOR_WIDTH_HALFCL_DEVICE_HOST_UNIFIED_MEMORYCL_DEVICE_NATIVE_VECTOR_WIDTH_CHARCL_DEVICE_NATIVE_VECTOR_WIDTH_SHORTCL_DEVICE_NATIVE_VECTOR_WIDTH_INTCL_DEVICE_NATIVE_VECTOR_WIDTH_LONGCL_DEVICE_NATIVE_VECTOR_WIDTH_FLOATCL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLECL_DEVICE_NATIVE_VECTOR_WIDTH_HALFCL_DEVICE_OPENCL_C_VERSIONCL_DEVICE_LINKER_AVAILABLECL_DEVICE_BUILT_IN_KERNELSCL_DEVICE_IMAGE_MAX_BUFFER_SIZECL_DEVICE_IMAGE_MAX_ARRAY_SIZECL_DEVICE_PARENT_DEVICECL_DEVICE_PARTITION_MAX_SUB_DEVICESCL_DEVICE_PARTITION_PROPERTIESCL_DEVICE_PARTITION_AFFINITY_DOMAINCL_DEVICE_PARTITION_TYPECL_DEVICE_REFERENCE_COUNTCL_DEVICE_PREFERRED_INTEROP_USER_SYNCCL_DEVICE_PRINTF_BUFFER_SIZEcl_device_local_mem_typeCL_GLOBALCL_LOCALCL_NONEcl_device_mem_cache_typeCL_NONECL_READ_ONLY_CACHECL_READ_WRITE_CACHEcl_device_partition_propertyCL_DEVICE_PARTITION_EQUALLYCL_DEVICE_PARTITION_BY_COUNTSCL_DEVICE_PARTITION_BY_COUNTS_LIST_ENDCL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN0cl_device_typeCL_DEVICE_TYPE_DEFAULTCL_DEVICE_TYPE_CPUCL_DEVICE_TYPE_GPUCL_DEVICE_TYPE_ACCELERATORCL_DEVICE_TYPE_CUSTOMCL_DEVICE_TYPE_ALLcl_event_infoCL_EVENT_COMMAND_QUEUECL_EVENT_COMMAND_TYPECL_EVENT_REFERENCE_COUNTCL_EVENT_COMMAND_EXECUTION_STATUSCL_EVENT_CONTEXTcl_filter_modeCL_FILTER_NEARESTCL_FILTER_LINEARcl_gl_context_infoCL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHRCL_DEVICES_FOR_GL_CONTEXT_KHRcl_gl_object_typeCL_GL_OBJECT_BUFFERCL_GL_OBJECT_TEXTURE2DCL_GL_OBJECT_TEXTURE3DCL_GL_OBJECT_RENDERBUFFERCL_GL_OBJECT_TEXTURE2D_ARRAYCL_GL_OBJECT_TEXTURE1DCL_GL_OBJECT_TEXTURE1D_ARRAYCL_GL_OBJECT_TEXTURE_BUFFERcl_gl_texture_infoCL_GL_TEXTURE_TARGETCL_GL_MIPMAP_LEVELcl_image_infoCL_IMAGE_FORMATCL_IMAGE_ELEMENT_SIZECL_IMAGE_ROW_PITCHCL_IMAGE_SLICE_PITCHCL_IMAGE_WIDTHCL_IMAGE_HEIGHTCL_IMAGE_DEPTHCL_IMAGE_ARRAY_SIZECL_IMAGE_BUFFERCL_IMAGE_NUM_MIP_LEVELSCL_IMAGE_NUM_SAMPLESCL_IMAGE_D3D10_SUBRESOURCE_KHRCL_IMAGE_D3D11_SUBRESOURCE_KHRCL_IMAGE_DX9_MEDIA_PLANE_KHRcl_kernel_arg_address_qualifierCL_KERNEL_ARG_ADDRESS_GLOBALCL_KERNEL_ARG_ADDRESS_LOCALCL_KERNEL_ARG_ADDRESS_CONSTANTCL_KERNEL_ARG_ADDRESS_PRIVATEcl_kernel_arg_access_qualifierCL_KERNEL_ARG_ACCESS_READ_ONLYCL_KERNEL_ARG_ACCESS_WRITE_ONLYCL_KERNEL_ARG_ACCESS_READ_WRITECL_KERNEL_ARG_ACCESS_NONEcl_kernel_arg_infoCL_KERNEL_ARG_ADDRESS_QUALIFIERCL_KERNEL_ARG_ACCESS_QUALIFIERCL_KERNEL_ARG_TYPE_NAMECL_KERNEL_ARG_NAMEcl_kernel_infoCL_KERNEL_FUNCTION_NAMECL_KERNEL_NUM_ARGSCL_KERNEL_REFERENCE_COUNTCL_KERNEL_CONTEXTCL_KERNEL_PROGRAMCL_KERNEL_ATTRIBUTEScl_kernel_work_group_infoCL_KERNEL_WORK_GROUP_SIZECL_KERNEL_COMPILE_WORK_GROUP_SIZECL_KERNEL_LOCAL_MEM_SIZECL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLECL_KERNEL_PRIVATE_MEM_SIZECL_KERNEL_GLOBAL_WORK_SIZEcl_map_flagsCL_MAP_READCL_MAP_WRITECL_MAP_WRITE_INVALIDATE_REGION// cl_media_adapter_set_khrCL_PREFERRED_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHRCL_ALL_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR// cl_media_adapter_type_khrCL_D3D9_DEVICE_KHRCL_D3D9EX_DEVICE_KHRCL_DXVA_DEVICE_KHRcl_mem_flagsCL_MEM_READ_WRITECL_MEM_WRITE_ONLYCL_MEM_READ_ONLYCL_MEM_USE_HOST_PTRCL_MEM_ALLOC_HOST_PTRCL_MEM_COPY_HOST_PTRcl_mem_infoCL_MEM_TYPECL_MEM_FLAGSCL_MEM_SIZECL_MEM_HOST_PTRCL_MEM_MAP_COUNTCL_MEM_REFERENCE_COUNTCL_MEM_CONTEXTCL_MEM_ASSOCIATED_MEMOBJECTCL_MEM_OFFSETCL_MEM_D3D10_RESOURCE_KHRCL_MEM_D3D11_RESOURCE_KHRCL_MEM_DX9_MEDIA_ADAPTER_TYPE_KHRCL_MEM_DX9_MEDIA_SURFACE_INFO_KHRcl_mem_migration_flagsCL_MIGRATE_MEM_OBJECT_HOSTCL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINEDcl_mem_object_typeCL_MEM_OBJECT_BUFFERCL_MEM_OBJECT_IMAGE2DCL_MEM_OBJECT_IMAGE3DCL_MEM_OBJECT_IMAGE2D_ARRAYCL_MEM_OBJECT_IMAGE1DCL_MEM_OBJECT_IMAGE1D_ARRAYCL_MEM_OBJECT_IMAGE1D_BUFFERcl_platform_infoCL_PLATFORM_PROFILECL_PLATFORM_VERSIONCL_PLATFORM_NAMECL_PLATFORM_VENDORCL_PLATFORM_EXTENSIONSCL_PLATFORM_ICD_SUFFIX_KHRcl_profiling_infoCL_PROFILING_COMMAND_QUEUEDCL_PROFILING_COMMAND_SUBMITCL_PROFILING_COMMAND_STARTCL_PROFILING_COMMAND_ENDcl_program_binary_typeCL_PROGRAM_BINARY_TYPE_NONECL_PROGRAM_BINARY_TYPE_COMPILED_OBJECTCL_PROGRAM_BINARY_TYPE_LIBRARYCL_PROGRAM_BINARY_TYPE_EXECUTABLEcl_program_build_infoCL_PROGRAM_BUILD_STATUSCL_PROGRAM_BUILD_OPTIONSCL_PROGRAM_BUILD_LOGCL_PROGRAM_BINARY_TYPEcl_program_infoCL_PROGRAM_REFERENCE_COUNTCL_PROGRAM_CONTEXTCL_PROGRAM_NUM_DEVICESCL_PROGRAM_DEVICESCL_PROGRAM_SOURCECL_PROGRAM_BINARY_SIZESCL_PROGRAM_BINARIESCL_PROGRAM_NUM_KERNELSCL_PROGRAM_KERNEL_NAMEScl_sampler_infoCL_SAMPLER_REFERENCE_COUNTCL_SAMPLER_CONTEXTCL_SAMPLER_NORMALIZED_COORDSCL_SAMPLER_ADDRESSING_MODECL_SAMPLER_FILTER_MODE
khronos-opencl-man-1.0~svn33624/erf.xml 0000644 0001750 0001750 00000010645 11660441607 017576 0 ustar mathieu mathieu
]>
erf, erfcacos2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3erf, erfc
Error functions.
gentype
erf
gentype
gentype
erfc
gentypeDescriptionerf is the error function encountered in integrating the normal
distribution.
erfc is the complementary error function.
Notes
&mathFunctionsInc;
SpecificationOpenCL SpecificationAlso seeMath Functions
khronos-opencl-man-1.0~svn33624/relationalFunctions.xml 0000644 0001750 0001750 00000020651 11660441607 023043 0 ustar mathieu mathieu
]>
Relational Built-In FunctionsRelational Built-In Functions2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3Relational Built-In FunctionsClick an item in the table below for details about that function.isequal
Component-wise compare of x == y.
isnotequalComponent-wise compare of x
!= y.isgreaterComponent-wise compare of x
> y.isgreaterequalComponent-wise compare of x >= y.islessComponent-wise compare of x < y.islessequalComponent-wise compare of x <= y.islessgreater
Component-wise compare of (x < y) ||
(x > y).
isfiniteTest for finite value.isinfTest for positive or negative infinity.isnanTest for a NaN.isnormalTest for a normal value.isorderedTest if arguments are ordered.isunorderedTest if arguments are unordered.signbitTest for sign bit.any1 if MSB in any component of x is set; else 0.all1 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.
SpecificationOpenCL Specification
khronos-opencl-man-1.0~svn33624/clGetGLTextureInfo.xml 0000644 0001750 0001750 00000024640 11660441607 022500 0 ustar mathieu mathieu
clGetGLTextureInfoclGetGLTextureInfo2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3clGetGLTextureInfo
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_retParameters 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_infoReturn TypeInformation returned in param_valueCL_GL_TEXTURE_TARGETGLenum
The texture_target argument specified in
clCreateFromGLTexture.
CL_GL_MIPMAP_LEVELGLint
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.
SpecificationOpenCL SpecificationAlso seecl_khr_gl_sharing,
clGetGLObjectInfo,
clCreateFromGLTexture,
clCreateFromGLTexture
khronos-opencl-man-1.0~svn33624/cl_khr_fp16.xml 0000644 0001750 0001750 00000031630 11660441607 021115 0 ustar mathieu mathieu
cl_khr_fp16cl_khr_fp162007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3cl_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 LanguageDescriptionAPI type for applicationhalf22-component half-precision floating-point
vectorcl_half2half33-component half-precision floating-point vectorcl_half3half44-component half-precision floating-point
vectorcl_half4half88-component half-precision floating-point
vectorcl_half8half1616-component half-precision floating-point
vectorcl_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 LanguagevalueMacro for application#define HALF_DIG3HALF_DIG#define HALF_MANT_DIG11HALF_MANT_DIG#define HALF_MAX_10_EXP+4HALF_MAX_10_EXP#define HALF_MAX_EXP+16HALF_MAX_EXP#define HALF_MIN_10_EXP-4HALF_MIN_10_EXP#define HALF_MIN_EXP-13HALF_MIN_EXP#define HALF_RADIX2HALF_RADIX#define HALF_MAX0x1.ffcp15hHALF_MAX#define HALF_MIN0x1.0p-14hHALF_MIN#define HALF_EPSILON0x1.0p-10hHALF_EPSILON
The following constants are also available. They are of type half and
are accurate within the precision of the half type.
ConstantDescriptionM_E_HValue of eM_LOG2E_H Value of log2 eM_LOG10E_HValue of log10 eM_LN2_HValue of ln 2M_LN10_H Value of ln 10M_PI_H Value of πM_PI_2_HValue of π / 2M_PI_4_HValue of π / 4M_1_PI_HValue of 1 / πM_2_PI_HValue of 2 / πM_2_SQRTPI_HValue of 2 / √πM_SQRT2_HValue of √2M_SQRT1_2_HValue 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.
SpecificationOpenCL SpecificationAlso seeEXTENSION,
clGetDeviceInfo,
mathFunctions,
commonFunctions,
geometricFunctions,
relationalFunctions,
vectorDataLoadandStoreFunctions,
asyncCopyFunctions,
imageFunctions
khronos-opencl-man-1.0~svn33624/get_global_offset.xml 0000644 0001750 0001750 00000011326 11660441607 022464 0 ustar mathieu mathieu
get_global_offsetget_global_offset2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3get_global_offset
Returns the offset values specified in global_work_offset argument to clEnqueueNDRangeKernel.
size_t
get_global_offset
uintdimindxDescription
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.
SpecificationOpenCL SpecificationAlso seeWork-Item Functions,
clEnqueueNDRangeKernel,
clEnqueueTask
khronos-opencl-man-1.0~svn33624/read_imagef2d.xml 0000644 0001750 0001750 00000024546 11660441607 021500 0 ustar mathieu mathieu
[
]>
read_imagef (2D)read_imagef (2D)2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3read_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
coordDescription
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;
SpecificationOpenCL SpecificationAlso seeImage Functions
khronos-opencl-man-1.0~svn33624/clCreateKernelsInProgram.xml 0000644 0001750 0001750 00000023562 11660441607 023711 0 ustar mathieu mathieu
clCreateKernelsInProgram
clCreateKernelsInProgram
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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
clCreateKernelsInProgramcl_program programcl_uintnum_kernelscl_kernel*kernelscl_uint*num_kernels_retParameters 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.
SpecificationOpenCL SpecificationAlso seeclCreateKernel,
clRetainKernel,
clReleaseKernel,
clSetKernelArg,
clGetKernelInfo,
clGetKernelWorkGroupInfo,
Cardinality Diagram
khronos-opencl-man-1.0~svn33624/atom_or.xml 0000644 0001750 0001750 00000017246 11660441607 020466 0 ustar mathieu mathieu
atom_oratom_or2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3atom_or
64-bit atom_or functions.
long
atom_or
volatile __global
long*plongval
long
atom_or
volatile __local
long*plongval
ulong
atom_or
volatile __global
ulong*pulongval
ulong
atom_or
volatile __local
ulong*pulongvalDescription
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.
SpecificationOpenCL SpecificationAlso seeAtomic Functions,
atomic_or,
cl_khr_int64_extended_atomics
khronos-opencl-man-1.0~svn33624/cl_khr_icd.xml 0000644 0001750 0001750 00000012003 11660441607 021071 0 ustar mathieu mathieu
cl_khr_icdcl_khr_icd2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3cl_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.
SpecificationOpenCL SpecificationAlso seeEXTENSION,
clIcdGetPlatformIDsKHR
khronos-opencl-man-1.0~svn33624/qualifierExampleInc.xml 0000644 0001750 0001750 00000003107 11660441607 022744 0 ustar mathieu mathieu
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~svn33624/miscVectorFunctions.xml 0000644 0001750 0001750 00000006743 11660441607 023035 0 ustar mathieu mathieu
Miscellaneous Vector FunctionsMiscellaneous Vector Functions2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3Miscellaneous Vector FunctionsThe table below describes the list of built-in miscelaneous vector functions.vec_stepTakes 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,
shuffle2Constructs a permutation of elements from one (or two) input vectorsSpecificationOpenCL SpecificationAlso seecl_khr_fp16
khronos-opencl-man-1.0~svn33624/clCreateFromD3D11Texture3DKHR.xml 0000644 0001750 0001750 00000045263 11660441607 024146 0 ustar mathieu mathieu
]>
clCreateFromD3D11Texture3DKHRclCreateFromD3D11Texture3DKHR2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3clCreateFromD3D11Texture3DKHRCreates an OpenCL 3D image object from a subresource of a Direct3D 11 3D texture.
cl_mem
clCreateFromD3D11Texture3DKHRcl_contextcontextcl_mem_flagsflagsID3D11Texture3D*resourceUINTsubresource
cl_int
*errcode_retParameterscontext
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 formatCL image format (channel order, channel data type)DXGI_FORMAT_R32G32B32A32_FLOATCL_RGBA, CL_FLOATDXGI_FORMAT_R32G32B32A32_UINTCL_RGBA, CL_UNSIGNED_INT32DXGI_FORMAT_R32G32B32A32_SINTCL_RGBA, CL_SIGNED_INT32DXGI_FORMAT_R16G16B16A16_FLOATCL_RGBA, CL_HALF_FLOATDXGI_FORMAT_R16G16B16A16_UNORMCL_RGBA, CL_UNORM_INT16DXGI_FORMAT_R16G16B16A16_UINTCL_RGBA, CL_UNSIGNED_INT16DXGI_FORMAT_R16G16B16A16_SNORMCL_RGBA, CL_SNORM_INT16DXGI_FORMAT_R16G16B16A16_SINTCL_RGBA, CL_SIGNED_INT16DXGI_FORMAT_R8G8B8A8_UNORMCL_RGBA, CL_UNORM_INT8DXGI_FORMAT_R8G8B8A8_UINTCL_RGBA, CL_UNSIGNED_INT8DXGI_FORMAT_R8G8B8A8_SNORMCL_RGBA, CL_SNORM_INT8DXGI_FORMAT_R8G8B8A8_SINTCL_RGBA, CL_SIGNED_INT8DXGI_FORMAT_R32G32_FLOATCL_RG, CL_FLOATDXGI_FORMAT_R32G32_UINTCL_RG, CL_UNSIGNED_INT32DXGI_FORMAT_R32G32_SINTCL_RG, CL_SIGNED_INT32DXGI_FORMAT_R16G16_FLOATCL_RG, CL_HALF_FLOATDXGI_FORMAT_R16G16_UNORMCL_RG, CL_UNORM_INT16DXGI_FORMAT_R16G16_UINTCL_RG, CL_UNSIGNED_INT16DXGI_FORMAT_R16G16_SNORMCL_RG, CL_SNORM_INT16DXGI_FORMAT_R16G16_SINTCL_RG, CL_SIGNED_INT16DXGI_FORMAT_R8G8_UNORMCL_RG, CL_UNORM_INT8DXGI_FORMAT_R8G8_UINTCL_RG, CL_UNSIGNED_INT8DXGI_FORMAT_R8G8_SNORMCL_RG, CL_SNORM_INT8DXGI_FORMAT_R8G8_SINTCL_RG, CL_SIGNED_INT8DXGI_FORMAT_R32_FLOATCL_R, CL_FLOATDXGI_FORMAT_R32_UINTCL_R, CL_UNSIGNED_INT32DXGI_FORMAT_R32_SINTCL_R, CL_SIGNED_INT32DXGI_FORMAT_R16_FLOATCL_R, CL_HALF_FLOATDXGI_FORMAT_R16_UNORMCL_R, CL_UNORM_INT16DXGI_FORMAT_R16_UINTCL_R, CL_UNSIGNED_INT16DXGI_FORMAT_R16_SNORMCL_R, CL_SNORM_INT16DXGI_FORMAT_R16_SINTCL_R, CL_SIGNED_INT16DXGI_FORMAT_R8_UNORMCL_R, CL_UNORM_INT8DXGI_FORMAT_R8_UINTCL_R, CL_UNSIGNED_INT8DXGI_FORMAT_R8_SNORMCL_R, CL_SNORM_INT8DXGI_FORMAT_R8_SINTCL_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.
SpecificationOpenCL SpecificationAlso seecl_khr_d3d11_sharing,
clGetDeviceIDsFromD3D11KHR,
clCreateFromD3D11BufferKHR,
clCreateFromD3D11Texture3DKHR,
clEnqueueAcquireD3D11ObjectsKHR,
clEnqueueReleaseD3D11ObjectsKHR
khronos-opencl-man-1.0~svn33624/clGetGLContextInfoKHR.xml 0000644 0001750 0001750 00000043164 11660441607 023033 0 ustar mathieu mathieu
clGetGLContextInfoKHR
clGetGLContextInfoKHR
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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
clGetGLContextInfoKHRconst
cl_context_properties
*properties
cl_gl_context_info
param_name
size_t
param_value_size
void
*param_value
size_t
*param_value_size_retParametersproperties
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_nameReturn TypeInformation returned in param_valueCL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHRcl_device_idReturn the CL device currently associated with the specified OpenGL context.CL_DEVICES_FOR_GL_CONTEXT_KHRcl_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.
SpecificationOpenCL SpecificationAlso seeclCreateContextcl_khr_gl_sharing
khronos-opencl-man-1.0~svn33624/vload_halfn.xml 0000644 0001750 0001750 00000017147 11660441607 021303 0 ustar mathieu mathieu
]>
vload_halfnvload_halfn2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3vload_halfn
Read a half float vector from a pointer to memory.
floatn
vload_halfnsize_toffsetconst __global half*p
floatn
vload_halfnsize_toffsetconst __local half*p
floatn
vload_halfnsize_toffsetconst __constant half*p
floatn
vload_halfnsize_toffsetconst __private half*pDescription
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.
SpecificationOpenCL SpecificationAlso seeVector Data Load and Store Functions
khronos-opencl-man-1.0~svn33624/clGetEventInfo.xml 0000644 0001750 0001750 00000035354 11660441607 021702 0 ustar mathieu mathieu
clGetEventInfoclGetEventInfo2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3clGetEventInfo
Returns information about the event object.
cl_int
clGetEventInfo
cl_eventeventcl_event_infoparam_namesize_tparam_value_sizevoid*param_valuesize_t*param_value_size_retParameters 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_infoReturn TypeInformation returned in param_valueCL_EVENT_COMMAND_QUEUEcl_command_queue
Return the command-queue associated with event.
For user event objects, a NULL value is returned.
CL_EVENT_CONTEXTcl_context
Return the context associated with event.
CL_EVENT_COMMAND_TYPEcl_command_typeReturn 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_STATUScl_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_COUNTcl_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.
SpecificationOpenCL SpecificationAlso seeclReleaseEvent,
clRetainEvent,
clWaitForEvents,
cl_khr_gl_event
khronos-opencl-man-1.0~svn33624/read_imagei3d.xml 0000644 0001750 0001750 00000025161 11660441607 021476 0 ustar mathieu mathieu
[
]>
read_imagei (3D)read_imagei (3D)2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3read_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
coordDescription
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;
SpecificationOpenCL SpecificationAlso seeImage Functions
khronos-opencl-man-1.0~svn33624/async_work_group_strided_copy.xml 0000644 0001750 0001750 00000022550 11660441607 025163 0 ustar mathieu mathieu
async_work_group_strided_copyasync_work_group_strided_copy2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3async_work_group_strided_copy
Performs an async gather of num_elementsgentype elements from source to destination.
event_t
async_work_group_strided_copy
__local gentype*dstconst __global gentype*srcsize_tnum_gentypessize_tsrc_strideevent_tevent
event_t
async_work_group_strided_copy
__global gentype*dstconst __local gentype*srcsize_tnum_gentypessize_tdst_strideevent_teventDescription
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_gentypesgentype 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.
SpecificationOpenCL SpecificationAlso seeAsync Copy and Prefetch Functions,
wait_group_events
khronos-opencl-man-1.0~svn33624/clReleaseProgram.xml 0000644 0001750 0001750 00000012453 11660441607 022250 0 ustar mathieu mathieu
clReleaseProgram
clReleaseProgram
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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 clReleaseProgramcl_programprogramNotes
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.
SpecificationOpenCL SpecificationAlso seeclCreateProgramWithSource,
clCreateProgramWithBinary,
clRetainProgram
khronos-opencl-man-1.0~svn33624/length.xml 0000644 0001750 0001750 00000013276 11660441607 020306 0 ustar mathieu mathieu
]>
lengthlength2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3length
Vector length.
float
length
floatnp
double
length
doublenphalflength (gentypep) // 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.
SpecificationOpenCL SpecificationAlso seeGeometric Functions
khronos-opencl-man-1.0~svn33624/cl_khr_dx9_media_sharing.xml 0000644 0001750 0001750 00000027640 11660441607 023725 0 ustar mathieu mathieu
cl_khr_dx9_media_sharingcl_khr_dx9_media_sharing2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3cl_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:
clGetDeviceIDsFromDX9MediaAdapterKHRclCreateFromDX9MediaSurfaceKHRclEnqueueAcquireDX9MediaSurfacesKHRclEnqueueReleaseDX9MediaSurfacesKHR
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.
SpecificationOpenCL SpecificationAlso seeEXTENSION,
clGetDeviceIDsFromDX9MediaAdapterKHR,
clCreateFromDX9MediaSurfaceKHR,
clEnqueueAcquireDX9MediaSurfacesKHR,
clEnqueueReleaseDX9MediaSurfacesKHR
khronos-opencl-man-1.0~svn33624/clEnqueueFillImage.xml 0000644 0001750 0001750 00000037323 11660441607 022524 0 ustar mathieu mathieu
clEnqueueFillImage
clEnqueueFillImage
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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
clEnqueueFillImagecl_command_queuecommand_queuecl_memimageconst void*fill_colorconst size_t*originconst size_t*regioncl_uintnum_events_in_wait_listconst cl_event*event_wait_listcl_event*eventParameters 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.
ErrorsclEnqueueFillImage 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.
SpecificationOpenCL SpecificationAlso seeclEnqueueReadImage,
clEnqueueWriteImage,
clEnqueueCopyImage,
clEnqueueBarrierWithWaitList
khronos-opencl-man-1.0~svn33624/isordered.xml 0000644 0001750 0001750 00000017350 11660441607 021002 0 ustar mathieu mathieu
]>
isorderedisordered2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3isordered
Test if arguments are ordered.
int
isordered
floatxfloaty
intn
isordered
floatnxfloatny
int
isordered
doublexdoubley
longn
isordered
doublenxdoublenyintisordered
(halfx,
halfy) // if half extension enabled
shortnisordered
(halfnx,
halfny) // 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;
SpecificationOpenCL SpecificationAlso seeRelational Functions
khronos-opencl-man-1.0~svn33624/convert_T.xml 0000644 0001750 0001750 00000034701 11660441607 020764 0 ustar mathieu mathieu
Explicit conversions with convert_T()
Explicit conversions with convert_T()2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3Explicit 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.
ModifierRounding Mode Description_rteRound to nearest even_rtzRound towards zero_rtpRound toward positive infinity_rtnRound toward negative infinityno 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 );
SpecificationOpenCL SpecificationAlso seeScalar Data Types,
Vector Data Types
khronos-opencl-man-1.0~svn33624/clReleaseEvent.xml 0000644 0001750 0001750 00000015701 11660441607 021721 0 ustar mathieu mathieu
clReleaseEvent
clReleaseEvent
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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
clReleaseEventcl_eventeventParameterseventEvent 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.
SpecificationOpenCL SpecificationAlso seeclGetEventInfo,
clRetainEvent,
clWaitForEvents
khronos-opencl-man-1.0~svn33624/clCreateUserEvent.xml 0000644 0001750 0001750 00000014250 11660441607 022401 0 ustar mathieu mathieu
clCreateUserEvent
clCreateUserEvent
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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 clCreateUserEventcl_contextcontextcl_int*errcode_retParameterscontextA 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.
SpecificationOpenCL SpecificationAlso seeCardinality Diagram
khronos-opencl-man-1.0~svn33624/clCreateFromD3D11Texture2DKHR.xml 0000644 0001750 0001750 00000025146 11660441607 024143 0 ustar mathieu mathieu
]>
clCreateFromD3D11Texture2DKHRclCreateFromD3D11Texture2DKHR2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3clCreateFromD3D11Texture2DKHRCreates an OpenCL 2D image object from a subresource of a Direct3D 11 2D texture.
cl_mem
clCreateFromD3D11Texture2DKHRcl_contextcontextcl_mem_flagsflagsID3D11Texture2D*resourceUINTsubresource
cl_int
*errcode_retParameterscontext
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.
SpecificationOpenCL SpecificationAlso seecl_khr_d3d11_sharing,
clGetDeviceIDsFromD3D11KHR,
clCreateFromD3D11BufferKHR,
clCreateFromD3D11Texture3DKHR,
clEnqueueAcquireD3D11ObjectsKHR,
clEnqueueReleaseD3D11ObjectsKHR
khronos-opencl-man-1.0~svn33624/sharingD3D10Inc.xml 0000644 0001750 0001750 00000006146 11660441607 021544 0 ustar mathieu mathieu
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~svn33624/sin.xml 0000644 0001750 0001750 00000020233 11660441607 017605 0 ustar mathieu mathieu
]>
sin, sincos, sinh, sinpisin, sincos, sinh, sinpi2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3sin, 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
gentypexDescriptionsin 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.
SpecificationOpenCL SpecificationAlso seeMath Functions
khronos-opencl-man-1.0~svn33624/cl_khr_gl_event.xml 0000644 0001750 0001750 00000020012 11660441607 022134 0 ustar mathieu mathieu
cl_khr_gl_eventcl_khr_gl_event2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3cl_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.
SpecificationOpenCL SpecificationAlso seeEXTENSION,
clCreateEventFromGLsyncKHR
khronos-opencl-man-1.0~svn33624/clGetDeviceInfo.xml 0000644 0001750 0001750 00000151746 11660441607 022024 0 ustar mathieu mathieu
clGetDeviceInfoclGetDeviceInfo2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3clGetDeviceInfoGet 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_retParametersdevice
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_infoReturn TypeDescriptionCL_DEVICE_ADDRESS_BITScl_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_AVAILABLEcl_bool
Is CL_TRUE if the device is available and
CL_FALSE if the device is not available.
CL_DEVICE_BUILT_IN_KERNELSchar[]
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_AVAILABLEcl_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_CONFIGcl_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_LITTLEcl_bool
Is CL_TRUE if the OpenCL device is a little endian
device and CL_FALSE otherwise.
CL_DEVICE_ERROR_CORRECTION_SUPPORTReturn 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_CAPABILITIEScl_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_EXTENSIONSchar[]
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_atomicscl_khr_int64_extended_atomicscl_khr_fp16cl_khr_gl_sharingcl_khr_gl_eventcl_khr_d3d10_sharingcl_khr_dx9_media_sharingcl_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_SIZEcl_ulongSize of global memory cache in bytes.CL_DEVICE_GLOBAL_MEM_CACHE_TYPEcl_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_SIZEcl_uintSize of global memory cache line in bytes.CL_DEVICE_GLOBAL_MEM_SIZEcl_ulongSize of global device memory in bytes.CL_DEVICE_HALF_FP_CONFIGcl_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_MEMORYcl_bool
Is CL_TRUE if the device and the host have a unified
memory subsystem and is CL_FALSE otherwise.
CL_DEVICE_IMAGE_SUPPORTcl_bool
Is CL_TRUE if images are supported by the OpenCL
device and CL_FALSE otherwise.
CL_DEVICE_IMAGE2D_MAX_HEIGHTsize_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_WIDTHsize_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_DEPTHsize_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_HEIGHTsize_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_WIDTHsize_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_SIZEsize_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_SIZEsize_t
Max number of images in a 1D or 2D image array. The minimum value is 2048 if
CL_DEVICE_IMAGE_SUPPORT is CL_TRUECL_DEVICE_LINKER_AVAILABLEcl_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_TRUECL_DEVICE_LOCAL_MEM_SIZEcl_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_TYPEcl_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_FREQUENCYcl_uintMaximum configured clock frequency of the device in MHz.CL_DEVICE_MAX_COMPUTE_UNITScl_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_ARGScl_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_SIZEcl_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_SIZEcl_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_SIZEsize_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_ARGScl_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_SAMPLERScl_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_SIZEsize_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_DIMENSIONScl_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_SIZESsize_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_ARGScl_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_ALIGNcl_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_SIZEcl_uint
Deprecated in OpenCL 1.2. The smallest alignment in bytes which can be
used for any data type.
CL_DEVICE_NAMEchar[]Device name string.CL_DEVICE_NATIVE_VECTOR_WIDTH_CHARCL_DEVICE_NATIVE_VECTOR_WIDTH_SHORTCL_DEVICE_NATIVE_VECTOR_WIDTH_INTCL_DEVICE_NATIVE_VECTOR_WIDTH_LONGCL_DEVICE_NATIVE_VECTOR_WIDTH_FLOATCL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLECL_DEVICE_NATIVE_VECTOR_WIDTH_HALFcl_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_VERSIONchar[]
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_DEVICEcl_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_DEVICEScl_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_PROPERTIEScl_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_EQUALLYCL_DEVICE_PARTITION_BY_COUNTSCL_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_DOMAINcl_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_NUMACL_DEVICE_AFFINITY_DOMAIN_L4_CACHECL_DEVICE_AFFINITY_DOMAIN_L3_CACHECL_DEVICE_AFFINITY_DOMAIN_L2_CACHECL_DEVICE_AFFINITY_DOMAIN_L1_CACHECL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE
If the device does not support any affinity domains, a value of 0 will be returned.
CL_DEVICE_PARTITION_TYPEcl_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_PLATFORMcl_platform_idThe platform associated with this device.CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHARCL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORTCL_DEVICE_PREFERRED_VECTOR_WIDTH_INTCL_DEVICE_PREFERRED_VECTOR_WIDTH_LONGCL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOATCL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLECL_DEVICE_PREFERRED_VECTOR_WIDTH_HALFcl_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_SIZEsize_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_SYNCcl_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_PROFILEchar[]
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_RESOLUTIONsize_tDescribes the resolution of device timer. This is measured in nanoseconds.CL_DEVICE_QUEUE_PROPERTIEScl_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_ENABLECL_QUEUE_PROFILING_ENABLE
These properties are described in the table for
clCreateCommandQueue.
The mandated minimum capability is
CL_QUEUE_PROFILING_ENABLE.
CL_DEVICE_REFERENCE_COUNTcl_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_CONFIGcl_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 supportedCL_FP_INF_NAN - INF and quiet NaNs are supportedCL_FP_ROUND_TO_NEAREST - round to nearest even rounding mode supportedCL_FP_ROUND_TO_ZERO - round to zero rounding mode supportedCL_FP_ROUND_TO_INF - round to +ve and -ve infinity rounding modes supportedCL_FP_FMA - IEEE754-2008 fused multiply-add is supportedCL_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_TYPEcl_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_VENDORchar[]Vendor name string.CL_DEVICE_VENDOR_IDcl_uint
A unique device vendor identifier. An example of a unique device identifier
could be the PCIe ID.
CL_DEVICE_VERSIONchar[]
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_VERSIONchar[]
OpenCL software driver version string in the form
major_number.minor_number.
NotesCL_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_SIZECL_DEVICE_BUILT_IN_KERNELSCL_DEVICE_PARENT_DEVICECL_DEVICE_PARTITION_TYPECL_DEVICE_REFERENCE_COUNTErrorsclGetDeviceInfo 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.
SpecificationOpenCL SpecificationAlso seeclGetDeviceIDs,
cl_khr_fp64,
__constant,
clCreateCommandQueue,
clRetainCommandQueue,
clEnqueueNDRangeKernel
khronos-opencl-man-1.0~svn33624/vstoren.xml 0000644 0001750 0001750 00000015705 11660441607 020524 0 ustar mathieu mathieu
]>
vstorenvstoren2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3vstoren
Write sizeof bytes (gentypen) to memory.
void
vstoren
gentypendata
size_toffset
__global gentype*p
void
vstorengentypendatasize_toffset__local gentype*p
void
vstorengentypendatasize_toffset__private gentype*pDescription
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)).
SpecificationOpenCL SpecificationAlso seeVector Data Load and Store Functions
khronos-opencl-man-1.0~svn33624/write_image3d.xml 0000644 0001750 0001750 00000025237 11660441607 021550 0 ustar mathieu mathieu
[
]>
write_image3dwrite_image (3D)2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3write_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
colorDescription
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.
SpecificationOpenCL SpecificationAlso seeImage Functions,
cl_khr_3d_image_writesscalarDataTypes
khronos-opencl-man-1.0~svn33624/abstractDataTypes.xml 0000644 0001750 0001750 00000012570 11660441607 022443 0 ustar mathieu mathieu
Abstract Data TypesAbstract Built-in Data Types2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3Abstract Data Types
Abstract Built-in Data Types
Description
The following table describes abstract data types supported by OpenCL:
TypeDescriptionAPI 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_samplerAlso seeMacros and Limits,
Scalar Data Types,
Vector Data Types,
Other Data Types,
Reserved Data Types
khronos-opencl-man-1.0~svn33624/read_imagei1d.xml 0000644 0001750 0001750 00000042205 11660441607 021472 0 ustar mathieu mathieu
[
]>
read_imagei (1D)read_imagei (1D)2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3read_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
coordDescription
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;
SpecificationOpenCL SpecificationAlso seeImage Functions
khronos-opencl-man-1.0~svn33624/trunc.xml 0000644 0001750 0001750 00000007701 11660441607 020154 0 ustar mathieu mathieu
]>
trunctrunc2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3trunc
Round to integer toward zero.
gentype
trunc
gentypeDescription
Round to integral value using the round to zero rounding mode.
Notes
&mathFunctionsInc;
SpecificationOpenCL SpecificationAlso seeMath Functions
khronos-opencl-man-1.0~svn33624/remainder.xml 0000644 0001750 0001750 00000010710 11660441607 020761 0 ustar mathieu mathieu
]>
remainderremainder2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3remainder
Floating point remainder function.
gentype
remainder
gentypexgentypeyDescription
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;
SpecificationOpenCL SpecificationAlso seeMath Functions
khronos-opencl-man-1.0~svn33624/islessequal.xml 0000644 0001750 0001750 00000017535 11660441607 021361 0 ustar mathieu mathieu
]>
islessequalislessequal2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3islessequal
Compare of x <= y.
int
islessequal
floatxfloaty
intn
islessequal
floatnxfloatny
int
islessequal
doublexdoubley
longn
islessequal
doublenxdoublenyintislessequal
(halfx,
halfy) // if half extension enabled
shortnislessequal
(halfnx,
halfny) // if half extension enabled
Description
Returns the component-wise compare of x <= y.
Notes
&relationalFunctionsInc1;
&relationalFunctionsInc2;
&relationalFunctionsInc3;
SpecificationOpenCL SpecificationAlso seeRelational Functions
khronos-opencl-man-1.0~svn33624/clReleaseDevice.xml 0000644 0001750 0001750 00000013637 11660441607 022045 0 ustar mathieu mathieu
clReleaseDevice
clReleaseDevice
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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 clReleaseDevicecl_device_iddeviceNotes
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.
SpecificationOpenCL SpecificationAlso seeclCreateSubDevices,
clGetDeviceIDs,
clRetainDevice
khronos-opencl-man-1.0~svn33624/clRetainContext.xml 0000644 0001750 0001750 00000014540 11660441607 022126 0 ustar mathieu mathieu
clRetainContext
clRetainContext
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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_contextcontextParameters
context
The context to retain.
NotesclCreateContext 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.
SpecificationOpenCL SpecificationAlso seeclCreateContext,
clCreateContextFromType,
clGetContextInfo,
clReleaseContext,
clGetContextInfo
khronos-opencl-man-1.0~svn33624/clSetUserEventStatus.xml 0000644 0001750 0001750 00000020126 11660441607 023134 0 ustar mathieu mathieu
clSetUserEventStatus
clSetUserEventStatus
clSetUserEventStatus
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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 clSetUserEventStatuscl_eventeventcl_intexecution_statusParametersevent
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);
SpecificationOpenCL SpecificationAlso seeclCreateUserEvent
khronos-opencl-man-1.0~svn33624/attribute.xml 0000644 0001750 0001750 00000014767 11660441607 021036 0 ustar mathieu mathieu
__attribute____attribute__2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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:
typesfunctionsvariablesblockscontrol-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.)
SpecificationOpenCL SpecificationAlso seeType Attributes,
Variable Attributes,
Block and Control-Flow Statement Attributes,
Function Qualifiers
khronos-opencl-man-1.0~svn33624/clCreateProgramWithSource.xml 0000644 0001750 0001750 00000021373 11660441607 024111 0 ustar mathieu mathieu
clCreateProgramWithSource
clCreateProgramWithSource
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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 clCreateProgramWithSourcecl_contextcontextcl_uintcountconst char**stringsconst size_t*lengthscl_int*errcode_retParameters 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.
ErrorsclCreateProgramWithSource 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.
SpecificationOpenCL SpecificationAlso seeclCreateProgramWithBinary,
clReleaseProgram,
clRetainProgram,
Cardinality Diagram
khronos-opencl-man-1.0~svn33624/vec_step.xml 0000644 0001750 0001750 00000025623 11660441607 020634 0 ustar mathieu mathieu
vec_stepvec_step2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3vec_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
typeDescription
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.
SpecificationOpenCL SpecificationAlso seeMiscellaneous Vector Functions
khronos-opencl-man-1.0~svn33624/atom_dec.xml 0000644 0001750 0001750 00000017223 11660441607 020574 0 ustar mathieu mathieu
atom_decatom_dec2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3atom_dec
64-bit atom_dec functions.
long
atom_dec
volatile __global
long*plongval
long
atom_dec
volatile __local
long*plongval
ulong
atom_dec
volatile __global
ulong*pulongval
ulong
atom_dec
volatile __local
ulong*pulongvalDescription
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.
SpecificationOpenCL SpecificationAlso seeAtomic Functions,
atomic_dec,
cl_khr_int64_base_atomics
khronos-opencl-man-1.0~svn33624/isinf.xml 0000644 0001750 0001750 00000015266 11660441607 020136 0 ustar mathieu mathieu
]>
isinfisinf2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3isinf
Test for infinity value.
int
isinf
float
intn
isinf
floatn
int
isinf
double
longn
isinf
doublenintisinf (half) // if half extension enabled
shortnisinf (halfn) // if half extension enabled
Description
Test for infinity value (positive or negative).
Notes
&relationalFunctionsInc1;
&relationalFunctionsInc2;
SpecificationOpenCL SpecificationAlso seeRelational Functions
khronos-opencl-man-1.0~svn33624/attributes-variables.xml 0000644 0001750 0001750 00000027052 11660441607 023156 0 ustar mathieu mathieu
Attributes of VariablesAttributes of Variables2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3Attributes 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 (alignment)
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 (endiantype)
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.
SpecificationOpenCL SpecificationAlso see__attribute__,
Blocks and Control-Flow Statement Attributes Attributes,
Types Attributes
khronos-opencl-man-1.0~svn33624/clRetainDevice.xml 0000644 0001750 0001750 00000014032 11660441607 021675 0 ustar mathieu mathieu
clRetainDevice
clRetainDevice
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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
deviceNotes
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.
SpecificationOpenCL SpecificationAlso seeclCreateSubDevices,
clGetDeviceIDs,
clReleaseDevice
khronos-opencl-man-1.0~svn33624/atomic_or.xml 0000644 0001750 0001750 00000016211 11660441607 020771 0 ustar mathieu mathieu
atomic_oratomic_or2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3atomic_or
atomic_or functions.
int
atomic_or
volatile __global
int*pintval
unsigned int
atomic_or
volatile __global
unsigned int*punsigned intval
int
atomic_or
volatile __local
int*pintval
unsigned int
atomic_or
volatile __local
unsigned int*punsigned intvalDescription
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.
SpecificationOpenCL SpecificationAlso seeAtomic Functions,
atom_or
khronos-opencl-man-1.0~svn33624/atomic_inc.xml 0000644 0001750 0001750 00000014650 11660441607 021127 0 ustar mathieu mathieu
atomic_incatomic_inc2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3atomic_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*pDescription
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.
SpecificationOpenCL SpecificationAlso seeAtomic Functions,
atom_inc
khronos-opencl-man-1.0~svn33624/mix.xml 0000644 0001750 0001750 00000015536 11660441607 017623 0 ustar mathieu mathieu
]>
mixmix2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3mix
Linear blend of x and y.
gentype
mix
gentypexgentypeygentypea
gentypef
mix
gentypefxgentypefyfloata
gentyped
mix
gentypedxgentypedydoubleagentypemix (gentypex,
gentypey, halfa) // if half extension enabled
Description
Returns the linear blend of x and y implemented
as: x + (y
- x) * aa 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.
SpecificationOpenCL SpecificationAlso seeCommon Functions
khronos-opencl-man-1.0~svn33624/clWaitForEvents.xml 0000644 0001750 0001750 00000016253 11660441607 022102 0 ustar mathieu mathieu
clWaitForEvents
clWaitForEvents
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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
clWaitForEventscl_uintnum_eventsconst cl_event*event_listParametersevent_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.
SpecificationOpenCL SpecificationAlso seeclGetEventInfo,
clReleaseEvent,
clRetainEvent,
cl_khr_gl_event
khronos-opencl-man-1.0~svn33624/clGetSamplerInfo.xml 0000644 0001750 0001750 00000024766 11660441607 022231 0 ustar mathieu mathieu
clGetSamplerInfo
clGetSamplerInfo
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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
clGetSamplerInfocl_samplersamplercl_sampler_infoparam_namesize_tparam_value_sizevoid*param_valuesize_t*param_value_size_retParameterssamplerSpecifies 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_infoReturn Type and Info. returned in param_valueCL_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.
SpecificationOpenCL SpecificationAlso seeclCreateSampler,
clRetainSampler,
clReleaseSampler
khronos-opencl-man-1.0~svn33624/clReleaseContext.xml 0000644 0001750 0001750 00000013715 11660441607 022267 0 ustar mathieu mathieu
clReleaseContext
clReleaseContext
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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_contextcontextParameters
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.
SpecificationOpenCL SpecificationAlso seeclCreateContext,
clCreateContextFromType,
clGetContextInfo,
clRetainContext,
clGetContextInfo
khronos-opencl-man-1.0~svn33624/atomic_max.xml 0000644 0001750 0001750 00000016360 11660441607 021143 0 ustar mathieu mathieu
atomic_maxatomic_max2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3atomic_max
atomic_max functions.
int
atomic_max
volatile __global
int*pintval
unsigned int
atomic_max
volatile __global
unsigned int*punsigned intval
int
atomic_max
volatile __local
int*pintval
unsigned int
atomic_max
volatile __local
unsigned int*punsigned intvalDescription
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.
SpecificationOpenCL SpecificationAlso seeAtomic Functions,
atom_max
khronos-opencl-man-1.0~svn33624/vectorDataLoadandStoreFunctions.xml 0000644 0001750 0001750 00000011276 11660441607 025310 0 ustar mathieu mathieu
]>
Vector Data Load and Store FunctionsVector Data Load and Store Functions2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3Vector Data Load and Store FunctionsClick an item in the table below for details about that function.vloadnRead vectors from a pointer to memory.vstorenWrite a vector to a pointer to memory.vload_halfRead a half float from a pointer to memory.vload_halfnRead a half float vector from a pointer to memory.vstore_halfConvert float to half and write to a pointer to memory.vstore_halfnConvert float vector to half vector and write to a pointer to memory.vloada_halfnRead half float vector from a pointer to memory.vstorea_halfnConvert float vector to half vector and write to a pointer to memory.SpecificationOpenCL Specification
khronos-opencl-man-1.0~svn33624/shuffle.xml 0000644 0001750 0001750 00000020047 11660441607 020453 0 ustar mathieu mathieu
shuffle, shuffle2shuffle, shuffle22007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3shuffle
Constructs a permutation of elements from one (or two) input vectors.
gentypen
shuffle
gentypemxugentypenmask
gentypen
shuffle2
gentypemxgentypemyugentypenmaskDescription
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);
SpecificationOpenCL SpecificationAlso seeMiscellaneous Vector Functions
khronos-opencl-man-1.0~svn33624/clEnqueueAcquireGLObjects.xml 0000644 0001750 0001750 00000031712 11660441607 024015 0 ustar mathieu mathieu
]>
clEnqueueAcquireGLObjectsclEnqueueAcquireGLObjects2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3clEnqueueAcquireGLObjects
Acquire OpenCL memory objects that have been created from OpenGL objects.
cl_int
clEnqueueAcquireGLObjects
cl_command_queuecommand_queuecl_uintnum_objectsconst cl_mem*mem_objectscl_uintnum_events_in_wait_listconst cl_event*event_wait_listcl_event*eventParameters
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.
SpecificationOpenCL SpecificationAlso seecl_khr_gl_sharing,
clEnqueueReleaseGLObjects,
cl_khr_gl_event
khronos-opencl-man-1.0~svn33624/imageDescriptor.xml 0000644 0001750 0001750 00000026642 12200737321 022137 0 ustar mathieu mathieu
imageDescriptorimageDescriptor2007-2010The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3imageDescriptor
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;Membersimage_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.
SpecificationOpenCL SpecificationAlso seecl_image_format
khronos-opencl-man-1.0~svn33624/vload_half.xml 0000644 0001750 0001750 00000015435 11660441607 021123 0 ustar mathieu mathieu
]>
vload_halfvload_half2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3vload_half
Read a half float from a pointer to memory.
float
vload_half
size_toffsetconst __global half*p
float
vload_half
size_toffsetconst __local half*p
float
vload_half
size_toffsetconst __constant half*p
float
vload_half
size_toffsetconst __private half*pDescription
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;
SpecificationOpenCL SpecificationAlso seeVector Data Load and Store Functions
khronos-opencl-man-1.0~svn33624/clGetImageInfo.xml 0000644 0001750 0001750 00000051045 11660441607 021636 0 ustar mathieu mathieu
clGetImageInfo
clGetImageInfo
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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_retParameters 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_infoReturn TypeInfo. returned in param_valueCL_IMAGE_FORMATcl_image_format
Return image format descriptor specified
when image is created with
clCreateImage.
CL_IMAGE_ELEMENT_SIZEsize_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_PITCHsize_t
Return size in bytes of a row of elements of the image object
given by image.
CL_IMAGE_SLICE_PITCHsize_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_WIDTHsize_t
Return width of image in pixels.
CL_IMAGE_HEIGHTsize_t
Return height of image in pixels. For a 1D image, 1D image
buffer and 1D image array object, height = 0.
CL_IMAGE_DEPTHsize_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_SIZEsize_t
Return number of images in the image array.
If image is not an image array, 0 is returned.
CL_IMAGE_BUFFERcl_mem
Return buffer object associated with image.
CL_IMAGE_NUM_MIP_LEVELScl_uint
Return num_mip_levels associated with image.
CL_IMAGE_NUM_SAMPLEScl_uint
Return num_samples associated with image.
CL_IMAGE_D3D10_SUBRESOURCE_KHRID3D10Resource *
(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_KHRcl_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_KHRcl_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_KHRID3D11Resource *
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)
SpecificationOpenCL SpecificationAlso seeclGetMemObjectInfo
khronos-opencl-man-1.0~svn33624/clCreateEventFromGLsyncKHR.xml 0000644 0001750 0001750 00000021150 11660441607 024050 0 ustar mathieu mathieu
clCreateEventFromGLsyncKHRclCreateEventFromGLsyncKHR2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3clCreateEventFromGLsyncKHR
Creates an event object linked to an OpenGL sync object.
cl_event
clCreateEventFromGLsyncKHR
cl_contextcontextGLsyncsynccl_int*errcode_retParameters 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.
SpecificationOpenCL SpecificationAlso seecl_khr_gl_event,
clEnqueueAcquireGLObjects,
clRetainEvent
khronos-opencl-man-1.0~svn33624/radians.xml 0000644 0001750 0001750 00000010526 11660441607 020441 0 ustar mathieu mathieu
]>
radiansradians2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3radians
Converts degrees to radians.
gentype
radians
gentypedegreesDescription
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}.
SpecificationOpenCL SpecificationAlso seeCommon Functions,
degrees
khronos-opencl-man-1.0~svn33624/dataTypes.xml 0000644 0001750 0001750 00000031015 11660441607 020752 0 ustar mathieu mathieu
Data TypesData Types2007-2010The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3Data 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 categoryIncluded data typesScalar data typesbool, 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 typescharn, ucharn,
shortn, ushortn,
intn, uintn,
longn, ulongn,
floatn, doublen, and optional halfn types.
Abstract data typescl_platform_id, cl_device_id,
cl_context, cl_command_queue,
cl_mem, cl_program,
cl_kernel, cl_event, and
cl_sampler.
Reserved Data Typesbooln,
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 typesimage2d_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.
SpecificationOpenCL Specification
khronos-opencl-man-1.0~svn33624/clEnqueueCopyBufferRect.xml 0000644 0001750 0001750 00000052731 11660441607 023555 0 ustar mathieu mathieu
clEnqueueCopyBufferRect
clEnqueueCopyBufferRect
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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_queuecl_memsrc_buffercl_memdst_bufferconst size_t*src_originconst size_t*dst_originconst size_t*regionsize_tsrc_row_pitchsize_tsrc_slice_pitchsize_tdst_row_pitchsize_tdst_slice_pitchcl_uintnum_events_in_wait_listconst cl_event*event_wait_listcl_event*eventParameters 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.
NotesclEnqueueCopyBufferRectenqueues 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.
SpecificationOpenCL SpecificationAlso seeclEnqueueReadBuffer,
clEnqueueReadBufferRect,
clEnqueueWriteBuffer,
clEnqueueWriteBufferRect,
clEnqueueCopyBuffer,
clCreateBuffer,
clCreateSubBuffer,
clEnqueueCopyBufferToImage,
clEnqueueCopyImageToBuffer
khronos-opencl-man-1.0~svn33624/wait_group_events.xml 0000644 0001750 0001750 00000011707 11660441607 022566 0 ustar mathieu mathieu
wait_group_eventswait_group_events2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3wait_group_events
Wait for events that identify the async_work_group_copy operations to complete.
void
wait_group_events
intnum_eventsevent_t*event_listDescription
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.
SpecificationOpenCL SpecificationAlso seeAsync Copy and Prefetch Functions
khronos-opencl-man-1.0~svn33624/atomicFunctions.xml 0000644 0001750 0001750 00000021256 11660441607 022167 0 ustar mathieu mathieu
Atomic FunctionsAtomic Functions2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3Atomic Functions
The atomic functions are shown below.
Click an item in the table below for details about that function.
atomic_addatomic_subatomic_xchgatomic_incatomic_decatomic_cmpxchgatomic_minatomic_maxatomic_andatomic_oratomic_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_addatom_subatom_xchgatom_incatom_decatom_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_minatom_maxatom_xoratom_andatom_orDescription
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.
SpecificationOpenCL Specification
khronos-opencl-man-1.0~svn33624/integerClamp.xml 0000644 0001750 0001750 00000012320 11660441607 021424 0 ustar mathieu mathieu
]>
clampclamp2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3clamp
Clamp x to range given by minval, maxval.
gentype
clamp
gentypexgentypeminvalgentypemaxval
gentype
clamp
gentypexsgentypeminvalsgentypemaxvalDescriptionclamp returns
min
(min(
x, minval), maxval).
Results are undefined if minval > maxval.
Notes
&integerFunctionsInc;
SpecificationOpenCL SpecificationAlso seeInteger Functions
khronos-opencl-man-1.0~svn33624/mul_hi.xml 0000644 0001750 0001750 00000010311 11660441607 020265 0 ustar mathieu mathieu
]>
mul_himul_hi2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3mul_hi
Returns the high half of the product of x and y.
gentype
mul_hi
gentypexgentypeyDescriptionmul_hi computes x * y and
returns the high half of the product of x and y.
Notes
&integerFunctionsInc;
SpecificationOpenCL SpecificationAlso seeInteger Functions
khronos-opencl-man-1.0~svn33624/clCreateSubDevices.xml 0000644 0001750 0001750 00000047464 11660441607 022532 0 ustar mathieu mathieu
]>
clCreateSubDevices
clCreateSubDevices
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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_deviceconst
cl_device_partition_property
*properties
cl_uint
num_devices
cl_device_id
*out_devicescl_uint
*num_devices_retParametersin_deviceThe 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)DescriptionCL_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 }
SpecificationOpenCL SpecificationAlso seeclGetDeviceInfo
khronos-opencl-man-1.0~svn33624/clUnloadPlatformCompiler.xml 0000644 0001750 0001750 00000012350 11660441607 023756 0 ustar mathieu mathieu
clUnloadPlatformCompiler
clUnloadPlatformCompiler
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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
clUnloadPlatformCompilercl_platform_idplatformNotes
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.
ErrorsclUnloadPlatformCompiler 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.
SpecificationOpenCL Specification
khronos-opencl-man-1.0~svn33624/atom_xchg.xml 0000644 0001750 0001750 00000017137 11660441607 020776 0 ustar mathieu mathieu
atom_xchgatom_xchg2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3atom_xchg
64-bit atom_xchg functions.
long
atom_xchg
volatile __global
long*plongval
long
atom_xchg
volatile __local
long*plongval
ulong
atom_xchg
volatile __global
ulong*pulongval
ulong
atom_xchg
volatile __local
ulong*pulongvalDescription
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.
SpecificationOpenCL SpecificationAlso seeAtomic Functions,
atomic_xchg,
cl_khr_int64_base_atomics
khronos-opencl-man-1.0~svn33624/clFlush.xml 0000644 0001750 0001750 00000016200 11660441607 020413 0 ustar mathieu mathieu
clFlush
clFlush
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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_queueNotes
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.
SpecificationOpenCL SpecificationAlso seeclFinish
khronos-opencl-man-1.0~svn33624/ldexp.xml 0000644 0001750 0001750 00000025547 11660441607 020145 0 ustar mathieu mathieu
ldexpldexp2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3ldexp
Multiply x by 2 to the power k.
floatn
ldexp
floatnx
intnk
floatn
ldexp
floatnx
int
k
float
ldexp
float
x
int
k
doublen
ldexp
doublenx
intnk
doublen
ldexp
doublenx
int
k
double
ldexp
double
x
int
n
halfn
ldexp
halfnx
intnk
halfn
ldexp
halfnx
int
k
half
ldexp
half
x
int
kDescription
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.
SpecificationOpenCL SpecificationAlso seeMath Functions
khronos-opencl-man-1.0~svn33624/clCompileProgram.xml 0000644 0001750 0001750 00000041747 12003060462 022254 0 ustar mathieu mathieu
]>
clCompileProgram
clCompileProgram
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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
clCompileProgramcl_programprogramcl_uintnum_devicesconst cl_device_id*device_listconst char*optionscl_uintnum_input_headersconst cl_program*input_headersconst char**header_include_namesvoid(CL_CALLBACK *pfn_notify)(
cl_program program,
void *user_data)void*user_dataParameters 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;
ErrorsclCompileProgram 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
SpecificationOpenCL SpecificationAlso seeclGetDeviceInfo
khronos-opencl-man-1.0~svn33624/clEnqueueAcquireD3D10ObjectsKHR.xml 0000644 0001750 0001750 00000030234 11660441607 024571 0 ustar mathieu mathieu
]>
clEnqueueAcquireD3D10ObjectsKHRclEnqueueAcquireD3D10ObjectsKHR2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3clEnqueueAcquireD3D10ObjectsKHRAcquire OpenCL memory objects that have been created from Direct3D 10 resources
cl_int
clEnqueueAcquireD3D10ObjectsKHRcl_command_queue
command_queuecl_uint
num_objectsconst cl_mem*mem_objectscl_uintnum_events_in_wait_list
const cl_event
*event_wait_listcl_event*eventParameterscommand_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.
SpecificationOpenCL SpecificationAlso seecl_khr_d3d10_sharing,
clGetDeviceIDsFromD3D10KHR,
clCreateFromD3D10BufferKHR,
clCreateFromD3D10Texture2DKHR,
clCreateFromD3D10Texture3DKHR,
clEnqueueReleaseD3D10ObjectsKHR
khronos-opencl-man-1.0~svn33624/atomic_xchg.xml 0000644 0001750 0001750 00000020472 11660441607 021306 0 ustar mathieu mathieu
atomic_xchgatomic_xchg2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3atomic_xchg
atomic_xchg functions.
int
atomic_xchg
volatile __global
int*pintval
unsigned int
atomic_xchg
volatile __global
unsigned int*punsigned intval
float
atomic_xchg
volatile __global
float*pfloatval
int
atomic_xchg
volatile __local
int*pintval
unsigned int
atomic_xchg
volatile __local
unsigned int*punsigned intval
float
atomic_xchg
volatile __local
float*pfloatvalDescription
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.
SpecificationOpenCL SpecificationAlso seeAtomic Functions,
atom_xchg
khronos-opencl-man-1.0~svn33624/local.xml 0000644 0001750 0001750 00000013434 11660441607 020113 0 ustar mathieu mathieu
[
]>
__local__local2007-2011yThe Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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.SpecificationOpenCL SpecificationAlso see__global,
__constant,
__private
khronos-opencl-man-1.0~svn33624/mad_sat.xml 0000644 0001750 0001750 00000010357 11660441607 020432 0 ustar mathieu mathieu
]>
mad_satmad_sat2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3mad_sat
Returns a*b+c and saturates the result.
gentype
mad_sat
gentypeagentypebgentypecDescriptionmad_sat returns
a*b+c and saturates the result.
Notes
&integerFunctionsInc;
SpecificationOpenCL SpecificationAlso seeInteger Functions
khronos-opencl-man-1.0~svn33624/clGetDeviceIDs.xml 0000644 0001750 0001750 00000030013 11660441607 021567 0 ustar mathieu mathieu
clGetDeviceIDsclGetDeviceIDs2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3clGetDeviceIDsObtain 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_devicesParametersplatform
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_typeDescriptionCL_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.
NotesclGetDeviceIDs may return all or a subset of the actual
physical devices present in the platform and that match device_type.
ErrorsclGetDeviceIDs 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.
SpecificationOpenCL SpecificationAlso seeclGetDeviceInfo,
clGetPlatformIDs,
clCreateContext,
Cardinality Diagram
khronos-opencl-man-1.0~svn33624/accessMappedInc.xml 0000644 0001750 0001750 00000007675 11660441607 022055 0 ustar mathieu mathieu
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~svn33624/clz.xml 0000644 0001750 0001750 00000010070 11660441607 017602 0 ustar mathieu mathieu
]>
clzclz2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3clz
Returns the number of leading 0-bits in x.
gentype
clz
gentypexDescriptionclz returns the number of leading 0-bits in x,
starting at the most significant bit position.
Notes
&integerFunctionsInc;
SpecificationOpenCL SpecificationAlso seeInteger Functions
khronos-opencl-man-1.0~svn33624/clEnqueueWriteImage.xml 0000644 0001750 0001750 00000051736 11660441607 022734 0 ustar mathieu mathieu
clEnqueueWriteImage
clEnqueueWriteImage
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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_writeconst
size_t
*originconst
size_t
*region
size_t
input_row_pitch
size_t
input_slice_pitchconst
void
* ptr
cl_uint
num_events_in_wait_listconst
cl_event
*event_wait_list
cl_event
*eventParameters 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.
ErrorsclEnqueueWriteImage 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.
SpecificationOpenCL SpecificationAlso seeclEnqueueReadImage,
clEnqueueCopyImage
khronos-opencl-man-1.0~svn33624/clRetainCommandQueue.xml 0000644 0001750 0001750 00000013403 11660441607 023062 0 ustar mathieu mathieu
clRetainCommandQueueclRetainCommandQueue2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3clRetainCommandQueueIncrements the command_queue reference count.cl_int clRetainCommandQueuecl_command_queuecommand_queueParameterscommand_queue
Specifies the command-queue to retain.
NotesclCreateCommandQueue
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.
SpecificationOpenCL SpecificationAlso seeclCreateCommandQueue,
clGetCommandQueueInfo,
clReleaseCommandQueue
khronos-opencl-man-1.0~svn33624/isgreater.xml 0000644 0001750 0001750 00000017137 11660441607 021012 0 ustar mathieu mathieu
]>
isgreaterisgreater2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3isgreater
Compare of x > y.
int
isgreater
floatxfloaty
intn
isgreater
floatnxfloatny
int
isgreater
doublexdoubley
longn
isgreater
doublenxdoublenyintisgreater
(halfx,
halfy) // if half extension enabled
shortnisgreater
(halfnx,
halfny) // if half extension enabled
Description
Returns the component-wise compare of x > y.
Notes
&relationalFunctionsInc1;
&relationalFunctionsInc2;
&relationalFunctionsInc3;
SpecificationOpenCL SpecificationAlso seeRelational Functions
khronos-opencl-man-1.0~svn33624/read_imageh2d.xml 0000644 0001750 0001750 00000026307 11660441607 021477 0 ustar mathieu mathieu
[
]>
read_imageh (2D, Half)read_image (2D, Half)2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3read_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
coordDescription
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;
SpecificationOpenCL SpecificationAlso seeImage Functions
khronos-opencl-man-1.0~svn33624/write_image2d.xml 0000644 0001750 0001750 00000034404 11660441607 021543 0 ustar mathieu mathieu
[
]>
write_image2dwrite_image (2D)2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3write_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
colorDescriptionwrite_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;
SpecificationOpenCL SpecificationAlso seeImage Functions
khronos-opencl-man-1.0~svn33624/relationalFunctionsUGEN.xml 0000644 0001750 0001750 00000000747 11660441607 023526 0 ustar mathieu mathieu
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~svn33624/clRetainMemObject.xml 0000644 0001750 0001750 00000014430 11660441607 022345 0 ustar mathieu mathieu
clRetainMemObject
clRetainMemObject
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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
clRetainMemObjectcl_memmemobjParametersmemobjA valid memory object.NotesclCreateBuffer,
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.
SpecificationOpenCL SpecificationAlso seeclCreateBuffer,
clEnqueueCopyBuffer,
clEnqueueReadBuffer,
clEnqueueWriteBuffer,
clReleaseMemObject
khronos-opencl-man-1.0~svn33624/functionQualifiers.xml 0000644 0001750 0001750 00000032500 11660441607 022666 0 ustar mathieu mathieu
Function QualifiersFunction Qualifiers2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3Function 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 ){ ....
SpecificationOpenCL SpecificationAlso see__attribute__,
clEnqueueNDRangeKernel,
clEnqueueTask
khronos-opencl-man-1.0~svn33624/mathFunctionsInc.xml 0000644 0001750 0001750 00000003574 11660441607 022301 0 ustar mathieu mathieu
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~svn33624/bitselect.xml 0000644 0001750 0001750 00000012656 11660441607 021004 0 ustar mathieu mathieu
]>
bitselectbitselect2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3bitselect
Each bit of result is corresponding bit of a if corresponding bit of c is 0.
gentype
bitselect
gentypeagentypebgentypechalfnbitselect (halfna, halfnb,
halfnc) // 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;
SpecificationOpenCL SpecificationAlso seeRelational Functions
khronos-opencl-man-1.0~svn33624/get_local_id.xml 0000644 0001750 0001750 00000011061 11660441607 021420 0 ustar mathieu mathieu
get_local_idget_local_id2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3get_local_id
Returns the unique local work-item ID.
size_t
get_local_id
uintdimindxDescription
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.
SpecificationOpenCL SpecificationAlso seeWork-Item Functions,
clEnqueueNDRangeKernel,
clEnqueueTask
khronos-opencl-man-1.0~svn33624/dot.xml 0000644 0001750 0001750 00000013345 11660441607 017610 0 ustar mathieu mathieu
]>
dotdot2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3dot
Dot product.
float
dot
floatnp0floatnp1
double
dot
doublenp0doublenp1halfdot (gentypep0,
gentypep1) // 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.
SpecificationOpenCL SpecificationAlso seeGeometric Functions
khronos-opencl-man-1.0~svn33624/clCreateCommandQueue.xml 0000644 0001750 0001750 00000036142 11660441607 023050 0 ustar mathieu mathieu
clCreateCommandQueueclCreateCommandQueue2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3clCreateCommandQueueCreate a command-queue on a specific device.cl_command_queue clCreateCommandQueuecl_contextcontextcl_device_iddevicecl_command_queue_propertiespropertiescl_int*errcode_retParameterscontext
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 PropertiesDescriptionCL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLEDetermines 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_ENABLEEnable 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.
ErrorsclCreateCommandQueue 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.
SpecificationOpenCL SpecificationAlso seeclGetCommandQueueInfo,
clReleaseCommandQueue,
clRetainCommandQueue,
clCreateContext,
clCreateContextFromType,
Cardinality Diagram
khronos-opencl-man-1.0~svn33624/clRetainEvent.xml 0000644 0001750 0001750 00000012530 11660441607 021560 0 ustar mathieu mathieu
clRetainEvent
clRetainEvent
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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
clRetainEventcl_eventeventParameterseventEvent 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.
SpecificationOpenCL SpecificationAlso seeclGetEventInfo,
clReleaseEvent,
clWaitForEvents
khronos-opencl-man-1.0~svn33624/relationalFunctionsIGEN.xml 0000644 0001750 0001750 00000000645 11660441607 023507 0 ustar mathieu mathieu
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~svn33624/async_work_group_copy.xml 0000644 0001750 0001750 00000020330 11660441607 023437 0 ustar mathieu mathieu
async_work_group_copyasync_work_group_copy2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3async_work_group_copy
Perform an async copy.
event_t
async_work_group_copy
__local gentype*dstconst __global gentype*srcsize_t
num_gentypesevent_tevent
event_t
async_work_group_copy
__global gentype*dstconst __local gentype*srcsize_tnum_gentypesevent_teventDescription
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.
SpecificationOpenCL SpecificationAlso seeAsync Copy and Prefetch Functions,
wait_group_events
khronos-opencl-man-1.0~svn33624/gl_formatsInc.xml 0000644 0001750 0001750 00000007404 11660441607 021610 0 ustar mathieu mathieu
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 formatCL image format (channel order, channel data type)GL_RGBA8CL_RGBA, CL_UNORM_INT8 or CL_BGRA, CL_UNORM_INT8GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REVCL_RGBA, CL_UNORM_INT8GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REVCL_BGRA, CL_UNORM_INT8GL_RGBA16CL_RGBA, CL_UNORM_INT16GL_RGBA8I, GL_RGBA8I_EXTCL_RGBA, CL_SIGNED_INT8GL_RGBA16I, GL_RGBA16I_EXTCL_RGBA, CL_SIGNED_INT16GL_RGBA32I, GL_RGBA32I_EXTCL_RGBA, CL_SIGNED_INT32GL_RGBA8UI, GL_RGBA8UI_EXTCL_RGBA, CL_UNSIGNED_INT8GL_RGBA16UI, GL_RGBA16UI_EXTCL_RGBA, CL_UNSIGNED_INT16GL_RGBA32UI, GL_RGBA32UI_EXTCL_RGBA, CL_UNSIGNED_INT32GL_RGBA16F, GL_RGBA16F_ARBCL_RGBA, CL_HALF_FLOATGL_RGBA32F, GL_RGBA32F_ARBCL_RGBA, CL_FLOAT
khronos-opencl-man-1.0~svn33624/tan.xml 0000644 0001750 0001750 00000015074 11660441607 017605 0 ustar mathieu mathieu
]>
tan, tanh, tanpi, half_tan, native_tantan, tanh, tanpi, half_tan, native_tan2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3tan, tanh, tanpi, half_tan, native_tan
Tangent functions.
gentype
tan
gentype
gentype
tanh
gentype
gentype
tanpi
gentypex
gentype
half_tan
gentypex
gentype
native_tan
gentypexDescriptiontan 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.
SpecificationOpenCL SpecificationAlso seeMath Functions
khronos-opencl-man-1.0~svn33624/read_imageh1d.xml 0000644 0001750 0001750 00000027560 11660441607 021500 0 ustar mathieu mathieu
[
]>
read_imageh (1D, Half)read_image (1D, Half)2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3read_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
coordDescription
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;
SpecificationOpenCL SpecificationAlso seeImage Functions
khronos-opencl-man-1.0~svn33624/mem_fence.xml 0000644 0001750 0001750 00000011070 11660441607 020731 0 ustar mathieu mathieu
mem_fencemem_fence2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3mem_fence
Orders loads and stores of a work-item executing a kernel.
void
mem_fence
cl_mem_fence_flagsflagsDescription
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.
SpecificationOpenCL SpecificationAlso seeExplicit Memory Fence Functions
khronos-opencl-man-1.0~svn33624/mul24.xml 0000644 0001750 0001750 00000012332 11660441607 017760 0 ustar mathieu mathieu
mul24mul242007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3mul24
Fast integer function to multiply 24-bit integer values.
gentype
mul24
gentypexgentypeyDescriptionmul24 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.
SpecificationOpenCL SpecificationAlso seeInteger Functions
khronos-opencl-man-1.0~svn33624/clGetMemObjectInfo.xml 0000644 0001750 0001750 00000060650 11660441607 022463 0 ustar mathieu mathieu
clGetMemObjectInfo
clGetMemObjectInfo
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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_retParameters 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_infoReturn TypeInfo. returned in param_valueCL_MEM_TYPEcl_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_FLAGScl_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_SIZEsize_t
Return actual size of the data store associated with memobj in bytes.
CL_MEM_HOST_PTRvoid *
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_COUNTcl_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_COUNTcl_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_CONTEXTcl_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_-
MEMOBJECTcl_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_OFFSETsize_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_KHRID3D10Resource *
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_KHRcl_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_KHRcl_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_KHRID3D11Resource *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."
SpecificationOpenCL SpecificationAlso seeclGetImageInfo
khronos-opencl-man-1.0~svn33624/cl_khr_int64_extended_atomics.xml 0000644 0001750 0001750 00000016430 11660441607 024705 0 ustar mathieu mathieu
cl_khr_int64_extended_atomicscl_khr_int64_extended_atomics2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3cl_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.
FunctionDescriptionatom_minCompute
min
(old, val)atom_maxCompute
max
(old, val)>atom_andCompute (old & val)atom_orCompute (old | val)atom_xorCompute (old ^ val)SpecificationOpenCL SpecificationAlso seeEXTENSION,
cl_khr_int64_base_atomics,
Atomic Functions
khronos-opencl-man-1.0~svn33624/clCreateImage.xml 0000644 0001750 0001750 00000044421 12057236107 021504 0 ustar mathieu mathieu
]>
clCreateImage
clCreateImage
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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 clCreateImagecl_contextcontextcl_mem_flagsflagsconst cl_image_format*image_formatconst cl_image_desc*image_descvoid*host_ptrcl_int*errcode_retParameters 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 TypeSize of buffer that host_ptr points toCL_MEM_OBJECT_IMAGE1D≥ image_row_pitchCL_MEM_OBJECT_IMAGE1D_BUFFER≥ image_row_pitchCL_MEM_OBJECT_IMAGE2D≥ image_row_pitch * image_heightCL_MEM_OBJECT_IMAGE3D≥ image_slice_pitch * image_depthCL_MEM_OBJECT_IMAGE1D_ARRAY≥ image_slice_pitch * image_array_sizeCL_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.
ErrorsclCreateImage 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.
SpecificationOpenCL SpecificationAlso seecl_image_desc,
cl_image_format,
Cardinality Diagram
khronos-opencl-man-1.0~svn33624/otherDataTypes.xml 0000644 0001750 0001750 00000020443 11660441607 021757 0 ustar mathieu mathieu
Other Data TypesOther Built-in Data Types2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3Other Data Types
Other Built-in Data Types
Description
The following table describes other data types supported by OpenCL:
TypeDescriptionimage2d_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.
SpecificationOpenCL SpecificationAlso seeMacros and Limits,
Scalar Data Types,
Vector Data Types,
Reserved Data Types,
Abstract Data Types,
Enumerated Data Types,
khronos-opencl-man-1.0~svn33624/clReleaseSampler.xml 0000644 0001750 0001750 00000013144 11660441607 022242 0 ustar mathieu mathieu
clReleaseSampler
clReleaseSampler
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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
clReleaseSamplercl_samplersamplerParameterssampler
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.
SpecificationOpenCL SpecificationAlso seeclCreateSampler,
clRetainSampler,
clGetSamplerInfo
khronos-opencl-man-1.0~svn33624/read_imageh3d.xml 0000644 0001750 0001750 00000020735 11660441607 021477 0 ustar mathieu mathieu
[
]>
read_imageh (3D)read_imageh (3D)2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3read_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
coordDescription
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;
SpecificationOpenCL SpecificationAlso seeImage Functions
khronos-opencl-man-1.0~svn33624/integerFunctions.xml 0000644 0001750 0001750 00000017000 11660441607 022340 0 ustar mathieu mathieu
]>
Integer Built-In FunctionsInteger Built-In Functions2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3Integer Built-In FunctionsClick an item in the table below for details about that function.abs|x|abs-diff|x-y| without modulo overflowadd_satx+y and saturate resulthadd(x+y) >> 1 without modulo overflow rhadd(x+y+1) >> 1. The intermediate sum
does not modulo overflow. clzNumber of leading 0-bits in xclampmin(max(
x, minval), maxval)
mad_himul_hi(a,b)+cmad24(Fast integer function.) Multiply 24-bit integer then add the 32-bit result to 32-bit integermad_sata*b+c and saturate the resultmaxThe greater of x or yminThe lessor of x or ymul_hiHigh half of the product of x and ymul24(Fast integer function.) Multiply 24-bit integer values a and brotateresult[indx]=v[indx]<<i[indx]sub_satx - y and saturate the resultupsampleresult[i] = ((gentype)hi[i] << 8|16|32) | lo[i]popcountReturns the number of non-zero bits in x.Description
&integerFunctionsInc;
SpecificationOpenCL Specification
khronos-opencl-man-1.0~svn33624/operators.xml 0000644 0001750 0001750 00000012460 11660441607 021035 0 ustar mathieu mathieu
OperatorsOperators2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3OperatorsOperators 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 ofsizeofcomma,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.
SpecificationOpenCL Specification
khronos-opencl-man-1.0~svn33624/get_num_groups.xml 0000644 0001750 0001750 00000011072 11660441607 022052 0 ustar mathieu mathieu
get_num_groupsget_num_groups2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3get_num_groups
Returns the number of work-groups that will execute a kernel.
size_t
get_num_groups
uintdimindxDescription
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.
SpecificationOpenCL SpecificationAlso seeWork-Item Functions,
clEnqueueNDRangeKernel,
clEnqueueTask
khronos-opencl-man-1.0~svn33624/clGetEventProfilingInfo.xml 0000644 0001750 0001750 00000031130 11660441607 023540 0 ustar mathieu mathieu
clGetEventProfilingInfo
clGetEventProfilingInfo
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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
clGetEventProfilingInfocl_eventeventcl_profiling_infoparam_namesize_tparam_value_sizevoid*param_valuesize_t*param_value_size_retParameterseventSpecifies the event object.param_nameSpecifies 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_infoReturn TypeInfo. returned in param_valueCL_PROFILING_COMMAND_QUEUEDcl_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_SUBMITcl_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_STARTcl_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_ENDcl_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.
SpecificationOpenCL SpecificationAlso seeclCreateCommandQueue
khronos-opencl-man-1.0~svn33624/islessgreater.xml 0000644 0001750 0001750 00000017375 11660441607 021705 0 ustar mathieu mathieu
]>
islessgreaterislessgreater2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3islessgreater
Compare of (x < y) || (x > y).
int
islessgreater
floatxfloaty
intn
islessgreater
floatnxfloatny
int
islessgreater
doublexdoubley
longn
islessgreater
doublenxdoublenyintislessgreater
(halfx,
halfy) // if half extension enabled
shortnislessgreater
(halfnx,
halfny) // if half extension enabled
Description
Returns the component-wise compare of (x < y)
|| (x > y).
Notes
&relationalFunctionsInc1;
&relationalFunctionsInc2;
&relationalFunctionsInc3;
SpecificationOpenCL SpecificationAlso seeRelational Functions
khronos-opencl-man-1.0~svn33624/get_group_id.xml 0000644 0001750 0001750 00000011072 11660441607 021464 0 ustar mathieu mathieu
get_group_idget_group_id2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3get_group_id
Returns the work-group ID.
size_t
get_group_id
uintdimindxDescription
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.
SpecificationOpenCL SpecificationAlso seeWork-Item Functions,
clEnqueueNDRangeKernel,
clEnqueueTask
khronos-opencl-man-1.0~svn33624/atom_add.xml 0000644 0001750 0001750 00000017250 11660441607 020571 0 ustar mathieu mathieu
atom_addatom_add2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3atom_add
64-bit atom_add functions.
long
atom_add
volatile __global
long*plongval
long
atom_add
volatile __local
long*plongval
ulong
atom_add
volatile __global
ulong*pulongval
ulong
atom_add
volatile __local
ulong*pulongvalDescription
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.
SpecificationOpenCL SpecificationAlso seeAtomic Functions,
atomic_add,
cl_khr_int64_base_atomics
khronos-opencl-man-1.0~svn33624/sampler_t.xml 0000644 0001750 0001750 00000034151 11660441607 021006 0 ustar mathieu mathieu
sampler_tsampler_t2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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 StateDescription<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.
SpecificationOpenCL SpecificationAlso seeOther Data Types,
Image Read and Write Functions,
Cardinality Diagram
khronos-opencl-man-1.0~svn33624/clCreateFromGLTexture.xml 0000644 0001750 0001750 00000033341 11660441607 023172 0 ustar mathieu mathieu
clCreateFromGLTextureclCreateFromGLTexture2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3clCreateFromGLTexture
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_contextcontextcl_mem_flagsflagsGLenumtexture_targetGLintmiplevelGLuinttexturecl_int* errcode_retParameters 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.
SpecificationOpenCL SpecificationAlso see
obsolete page replaced by clCreateFromGLTexture
cl_khr_gl_sharing,
clCreateBuffer,
clCreateFromGLTexture
khronos-opencl-man-1.0~svn33624/workItemFunctions.xml 0000644 0001750 0001750 00000011300 11660441607 022501 0 ustar mathieu mathieu
Work-Item Built-In FunctionsWork-Item Built-In Functions2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3Work-Item Built-In FunctionsClick an item in the table below for details about that function.get_work_dimNumber of dimensions in useget_global_sizeNumber of global work itemsget_global_idGlobal work item ID valueget_local_sizeNumber of local work itemsget_local_idLocal work item IDget_num_groupsNumber of work groupsget_group_idWork group IDget_global_offsetWork offsetDescription
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.
SpecificationOpenCL SpecificationAlso seeclEnqueueNDRangeKernel,
clEnqueueTask
khronos-opencl-man-1.0~svn33624/clamp.xml 0000644 0001750 0001750 00000015760 11660441607 020121 0 ustar mathieu mathieu
]>
clampclamp2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3clamp
Clamp x to range given by min, max
gentype
clamp
gentypexgentypeminvalgentypemaxval
gentypef
clamp
gentypefxfloatminvalfloatmaxval
gentyped
clamp
gentypedxdoubleminvaldoublemaxvalgentypeclamp (gentypex,
gentypeminval,
gentypemaxval) // if half extension enabled
gentypeclamp (gentypex,
halfminval,
halfmaxval) // 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.
SpecificationOpenCL SpecificationAlso seeCommon Functions
khronos-opencl-man-1.0~svn33624/clIcdGetPlatformIDsKHR.xml 0000644 0001750 0001750 00000015603 11660441607 023151 0 ustar mathieu mathieu
clIcdGetPlatformIDsKHRclIcdGetPlatformIDsKHR2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3clIcdGetPlatformIDsKHRObtain the list of platforms accessible through the Khronos ICD Loader.
cl_int
clIcdGetPlatformIDsKHR
cl_uint
num_entries
cl_platform_id
*platforms
cl_uint
*num_platformsParametersnum_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.
SpecificationOpenCL SpecificationAlso seeclGetPlatformIDs,
cl_khr_icd
khronos-opencl-man-1.0~svn33624/clEnqueueWriteBuffer.xml 0000644 0001750 0001750 00000040064 11660441607 023113 0 ustar mathieu mathieu
clEnqueueWriteBuffer
clEnqueueWriteBuffer
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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
clEnqueueWriteBuffercl_command_queuecommand_queuecl_membuffercl_boolblocking_writesize_toffsetsize_tsizeconst void*ptrcl_uintnum_events_in_wait_listconst cl_event*event_wait_listcl_event*eventParameters 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.
ErrorsclEnqueueWriteBuffer 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.
SpecificationOpenCL SpecificationAlso seeclEnqueueCopyBuffer,
clEnqueueReadBuffer,
clEnqueueReadBufferRect,
clEnqueueWriteBufferRect
khronos-opencl-man-1.0~svn33624/geometricFunctions.xml 0000644 0001750 0001750 00000010415 11660441607 022664 0 ustar mathieu mathieu
]>
Geometric Built-In FunctionsGeometric Built-In Functions2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3Geometric Built-In FunctionsClick an item in the table below for details about that function.crossCross productdotDot productdistanceVector distancelengthVector lengthnormalizeNormal vector length 1fast_distanceVector distancefast_lengthVector lengthfast_normalizeNormal vector length 1SpecificationOpenCL Specification
khronos-opencl-man-1.0~svn33624/clEnqueueCopyBuffer.xml 0000644 0001750 0001750 00000035023 11660441607 022732 0 ustar mathieu mathieu
clEnqueueCopyBuffer
clEnqueueCopyBuffer
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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_queuecl_memsrc_buffercl_memdst_buffersize_tsrc_offsetsize_tdst_offsetsize_tsizecl_uintnum_events_in_wait_listconst cl_event*event_wait_listcl_event*eventParameters 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.
SpecificationOpenCL SpecificationAlso seeclEnqueueReadBuffer,
clEnqueueWriteBuffer,
clCreateBuffer,
clCreateSubBuffer,
clEnqueueCopyBufferToImage,
clEnqueueCopyImageToBuffer
khronos-opencl-man-1.0~svn33624/atomic_xor.xml 0000644 0001750 0001750 00000016224 11660441607 021165 0 ustar mathieu mathieu
atomic_xoratomic_xor2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3atomic_xor
atomic_xor functions.
int
atomic_xor
volatile __global
int*pintval
unsigned int
atomic_xor
volatile __global
unsigned int*punsigned intval
int
atomic_xor
volatile __local
int*pintval
unsigned int
atomic_xor
volatile __local
unsigned int*punsigned intvalDescription
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.
SpecificationOpenCL SpecificationAlso seeAtomic Functions,
atom_xor
khronos-opencl-man-1.0~svn33624/clEnqueueBarrierWithWaitList.xml 0000644 0001750 0001750 00000024565 11660441607 024602 0 ustar mathieu mathieu
clEnqueueBarrierWithWaitList
clEnqueueBarrierWithWaitList
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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_listconst
cl_event
*event_wait_list
cl_event
*eventParameters 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.
SpecificationOpenCL SpecificationAlso seeclEnqueueFillBuffer,
clEnqueueCopyBuffer,
clEnqueueCopyBufferRect,
clEnqueueFillImage,
clEnqueueCopyImage,
clEnqueueCopyImageToBuffer,
clEnqueueCopyBufferToImage,
clEnqueueUnmapMemObject
khronos-opencl-man-1.0~svn33624/cl_image_format.xml 0000644 0001750 0001750 00000031510 11660441607 022124 0 ustar mathieu mathieu
cl_image_formatcl_image_format2007-2010The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3cl_image_formatThe 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;Membersimage_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.
FormatDescriptionCL_R, CL_Rx, or CL_ACL_INTENSITYThis 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_LUMINANCEThis 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_RACL_RGB or CL_RGBxThis format can only be used if channel data type = CL_UNORM_SHORT_565,
CL_UNORM_SHORT_555 or CL_UNORM_INT101010.CL_RGBACL_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 TypeDescriptionCL_SNORM_INT8Each channel component is a normalized signed 8-bit integer value.CL_SNORM_INT16Each channel component is a normalized signed 16-bit integer value.CL_UNORM_INT8Each channel component is a normalized unsigned 8-bit integer value.CL_UNORM_INT16Each channel component is a normalized unsigned 16-bit integer value.CL_UNORM_SHORT_565Represents a normalized 5-6-5 3-channel RGB image. The channel order must be CL_RGB or CL_RGBx.CL_UNORM_SHORT_555Represents a normalized x-5-5-5 4-channel xRGB image.
The channel order must be CL_RGB or CL_RGBx.CL_UNORM_INT_101010Represents a normalized x-10-10-10 4-channel xRGB image.
The channel order must be CL_RGB or CL_RGBx.CL_SIGNED_INT8Each channel component is an unnormalized signed 8-bit integer value.CL_SIGNED_INT16Each channel component is an unnormalized signed 16-bit integer value.CL_SIGNED_INT32Each channel component is an unnormalized signed 32-bit integer value.CL_UNSIGNED_INT8Each channel component is an unnormalized unsigned 8-bit integer value.CL_UNSIGNED_INT16Each channel component is an unnormalized unsigned 16-bit integer value.CL_UNSIGNED_INT32Each channel component is an unnormalized unsigned 32-bit integer value.CL_HALF_FLOATEach channel component is a 16-bit half-float value.CL_FLOATEach 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_RGBAimage_channel_data_type = CL_UNORM_INT8image_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.
SpecificationOpenCL SpecificationAlso seecl_image_desc Image Descriptor,
EXTENSION,
clGetSupportedImageFormats,
clCreateImage
khronos-opencl-man-1.0~svn33624/sign.xml 0000644 0001750 0001750 00000010655 11660441607 017763 0 ustar mathieu mathieu
]>
signsign2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3sign
Sign of a value.
gentype
sign
gentypexDescriptionReturns
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.
SpecificationOpenCL SpecificationAlso seeCommon Functions
khronos-opencl-man-1.0~svn33624/isgreaterequal.xml 0000644 0001750 0001750 00000017573 11660441607 022046 0 ustar mathieu mathieu
]>
isgreaterequalisgreaterequal2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3isgreaterequal
Compare of x >= y.
int
isgreaterequal
floatxfloaty
intn
isgreaterequal
floatnxfloatny
int
isgreaterequal
doublexdoubley
longn
isgreaterequal
doublenxdoublenyintisgreaterequal
(halfx,
halfy) // if half extension enabled
shortnisgreaterequal
(halfnx,
halfny) // if half extension enabled
Description
Returns the component-wise compare of x >= y.
Notes
&relationalFunctionsInc1;
&relationalFunctionsInc2;
&relationalFunctionsInc3;
SpecificationOpenCL SpecificationAlso seeRelational Functions
khronos-opencl-man-1.0~svn33624/atom_max.xml 0000644 0001750 0001750 00000017423 11660441607 020630 0 ustar mathieu mathieu
atom_maxatom_max2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3atom_max
64-bit atom_max functions.
long
atom_max
volatile __global
long*plongval
long
atom_max
volatile __local
long*plongval
ulong
atom_max
volatile __global
ulong*pulongval
ulong
atom_max
volatile __local
ulong*pulongvalDescription
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.
SpecificationOpenCL SpecificationAlso seeAtomic Functions,
atomic_max,
cl_khr_int64_extended_atomics
khronos-opencl-man-1.0~svn33624/cross.xml 0000644 0001750 0001750 00000017452 11660441607 020156 0 ustar mathieu mathieu
]>
cross
cross2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3cross
Cross product.
float4
cross
float4p0float4p1
float3
cross
float3p0float3p1
double4
cross
double4p0double4p1
double3
cross
double3p0double3p1half4cross
(half4p0,
half4p1) // if half extension enabled
half3cross
(half3p0,
half3p1) // 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.
SpecificationOpenCL SpecificationAlso seeGeometric Functions
khronos-opencl-man-1.0~svn33624/constant.xml 0000644 0001750 0001750 00000013223 11660441607 020646 0 ustar mathieu mathieu
[
]>
__constant
__constant2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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;
SpecificationOpenCL SpecificationAlso see__global,
__local,
__private
khronos-opencl-man-1.0~svn33624/clCreateFromGLRenderbuffer.xml 0000644 0001750 0001750 00000024352 11660441607 024145 0 ustar mathieu mathieu
]>
clCreateFromGLRenderbufferclCreateFromGLRenderbuffer2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3clCreateFromGLRenderbuffer
Creates an OpenCL 2D image object from an OpenGL renderbuffer object.
cl_mem
clCreateFromGLRenderbuffer
cl_contextcontextcl_mem_flagsflagsGLuintrenderbuffercl_int* errcode_retParameters 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.
SpecificationOpenCL SpecificationAlso seecl_khr_gl_sharing,
clCreateBuffer,
cl_image_format,
clRetainMemObject,
clReleaseMemObject
khronos-opencl-man-1.0~svn33624/commonMax.xml 0000644 0001750 0001750 00000014177 11660441607 020764 0 ustar mathieu mathieu
]>
max
max2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3max
Returns the greater of two values.
gentype
max
gentypexgentypey
gentypef
max
gentypefxfloaty
gentyped
max
gentypedxdoubleygentypemax (gentypex,
halfy) // if half extension enabled
Descriptionmax 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.
SpecificationOpenCL SpecificationAlso seeCommon Functions
khronos-opencl-man-1.0~svn33624/preprocessorDirectives.xml 0000644 0001750 0001750 00000025167 11660441607 023577 0 ustar mathieu mathieu
Preprocessor Directives and MacrosPreprocessor Directives and Macros2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3Preprocessor Directives and Macros
Preprocessor Directives and Macros.
# pragmapp-tokensoptnew-lineDescription
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_CONTRACTon-off-switchon-off-switch: one of ON OFF DEFAULT
#pragma OPENCL EXTENSIONextensionname : 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.
SpecificationOpenCL SpecificationAlso seeSymbolic Math ConstantsclBuildProgram,
FP_CONTRACT,
EXTENSION
khronos-opencl-man-1.0~svn33624/relationalFunctionsInc2.xml 0000644 0001750 0001750 00000000677 11660441607 023565 0 ustar mathieu mathieu
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~svn33624/mediaSurfaceFormatsInc.xml 0000644 0001750 0001750 00000017452 11660441607 023403 0 ustar mathieu mathieu
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 codeCL image format (channel order, channel data type)FOURCC('N', 'V', '1', '2'), Plane 0CL_R, CL_UNORM_INT8FOURCC('N', 'V', '1', '2'), Plane 1CL_RG, CL_UNORM_INT8FOURCC('Y', 'V', '1', '2'), Plane 0CL_R, CL_UNORM_INT8FOURCC('Y', 'V', '1', '2'), Plane 1CL_R, CL_UNORM_INT8FOURCC('Y', 'V', '1', '2'), Plane 2CL_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 formatCL image format (channel order, channel data type)D3DFMT_R32FCL_R, CL_FLOATD3DFMT_R16FCL_R, CL_HALF_FLOATD3DFMT_L16CL_R, CL_UNORM_INT16D3DFMT_A8CL_A, CL_UNORM_INT8D3DFMT_L8CL_R, CL_UNORM_INT8D3DFMT_G32R32FCL_RG, CL_FLOATD3DFMT_G16R16FCL_RG, CL_HALF_FLOATD3DFMT_G16R16CL_RG, CL_UNORM_INT16D3DFMT_A8L8CL_RG, CL_UNORM_INT8D3DFMT_A32B32G32R32FCL_RGBA, CL_FLOATD3DFMT_A16B16G16R16FCL_RGBA, CL_HALF_FLOATD3DFMT_A16B16G16R16CL_RGBA, CL_UNORM_INT16D3DFMT_A8B8G8R8CL_RGBA, CL_UNORM_INT8D3DFMT_X8B8G8R8CL_RGBA, CL_UNORM_INT8D3DFMT_A8R8G8B8CL_BGRA, CL_UNORM_INT8D3DFMT_X8R8G8B8CL_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_nameCL_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~svn33624/clEnqueueTask.xml 0000644 0001750 0001750 00000032226 11660441607 021572 0 ustar mathieu mathieu
clEnqueueTaskclEnqueueTask2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3clEnqueueTask
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_listconst
cl_event
*event_wait_list
cl_event
*eventParameters 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.
SpecificationOpenCL SpecificationAlso seeclEnqueueNDRangeKernel,
clEnqueueNativeKernel
khronos-opencl-man-1.0~svn33624/clGetProgramInfo.xml 0000644 0001750 0001750 00000052510 11660441607 022221 0 ustar mathieu mathieu
clGetProgramInfo
clGetProgramInfo
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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
clGetProgramInfocl_programprogramcl_program_infoparam_namesize_tparam_value_sizevoid*param_valuesize_t*param_value_size_retParameters 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_infoReturn Type and Info. returned in param_valueCL_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.
SpecificationOpenCL SpecificationAlso seeclGetProgramBuildInfo
khronos-opencl-man-1.0~svn33624/read_imagei2d.xml 0000644 0001750 0001750 00000040774 11660441607 021504 0 ustar mathieu mathieu
[
]>
read_imagei (2D)read_imagei (2D)2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3read_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
coordDescription
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;
SpecificationOpenCL SpecificationAlso seeImage Functions
khronos-opencl-man-1.0~svn33624/geometricFunctionsInc.xml 0000644 0001750 0001750 00000001642 11660441607 023320 0 ustar mathieu mathieu
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~svn33624/clCreateKernel.xml 0000644 0001750 0001750 00000021315 11660441607 021701 0 ustar mathieu mathieu
clCreateKernel
clCreateKernel
2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, 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 clCreateKernelcl_program programconst char*kernel_namecl_int*errcode_retParameters 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.
ErrorsclCreateKernel 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.
SpecificationOpenCL SpecificationAlso seeclCreateKernelsInProgram,
clRetainKernel,
clReleaseKernel,
clSetKernelArg,
clGetKernelInfo,
clGetKernelWorkGroupInfo,
Cardinality Diagram
khronos-opencl-man-1.0~svn33624/rotate.xml 0000644 0001750 0001750 00000010577 11660441607 020324 0 ustar mathieu mathieu
]>
rotaterotate2007-2011The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.3rotate
Rotate bits left.
gentype
rotate
gentypevgentypeiDescription
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;
SpecificationOpenCL SpecificationAlso seeInteger Functions
khronos-opencl-man-1.0~svn33624/xhtml/ 0000755 0001750 0001750 00000000000 13223132735 017422 5 ustar mathieu mathieu khronos-opencl-man-1.0~svn33624/xhtml/opencl-man.xsl 0000644 0001750 0001750 00000025214 12155450025 022205 0 ustar mathieu mathieu
ansihttp://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"