Path: blob/master/thirdparty/metal-cpp/Metal/MTLArgument.hpp
21100 views
//-------------------------------------------------------------------------------------------------------------------------------------------------------------1//2// Metal/MTLArgument.hpp3//4// Copyright 2020-2025 Apple Inc.5//6// Licensed under the Apache License, Version 2.0 (the "License");7// you may not use this file except in compliance with the License.8// You may obtain a copy of the License at9//10// http://www.apache.org/licenses/LICENSE-2.011//12// Unless required by applicable law or agreed to in writing, software13// distributed under the License is distributed on an "AS IS" BASIS,14// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.15// See the License for the specific language governing permissions and16// limitations under the License.17//18//-------------------------------------------------------------------------------------------------------------------------------------------------------------1920#pragma once2122#include "../Foundation/Foundation.hpp"23#include "MTLDataType.hpp"24#include "MTLDefines.hpp"25#include "MTLHeaderBridge.hpp"26#include "MTLPrivate.hpp"27#include "MTLTensor.hpp"28#include "MTLTexture.hpp"2930namespace MTL31{32class Argument;33class ArrayType;34class PointerType;35class StructMember;36class StructType;37class TensorExtents;38class TensorReferenceType;39class TextureReferenceType;40class Type;41_MTL_ENUM(NS::UInteger, IndexType) {42IndexTypeUInt16 = 0,43IndexTypeUInt32 = 1,44};4546_MTL_ENUM(NS::Integer, BindingType) {47BindingTypeBuffer = 0,48BindingTypeThreadgroupMemory = 1,49BindingTypeTexture = 2,50BindingTypeSampler = 3,51BindingTypeImageblockData = 16,52BindingTypeImageblock = 17,53BindingTypeVisibleFunctionTable = 24,54BindingTypePrimitiveAccelerationStructure = 25,55BindingTypeInstanceAccelerationStructure = 26,56BindingTypeIntersectionFunctionTable = 27,57BindingTypeObjectPayload = 34,58BindingTypeTensor = 37,59};6061_MTL_ENUM(NS::UInteger, ArgumentType) {62ArgumentTypeBuffer = 0,63ArgumentTypeThreadgroupMemory = 1,64ArgumentTypeTexture = 2,65ArgumentTypeSampler = 3,66ArgumentTypeImageblockData = 16,67ArgumentTypeImageblock = 17,68ArgumentTypeVisibleFunctionTable = 24,69ArgumentTypePrimitiveAccelerationStructure = 25,70ArgumentTypeInstanceAccelerationStructure = 26,71ArgumentTypeIntersectionFunctionTable = 27,72};7374_MTL_ENUM(NS::UInteger, BindingAccess) {75BindingAccessReadOnly = 0,76BindingAccessReadWrite = 1,77BindingAccessWriteOnly = 2,78ArgumentAccessReadOnly = 0,79ArgumentAccessReadWrite = 1,80ArgumentAccessWriteOnly = 2,81};8283class Type : public NS::Referencing<Type>84{85public:86static Type* alloc();8788DataType dataType() const;8990Type* init();91};92class StructMember : public NS::Referencing<StructMember>93{94public:95static StructMember* alloc();9697NS::UInteger argumentIndex() const;9899ArrayType* arrayType();100101DataType dataType() const;102103StructMember* init();104105NS::String* name() const;106107NS::UInteger offset() const;108109PointerType* pointerType();110111StructType* structType();112113TensorReferenceType* tensorReferenceType();114115TextureReferenceType* textureReferenceType();116};117class StructType : public NS::Referencing<StructType, Type>118{119public:120static StructType* alloc();121122StructType* init();123124StructMember* memberByName(const NS::String* name);125126NS::Array* members() const;127};128class ArrayType : public NS::Referencing<ArrayType, Type>129{130public:131static ArrayType* alloc();132133NS::UInteger argumentIndexStride() const;134135NS::UInteger arrayLength() const;136137ArrayType* elementArrayType();138139PointerType* elementPointerType();140141StructType* elementStructType();142143TensorReferenceType* elementTensorReferenceType();144145TextureReferenceType* elementTextureReferenceType();146147DataType elementType() const;148149ArrayType* init();150151NS::UInteger stride() const;152};153class PointerType : public NS::Referencing<PointerType, Type>154{155public:156BindingAccess access() const;157158NS::UInteger alignment() const;159160static PointerType* alloc();161162NS::UInteger dataSize() const;163164ArrayType* elementArrayType();165166bool elementIsArgumentBuffer() const;167168StructType* elementStructType();169170DataType elementType() const;171172PointerType* init();173};174class TextureReferenceType : public NS::Referencing<TextureReferenceType, Type>175{176public:177BindingAccess access() const;178179static TextureReferenceType* alloc();180181TextureReferenceType* init();182183bool isDepthTexture() const;184185DataType textureDataType() const;186187TextureType textureType() const;188};189class TensorReferenceType : public NS::Referencing<TensorReferenceType, Type>190{191public:192BindingAccess access() const;193194static TensorReferenceType* alloc();195196TensorExtents* dimensions() const;197198DataType indexType() const;199200TensorReferenceType* init();201202TensorDataType tensorDataType() const;203};204class Argument : public NS::Referencing<Argument>205{206public:207BindingAccess access() const;208209[[deprecated("please use isActive instead")]]210bool active() const;211212static Argument* alloc();213214NS::UInteger arrayLength() const;215216NS::UInteger bufferAlignment() const;217218NS::UInteger bufferDataSize() const;219220DataType bufferDataType() const;221222PointerType* bufferPointerType() const;223224StructType* bufferStructType() const;225226NS::UInteger index() const;227228Argument* init();229230bool isActive() const;231232bool isDepthTexture() const;233234NS::String* name() const;235236DataType textureDataType() const;237238TextureType textureType() const;239240NS::UInteger threadgroupMemoryAlignment() const;241242NS::UInteger threadgroupMemoryDataSize() const;243244ArgumentType type() const;245};246class Binding : public NS::Referencing<Binding>247{248public:249BindingAccess access() const;250251[[deprecated("please use isArgument instead")]]252bool argument() const;253254NS::UInteger index() const;255256bool isArgument() const;257258bool isUsed() const;259260NS::String* name() const;261262BindingType type() const;263264[[deprecated("please use isUsed instead")]]265bool used() const;266};267class BufferBinding : public NS::Referencing<BufferBinding, Binding>268{269public:270NS::UInteger bufferAlignment() const;271272NS::UInteger bufferDataSize() const;273274DataType bufferDataType() const;275276PointerType* bufferPointerType() const;277278StructType* bufferStructType() const;279};280class ThreadgroupBinding : public NS::Referencing<ThreadgroupBinding, Binding>281{282public:283NS::UInteger threadgroupMemoryAlignment() const;284285NS::UInteger threadgroupMemoryDataSize() const;286};287class TextureBinding : public NS::Referencing<TextureBinding, Binding>288{289public:290NS::UInteger arrayLength() const;291292[[deprecated("please use isDepthTexture instead")]]293bool depthTexture() const;294bool isDepthTexture() const;295296DataType textureDataType() const;297298TextureType textureType() const;299};300class ObjectPayloadBinding : public NS::Referencing<ObjectPayloadBinding, Binding>301{302public:303NS::UInteger objectPayloadAlignment() const;304305NS::UInteger objectPayloadDataSize() const;306};307class TensorBinding : public NS::Referencing<TensorBinding, Binding>308{309public:310TensorExtents* dimensions() const;311312DataType indexType() const;313314TensorDataType tensorDataType() const;315};316317}318_MTL_INLINE MTL::Type* MTL::Type::alloc()319{320return NS::Object::alloc<MTL::Type>(_MTL_PRIVATE_CLS(MTLType));321}322323_MTL_INLINE MTL::DataType MTL::Type::dataType() const324{325return Object::sendMessage<MTL::DataType>(this, _MTL_PRIVATE_SEL(dataType));326}327328_MTL_INLINE MTL::Type* MTL::Type::init()329{330return NS::Object::init<MTL::Type>();331}332333_MTL_INLINE MTL::StructMember* MTL::StructMember::alloc()334{335return NS::Object::alloc<MTL::StructMember>(_MTL_PRIVATE_CLS(MTLStructMember));336}337338_MTL_INLINE NS::UInteger MTL::StructMember::argumentIndex() const339{340return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(argumentIndex));341}342343_MTL_INLINE MTL::ArrayType* MTL::StructMember::arrayType()344{345return Object::sendMessage<MTL::ArrayType*>(this, _MTL_PRIVATE_SEL(arrayType));346}347348_MTL_INLINE MTL::DataType MTL::StructMember::dataType() const349{350return Object::sendMessage<MTL::DataType>(this, _MTL_PRIVATE_SEL(dataType));351}352353_MTL_INLINE MTL::StructMember* MTL::StructMember::init()354{355return NS::Object::init<MTL::StructMember>();356}357358_MTL_INLINE NS::String* MTL::StructMember::name() const359{360return Object::sendMessage<NS::String*>(this, _MTL_PRIVATE_SEL(name));361}362363_MTL_INLINE NS::UInteger MTL::StructMember::offset() const364{365return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(offset));366}367368_MTL_INLINE MTL::PointerType* MTL::StructMember::pointerType()369{370return Object::sendMessage<MTL::PointerType*>(this, _MTL_PRIVATE_SEL(pointerType));371}372373_MTL_INLINE MTL::StructType* MTL::StructMember::structType()374{375return Object::sendMessage<MTL::StructType*>(this, _MTL_PRIVATE_SEL(structType));376}377378_MTL_INLINE MTL::TensorReferenceType* MTL::StructMember::tensorReferenceType()379{380return Object::sendMessage<MTL::TensorReferenceType*>(this, _MTL_PRIVATE_SEL(tensorReferenceType));381}382383_MTL_INLINE MTL::TextureReferenceType* MTL::StructMember::textureReferenceType()384{385return Object::sendMessage<MTL::TextureReferenceType*>(this, _MTL_PRIVATE_SEL(textureReferenceType));386}387388_MTL_INLINE MTL::StructType* MTL::StructType::alloc()389{390return NS::Object::alloc<MTL::StructType>(_MTL_PRIVATE_CLS(MTLStructType));391}392393_MTL_INLINE MTL::StructType* MTL::StructType::init()394{395return NS::Object::init<MTL::StructType>();396}397398_MTL_INLINE MTL::StructMember* MTL::StructType::memberByName(const NS::String* name)399{400return Object::sendMessage<MTL::StructMember*>(this, _MTL_PRIVATE_SEL(memberByName_), name);401}402403_MTL_INLINE NS::Array* MTL::StructType::members() const404{405return Object::sendMessage<NS::Array*>(this, _MTL_PRIVATE_SEL(members));406}407408_MTL_INLINE MTL::ArrayType* MTL::ArrayType::alloc()409{410return NS::Object::alloc<MTL::ArrayType>(_MTL_PRIVATE_CLS(MTLArrayType));411}412413_MTL_INLINE NS::UInteger MTL::ArrayType::argumentIndexStride() const414{415return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(argumentIndexStride));416}417418_MTL_INLINE NS::UInteger MTL::ArrayType::arrayLength() const419{420return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(arrayLength));421}422423_MTL_INLINE MTL::ArrayType* MTL::ArrayType::elementArrayType()424{425return Object::sendMessage<MTL::ArrayType*>(this, _MTL_PRIVATE_SEL(elementArrayType));426}427428_MTL_INLINE MTL::PointerType* MTL::ArrayType::elementPointerType()429{430return Object::sendMessage<MTL::PointerType*>(this, _MTL_PRIVATE_SEL(elementPointerType));431}432433_MTL_INLINE MTL::StructType* MTL::ArrayType::elementStructType()434{435return Object::sendMessage<MTL::StructType*>(this, _MTL_PRIVATE_SEL(elementStructType));436}437438_MTL_INLINE MTL::TensorReferenceType* MTL::ArrayType::elementTensorReferenceType()439{440return Object::sendMessage<MTL::TensorReferenceType*>(this, _MTL_PRIVATE_SEL(elementTensorReferenceType));441}442443_MTL_INLINE MTL::TextureReferenceType* MTL::ArrayType::elementTextureReferenceType()444{445return Object::sendMessage<MTL::TextureReferenceType*>(this, _MTL_PRIVATE_SEL(elementTextureReferenceType));446}447448_MTL_INLINE MTL::DataType MTL::ArrayType::elementType() const449{450return Object::sendMessage<MTL::DataType>(this, _MTL_PRIVATE_SEL(elementType));451}452453_MTL_INLINE MTL::ArrayType* MTL::ArrayType::init()454{455return NS::Object::init<MTL::ArrayType>();456}457458_MTL_INLINE NS::UInteger MTL::ArrayType::stride() const459{460return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(stride));461}462463_MTL_INLINE MTL::BindingAccess MTL::PointerType::access() const464{465return Object::sendMessage<MTL::BindingAccess>(this, _MTL_PRIVATE_SEL(access));466}467468_MTL_INLINE NS::UInteger MTL::PointerType::alignment() const469{470return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(alignment));471}472473_MTL_INLINE MTL::PointerType* MTL::PointerType::alloc()474{475return NS::Object::alloc<MTL::PointerType>(_MTL_PRIVATE_CLS(MTLPointerType));476}477478_MTL_INLINE NS::UInteger MTL::PointerType::dataSize() const479{480return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(dataSize));481}482483_MTL_INLINE MTL::ArrayType* MTL::PointerType::elementArrayType()484{485return Object::sendMessage<MTL::ArrayType*>(this, _MTL_PRIVATE_SEL(elementArrayType));486}487488_MTL_INLINE bool MTL::PointerType::elementIsArgumentBuffer() const489{490return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(elementIsArgumentBuffer));491}492493_MTL_INLINE MTL::StructType* MTL::PointerType::elementStructType()494{495return Object::sendMessage<MTL::StructType*>(this, _MTL_PRIVATE_SEL(elementStructType));496}497498_MTL_INLINE MTL::DataType MTL::PointerType::elementType() const499{500return Object::sendMessage<MTL::DataType>(this, _MTL_PRIVATE_SEL(elementType));501}502503_MTL_INLINE MTL::PointerType* MTL::PointerType::init()504{505return NS::Object::init<MTL::PointerType>();506}507508_MTL_INLINE MTL::BindingAccess MTL::TextureReferenceType::access() const509{510return Object::sendMessage<MTL::BindingAccess>(this, _MTL_PRIVATE_SEL(access));511}512513_MTL_INLINE MTL::TextureReferenceType* MTL::TextureReferenceType::alloc()514{515return NS::Object::alloc<MTL::TextureReferenceType>(_MTL_PRIVATE_CLS(MTLTextureReferenceType));516}517518_MTL_INLINE MTL::TextureReferenceType* MTL::TextureReferenceType::init()519{520return NS::Object::init<MTL::TextureReferenceType>();521}522523_MTL_INLINE bool MTL::TextureReferenceType::isDepthTexture() const524{525return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(isDepthTexture));526}527528_MTL_INLINE MTL::DataType MTL::TextureReferenceType::textureDataType() const529{530return Object::sendMessage<MTL::DataType>(this, _MTL_PRIVATE_SEL(textureDataType));531}532533_MTL_INLINE MTL::TextureType MTL::TextureReferenceType::textureType() const534{535return Object::sendMessage<MTL::TextureType>(this, _MTL_PRIVATE_SEL(textureType));536}537538_MTL_INLINE MTL::BindingAccess MTL::TensorReferenceType::access() const539{540return Object::sendMessage<MTL::BindingAccess>(this, _MTL_PRIVATE_SEL(access));541}542543_MTL_INLINE MTL::TensorReferenceType* MTL::TensorReferenceType::alloc()544{545return NS::Object::alloc<MTL::TensorReferenceType>(_MTL_PRIVATE_CLS(MTLTensorReferenceType));546}547548_MTL_INLINE MTL::TensorExtents* MTL::TensorReferenceType::dimensions() const549{550return Object::sendMessage<MTL::TensorExtents*>(this, _MTL_PRIVATE_SEL(dimensions));551}552553_MTL_INLINE MTL::DataType MTL::TensorReferenceType::indexType() const554{555return Object::sendMessage<MTL::DataType>(this, _MTL_PRIVATE_SEL(indexType));556}557558_MTL_INLINE MTL::TensorReferenceType* MTL::TensorReferenceType::init()559{560return NS::Object::init<MTL::TensorReferenceType>();561}562563_MTL_INLINE MTL::TensorDataType MTL::TensorReferenceType::tensorDataType() const564{565return Object::sendMessage<MTL::TensorDataType>(this, _MTL_PRIVATE_SEL(tensorDataType));566}567568_MTL_INLINE MTL::BindingAccess MTL::Argument::access() const569{570return Object::sendMessage<MTL::BindingAccess>(this, _MTL_PRIVATE_SEL(access));571}572573_MTL_INLINE bool MTL::Argument::active() const574{575return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(isActive));576}577578_MTL_INLINE MTL::Argument* MTL::Argument::alloc()579{580return NS::Object::alloc<MTL::Argument>(_MTL_PRIVATE_CLS(MTLArgument));581}582583_MTL_INLINE NS::UInteger MTL::Argument::arrayLength() const584{585return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(arrayLength));586}587588_MTL_INLINE NS::UInteger MTL::Argument::bufferAlignment() const589{590return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(bufferAlignment));591}592593_MTL_INLINE NS::UInteger MTL::Argument::bufferDataSize() const594{595return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(bufferDataSize));596}597598_MTL_INLINE MTL::DataType MTL::Argument::bufferDataType() const599{600return Object::sendMessage<MTL::DataType>(this, _MTL_PRIVATE_SEL(bufferDataType));601}602603_MTL_INLINE MTL::PointerType* MTL::Argument::bufferPointerType() const604{605return Object::sendMessage<MTL::PointerType*>(this, _MTL_PRIVATE_SEL(bufferPointerType));606}607608_MTL_INLINE MTL::StructType* MTL::Argument::bufferStructType() const609{610return Object::sendMessage<MTL::StructType*>(this, _MTL_PRIVATE_SEL(bufferStructType));611}612613_MTL_INLINE NS::UInteger MTL::Argument::index() const614{615return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(index));616}617618_MTL_INLINE MTL::Argument* MTL::Argument::init()619{620return NS::Object::init<MTL::Argument>();621}622623_MTL_INLINE bool MTL::Argument::isActive() const624{625return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(isActive));626}627628_MTL_INLINE bool MTL::Argument::isDepthTexture() const629{630return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(isDepthTexture));631}632633_MTL_INLINE NS::String* MTL::Argument::name() const634{635return Object::sendMessage<NS::String*>(this, _MTL_PRIVATE_SEL(name));636}637638_MTL_INLINE MTL::DataType MTL::Argument::textureDataType() const639{640return Object::sendMessage<MTL::DataType>(this, _MTL_PRIVATE_SEL(textureDataType));641}642643_MTL_INLINE MTL::TextureType MTL::Argument::textureType() const644{645return Object::sendMessage<MTL::TextureType>(this, _MTL_PRIVATE_SEL(textureType));646}647648_MTL_INLINE NS::UInteger MTL::Argument::threadgroupMemoryAlignment() const649{650return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(threadgroupMemoryAlignment));651}652653_MTL_INLINE NS::UInteger MTL::Argument::threadgroupMemoryDataSize() const654{655return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(threadgroupMemoryDataSize));656}657658_MTL_INLINE MTL::ArgumentType MTL::Argument::type() const659{660return Object::sendMessage<MTL::ArgumentType>(this, _MTL_PRIVATE_SEL(type));661}662663_MTL_INLINE MTL::BindingAccess MTL::Binding::access() const664{665return Object::sendMessage<MTL::BindingAccess>(this, _MTL_PRIVATE_SEL(access));666}667668_MTL_INLINE bool MTL::Binding::argument() const669{670return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(isArgument));671}672673_MTL_INLINE NS::UInteger MTL::Binding::index() const674{675return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(index));676}677678_MTL_INLINE bool MTL::Binding::isArgument() const679{680return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(isArgument));681}682683_MTL_INLINE bool MTL::Binding::isUsed() const684{685return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(isUsed));686}687688_MTL_INLINE NS::String* MTL::Binding::name() const689{690return Object::sendMessage<NS::String*>(this, _MTL_PRIVATE_SEL(name));691}692693_MTL_INLINE MTL::BindingType MTL::Binding::type() const694{695return Object::sendMessage<MTL::BindingType>(this, _MTL_PRIVATE_SEL(type));696}697698_MTL_INLINE bool MTL::Binding::used() const699{700return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(isUsed));701}702703_MTL_INLINE NS::UInteger MTL::BufferBinding::bufferAlignment() const704{705return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(bufferAlignment));706}707708_MTL_INLINE NS::UInteger MTL::BufferBinding::bufferDataSize() const709{710return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(bufferDataSize));711}712713_MTL_INLINE MTL::DataType MTL::BufferBinding::bufferDataType() const714{715return Object::sendMessage<MTL::DataType>(this, _MTL_PRIVATE_SEL(bufferDataType));716}717718_MTL_INLINE MTL::PointerType* MTL::BufferBinding::bufferPointerType() const719{720return Object::sendMessage<MTL::PointerType*>(this, _MTL_PRIVATE_SEL(bufferPointerType));721}722723_MTL_INLINE MTL::StructType* MTL::BufferBinding::bufferStructType() const724{725return Object::sendMessage<MTL::StructType*>(this, _MTL_PRIVATE_SEL(bufferStructType));726}727728_MTL_INLINE NS::UInteger MTL::ThreadgroupBinding::threadgroupMemoryAlignment() const729{730return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(threadgroupMemoryAlignment));731}732733_MTL_INLINE NS::UInteger MTL::ThreadgroupBinding::threadgroupMemoryDataSize() const734{735return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(threadgroupMemoryDataSize));736}737738_MTL_INLINE NS::UInteger MTL::TextureBinding::arrayLength() const739{740return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(arrayLength));741}742743_MTL_INLINE bool MTL::TextureBinding::depthTexture() const744{745return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(isDepthTexture));746}747748_MTL_INLINE bool MTL::TextureBinding::isDepthTexture() const749{750return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(isDepthTexture));751}752753_MTL_INLINE MTL::DataType MTL::TextureBinding::textureDataType() const754{755return Object::sendMessage<MTL::DataType>(this, _MTL_PRIVATE_SEL(textureDataType));756}757758_MTL_INLINE MTL::TextureType MTL::TextureBinding::textureType() const759{760return Object::sendMessage<MTL::TextureType>(this, _MTL_PRIVATE_SEL(textureType));761}762763_MTL_INLINE NS::UInteger MTL::ObjectPayloadBinding::objectPayloadAlignment() const764{765return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(objectPayloadAlignment));766}767768_MTL_INLINE NS::UInteger MTL::ObjectPayloadBinding::objectPayloadDataSize() const769{770return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(objectPayloadDataSize));771}772773_MTL_INLINE MTL::TensorExtents* MTL::TensorBinding::dimensions() const774{775return Object::sendMessage<MTL::TensorExtents*>(this, _MTL_PRIVATE_SEL(dimensions));776}777778_MTL_INLINE MTL::DataType MTL::TensorBinding::indexType() const779{780return Object::sendMessage<MTL::DataType>(this, _MTL_PRIVATE_SEL(indexType));781}782783_MTL_INLINE MTL::TensorDataType MTL::TensorBinding::tensorDataType() const784{785return Object::sendMessage<MTL::TensorDataType>(this, _MTL_PRIVATE_SEL(tensorDataType));786}787788789