yum-mirror/VkFFT

git clone https://git.yummers.dev/yum-mirror/VkFFT

Tolmachev DmitriiMetal support in VkFFTba7001c

develop
11.1 KiB305 linesraw
1//-------------------------------------------------------------------------------------------------------------------------------------------------------------
2//
3// Metal/MTLFunctionStitching.hpp
4//
5// Copyright 2020-2021 Apple Inc.
6//
7// Licensed under the Apache License, Version 2.0 (the "License");
8// you may not use this file except in compliance with the License.
9// You may obtain a copy of the License at
10//
11//     http://www.apache.org/licenses/LICENSE-2.0
12//
13// Unless required by applicable law or agreed to in writing, software
14// distributed under the License is distributed on an "AS IS" BASIS,
15// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16// See the License for the specific language governing permissions and
17// limitations under the License.
18//
19//-------------------------------------------------------------------------------------------------------------------------------------------------------------
20
21#pragma once
22
23#include "MTLDefines.hpp"
24#include "MTLHeaderBridge.hpp"
25#include "MTLPrivate.hpp"
26
27#include <Foundation/Foundation.hpp>
28
29#include "MTLFunctionStitching.hpp"
30
31namespace MTL
32{
33class FunctionStitchingAttribute : public NS::Referencing<FunctionStitchingAttribute>
34{
35};
36
37class FunctionStitchingAttributeAlwaysInline : public NS::Referencing<FunctionStitchingAttributeAlwaysInline, FunctionStitchingAttribute>
38{
39public:
40    static class FunctionStitchingAttributeAlwaysInline* alloc();
41
42    class FunctionStitchingAttributeAlwaysInline*        init();
43};
44
45class FunctionStitchingNode : public NS::Copying<FunctionStitchingNode>
46{
47};
48
49class FunctionStitchingInputNode : public NS::Referencing<FunctionStitchingInputNode, FunctionStitchingNode>
50{
51public:
52    static class FunctionStitchingInputNode* alloc();
53
54    class FunctionStitchingInputNode*        init();
55
56    NS::UInteger                             argumentIndex() const;
57    void                                     setArgumentIndex(NS::UInteger argumentIndex);
58
59    MTL::FunctionStitchingInputNode*         init(NS::UInteger argument);
60};
61
62class FunctionStitchingFunctionNode : public NS::Referencing<FunctionStitchingFunctionNode, FunctionStitchingNode>
63{
64public:
65    static class FunctionStitchingFunctionNode* alloc();
66
67    class FunctionStitchingFunctionNode*        init();
68
69    NS::String*                                 name() const;
70    void                                        setName(const NS::String* name);
71
72    NS::Array*                                  arguments() const;
73    void                                        setArguments(const NS::Array* arguments);
74
75    NS::Array*                                  controlDependencies() const;
76    void                                        setControlDependencies(const NS::Array* controlDependencies);
77
78    MTL::FunctionStitchingFunctionNode*         init(const NS::String* name, const NS::Array* arguments, const NS::Array* controlDependencies);
79};
80
81class FunctionStitchingGraph : public NS::Copying<FunctionStitchingGraph>
82{
83public:
84    static class FunctionStitchingGraph* alloc();
85
86    class FunctionStitchingGraph*        init();
87
88    NS::String*                          functionName() const;
89    void                                 setFunctionName(const NS::String* functionName);
90
91    NS::Array*                           nodes() const;
92    void                                 setNodes(const NS::Array* nodes);
93
94    class FunctionStitchingFunctionNode* outputNode() const;
95    void                                 setOutputNode(const class FunctionStitchingFunctionNode* outputNode);
96
97    NS::Array*                           attributes() const;
98    void                                 setAttributes(const NS::Array* attributes);
99
100    MTL::FunctionStitchingGraph*         init(const NS::String* functionName, const NS::Array* nodes, const class FunctionStitchingFunctionNode* outputNode, const NS::Array* attributes);
101};
102
103class StitchedLibraryDescriptor : public NS::Copying<StitchedLibraryDescriptor>
104{
105public:
106    static class StitchedLibraryDescriptor* alloc();
107
108    class StitchedLibraryDescriptor*        init();
109
110    NS::Array*                              functionGraphs() const;
111    void                                    setFunctionGraphs(const NS::Array* functionGraphs);
112
113    NS::Array*                              functions() const;
114    void                                    setFunctions(const NS::Array* functions);
115};
116
117}
118
119// static method: alloc
120_MTL_INLINE MTL::FunctionStitchingAttributeAlwaysInline* MTL::FunctionStitchingAttributeAlwaysInline::alloc()
121{
122    return NS::Object::alloc<MTL::FunctionStitchingAttributeAlwaysInline>(_MTL_PRIVATE_CLS(MTLFunctionStitchingAttributeAlwaysInline));
123}
124
125// method: init
126_MTL_INLINE MTL::FunctionStitchingAttributeAlwaysInline* MTL::FunctionStitchingAttributeAlwaysInline::init()
127{
128    return NS::Object::init<MTL::FunctionStitchingAttributeAlwaysInline>();
129}
130
131// static method: alloc
132_MTL_INLINE MTL::FunctionStitchingInputNode* MTL::FunctionStitchingInputNode::alloc()
133{
134    return NS::Object::alloc<MTL::FunctionStitchingInputNode>(_MTL_PRIVATE_CLS(MTLFunctionStitchingInputNode));
135}
136
137// method: init
138_MTL_INLINE MTL::FunctionStitchingInputNode* MTL::FunctionStitchingInputNode::init()
139{
140    return NS::Object::init<MTL::FunctionStitchingInputNode>();
141}
142
143// property: argumentIndex
144_MTL_INLINE NS::UInteger MTL::FunctionStitchingInputNode::argumentIndex() const
145{
146    return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(argumentIndex));
147}
148
149_MTL_INLINE void MTL::FunctionStitchingInputNode::setArgumentIndex(NS::UInteger argumentIndex)
150{
151    Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setArgumentIndex_), argumentIndex);
152}
153
154// method: initWithArgumentIndex:
155_MTL_INLINE MTL::FunctionStitchingInputNode* MTL::FunctionStitchingInputNode::init(NS::UInteger argument)
156{
157    return Object::sendMessage<MTL::FunctionStitchingInputNode*>(this, _MTL_PRIVATE_SEL(initWithArgumentIndex_), argument);
158}
159
160// static method: alloc
161_MTL_INLINE MTL::FunctionStitchingFunctionNode* MTL::FunctionStitchingFunctionNode::alloc()
162{
163    return NS::Object::alloc<MTL::FunctionStitchingFunctionNode>(_MTL_PRIVATE_CLS(MTLFunctionStitchingFunctionNode));
164}
165
166// method: init
167_MTL_INLINE MTL::FunctionStitchingFunctionNode* MTL::FunctionStitchingFunctionNode::init()
168{
169    return NS::Object::init<MTL::FunctionStitchingFunctionNode>();
170}
171
172// property: name
173_MTL_INLINE NS::String* MTL::FunctionStitchingFunctionNode::name() const
174{
175    return Object::sendMessage<NS::String*>(this, _MTL_PRIVATE_SEL(name));
176}
177
178_MTL_INLINE void MTL::FunctionStitchingFunctionNode::setName(const NS::String* name)
179{
180    Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setName_), name);
181}
182
183// property: arguments
184_MTL_INLINE NS::Array* MTL::FunctionStitchingFunctionNode::arguments() const
185{
186    return Object::sendMessage<NS::Array*>(this, _MTL_PRIVATE_SEL(arguments));
187}
188
189_MTL_INLINE void MTL::FunctionStitchingFunctionNode::setArguments(const NS::Array* arguments)
190{
191    Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setArguments_), arguments);
192}
193
194// property: controlDependencies
195_MTL_INLINE NS::Array* MTL::FunctionStitchingFunctionNode::controlDependencies() const
196{
197    return Object::sendMessage<NS::Array*>(this, _MTL_PRIVATE_SEL(controlDependencies));
198}
199
200_MTL_INLINE void MTL::FunctionStitchingFunctionNode::setControlDependencies(const NS::Array* controlDependencies)
201{
202    Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setControlDependencies_), controlDependencies);
203}
204
205// method: initWithName:arguments:controlDependencies:
206_MTL_INLINE MTL::FunctionStitchingFunctionNode* MTL::FunctionStitchingFunctionNode::init(const NS::String* name, const NS::Array* arguments, const NS::Array* controlDependencies)
207{
208    return Object::sendMessage<MTL::FunctionStitchingFunctionNode*>(this, _MTL_PRIVATE_SEL(initWithName_arguments_controlDependencies_), name, arguments, controlDependencies);
209}
210
211// static method: alloc
212_MTL_INLINE MTL::FunctionStitchingGraph* MTL::FunctionStitchingGraph::alloc()
213{
214    return NS::Object::alloc<MTL::FunctionStitchingGraph>(_MTL_PRIVATE_CLS(MTLFunctionStitchingGraph));
215}
216
217// method: init
218_MTL_INLINE MTL::FunctionStitchingGraph* MTL::FunctionStitchingGraph::init()
219{
220    return NS::Object::init<MTL::FunctionStitchingGraph>();
221}
222
223// property: functionName
224_MTL_INLINE NS::String* MTL::FunctionStitchingGraph::functionName() const
225{
226    return Object::sendMessage<NS::String*>(this, _MTL_PRIVATE_SEL(functionName));
227}
228
229_MTL_INLINE void MTL::FunctionStitchingGraph::setFunctionName(const NS::String* functionName)
230{
231    Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setFunctionName_), functionName);
232}
233
234// property: nodes
235_MTL_INLINE NS::Array* MTL::FunctionStitchingGraph::nodes() const
236{
237    return Object::sendMessage<NS::Array*>(this, _MTL_PRIVATE_SEL(nodes));
238}
239
240_MTL_INLINE void MTL::FunctionStitchingGraph::setNodes(const NS::Array* nodes)
241{
242    Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setNodes_), nodes);
243}
244
245// property: outputNode
246_MTL_INLINE MTL::FunctionStitchingFunctionNode* MTL::FunctionStitchingGraph::outputNode() const
247{
248    return Object::sendMessage<MTL::FunctionStitchingFunctionNode*>(this, _MTL_PRIVATE_SEL(outputNode));
249}
250
251_MTL_INLINE void MTL::FunctionStitchingGraph::setOutputNode(const MTL::FunctionStitchingFunctionNode* outputNode)
252{
253    Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setOutputNode_), outputNode);
254}
255
256// property: attributes
257_MTL_INLINE NS::Array* MTL::FunctionStitchingGraph::attributes() const
258{
259    return Object::sendMessage<NS::Array*>(this, _MTL_PRIVATE_SEL(attributes));
260}
261
262_MTL_INLINE void MTL::FunctionStitchingGraph::setAttributes(const NS::Array* attributes)
263{
264    Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setAttributes_), attributes);
265}
266
267// method: initWithFunctionName:nodes:outputNode:attributes:
268_MTL_INLINE MTL::FunctionStitchingGraph* MTL::FunctionStitchingGraph::init(const NS::String* functionName, const NS::Array* nodes, const MTL::FunctionStitchingFunctionNode* outputNode, const NS::Array* attributes)
269{
270    return Object::sendMessage<MTL::FunctionStitchingGraph*>(this, _MTL_PRIVATE_SEL(initWithFunctionName_nodes_outputNode_attributes_), functionName, nodes, outputNode, attributes);
271}
272
273// static method: alloc
274_MTL_INLINE MTL::StitchedLibraryDescriptor* MTL::StitchedLibraryDescriptor::alloc()
275{
276    return NS::Object::alloc<MTL::StitchedLibraryDescriptor>(_MTL_PRIVATE_CLS(MTLStitchedLibraryDescriptor));
277}
278
279// method: init
280_MTL_INLINE MTL::StitchedLibraryDescriptor* MTL::StitchedLibraryDescriptor::init()
281{
282    return NS::Object::init<MTL::StitchedLibraryDescriptor>();
283}
284
285// property: functionGraphs
286_MTL_INLINE NS::Array* MTL::StitchedLibraryDescriptor::functionGraphs() const
287{
288    return Object::sendMessage<NS::Array*>(this, _MTL_PRIVATE_SEL(functionGraphs));
289}
290
291_MTL_INLINE void MTL::StitchedLibraryDescriptor::setFunctionGraphs(const NS::Array* functionGraphs)
292{
293    Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setFunctionGraphs_), functionGraphs);
294}
295
296// property: functions
297_MTL_INLINE NS::Array* MTL::StitchedLibraryDescriptor::functions() const
298{
299    return Object::sendMessage<NS::Array*>(this, _MTL_PRIVATE_SEL(functions));
300}
301
302_MTL_INLINE void MTL::StitchedLibraryDescriptor::setFunctions(const NS::Array* functions)
303{
304    Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setFunctions_), functions);
305}