Path: blob/master/thirdparty/metal-cpp/Metal/MTL4BinaryFunctionDescriptor.hpp
21066 views
//-------------------------------------------------------------------------------------------------------------------------------------------------------------1//2// Metal/MTL4BinaryFunctionDescriptor.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 "MTLDefines.hpp"24#include "MTLHeaderBridge.hpp"25#include "MTLPrivate.hpp"2627namespace MTL428{29class BinaryFunctionDescriptor;30class FunctionDescriptor;3132_MTL_OPTIONS(NS::UInteger, BinaryFunctionOptions) {33BinaryFunctionOptionNone = 0,34BinaryFunctionOptionPipelineIndependent = 1 << 1,35};3637class BinaryFunctionDescriptor : public NS::Copying<BinaryFunctionDescriptor>38{39public:40static BinaryFunctionDescriptor* alloc();4142FunctionDescriptor* functionDescriptor() const;4344BinaryFunctionDescriptor* init();4546NS::String* name() const;4748BinaryFunctionOptions options() const;4950void setFunctionDescriptor(const MTL4::FunctionDescriptor* functionDescriptor);5152void setName(const NS::String* name);5354void setOptions(MTL4::BinaryFunctionOptions options);55};5657}58_MTL_INLINE MTL4::BinaryFunctionDescriptor* MTL4::BinaryFunctionDescriptor::alloc()59{60return NS::Object::alloc<MTL4::BinaryFunctionDescriptor>(_MTL_PRIVATE_CLS(MTL4BinaryFunctionDescriptor));61}6263_MTL_INLINE MTL4::FunctionDescriptor* MTL4::BinaryFunctionDescriptor::functionDescriptor() const64{65return Object::sendMessage<MTL4::FunctionDescriptor*>(this, _MTL_PRIVATE_SEL(functionDescriptor));66}6768_MTL_INLINE MTL4::BinaryFunctionDescriptor* MTL4::BinaryFunctionDescriptor::init()69{70return NS::Object::init<MTL4::BinaryFunctionDescriptor>();71}7273_MTL_INLINE NS::String* MTL4::BinaryFunctionDescriptor::name() const74{75return Object::sendMessage<NS::String*>(this, _MTL_PRIVATE_SEL(name));76}7778_MTL_INLINE MTL4::BinaryFunctionOptions MTL4::BinaryFunctionDescriptor::options() const79{80return Object::sendMessage<MTL4::BinaryFunctionOptions>(this, _MTL_PRIVATE_SEL(options));81}8283_MTL_INLINE void MTL4::BinaryFunctionDescriptor::setFunctionDescriptor(const MTL4::FunctionDescriptor* functionDescriptor)84{85Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setFunctionDescriptor_), functionDescriptor);86}8788_MTL_INLINE void MTL4::BinaryFunctionDescriptor::setName(const NS::String* name)89{90Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setName_), name);91}9293_MTL_INLINE void MTL4::BinaryFunctionDescriptor::setOptions(MTL4::BinaryFunctionOptions options)94{95Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setOptions_), options);96}979899