3131#include " Support/ExternC.h"
3232#include " Support/MemOwnershipAttrs.h"
3333#include " dpctl_data_types.h"
34+ #include " dpctl_exec_state.h"
3435#include " dpctl_sycl_device_manager.h"
3536#include " dpctl_sycl_enum_types.h"
3637#include " dpctl_sycl_types.h"
3738
3839DPCTL_C_EXTERN_C_BEGIN
3940
41+ #define DEPRACATION_NOTICE \
42+ " The function is deprecated to change the naming convention and " \
43+ " support the new DpctlExecState argument to improve error " \
44+ " handling and reporting."
45+
4046/* *
4147 * @defgroup DeviceInterface Device class C wrapper
4248 */
@@ -49,20 +55,33 @@ DPCTL_C_EXTERN_C_BEGIN
4955 * DPCTLSyclDeviceRef object.
5056 * @ingroup DeviceInterface
5157 */
58+ DPCTL_API __dpctl_give DPCTLSyclDeviceRef
59+ DPCTLDevice_Copy (__dpctl_keep const DPCTLSyclDeviceRef DRef)
60+ __attribute__((deprecated(DEPRACATION_NOTICE, " dpctl_device_copy" )));
61+
62+ /* !
63+ * @brief Returns a copy of the DPCTLSyclDeviceRef object.
64+ *
65+ * @param ES The execution state object used for error handling.
66+ * @param DRef DPCTLSyclDeviceRef object to be copied.
67+ * @return A new DPCTLSyclDeviceRef created by copying the passed in
68+ * DPCTLSyclDeviceRef object.
69+ * @ingroup DeviceInterface
70+ */
5271DPCTL_API
5372__dpctl_give DPCTLSyclDeviceRef
54- DPCTLDevice_Copy (__dpctl_keep const DPCTLSyclDeviceRef DRef);
73+ dpctl_device_copy (__dpctl_keep const DPCTLSyclDeviceRef DRef,
74+ __dpctl_keep const DpctlExecState ES);
5575
5676/* !
57- * @brief Returns a new DPCTLSyclDeviceRef opaque object wrapping a SYCL device
58- * instance as a host device.
77+ * @brief Returns a new DPCTLSyclDeviceRef opaque object wrapping a SYCL
78+ * device instance as a host device.
5979 *
60- * @return An opaque pointer to a ``sycl::device`` created as an instance of
61- * the host device.
80+ * @return An opaque pointer to a ``sycl::device`` created as an instance
81+ * of the host device.
6282 * @ingroup DeviceInterface
6383 */
64- DPCTL_API
65- __dpctl_give DPCTLSyclDeviceRef DPCTLDevice_Create (void );
84+ DPCTL_API __dpctl_give DPCTLSyclDeviceRef DPCTLDevice_Create (void );
6685
6786/* !
6887 * @brief Returns a new DPCTLSyclDeviceRef opaque object created using the
0 commit comments