[SPIRV][LevelZero] Javadoc for copies with offset
@@ -119,6 +119,68 @@ public class LevelZeroCommandList {
return zeCommandListAppendMemoryCopy_native(commandListHandlerPtr, dstBuffer, srcBuffer, allocSize, 0, 0, hSignalEvents, numWaitEvents, phWaitEvents);
}
+ /**
+ * Copies host, device, or shared memory.
+ * <p>
+ * Details:
+ *
+ * <ul>
+ * <li>The application must ensure the memory pointed to by dstptr and srcptr is
+ * accessible by the device on which the command list was created.</li>
+ * <li>The implementation must not access the memory pointed to by dstptr and
+ * srcptr as they are free to be modified by either the Host or device up until
+ * execution.</li>
+ * <li>The application must ensure the events are accessible by the device on
+ * which the command list was created.</li>
+ * <li>The application must ensure the command list and events were created, and
+ * the memory was allocated, on the same context.</li>
+ * <li>The application must not call this function from simultaneous threads
+ * with the same command list handle.</li>
+ * <li>The implementation of this function should be lock-free.</li>
+ * </ul>
+ * <p>
+ * This function is similar to: clEnqueueCopyBuffer, clEnqueueReadBuffer,
+ * clEnqueueWriteBuffer, and clEnqueueSVMMemCpy.
+ *
+ * @param commandListHandlerPtr
+ * [in] handle of command list
+ * @param dstBuffer
+ * [in] {@link LevelZeroByteBuffer} to destination memory to copy to
+ * @param srcBuffer
+ * [in] Java array to source memory to copy from
+ * @param allocSize
+ * [in] size in bytes to copy
+ * @param dstOffset
+ * [in] offset in bytes for the dstBuffer
+ * @param srcOffset
+ * [in] offset in bytes for the srcBuffer
+ * @param hSignalEvents
+ * [in][optional] {@link ZeEventHandle} handler of the event to
+ * signal on completion
+ * @param numWaitEvents
+ * [in][optional] number of events to wait on before launching; must
+ * be 0 if `null == phWaitEvents`
+ * @param phWaitEvents
+ * [in][optional][range(0, numWaitEvents)] handle of the events to
+ * wait on before launching
+ * @return Status of the call:
+ * <p>
+ * ZE_RESULT_SUCCESS
+ * <p>
+ * ZE_RESULT_ERROR_UNINITIALIZED
+ * <p>
+ * ZE_RESULT_ERROR_DEVICE_LOST
+ * <p>
+ * ZE_RESULT_ERROR_INVALID_NULL_HANDLE: null == hCommandList
+ * <p>
+ * ZE_RESULT_ERROR_INVALID_NULL_POINTER: null == dstptr or null ==
+ * srcptr
+ * <p>
+ * ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT
+ * <p>
+ * ZE_RESULT_ERROR_INVALID_SIZE: (null == phWaitEvents) && (0 <
+ * numWaitEvents)
+ */
public int zeCommandListAppendMemoryCopyWithOffset(long commandListHandlerPtr, LevelZeroByteBuffer dstBuffer, byte[] srcBuffer, long allocSize, long dstOffset, long srcOffset,
ZeEventHandle hSignalEvents, int numWaitEvents, ZeEventHandle phWaitEvents) {
return zeCommandListAppendMemoryCopy_native(commandListHandlerPtr, dstBuffer, srcBuffer, allocSize, dstOffset, srcOffset, hSignalEvents, numWaitEvents, phWaitEvents);
