Path: blob/master/thirdparty/metal-cpp/Metal/MTL4SpecializedFunctionDescriptor.hpp
21066 views
//-------------------------------------------------------------------------------------------------------------------------------------------------------------1//2// Metal/MTL4SpecializedFunctionDescriptor.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 "MTL4FunctionDescriptor.hpp"24#include "MTLDefines.hpp"25#include "MTLHeaderBridge.hpp"26#include "MTLPrivate.hpp"2728namespace MTL429{30class FunctionDescriptor;31class SpecializedFunctionDescriptor;32}3334namespace MTL35{36class FunctionConstantValues;37}3839namespace MTL440{41class SpecializedFunctionDescriptor : public NS::Copying<SpecializedFunctionDescriptor, FunctionDescriptor>42{43public:44static SpecializedFunctionDescriptor* alloc();4546MTL::FunctionConstantValues* constantValues() const;4748FunctionDescriptor* functionDescriptor() const;4950SpecializedFunctionDescriptor* init();5152void setConstantValues(const MTL::FunctionConstantValues* constantValues);5354void setFunctionDescriptor(const MTL4::FunctionDescriptor* functionDescriptor);5556void setSpecializedName(const NS::String* specializedName);57NS::String* specializedName() const;58};5960}61_MTL_INLINE MTL4::SpecializedFunctionDescriptor* MTL4::SpecializedFunctionDescriptor::alloc()62{63return NS::Object::alloc<MTL4::SpecializedFunctionDescriptor>(_MTL_PRIVATE_CLS(MTL4SpecializedFunctionDescriptor));64}6566_MTL_INLINE MTL::FunctionConstantValues* MTL4::SpecializedFunctionDescriptor::constantValues() const67{68return Object::sendMessage<MTL::FunctionConstantValues*>(this, _MTL_PRIVATE_SEL(constantValues));69}7071_MTL_INLINE MTL4::FunctionDescriptor* MTL4::SpecializedFunctionDescriptor::functionDescriptor() const72{73return Object::sendMessage<MTL4::FunctionDescriptor*>(this, _MTL_PRIVATE_SEL(functionDescriptor));74}7576_MTL_INLINE MTL4::SpecializedFunctionDescriptor* MTL4::SpecializedFunctionDescriptor::init()77{78return NS::Object::init<MTL4::SpecializedFunctionDescriptor>();79}8081_MTL_INLINE void MTL4::SpecializedFunctionDescriptor::setConstantValues(const MTL::FunctionConstantValues* constantValues)82{83Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setConstantValues_), constantValues);84}8586_MTL_INLINE void MTL4::SpecializedFunctionDescriptor::setFunctionDescriptor(const MTL4::FunctionDescriptor* functionDescriptor)87{88Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setFunctionDescriptor_), functionDescriptor);89}9091_MTL_INLINE void MTL4::SpecializedFunctionDescriptor::setSpecializedName(const NS::String* specializedName)92{93Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setSpecializedName_), specializedName);94}9596_MTL_INLINE NS::String* MTL4::SpecializedFunctionDescriptor::specializedName() const97{98return Object::sendMessage<NS::String*>(this, _MTL_PRIVATE_SEL(specializedName));99}100101102