yum-mirror/VkFFT

git clone https://git.yummers.dev/yum-mirror/VkFFT

Tolmachev DmitriiMetal support in VkFFTba7001c

develop
5.2 KiB156 linesraw
1//-------------------------------------------------------------------------------------------------------------------------------------------------------------
2//
3// Metal/MTLFunctionDescriptor.hpp
4//
5// Copyright 2020-2021 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 "MTLDefines.hpp"
24#include "MTLHeaderBridge.hpp"
25#include "MTLPrivate.hpp"
26
27#include <Foundation/Foundation.hpp>
28
29#include "MTLFunctionDescriptor.hpp"
30
31namespace MTL
32{
33_MTL_OPTIONS(NS::UInteger, FunctionOptions) {
34    FunctionOptionNone = 0,
35    FunctionOptionCompileToBinary = 1,
36};
37
38class FunctionDescriptor : public NS::Copying<FunctionDescriptor>
39{
40public:
41    static class FunctionDescriptor* alloc();
42
43    class FunctionDescriptor*        init();
44
45    static class FunctionDescriptor* functionDescriptor();
46
47    NS::String*                      name() const;
48    void                             setName(const NS::String* name);
49
50    NS::String*                      specializedName() const;
51    void                             setSpecializedName(const NS::String* specializedName);
52
53    class FunctionConstantValues*    constantValues() const;
54    void                             setConstantValues(const class FunctionConstantValues* constantValues);
55
56    MTL::FunctionOptions             options() const;
57    void                             setOptions(MTL::FunctionOptions options);
58
59    NS::Array*                       binaryArchives() const;
60    void                             setBinaryArchives(const NS::Array* binaryArchives);
61};
62
63class IntersectionFunctionDescriptor : public NS::Copying<IntersectionFunctionDescriptor, MTL::FunctionDescriptor>
64{
65public:
66    static class IntersectionFunctionDescriptor* alloc();
67
68    class IntersectionFunctionDescriptor*        init();
69};
70
71}
72
73// static method: alloc
74_MTL_INLINE MTL::FunctionDescriptor* MTL::FunctionDescriptor::alloc()
75{
76    return NS::Object::alloc<MTL::FunctionDescriptor>(_MTL_PRIVATE_CLS(MTLFunctionDescriptor));
77}
78
79// method: init
80_MTL_INLINE MTL::FunctionDescriptor* MTL::FunctionDescriptor::init()
81{
82    return NS::Object::init<MTL::FunctionDescriptor>();
83}
84
85// static method: functionDescriptor
86_MTL_INLINE MTL::FunctionDescriptor* MTL::FunctionDescriptor::functionDescriptor()
87{
88    return Object::sendMessage<MTL::FunctionDescriptor*>(_MTL_PRIVATE_CLS(MTLFunctionDescriptor), _MTL_PRIVATE_SEL(functionDescriptor));
89}
90
91// property: name
92_MTL_INLINE NS::String* MTL::FunctionDescriptor::name() const
93{
94    return Object::sendMessage<NS::String*>(this, _MTL_PRIVATE_SEL(name));
95}
96
97_MTL_INLINE void MTL::FunctionDescriptor::setName(const NS::String* name)
98{
99    Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setName_), name);
100}
101
102// property: specializedName
103_MTL_INLINE NS::String* MTL::FunctionDescriptor::specializedName() const
104{
105    return Object::sendMessage<NS::String*>(this, _MTL_PRIVATE_SEL(specializedName));
106}
107
108_MTL_INLINE void MTL::FunctionDescriptor::setSpecializedName(const NS::String* specializedName)
109{
110    Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setSpecializedName_), specializedName);
111}
112
113// property: constantValues
114_MTL_INLINE MTL::FunctionConstantValues* MTL::FunctionDescriptor::constantValues() const
115{
116    return Object::sendMessage<MTL::FunctionConstantValues*>(this, _MTL_PRIVATE_SEL(constantValues));
117}
118
119_MTL_INLINE void MTL::FunctionDescriptor::setConstantValues(const MTL::FunctionConstantValues* constantValues)
120{
121    Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setConstantValues_), constantValues);
122}
123
124// property: options
125_MTL_INLINE MTL::FunctionOptions MTL::FunctionDescriptor::options() const
126{
127    return Object::sendMessage<MTL::FunctionOptions>(this, _MTL_PRIVATE_SEL(options));
128}
129
130_MTL_INLINE void MTL::FunctionDescriptor::setOptions(MTL::FunctionOptions options)
131{
132    Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setOptions_), options);
133}
134
135// property: binaryArchives
136_MTL_INLINE NS::Array* MTL::FunctionDescriptor::binaryArchives() const
137{
138    return Object::sendMessage<NS::Array*>(this, _MTL_PRIVATE_SEL(binaryArchives));
139}
140
141_MTL_INLINE void MTL::FunctionDescriptor::setBinaryArchives(const NS::Array* binaryArchives)
142{
143    Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setBinaryArchives_), binaryArchives);
144}
145
146// static method: alloc
147_MTL_INLINE MTL::IntersectionFunctionDescriptor* MTL::IntersectionFunctionDescriptor::alloc()
148{
149    return NS::Object::alloc<MTL::IntersectionFunctionDescriptor>(_MTL_PRIVATE_CLS(MTLIntersectionFunctionDescriptor));
150}
151
152// method: init
153_MTL_INLINE MTL::IntersectionFunctionDescriptor* MTL::IntersectionFunctionDescriptor::init()
154{
155    return NS::Object::init<MTL::IntersectionFunctionDescriptor>();
156}