Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
godotengine
GitHub Repository: godotengine/godot
Path: blob/master/thirdparty/metal-cpp/Metal/MTL4BinaryFunctionDescriptor.hpp
21066 views
1
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
2
//
3
// Metal/MTL4BinaryFunctionDescriptor.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 "MTLDefines.hpp"
25
#include "MTLHeaderBridge.hpp"
26
#include "MTLPrivate.hpp"
27
28
namespace MTL4
29
{
30
class BinaryFunctionDescriptor;
31
class FunctionDescriptor;
32
33
_MTL_OPTIONS(NS::UInteger, BinaryFunctionOptions) {
34
BinaryFunctionOptionNone = 0,
35
BinaryFunctionOptionPipelineIndependent = 1 << 1,
36
};
37
38
class BinaryFunctionDescriptor : public NS::Copying<BinaryFunctionDescriptor>
39
{
40
public:
41
static BinaryFunctionDescriptor* alloc();
42
43
FunctionDescriptor* functionDescriptor() const;
44
45
BinaryFunctionDescriptor* init();
46
47
NS::String* name() const;
48
49
BinaryFunctionOptions options() const;
50
51
void setFunctionDescriptor(const MTL4::FunctionDescriptor* functionDescriptor);
52
53
void setName(const NS::String* name);
54
55
void setOptions(MTL4::BinaryFunctionOptions options);
56
};
57
58
}
59
_MTL_INLINE MTL4::BinaryFunctionDescriptor* MTL4::BinaryFunctionDescriptor::alloc()
60
{
61
return NS::Object::alloc<MTL4::BinaryFunctionDescriptor>(_MTL_PRIVATE_CLS(MTL4BinaryFunctionDescriptor));
62
}
63
64
_MTL_INLINE MTL4::FunctionDescriptor* MTL4::BinaryFunctionDescriptor::functionDescriptor() const
65
{
66
return Object::sendMessage<MTL4::FunctionDescriptor*>(this, _MTL_PRIVATE_SEL(functionDescriptor));
67
}
68
69
_MTL_INLINE MTL4::BinaryFunctionDescriptor* MTL4::BinaryFunctionDescriptor::init()
70
{
71
return NS::Object::init<MTL4::BinaryFunctionDescriptor>();
72
}
73
74
_MTL_INLINE NS::String* MTL4::BinaryFunctionDescriptor::name() const
75
{
76
return Object::sendMessage<NS::String*>(this, _MTL_PRIVATE_SEL(name));
77
}
78
79
_MTL_INLINE MTL4::BinaryFunctionOptions MTL4::BinaryFunctionDescriptor::options() const
80
{
81
return Object::sendMessage<MTL4::BinaryFunctionOptions>(this, _MTL_PRIVATE_SEL(options));
82
}
83
84
_MTL_INLINE void MTL4::BinaryFunctionDescriptor::setFunctionDescriptor(const MTL4::FunctionDescriptor* functionDescriptor)
85
{
86
Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setFunctionDescriptor_), functionDescriptor);
87
}
88
89
_MTL_INLINE void MTL4::BinaryFunctionDescriptor::setName(const NS::String* name)
90
{
91
Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setName_), name);
92
}
93
94
_MTL_INLINE void MTL4::BinaryFunctionDescriptor::setOptions(MTL4::BinaryFunctionOptions options)
95
{
96
Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setOptions_), options);
97
}
98
99