Repository navigation
Expand file tree
/
Copy path_sycl_queue.pxd
More file actions
140 lines (126 loc) · 4.27 KB
/
Copy path_sycl_queue.pxd
File metadata and controls
140 lines (126 loc) · 4.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# Data Parallel Control (dpctl)
#
# Copyright 2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# distutils: language = c++
# cython: language_level=3
""" This file declares the SyclQueue extension type.
"""
from libcpp cimport bool as cpp_bool
from ._backend cimport (
DPCTLSyclDeviceRef,
DPCTLSyclQueueRef,
DPCTLSyclRawKernelArgRef,
DPCTLSyclWorkGroupMemoryRef,
_arg_data_type,
)
from ._sycl_context cimport SyclContext
from ._sycl_device cimport SyclDevice
from ._sycl_event cimport SyclEvent
from .compiler._compiler cimport SyclKernel
cdef public api class _SyclQueue [
object Py_SyclQueueObject, type Py_SyclQueueType
]:
""" Python data owner class for a sycl::queue.
"""
cdef DPCTLSyclQueueRef _queue_ref
cdef SyclContext _context
cdef SyclDevice _device
cdef public api class SyclQueue (_SyclQueue) [
object PySyclQueueObject, type PySyclQueueType
]:
""" Python wrapper class for a sycl::queue.
"""
cdef int _init_queue_default(self, int)
cdef int _init_queue_from__SyclQueue(self, _SyclQueue)
cdef int _init_queue_from_DPCTLSyclDeviceRef(self, DPCTLSyclDeviceRef, int)
cdef int _init_queue_from_device(self, SyclDevice, int)
cdef int _init_queue_from_filter_string(self, const char *, int)
cdef int _init_queue_from_context_and_device(
self, SyclContext, SyclDevice, int
)
cdef int _init_queue_from_capsule(self, object)
cdef int _populate_args(
self,
list args,
void **kargs,
_arg_data_type *kargty
)
cdef int _populate_range(self, size_t Range[3], list gS, size_t nGS)
@staticmethod
cdef SyclQueue _create(DPCTLSyclQueueRef qref)
@staticmethod
cdef SyclQueue _create_from_context_and_device(
SyclContext ctx, SyclDevice dev, int props=*
)
cdef cpp_bool equals(self, SyclQueue q)
cpdef SyclContext get_sycl_context(self)
cpdef SyclDevice get_sycl_device(self)
cdef DPCTLSyclQueueRef get_queue_ref(self)
cpdef SyclEvent _submit_keep_args_alive(
self,
object args,
list dEvents
)
cpdef SyclEvent submit_async(
self,
SyclKernel kernel,
list args,
list gS,
list lS=*,
list dEvents=*
)
cpdef SyclEvent submit(
self,
SyclKernel kernel,
list args,
list gS,
list lS=*,
list dEvents=*
)
cpdef void wait(self)
cdef DPCTLSyclQueueRef get_queue_ref(self)
cpdef memcpy(self, dest, src, size_t count)
cpdef SyclEvent memcpy_async(self, dest, src, size_t count, list dEvents=*)
cpdef copy(self, dest, src, size_t count, str dtype=*)
cpdef SyclEvent copy_async(
self, dest, src, size_t count, list dEvents=*, str dtype=*
)
cpdef fill(self, dest, value, size_t count, str dtype=*)
cpdef SyclEvent fill_async(
self, dest, value, size_t count, list dEvents=*, str dtype=*
)
cpdef memset(self, mem, int val, size_t count=*)
cpdef SyclEvent memset_async(
self, mem, int val, size_t count=*, list dEvents=*
)
cpdef prefetch(self, ptr, size_t count=*)
cpdef mem_advise(self, ptr, size_t count, int mem)
cpdef SyclEvent submit_barrier(self, dependent_events=*)
cdef public api class _WorkGroupMemory [
object Py_WorkGroupMemoryObject, type Py_WorkGroupMemoryType
]:
cdef DPCTLSyclWorkGroupMemoryRef _mem_ref
cdef public api class WorkGroupMemory(_WorkGroupMemory) [
object PyWorkGroupMemoryObject, type PyWorkGroupMemoryType
]:
pass
cdef public api class _RawKernelArg [
object Py_RawKernelArgObject, type Py_RawKernelArgType
]:
cdef DPCTLSyclRawKernelArgRef _arg_ref
cdef public api class RawKernelArg(_RawKernelArg) [
object PyRawKernelArgObject, type PyRawKernelArgType
]:
pass