yum-mirror/VkFFT
git clone https://git.yummers.dev/yum-mirror/VkFFT
ba7001c
v1.3.2
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 : 40static class FunctionStitchingAttributeAlwaysInline * alloc () ; 41 42class FunctionStitchingAttributeAlwaysInline * init () ; 43} ; 44 45class FunctionStitchingNode : public NS :: Copying < FunctionStitchingNode > 46{ 47} ; 48 49class FunctionStitchingInputNode : public NS :: Referencing < FunctionStitchingInputNode , FunctionStitchingNode > 50{ 51public : 52static class FunctionStitchingInputNode * alloc () ; 53 54class FunctionStitchingInputNode * init () ; 55 56NS :: UInteger argumentIndex () const ; 57void setArgumentIndex ( NS :: UInteger argumentIndex ) ; 58 59MTL :: FunctionStitchingInputNode * init ( NS :: UInteger argument ) ; 60} ; 61 62class FunctionStitchingFunctionNode : public NS :: Referencing < FunctionStitchingFunctionNode , FunctionStitchingNode > 63{ 64public : 65static class FunctionStitchingFunctionNode * alloc () ; 66 67class FunctionStitchingFunctionNode * init () ; 68 69NS :: String * name () const ; 70void setName ( const NS :: String * name ) ; 71 72NS :: Array * arguments () const ; 73void setArguments ( const NS :: Array * arguments ) ; 74 75NS :: Array * controlDependencies () const ; 76void setControlDependencies ( const NS :: Array * controlDependencies ) ; 77 78MTL :: FunctionStitchingFunctionNode * init ( const NS :: String * name , const NS :: Array * arguments , const NS :: Array * controlDependencies ) ; 79} ; 80 81class FunctionStitchingGraph : public NS :: Copying < FunctionStitchingGraph > 82{ 83public : 84static class FunctionStitchingGraph * alloc () ; 85 86class FunctionStitchingGraph * init () ; 87 88NS :: String * functionName () const ; 89void setFunctionName ( const NS :: String * functionName ) ; 90 91NS :: Array * nodes () const ; 92void setNodes ( const NS :: Array * nodes ) ; 93 94class FunctionStitchingFunctionNode * outputNode () const ; 95void setOutputNode ( const class FunctionStitchingFunctionNode * outputNode ) ; 96 97NS :: Array * attributes () const ; 98void setAttributes ( const NS :: Array * attributes ) ; 99 100MTL :: 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 : 106static class StitchedLibraryDescriptor * alloc () ; 107 108class StitchedLibraryDescriptor * init () ; 109 110NS :: Array * functionGraphs () const ; 111void setFunctionGraphs ( const NS :: Array * functionGraphs ) ; 112 113NS :: Array * functions () const ; 114void setFunctions ( const NS :: Array * functions ) ; 115} ; 116 117} 118 119// static method: alloc 120_MTL_INLINE MTL :: FunctionStitchingAttributeAlwaysInline * MTL :: FunctionStitchingAttributeAlwaysInline :: alloc () 121{ 122return NS :: Object :: alloc < MTL :: FunctionStitchingAttributeAlwaysInline > ( _MTL_PRIVATE_CLS ( MTLFunctionStitchingAttributeAlwaysInline )) ; 123} 124 125// method: init 126_MTL_INLINE MTL :: FunctionStitchingAttributeAlwaysInline * MTL :: FunctionStitchingAttributeAlwaysInline :: init () 127{ 128return NS :: Object :: init < MTL :: FunctionStitchingAttributeAlwaysInline > () ; 129} 130 131// static method: alloc 132_MTL_INLINE MTL :: FunctionStitchingInputNode * MTL :: FunctionStitchingInputNode :: alloc () 133{ 134return NS :: Object :: alloc < MTL :: FunctionStitchingInputNode > ( _MTL_PRIVATE_CLS ( MTLFunctionStitchingInputNode )) ; 135} 136 137// method: init 138_MTL_INLINE MTL :: FunctionStitchingInputNode * MTL :: FunctionStitchingInputNode :: init () 139{ 140return NS :: Object :: init < MTL :: FunctionStitchingInputNode > () ; 141} 142 143// property: argumentIndex 144_MTL_INLINE NS :: UInteger MTL :: FunctionStitchingInputNode :: argumentIndex () const 145{ 146return Object :: sendMessage < NS :: UInteger > ( this , _MTL_PRIVATE_SEL ( argumentIndex )) ; 147} 148 149_MTL_INLINE void MTL :: FunctionStitchingInputNode :: setArgumentIndex ( NS :: UInteger argumentIndex ) 150{ 151Object :: 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{ 157return 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{ 163return NS :: Object :: alloc < MTL :: FunctionStitchingFunctionNode > ( _MTL_PRIVATE_CLS ( MTLFunctionStitchingFunctionNode )) ; 164} 165 166// method: init 167_MTL_INLINE MTL :: FunctionStitchingFunctionNode * MTL :: FunctionStitchingFunctionNode :: init () 168{ 169return NS :: Object :: init < MTL :: FunctionStitchingFunctionNode > () ; 170} 171 172// property: name 173_MTL_INLINE NS :: String * MTL :: FunctionStitchingFunctionNode :: name () const 174{ 175return Object :: sendMessage < NS :: String *> ( this , _MTL_PRIVATE_SEL ( name )) ; 176} 177 178_MTL_INLINE void MTL :: FunctionStitchingFunctionNode :: setName ( const NS :: String * name ) 179{ 180Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setName_ ) , name ) ; 181} 182 183// property: arguments 184_MTL_INLINE NS :: Array * MTL :: FunctionStitchingFunctionNode :: arguments () const 185{ 186return Object :: sendMessage < NS :: Array *> ( this , _MTL_PRIVATE_SEL ( arguments )) ; 187} 188 189_MTL_INLINE void MTL :: FunctionStitchingFunctionNode :: setArguments ( const NS :: Array * arguments ) 190{ 191Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setArguments_ ) , arguments ) ; 192} 193 194// property: controlDependencies 195_MTL_INLINE NS :: Array * MTL :: FunctionStitchingFunctionNode :: controlDependencies () const 196{ 197return Object :: sendMessage < NS :: Array *> ( this , _MTL_PRIVATE_SEL ( controlDependencies )) ; 198} 199 200_MTL_INLINE void MTL :: FunctionStitchingFunctionNode :: setControlDependencies ( const NS :: Array * controlDependencies ) 201{ 202Object :: 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{ 208return 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{ 214return NS :: Object :: alloc < MTL :: FunctionStitchingGraph > ( _MTL_PRIVATE_CLS ( MTLFunctionStitchingGraph )) ; 215} 216 217// method: init 218_MTL_INLINE MTL :: FunctionStitchingGraph * MTL :: FunctionStitchingGraph :: init () 219{ 220return NS :: Object :: init < MTL :: FunctionStitchingGraph > () ; 221} 222 223// property: functionName 224_MTL_INLINE NS :: String * MTL :: FunctionStitchingGraph :: functionName () const 225{ 226return Object :: sendMessage < NS :: String *> ( this , _MTL_PRIVATE_SEL ( functionName )) ; 227} 228 229_MTL_INLINE void MTL :: FunctionStitchingGraph :: setFunctionName ( const NS :: String * functionName ) 230{ 231Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setFunctionName_ ) , functionName ) ; 232} 233 234// property: nodes 235_MTL_INLINE NS :: Array * MTL :: FunctionStitchingGraph :: nodes () const 236{ 237return Object :: sendMessage < NS :: Array *> ( this , _MTL_PRIVATE_SEL ( nodes )) ; 238} 239 240_MTL_INLINE void MTL :: FunctionStitchingGraph :: setNodes ( const NS :: Array * nodes ) 241{ 242Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setNodes_ ) , nodes ) ; 243} 244 245// property: outputNode 246_MTL_INLINE MTL :: FunctionStitchingFunctionNode * MTL :: FunctionStitchingGraph :: outputNode () const 247{ 248return Object :: sendMessage < MTL :: FunctionStitchingFunctionNode *> ( this , _MTL_PRIVATE_SEL ( outputNode )) ; 249} 250 251_MTL_INLINE void MTL :: FunctionStitchingGraph :: setOutputNode ( const MTL :: FunctionStitchingFunctionNode * outputNode ) 252{ 253Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setOutputNode_ ) , outputNode ) ; 254} 255 256// property: attributes 257_MTL_INLINE NS :: Array * MTL :: FunctionStitchingGraph :: attributes () const 258{ 259return Object :: sendMessage < NS :: Array *> ( this , _MTL_PRIVATE_SEL ( attributes )) ; 260} 261 262_MTL_INLINE void MTL :: FunctionStitchingGraph :: setAttributes ( const NS :: Array * attributes ) 263{ 264Object :: 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{ 270return 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{ 276return NS :: Object :: alloc < MTL :: StitchedLibraryDescriptor > ( _MTL_PRIVATE_CLS ( MTLStitchedLibraryDescriptor )) ; 277} 278 279// method: init 280_MTL_INLINE MTL :: StitchedLibraryDescriptor * MTL :: StitchedLibraryDescriptor :: init () 281{ 282return NS :: Object :: init < MTL :: StitchedLibraryDescriptor > () ; 283} 284 285// property: functionGraphs 286_MTL_INLINE NS :: Array * MTL :: StitchedLibraryDescriptor :: functionGraphs () const 287{ 288return Object :: sendMessage < NS :: Array *> ( this , _MTL_PRIVATE_SEL ( functionGraphs )) ; 289} 290 291_MTL_INLINE void MTL :: StitchedLibraryDescriptor :: setFunctionGraphs ( const NS :: Array * functionGraphs ) 292{ 293Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setFunctionGraphs_ ) , functionGraphs ) ; 294} 295 296// property: functions 297_MTL_INLINE NS :: Array * MTL :: StitchedLibraryDescriptor :: functions () const 298{ 299return Object :: sendMessage < NS :: Array *> ( this , _MTL_PRIVATE_SEL ( functions )) ; 300} 301 302_MTL_INLINE void MTL :: StitchedLibraryDescriptor :: setFunctions ( const NS :: Array * functions ) 303{ 304Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setFunctions_ ) , functions ) ; 305}