Copyright © 2022 Intel Corporation. All rights reserved.
Khronos® is a registered trademark and SYCL™ and SPIR™ are trademarks of The Khronos Group Inc. OpenCL™ is a trademark of Apple Inc. used by permission by Khronos.
To report problems with this extension, please open a new issue at:
This extension is written against the SYCL 2020 revision 4 specification. All references below to the "core SYCL specification" or to section numbers in the SYCL specification refer to that revision.
This extension adds support for 2D memcpy and associated routines that can copy a specified rectangular region in the presence of array padding.
This extension provides a feature-test macro as described in the core SYCL
specification. An implementation supporting this extension must predefine the
macro SYCL_EXT_ONEAPI_MEMCPY2D
to one of the values defined in the table
below. Applications can test for the existence of this macro to determine if
the implementation supports this feature, or applications can test the macro’s
value to determine which of the extension’s features the implementation
supports.
Value | Description |
---|---|
1 |
Initial version of this extension. |
The handler class gains the following new methods:
Member Function | Description |
---|---|
void ext_oneapi_memcpy2d(void *dest, size_t destPitch,
const void *src, size_t srcPitch,
size_t width, size_t height) |
Copies the data located at |
template <typename T>
void ext_oneapi_copy2d(const T *src, size_t srcPitch,
T *dest, size_t destPitch,
size_t width, size_t height) |
Copies the data located at |
void ext_oneapi_memset2d(void *dest, size_t destPitch,
int value, size_t width, size_t height) |
Fills the data located at |
template <typename T>
void ext_oneapi_fill2d(void *dest, size_t destPitch,
const T& pattern, size_t width, size_t height) |
Fills the data located at |
This extension also defines additional shortcut methods. The queue
class
gains several new methods:
Member Function | Description |
---|---|
event ext_oneapi_memcpy2d(void *dest, size_t destPitch,
const void *src, size_t srcPitch,
size_t width, size_t height)
event ext_oneapi_memcpy2d(void *dest, size_t destPitch,
const void *src, size_t srcPitch,
size_t width, size_t height,
event depEvent)
event ext_oneapi_memcpy2d(void *dest, size_t destPitch,
const void *src, size_t srcPitch,
size_t width, size_t height,
const std::vector<event> &depEvents)
template <typename T>
event ext_oneapi_copy2d(const T *src, size_t srcPitch,
T *dest, size_t destPitch,
size_t width, size_t height)
template <typename T>
event ext_oneapi_copy2d(const T *src, size_t srcPitch,
T *dest, size_t destPitch,
size_t width, size_t height,
event depEvent)
template <typename T>
event ext_oneapi_copy2d(const T *src, size_t srcPitch,
T *dest, size_t destPitch,
size_t width, size_t height,
const std::vector<event> &depEvents)
event ext_oneapi_memset2d(void *dest, size_t destPitch,
int value, size_t width, size_t height)
event ext_oneapi_memset2d(void *dest, size_t destPitch,
int value, size_t width, size_t height,
event depEvent)
event ext_oneapi_memset2d(void *dest, size_t destPitch,
int value, size_t width, size_t height,
const std::vector<event> &depEvents)
template <typename T>
event ext_oneapi_fill2d(void *dest, size_t destPitch,
const T& pattern, size_t width, size_t height)
template <typename T>
event ext_oneapi_fill2d(void *dest, size_t destPitch,
const T& pattern, size_t width, size_t height,
event depEvent)
template <typename T>
event ext_oneapi_fill2d(void *dest, size_t destPitch,
const T& pattern, size_t width, size_t height,
const std::vector<event> &depEvents) |
Equivalent to submitting a command group containing the corresponding
method in the |