@@ -595,6 +595,39 @@ include::{generated}/api/version-notes/CL_MEM_DEVICE_HANDLE_LIST_KHR.asciidoc[]
595595 {CL_MEM_DEVICE_HANDLE_LIST_END_KHR_anchor}) to associate with the
596596 external memory handle.
597597endif::cl_khr_external_memory[]
598+
599+ ifdef::cl_ext_buffer_device_address[]
600+
601+ | {CL_MEM_DEVICE_PRIVATE_ADDRESS_EXT_anchor}
602+
603+ include::{generated}/api/version-notes/CL_MEM_DEVICE_PRIVATE_ADDRESS_EXT.asciidoc[]
604+ | {cl_bool_TYPE}
605+ | When set to CL_TRUE, specifies that the buffer must have a single fixed
606+ device-side address for its lifetime, and the address can be queried via {clGetMemObjectInfo}.
607+
608+ Each device in the context can have their own (fixed) device-side address and
609+ a copy of the created buffer which are synchronized
610+ implicitly by the runtime.
611+
612+ The flag might imply that the buffer will be "pinned" permanently to
613+ a device's memory, but might not be necessarily so, as long as the address
614+ range of the buffer remains constant.
615+
616+ The device addresses of sub-buffers derived from {CL_MEM_DEVICE_PRIVATE_ADDRESS_EXT}
617+ allocated buffers can be computed by adding the sub-buffer origin to the
618+ device-specific start address.
619+
620+ | {CL_MEM_DEVICE_SHARED_ADDRESS_EXT_anchor}
621+
622+ include::{generated}/api/version-notes/CL_MEM_DEVICE_SHARED_ADDRESS_EXT.asciidoc[]
623+ | {cl_bool_TYPE}
624+ | When set to CL_TRUE, the buffer has otherwise the same properties as
625+ when allocated using the {CL_MEM_DEVICE_PRIVATE_ADDRESS_EXT_anchor} flag,
626+ but with an additional property that the buffer's address is the same across
627+ all the devices in the context.
628+
629+ endif::cl_ext_buffer_device_address[]
630+
598631|====
599632
600633ifdef::cl_khr_external_memory[]
@@ -662,6 +695,15 @@ ifdef::cl_khr_external_memory[]
662695 {CL_MEM_DEVICE_HANDLE_LIST_KHR} is specified as part of _properties_.
663696 ** if _properties_ includes more than one external memory handle.
664697endif::cl_khr_external_memory[]
698+ ifdef::cl_ext_buffer_device_address[]
699+ * {CL_INVALID_DEVICE}
700+ ** If _properties_ includes either {CL_MEM_DEVICE_SHARED_ADDRESS_EXT} or
701+ {CL_MEM_DEVICE_PRIVATE_ADDRESS_EXT} and there is at least one device in
702+ the context that doesn't support such allocation.
703+ * {CL_INVALID_VALUE}
704+ ** If _properties_ includes both {CL_MEM_DEVICE_SHARED_ADDRESS_EXT} and
705+ {CL_MEM_DEVICE_PRIVATE_ADDRESS_EXT} at the same time.
706+ endif::cl_ext_buffer_device_address[]
665707
666708[[memory-flags-table]]
667709.List of supported memory flag values
@@ -6463,6 +6505,21 @@ include::{generated}/api/version-notes/CL_MEM_D3D11_RESOURCE_KHR.asciidoc[]
64636505 returns the _resource_ argument specified when _memobj_ was created.
64646506endif::cl_khr_d3d11_sharing[]
64656507
6508+ ifdef::cl_ext_buffer_device_address[]
6509+ | {CL_MEM_DEVICE_ADDRESS_EXT_anchor}
6510+
6511+ include::{generated}/api/version-notes/CL_MEM_DEVICE_ADDRESS_EXT.asciidoc[]
6512+ | {cl_mem_device_address_EXT_TYPE}[]
6513+ | If _memobj_ was created using {clCreateBufferWithProperties} with
6514+ the {CL_MEM_DEVICE_PRIVATE_ADDRESS_EXT} property set to CL_TRUE,
6515+ returns a list of device addresses for the buffer, one for each
6516+ device in the context. If the buffer was allocated
6517+ with the {CL_MEM_DEVICE_SHARED_ADDRESS_EXT} property,
6518+ only one device address is returned.
6519+
6520+ endif::cl_ext_buffer_device_address[]
6521+
6522+
64666523|====
64676524
64686525// refError
@@ -6477,6 +6534,12 @@ Otherwise, it returns one of the following errors:
64776534 the return type specified in the
64786535 <<mem-info-table, Memory Object Queries>> table
64796536 and _param_value_ is not `NULL`.
6537+ ifdef::cl_ext_buffer_device_address[]
6538+ ** Returned for the {CL_MEM_DEVICE_ADDRESS_EXT} query if
6539+ the {cl_ext_buffer_device_address_EXT} is not supported or if the
6540+ buffer was not allocated with neither {CL_MEM_DEVICE_PRIVATE_ADDRESS_EXT} or
6541+ {CL_MEM_DEVICE_SHARED_ADDRESS_EXT}.
6542+ endif::cl_ext_buffer_device_address[]
64806543 * {CL_OUT_OF_RESOURCES} if there is a failure to allocate resources required
64816544 by the OpenCL implementation on the device.
64826545 * {CL_OUT_OF_HOST_MEMORY} if there is a failure to allocate resources
@@ -10778,6 +10841,48 @@ Otherwise, it returns one of the following errors:
1077810841 required by the OpenCL implementation on the host.
1077910842--
1078010843
10844+ ifdef::cl_ext_buffer_device_address[]
10845+ [open,refpage='clSetKernelArgDevicePointerEXT',desc='Set a device pointer as the argument value for a specific argument of a kernel.',type='protos']
10846+ --
10847+ To set a device pointer as the argument value for a specific argument of a
10848+ kernel, call the function
10849+
10850+ include::{generated}/api/protos/clSetKernelArgDevicePointerEXT.txt[]
10851+ include::{generated}/api/version-notes/clSetKernelArgDevicePointerEXT.asciidoc[]
10852+
10853+ * _kernel_ is a valid kernel object.
10854+ * _arg_index_ is the argument index.
10855+ Arguments to the kernel are referred by indices that go from 0 for the
10856+ leftmost argument to _n_ - 1, where _n_ is the total number of arguments
10857+ declared by a kernel.
10858+ * _arg_value_ is the device pointer that should be used as the argument value for
10859+ argument specified by _arg_index_.
10860+ The device pointer specified is the value used by all API calls that enqueue
10861+ _kernel_ ({clEnqueueNDRangeKernel} and {clEnqueueTask}) until the argument
10862+ value is changed by a call to {clSetKernelArgDevicePointerEXT} for _kernel_.
10863+ The device pointer can only be used for arguments that are declared to be a
10864+ pointer to `global` memory allocated with {clCreateBufferWithProperties} with
10865+ either the {CL_MEM_DEVICE_PRIVATE_ADDRESS_EXT} or {CL_MEM_DEVICE_SHARED_ADDRESS_EXT}
10866+ property. The pointer value specified as the argument value
10867+ can be the pointer to the beginning of the buffer or any offset into
10868+ the buffer region. The device pointer value must be naturally aligned according to
10869+ the argument's type.
10870+
10871+ {clSetKernelArgDevicePointerEXT} returns {CL_SUCCESS} if the argument was set
10872+ successfully. Otherwise, it returns one of the following errors:
10873+
10874+ * {CL_INVALID_KERNEL} if _kernel_ is not a valid kernel object.
10875+ * {CL_INVALID_OPERATION} if no devices in the context associated with _kernel_ support
10876+ the device pointer.
10877+ * {CL_INVALID_ARG_INDEX} if _arg_index_ is not a valid argument index.
10878+ * {CL_INVALID_ARG_VALUE} if _arg_value_ specified is not a valid value.
10879+ * {CL_OUT_OF_RESOURCES} if there is a failure to allocate resources required
10880+ by the OpenCL implementation on the device.
10881+ * {CL_OUT_OF_HOST_MEMORY} if there is a failure to allocate resources
10882+ required by the OpenCL implementation on the host.
10883+ --
10884+ endif::cl_ext_buffer_device_address[]
10885+
1078110886[open,refpage='clSetKernelExecInfo',desc='Set additional execution information for a kernel.',type='protos']
1078210887--
1078310888To set additional execution information for a kernel, call the function
@@ -10844,6 +10949,19 @@ include::{generated}/api/version-notes/CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM
1084410949 If {clSetKernelExecInfo} has not been called with a value for
1084510950 {CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM}, the default value is
1084610951 {CL_TRUE}.
10952+
10953+ ifdef::cl_ext_buffer_device_address[]
10954+ | {CL_KERNEL_EXEC_INFO_DEVICE_PTRS_EXT_anchor}
10955+
10956+ include::{generated}/api/version-notes/CL_KERNEL_EXEC_INFO_DEVICE_PTRS_EXT.asciidoc[]
10957+ | {cl_mem_device_address_EXT_TYPE}[]
10958+ | Device pointers must reference locations contained entirely within
10959+ buffers that are passed to kernel as arguments, or that are passed
10960+ through the execution information. Non-argument device pointers accessed
10961+ by the kernel must be specified by passing pointers to those buffers
10962+ via this {clSetKernelExecInfo} option.
10963+ endif::cl_ext_buffer_device_address[]
10964+
1084710965|====
1084810966
1084910967// refError
@@ -10853,7 +10971,14 @@ successfully.
1085310971Otherwise, it returns one of the following errors:
1085410972
1085510973 * {CL_INVALID_KERNEL} if _kernel_ is a not a valid kernel object.
10856- * {CL_INVALID_OPERATION} if no devices in the context associated with _kernel_ support SVM.
10974+ * {CL_INVALID_OPERATION} for {CL_KERNEL_EXEC_INFO_SVM_PTRS} if no devices in
10975+ the context associated with _kernel_ support SVM.
10976+ ifdef::cl_ext_buffer_device_address[]
10977+ * {CL_INVALID_OPERATION} for {CL_KERNEL_EXEC_INFO_DEVICE_PTRS_EXT} if no
10978+ device in the context associated with _kernel_ support device pointers.
10979+ endif::cl_ext_buffer_device_address[]
10980+ * {CL_INVALID_VALUE} if _param_name_ is not valid, if _param_value_ is
10981+ `NULL` or if the size specified by _param_value_size_ is not valid.
1085710982 * {CL_INVALID_OPERATION} if _param_name_ is
1085810983 {CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM} and _param_value_ is {CL_TRUE}
1085910984 and no devices in the context associated with _kernel_ support fine-grain
0 commit comments