DPC++ Runtime
Runtime libraries for oneAPI DPC++
esimd_emulator_device_interface.hpp
Go to the documentation of this file.
1 //==----- esimd_emulator_device_interface.hpp - DPC++ Explicit SIMD API ----==//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
10 
20 
21 #pragma once
22 
23 #include <CL/sycl/detail/pi.hpp>
24 
25 // cstdint-type fields such as 'uint32_t' are to be used in funtion
26 // pointer table file ('esimd_emulator_functions_v1.h') included in 'struct
27 // ESIMDDeviceInterface' definition.
28 #include <cstdint>
29 #include <mutex>
30 
32 namespace sycl {
33 namespace detail {
34 
37 #define ESIMD_DEVICE_INTERFACE_VERSION 1
38 
39 // 'ESIMDDeviceInterface' structure defines interface for ESIMD CPU
40 // emulation (ESIMD_EMULATOR) to access LibCM CPU emulation functionalities
41 // from kernel application under emulation.
42 
43 // Header files included in the structure contains only function
44 // pointers to access CM functionalities. Only new function can be
45 // added - reordering, changing, or removing existing function pointer
46 // is not allowed.
47 
48 // Whenever a new function(s) is added to this interface, a new header
49 // file must be added following naming convention that contains
50 // version number such as 'v1' from 'ESIMD_DEVICE_INTERFACE_VERSION'.
51 struct ESIMDDeviceInterface {
52  uintptr_t version;
53  void *reserved;
54 
55  ESIMDDeviceInterface();
57 };
58 
59 // Denotes the data version used by the implementation.
60 // Increment whenever the 'data' field interpretation within PluginOpaqueData is
61 // changed.
62 #define ESIMD_EMULATOR_PLUGIN_OPAQUE_DATA_VERSION 0
63 struct ESIMDEmuPluginOpaqueData {
67  uintptr_t version;
68  void *data;
69 };
70 
71 __SYCL_EXPORT ESIMDDeviceInterface *getESIMDDeviceInterface();
72 
73 } // namespace detail
74 } // namespace sycl
75 } // __SYCL_INLINE_NAMESPACE(cl)
76 
cl::sycl::detail::getESIMDDeviceInterface
ESIMDDeviceInterface * getESIMDDeviceInterface()
Definition: esimd_emulator_device_interface.cpp:25
sycl
Definition: invoke_simd.hpp:68
pi.hpp
cl
We provide new interfaces for matrix muliply in this patch:
Definition: access.hpp:13
cl::sycl::info::platform::version
@ version
esimd_emulator_functions_v1.h
__SYCL_INLINE_NAMESPACE
#define __SYCL_INLINE_NAMESPACE(X)
Definition: defines_elementary.hpp:12