yum-mirror/VkFFT
git clone https://git.yummers.dev/yum-mirror/VkFFT
ba7001c
develop
1//------------------------------------------------------------------------------------------------------------------------------------------------------------- 2// 3// Metal/MTLBinaryArchive.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 29namespace MTL 30{ 31_MTL_ENUM (NS ::UInteger ,BinaryArchiveError ) { 32BinaryArchiveErrorNone = 0 , 33BinaryArchiveErrorInvalidFile = 1 , 34BinaryArchiveErrorUnexpectedElement = 2 , 35BinaryArchiveErrorCompilationFailure = 3 , 36}; 37 38class BinaryArchiveDescriptor :public NS ::Copying < BinaryArchiveDescriptor > 39{ 40public : 41static class BinaryArchiveDescriptor * alloc (); 42 43class BinaryArchiveDescriptor * init (); 44 45NS ::URL * url ()const ; 46void setUrl (const NS ::URL * url ); 47}; 48 49class BinaryArchive :public NS ::Referencing < BinaryArchive > 50{ 51public : 52NS ::String * label ()const ; 53void setLabel (const NS ::String * label ); 54 55class Device * device ()const ; 56 57bool addComputePipelineFunctions (const class ComputePipelineDescriptor * descriptor ,NS ::Error ** error ); 58 59bool addRenderPipelineFunctions (const class RenderPipelineDescriptor * descriptor ,NS ::Error ** error ); 60 61bool addTileRenderPipelineFunctions (const class TileRenderPipelineDescriptor * descriptor ,NS ::Error ** error ); 62 63bool serializeToURL (const NS ::URL * url ,NS ::Error ** error ); 64 65bool addFunction (const class FunctionDescriptor * descriptor ,const class Library * library ,NS ::Error ** error ); 66}; 67 68} 69 70// static method: alloc 71_MTL_INLINE MTL ::BinaryArchiveDescriptor * MTL ::BinaryArchiveDescriptor ::alloc () 72{ 73return NS ::Object ::alloc < MTL ::BinaryArchiveDescriptor > (_MTL_PRIVATE_CLS (MTLBinaryArchiveDescriptor )); 74} 75 76// method: init 77_MTL_INLINE MTL ::BinaryArchiveDescriptor * MTL ::BinaryArchiveDescriptor ::init () 78{ 79return NS ::Object ::init < MTL ::BinaryArchiveDescriptor > (); 80} 81 82// property: url 83_MTL_INLINE NS ::URL * MTL ::BinaryArchiveDescriptor ::url ()const 84{ 85return Object ::sendMessage < NS ::URL *> (this ,_MTL_PRIVATE_SEL (url )); 86} 87 88_MTL_INLINE voidMTL ::BinaryArchiveDescriptor ::setUrl (const NS ::URL * url ) 89{ 90Object ::sendMessage < void > (this ,_MTL_PRIVATE_SEL (setUrl_ ),url ); 91} 92 93// property: label 94_MTL_INLINE NS ::String * MTL ::BinaryArchive ::label ()const 95{ 96return Object ::sendMessage < NS ::String *> (this ,_MTL_PRIVATE_SEL (label )); 97} 98 99_MTL_INLINE voidMTL ::BinaryArchive ::setLabel (const NS ::String * label ) 100{ 101Object ::sendMessage < void > (this ,_MTL_PRIVATE_SEL (setLabel_ ),label ); 102} 103 104// property: device 105_MTL_INLINE MTL ::Device * MTL ::BinaryArchive ::device ()const 106{ 107return Object ::sendMessage < MTL ::Device *> (this ,_MTL_PRIVATE_SEL (device )); 108} 109 110// method: addComputePipelineFunctionsWithDescriptor:error: 111_MTL_INLINE boolMTL ::BinaryArchive ::addComputePipelineFunctions (const MTL ::ComputePipelineDescriptor * descriptor ,NS ::Error ** error ) 112{ 113return Object ::sendMessage < bool > (this ,_MTL_PRIVATE_SEL (addComputePipelineFunctionsWithDescriptor_error_ ),descriptor ,error ); 114} 115 116// method: addRenderPipelineFunctionsWithDescriptor:error: 117_MTL_INLINE boolMTL ::BinaryArchive ::addRenderPipelineFunctions (const MTL ::RenderPipelineDescriptor * descriptor ,NS ::Error ** error ) 118{ 119return Object ::sendMessage < bool > (this ,_MTL_PRIVATE_SEL (addRenderPipelineFunctionsWithDescriptor_error_ ),descriptor ,error ); 120} 121 122// method: addTileRenderPipelineFunctionsWithDescriptor:error: 123_MTL_INLINE boolMTL ::BinaryArchive ::addTileRenderPipelineFunctions (const MTL ::TileRenderPipelineDescriptor * descriptor ,NS ::Error ** error ) 124{ 125return Object ::sendMessage < bool > (this ,_MTL_PRIVATE_SEL (addTileRenderPipelineFunctionsWithDescriptor_error_ ),descriptor ,error ); 126} 127 128// method: serializeToURL:error: 129_MTL_INLINE boolMTL ::BinaryArchive ::serializeToURL (const NS ::URL * url ,NS ::Error ** error ) 130{ 131return Object ::sendMessage < bool > (this ,_MTL_PRIVATE_SEL (serializeToURL_error_ ),url ,error ); 132} 133 134// method: addFunctionWithDescriptor:library:error: 135_MTL_INLINE boolMTL ::BinaryArchive ::addFunction (const MTL ::FunctionDescriptor * descriptor ,const MTL ::Library * library ,NS ::Error ** error ) 136{ 137return Object ::sendMessage < bool > (this ,_MTL_PRIVATE_SEL (addFunctionWithDescriptor_library_error_ ),descriptor ,library ,error ); 138}