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