Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
godotengine
GitHub Repository: godotengine/godot
Path: blob/master/thirdparty/metal-cpp/Metal/MTLArgument.hpp
21100 views
1
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
2
//
3
// Metal/MTLArgument.hpp
4
//
5
// Copyright 2020-2025 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 "../Foundation/Foundation.hpp"
24
#include "MTLDataType.hpp"
25
#include "MTLDefines.hpp"
26
#include "MTLHeaderBridge.hpp"
27
#include "MTLPrivate.hpp"
28
#include "MTLTensor.hpp"
29
#include "MTLTexture.hpp"
30
31
namespace MTL
32
{
33
class Argument;
34
class ArrayType;
35
class PointerType;
36
class StructMember;
37
class StructType;
38
class TensorExtents;
39
class TensorReferenceType;
40
class TextureReferenceType;
41
class Type;
42
_MTL_ENUM(NS::UInteger, IndexType) {
43
IndexTypeUInt16 = 0,
44
IndexTypeUInt32 = 1,
45
};
46
47
_MTL_ENUM(NS::Integer, BindingType) {
48
BindingTypeBuffer = 0,
49
BindingTypeThreadgroupMemory = 1,
50
BindingTypeTexture = 2,
51
BindingTypeSampler = 3,
52
BindingTypeImageblockData = 16,
53
BindingTypeImageblock = 17,
54
BindingTypeVisibleFunctionTable = 24,
55
BindingTypePrimitiveAccelerationStructure = 25,
56
BindingTypeInstanceAccelerationStructure = 26,
57
BindingTypeIntersectionFunctionTable = 27,
58
BindingTypeObjectPayload = 34,
59
BindingTypeTensor = 37,
60
};
61
62
_MTL_ENUM(NS::UInteger, ArgumentType) {
63
ArgumentTypeBuffer = 0,
64
ArgumentTypeThreadgroupMemory = 1,
65
ArgumentTypeTexture = 2,
66
ArgumentTypeSampler = 3,
67
ArgumentTypeImageblockData = 16,
68
ArgumentTypeImageblock = 17,
69
ArgumentTypeVisibleFunctionTable = 24,
70
ArgumentTypePrimitiveAccelerationStructure = 25,
71
ArgumentTypeInstanceAccelerationStructure = 26,
72
ArgumentTypeIntersectionFunctionTable = 27,
73
};
74
75
_MTL_ENUM(NS::UInteger, BindingAccess) {
76
BindingAccessReadOnly = 0,
77
BindingAccessReadWrite = 1,
78
BindingAccessWriteOnly = 2,
79
ArgumentAccessReadOnly = 0,
80
ArgumentAccessReadWrite = 1,
81
ArgumentAccessWriteOnly = 2,
82
};
83
84
class Type : public NS::Referencing<Type>
85
{
86
public:
87
static Type* alloc();
88
89
DataType dataType() const;
90
91
Type* init();
92
};
93
class StructMember : public NS::Referencing<StructMember>
94
{
95
public:
96
static StructMember* alloc();
97
98
NS::UInteger argumentIndex() const;
99
100
ArrayType* arrayType();
101
102
DataType dataType() const;
103
104
StructMember* init();
105
106
NS::String* name() const;
107
108
NS::UInteger offset() const;
109
110
PointerType* pointerType();
111
112
StructType* structType();
113
114
TensorReferenceType* tensorReferenceType();
115
116
TextureReferenceType* textureReferenceType();
117
};
118
class StructType : public NS::Referencing<StructType, Type>
119
{
120
public:
121
static StructType* alloc();
122
123
StructType* init();
124
125
StructMember* memberByName(const NS::String* name);
126
127
NS::Array* members() const;
128
};
129
class ArrayType : public NS::Referencing<ArrayType, Type>
130
{
131
public:
132
static ArrayType* alloc();
133
134
NS::UInteger argumentIndexStride() const;
135
136
NS::UInteger arrayLength() const;
137
138
ArrayType* elementArrayType();
139
140
PointerType* elementPointerType();
141
142
StructType* elementStructType();
143
144
TensorReferenceType* elementTensorReferenceType();
145
146
TextureReferenceType* elementTextureReferenceType();
147
148
DataType elementType() const;
149
150
ArrayType* init();
151
152
NS::UInteger stride() const;
153
};
154
class PointerType : public NS::Referencing<PointerType, Type>
155
{
156
public:
157
BindingAccess access() const;
158
159
NS::UInteger alignment() const;
160
161
static PointerType* alloc();
162
163
NS::UInteger dataSize() const;
164
165
ArrayType* elementArrayType();
166
167
bool elementIsArgumentBuffer() const;
168
169
StructType* elementStructType();
170
171
DataType elementType() const;
172
173
PointerType* init();
174
};
175
class TextureReferenceType : public NS::Referencing<TextureReferenceType, Type>
176
{
177
public:
178
BindingAccess access() const;
179
180
static TextureReferenceType* alloc();
181
182
TextureReferenceType* init();
183
184
bool isDepthTexture() const;
185
186
DataType textureDataType() const;
187
188
TextureType textureType() const;
189
};
190
class TensorReferenceType : public NS::Referencing<TensorReferenceType, Type>
191
{
192
public:
193
BindingAccess access() const;
194
195
static TensorReferenceType* alloc();
196
197
TensorExtents* dimensions() const;
198
199
DataType indexType() const;
200
201
TensorReferenceType* init();
202
203
TensorDataType tensorDataType() const;
204
};
205
class Argument : public NS::Referencing<Argument>
206
{
207
public:
208
BindingAccess access() const;
209
210
[[deprecated("please use isActive instead")]]
211
bool active() const;
212
213
static Argument* alloc();
214
215
NS::UInteger arrayLength() const;
216
217
NS::UInteger bufferAlignment() const;
218
219
NS::UInteger bufferDataSize() const;
220
221
DataType bufferDataType() const;
222
223
PointerType* bufferPointerType() const;
224
225
StructType* bufferStructType() const;
226
227
NS::UInteger index() const;
228
229
Argument* init();
230
231
bool isActive() const;
232
233
bool isDepthTexture() const;
234
235
NS::String* name() const;
236
237
DataType textureDataType() const;
238
239
TextureType textureType() const;
240
241
NS::UInteger threadgroupMemoryAlignment() const;
242
243
NS::UInteger threadgroupMemoryDataSize() const;
244
245
ArgumentType type() const;
246
};
247
class Binding : public NS::Referencing<Binding>
248
{
249
public:
250
BindingAccess access() const;
251
252
[[deprecated("please use isArgument instead")]]
253
bool argument() const;
254
255
NS::UInteger index() const;
256
257
bool isArgument() const;
258
259
bool isUsed() const;
260
261
NS::String* name() const;
262
263
BindingType type() const;
264
265
[[deprecated("please use isUsed instead")]]
266
bool used() const;
267
};
268
class BufferBinding : public NS::Referencing<BufferBinding, Binding>
269
{
270
public:
271
NS::UInteger bufferAlignment() const;
272
273
NS::UInteger bufferDataSize() const;
274
275
DataType bufferDataType() const;
276
277
PointerType* bufferPointerType() const;
278
279
StructType* bufferStructType() const;
280
};
281
class ThreadgroupBinding : public NS::Referencing<ThreadgroupBinding, Binding>
282
{
283
public:
284
NS::UInteger threadgroupMemoryAlignment() const;
285
286
NS::UInteger threadgroupMemoryDataSize() const;
287
};
288
class TextureBinding : public NS::Referencing<TextureBinding, Binding>
289
{
290
public:
291
NS::UInteger arrayLength() const;
292
293
[[deprecated("please use isDepthTexture instead")]]
294
bool depthTexture() const;
295
bool isDepthTexture() const;
296
297
DataType textureDataType() const;
298
299
TextureType textureType() const;
300
};
301
class ObjectPayloadBinding : public NS::Referencing<ObjectPayloadBinding, Binding>
302
{
303
public:
304
NS::UInteger objectPayloadAlignment() const;
305
306
NS::UInteger objectPayloadDataSize() const;
307
};
308
class TensorBinding : public NS::Referencing<TensorBinding, Binding>
309
{
310
public:
311
TensorExtents* dimensions() const;
312
313
DataType indexType() const;
314
315
TensorDataType tensorDataType() const;
316
};
317
318
}
319
_MTL_INLINE MTL::Type* MTL::Type::alloc()
320
{
321
return NS::Object::alloc<MTL::Type>(_MTL_PRIVATE_CLS(MTLType));
322
}
323
324
_MTL_INLINE MTL::DataType MTL::Type::dataType() const
325
{
326
return Object::sendMessage<MTL::DataType>(this, _MTL_PRIVATE_SEL(dataType));
327
}
328
329
_MTL_INLINE MTL::Type* MTL::Type::init()
330
{
331
return NS::Object::init<MTL::Type>();
332
}
333
334
_MTL_INLINE MTL::StructMember* MTL::StructMember::alloc()
335
{
336
return NS::Object::alloc<MTL::StructMember>(_MTL_PRIVATE_CLS(MTLStructMember));
337
}
338
339
_MTL_INLINE NS::UInteger MTL::StructMember::argumentIndex() const
340
{
341
return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(argumentIndex));
342
}
343
344
_MTL_INLINE MTL::ArrayType* MTL::StructMember::arrayType()
345
{
346
return Object::sendMessage<MTL::ArrayType*>(this, _MTL_PRIVATE_SEL(arrayType));
347
}
348
349
_MTL_INLINE MTL::DataType MTL::StructMember::dataType() const
350
{
351
return Object::sendMessage<MTL::DataType>(this, _MTL_PRIVATE_SEL(dataType));
352
}
353
354
_MTL_INLINE MTL::StructMember* MTL::StructMember::init()
355
{
356
return NS::Object::init<MTL::StructMember>();
357
}
358
359
_MTL_INLINE NS::String* MTL::StructMember::name() const
360
{
361
return Object::sendMessage<NS::String*>(this, _MTL_PRIVATE_SEL(name));
362
}
363
364
_MTL_INLINE NS::UInteger MTL::StructMember::offset() const
365
{
366
return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(offset));
367
}
368
369
_MTL_INLINE MTL::PointerType* MTL::StructMember::pointerType()
370
{
371
return Object::sendMessage<MTL::PointerType*>(this, _MTL_PRIVATE_SEL(pointerType));
372
}
373
374
_MTL_INLINE MTL::StructType* MTL::StructMember::structType()
375
{
376
return Object::sendMessage<MTL::StructType*>(this, _MTL_PRIVATE_SEL(structType));
377
}
378
379
_MTL_INLINE MTL::TensorReferenceType* MTL::StructMember::tensorReferenceType()
380
{
381
return Object::sendMessage<MTL::TensorReferenceType*>(this, _MTL_PRIVATE_SEL(tensorReferenceType));
382
}
383
384
_MTL_INLINE MTL::TextureReferenceType* MTL::StructMember::textureReferenceType()
385
{
386
return Object::sendMessage<MTL::TextureReferenceType*>(this, _MTL_PRIVATE_SEL(textureReferenceType));
387
}
388
389
_MTL_INLINE MTL::StructType* MTL::StructType::alloc()
390
{
391
return NS::Object::alloc<MTL::StructType>(_MTL_PRIVATE_CLS(MTLStructType));
392
}
393
394
_MTL_INLINE MTL::StructType* MTL::StructType::init()
395
{
396
return NS::Object::init<MTL::StructType>();
397
}
398
399
_MTL_INLINE MTL::StructMember* MTL::StructType::memberByName(const NS::String* name)
400
{
401
return Object::sendMessage<MTL::StructMember*>(this, _MTL_PRIVATE_SEL(memberByName_), name);
402
}
403
404
_MTL_INLINE NS::Array* MTL::StructType::members() const
405
{
406
return Object::sendMessage<NS::Array*>(this, _MTL_PRIVATE_SEL(members));
407
}
408
409
_MTL_INLINE MTL::ArrayType* MTL::ArrayType::alloc()
410
{
411
return NS::Object::alloc<MTL::ArrayType>(_MTL_PRIVATE_CLS(MTLArrayType));
412
}
413
414
_MTL_INLINE NS::UInteger MTL::ArrayType::argumentIndexStride() const
415
{
416
return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(argumentIndexStride));
417
}
418
419
_MTL_INLINE NS::UInteger MTL::ArrayType::arrayLength() const
420
{
421
return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(arrayLength));
422
}
423
424
_MTL_INLINE MTL::ArrayType* MTL::ArrayType::elementArrayType()
425
{
426
return Object::sendMessage<MTL::ArrayType*>(this, _MTL_PRIVATE_SEL(elementArrayType));
427
}
428
429
_MTL_INLINE MTL::PointerType* MTL::ArrayType::elementPointerType()
430
{
431
return Object::sendMessage<MTL::PointerType*>(this, _MTL_PRIVATE_SEL(elementPointerType));
432
}
433
434
_MTL_INLINE MTL::StructType* MTL::ArrayType::elementStructType()
435
{
436
return Object::sendMessage<MTL::StructType*>(this, _MTL_PRIVATE_SEL(elementStructType));
437
}
438
439
_MTL_INLINE MTL::TensorReferenceType* MTL::ArrayType::elementTensorReferenceType()
440
{
441
return Object::sendMessage<MTL::TensorReferenceType*>(this, _MTL_PRIVATE_SEL(elementTensorReferenceType));
442
}
443
444
_MTL_INLINE MTL::TextureReferenceType* MTL::ArrayType::elementTextureReferenceType()
445
{
446
return Object::sendMessage<MTL::TextureReferenceType*>(this, _MTL_PRIVATE_SEL(elementTextureReferenceType));
447
}
448
449
_MTL_INLINE MTL::DataType MTL::ArrayType::elementType() const
450
{
451
return Object::sendMessage<MTL::DataType>(this, _MTL_PRIVATE_SEL(elementType));
452
}
453
454
_MTL_INLINE MTL::ArrayType* MTL::ArrayType::init()
455
{
456
return NS::Object::init<MTL::ArrayType>();
457
}
458
459
_MTL_INLINE NS::UInteger MTL::ArrayType::stride() const
460
{
461
return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(stride));
462
}
463
464
_MTL_INLINE MTL::BindingAccess MTL::PointerType::access() const
465
{
466
return Object::sendMessage<MTL::BindingAccess>(this, _MTL_PRIVATE_SEL(access));
467
}
468
469
_MTL_INLINE NS::UInteger MTL::PointerType::alignment() const
470
{
471
return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(alignment));
472
}
473
474
_MTL_INLINE MTL::PointerType* MTL::PointerType::alloc()
475
{
476
return NS::Object::alloc<MTL::PointerType>(_MTL_PRIVATE_CLS(MTLPointerType));
477
}
478
479
_MTL_INLINE NS::UInteger MTL::PointerType::dataSize() const
480
{
481
return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(dataSize));
482
}
483
484
_MTL_INLINE MTL::ArrayType* MTL::PointerType::elementArrayType()
485
{
486
return Object::sendMessage<MTL::ArrayType*>(this, _MTL_PRIVATE_SEL(elementArrayType));
487
}
488
489
_MTL_INLINE bool MTL::PointerType::elementIsArgumentBuffer() const
490
{
491
return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(elementIsArgumentBuffer));
492
}
493
494
_MTL_INLINE MTL::StructType* MTL::PointerType::elementStructType()
495
{
496
return Object::sendMessage<MTL::StructType*>(this, _MTL_PRIVATE_SEL(elementStructType));
497
}
498
499
_MTL_INLINE MTL::DataType MTL::PointerType::elementType() const
500
{
501
return Object::sendMessage<MTL::DataType>(this, _MTL_PRIVATE_SEL(elementType));
502
}
503
504
_MTL_INLINE MTL::PointerType* MTL::PointerType::init()
505
{
506
return NS::Object::init<MTL::PointerType>();
507
}
508
509
_MTL_INLINE MTL::BindingAccess MTL::TextureReferenceType::access() const
510
{
511
return Object::sendMessage<MTL::BindingAccess>(this, _MTL_PRIVATE_SEL(access));
512
}
513
514
_MTL_INLINE MTL::TextureReferenceType* MTL::TextureReferenceType::alloc()
515
{
516
return NS::Object::alloc<MTL::TextureReferenceType>(_MTL_PRIVATE_CLS(MTLTextureReferenceType));
517
}
518
519
_MTL_INLINE MTL::TextureReferenceType* MTL::TextureReferenceType::init()
520
{
521
return NS::Object::init<MTL::TextureReferenceType>();
522
}
523
524
_MTL_INLINE bool MTL::TextureReferenceType::isDepthTexture() const
525
{
526
return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(isDepthTexture));
527
}
528
529
_MTL_INLINE MTL::DataType MTL::TextureReferenceType::textureDataType() const
530
{
531
return Object::sendMessage<MTL::DataType>(this, _MTL_PRIVATE_SEL(textureDataType));
532
}
533
534
_MTL_INLINE MTL::TextureType MTL::TextureReferenceType::textureType() const
535
{
536
return Object::sendMessage<MTL::TextureType>(this, _MTL_PRIVATE_SEL(textureType));
537
}
538
539
_MTL_INLINE MTL::BindingAccess MTL::TensorReferenceType::access() const
540
{
541
return Object::sendMessage<MTL::BindingAccess>(this, _MTL_PRIVATE_SEL(access));
542
}
543
544
_MTL_INLINE MTL::TensorReferenceType* MTL::TensorReferenceType::alloc()
545
{
546
return NS::Object::alloc<MTL::TensorReferenceType>(_MTL_PRIVATE_CLS(MTLTensorReferenceType));
547
}
548
549
_MTL_INLINE MTL::TensorExtents* MTL::TensorReferenceType::dimensions() const
550
{
551
return Object::sendMessage<MTL::TensorExtents*>(this, _MTL_PRIVATE_SEL(dimensions));
552
}
553
554
_MTL_INLINE MTL::DataType MTL::TensorReferenceType::indexType() const
555
{
556
return Object::sendMessage<MTL::DataType>(this, _MTL_PRIVATE_SEL(indexType));
557
}
558
559
_MTL_INLINE MTL::TensorReferenceType* MTL::TensorReferenceType::init()
560
{
561
return NS::Object::init<MTL::TensorReferenceType>();
562
}
563
564
_MTL_INLINE MTL::TensorDataType MTL::TensorReferenceType::tensorDataType() const
565
{
566
return Object::sendMessage<MTL::TensorDataType>(this, _MTL_PRIVATE_SEL(tensorDataType));
567
}
568
569
_MTL_INLINE MTL::BindingAccess MTL::Argument::access() const
570
{
571
return Object::sendMessage<MTL::BindingAccess>(this, _MTL_PRIVATE_SEL(access));
572
}
573
574
_MTL_INLINE bool MTL::Argument::active() const
575
{
576
return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(isActive));
577
}
578
579
_MTL_INLINE MTL::Argument* MTL::Argument::alloc()
580
{
581
return NS::Object::alloc<MTL::Argument>(_MTL_PRIVATE_CLS(MTLArgument));
582
}
583
584
_MTL_INLINE NS::UInteger MTL::Argument::arrayLength() const
585
{
586
return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(arrayLength));
587
}
588
589
_MTL_INLINE NS::UInteger MTL::Argument::bufferAlignment() const
590
{
591
return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(bufferAlignment));
592
}
593
594
_MTL_INLINE NS::UInteger MTL::Argument::bufferDataSize() const
595
{
596
return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(bufferDataSize));
597
}
598
599
_MTL_INLINE MTL::DataType MTL::Argument::bufferDataType() const
600
{
601
return Object::sendMessage<MTL::DataType>(this, _MTL_PRIVATE_SEL(bufferDataType));
602
}
603
604
_MTL_INLINE MTL::PointerType* MTL::Argument::bufferPointerType() const
605
{
606
return Object::sendMessage<MTL::PointerType*>(this, _MTL_PRIVATE_SEL(bufferPointerType));
607
}
608
609
_MTL_INLINE MTL::StructType* MTL::Argument::bufferStructType() const
610
{
611
return Object::sendMessage<MTL::StructType*>(this, _MTL_PRIVATE_SEL(bufferStructType));
612
}
613
614
_MTL_INLINE NS::UInteger MTL::Argument::index() const
615
{
616
return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(index));
617
}
618
619
_MTL_INLINE MTL::Argument* MTL::Argument::init()
620
{
621
return NS::Object::init<MTL::Argument>();
622
}
623
624
_MTL_INLINE bool MTL::Argument::isActive() const
625
{
626
return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(isActive));
627
}
628
629
_MTL_INLINE bool MTL::Argument::isDepthTexture() const
630
{
631
return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(isDepthTexture));
632
}
633
634
_MTL_INLINE NS::String* MTL::Argument::name() const
635
{
636
return Object::sendMessage<NS::String*>(this, _MTL_PRIVATE_SEL(name));
637
}
638
639
_MTL_INLINE MTL::DataType MTL::Argument::textureDataType() const
640
{
641
return Object::sendMessage<MTL::DataType>(this, _MTL_PRIVATE_SEL(textureDataType));
642
}
643
644
_MTL_INLINE MTL::TextureType MTL::Argument::textureType() const
645
{
646
return Object::sendMessage<MTL::TextureType>(this, _MTL_PRIVATE_SEL(textureType));
647
}
648
649
_MTL_INLINE NS::UInteger MTL::Argument::threadgroupMemoryAlignment() const
650
{
651
return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(threadgroupMemoryAlignment));
652
}
653
654
_MTL_INLINE NS::UInteger MTL::Argument::threadgroupMemoryDataSize() const
655
{
656
return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(threadgroupMemoryDataSize));
657
}
658
659
_MTL_INLINE MTL::ArgumentType MTL::Argument::type() const
660
{
661
return Object::sendMessage<MTL::ArgumentType>(this, _MTL_PRIVATE_SEL(type));
662
}
663
664
_MTL_INLINE MTL::BindingAccess MTL::Binding::access() const
665
{
666
return Object::sendMessage<MTL::BindingAccess>(this, _MTL_PRIVATE_SEL(access));
667
}
668
669
_MTL_INLINE bool MTL::Binding::argument() const
670
{
671
return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(isArgument));
672
}
673
674
_MTL_INLINE NS::UInteger MTL::Binding::index() const
675
{
676
return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(index));
677
}
678
679
_MTL_INLINE bool MTL::Binding::isArgument() const
680
{
681
return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(isArgument));
682
}
683
684
_MTL_INLINE bool MTL::Binding::isUsed() const
685
{
686
return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(isUsed));
687
}
688
689
_MTL_INLINE NS::String* MTL::Binding::name() const
690
{
691
return Object::sendMessage<NS::String*>(this, _MTL_PRIVATE_SEL(name));
692
}
693
694
_MTL_INLINE MTL::BindingType MTL::Binding::type() const
695
{
696
return Object::sendMessage<MTL::BindingType>(this, _MTL_PRIVATE_SEL(type));
697
}
698
699
_MTL_INLINE bool MTL::Binding::used() const
700
{
701
return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(isUsed));
702
}
703
704
_MTL_INLINE NS::UInteger MTL::BufferBinding::bufferAlignment() const
705
{
706
return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(bufferAlignment));
707
}
708
709
_MTL_INLINE NS::UInteger MTL::BufferBinding::bufferDataSize() const
710
{
711
return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(bufferDataSize));
712
}
713
714
_MTL_INLINE MTL::DataType MTL::BufferBinding::bufferDataType() const
715
{
716
return Object::sendMessage<MTL::DataType>(this, _MTL_PRIVATE_SEL(bufferDataType));
717
}
718
719
_MTL_INLINE MTL::PointerType* MTL::BufferBinding::bufferPointerType() const
720
{
721
return Object::sendMessage<MTL::PointerType*>(this, _MTL_PRIVATE_SEL(bufferPointerType));
722
}
723
724
_MTL_INLINE MTL::StructType* MTL::BufferBinding::bufferStructType() const
725
{
726
return Object::sendMessage<MTL::StructType*>(this, _MTL_PRIVATE_SEL(bufferStructType));
727
}
728
729
_MTL_INLINE NS::UInteger MTL::ThreadgroupBinding::threadgroupMemoryAlignment() const
730
{
731
return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(threadgroupMemoryAlignment));
732
}
733
734
_MTL_INLINE NS::UInteger MTL::ThreadgroupBinding::threadgroupMemoryDataSize() const
735
{
736
return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(threadgroupMemoryDataSize));
737
}
738
739
_MTL_INLINE NS::UInteger MTL::TextureBinding::arrayLength() const
740
{
741
return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(arrayLength));
742
}
743
744
_MTL_INLINE bool MTL::TextureBinding::depthTexture() const
745
{
746
return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(isDepthTexture));
747
}
748
749
_MTL_INLINE bool MTL::TextureBinding::isDepthTexture() const
750
{
751
return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(isDepthTexture));
752
}
753
754
_MTL_INLINE MTL::DataType MTL::TextureBinding::textureDataType() const
755
{
756
return Object::sendMessage<MTL::DataType>(this, _MTL_PRIVATE_SEL(textureDataType));
757
}
758
759
_MTL_INLINE MTL::TextureType MTL::TextureBinding::textureType() const
760
{
761
return Object::sendMessage<MTL::TextureType>(this, _MTL_PRIVATE_SEL(textureType));
762
}
763
764
_MTL_INLINE NS::UInteger MTL::ObjectPayloadBinding::objectPayloadAlignment() const
765
{
766
return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(objectPayloadAlignment));
767
}
768
769
_MTL_INLINE NS::UInteger MTL::ObjectPayloadBinding::objectPayloadDataSize() const
770
{
771
return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(objectPayloadDataSize));
772
}
773
774
_MTL_INLINE MTL::TensorExtents* MTL::TensorBinding::dimensions() const
775
{
776
return Object::sendMessage<MTL::TensorExtents*>(this, _MTL_PRIVATE_SEL(dimensions));
777
}
778
779
_MTL_INLINE MTL::DataType MTL::TensorBinding::indexType() const
780
{
781
return Object::sendMessage<MTL::DataType>(this, _MTL_PRIVATE_SEL(indexType));
782
}
783
784
_MTL_INLINE MTL::TensorDataType MTL::TensorBinding::tensorDataType() const
785
{
786
return Object::sendMessage<MTL::TensorDataType>(this, _MTL_PRIVATE_SEL(tensorDataType));
787
}
788
789