# This file is generated by objective.metadata
#
# Last update: Wed Feb 23 12:19:09 2022
#
# flake8: noqa

import objc, sys
from typing import NewType

if sys.maxsize > 2**32:

    def sel32or64(a, b):
        return b

else:

    def sel32or64(a, b):
        return a


if objc.arch == "arm64":

    def selAorI(a, b):
        return a

else:

    def selAorI(a, b):
        return b


misc = {}
constants = """$$"""
enums = """$MPSGraphDeviceTypeMetal@0$MPSGraphLossReductionTypeAxis@0$MPSGraphLossReductionTypeMean@2$MPSGraphLossReductionTypeSum@1$MPSGraphOptimizationLevel0@0$MPSGraphOptimizationLevel1@1$MPSGraphOptimizationProfilePerformance@0$MPSGraphOptimizationProfilePowerEfficiency@1$MPSGraphOptionsDefault@1$MPSGraphOptionsNone@0$MPSGraphOptionsSynchronizeResults@1$MPSGraphOptionsVerbose@2$MPSGraphPaddingModeAntiPeriodic@6$MPSGraphPaddingModeClampToEdge@3$MPSGraphPaddingModeConstant@0$MPSGraphPaddingModePeriodic@5$MPSGraphPaddingModeReflect@1$MPSGraphPaddingModeSymmetric@2$MPSGraphPaddingModeZero@4$MPSGraphPaddingStyleExplicit@0$MPSGraphPaddingStyleExplicitOffset@3$MPSGraphPaddingStyleTF_SAME@2$MPSGraphPaddingStyleTF_VALID@1$MPSGraphPoolingReturnIndicesGlobalFlatten1D@1$MPSGraphPoolingReturnIndicesGlobalFlatten2D@2$MPSGraphPoolingReturnIndicesGlobalFlatten3D@3$MPSGraphPoolingReturnIndicesGlobalFlatten4D@4$MPSGraphPoolingReturnIndicesLocalFlatten1D@5$MPSGraphPoolingReturnIndicesLocalFlatten2D@6$MPSGraphPoolingReturnIndicesLocalFlatten3D@7$MPSGraphPoolingReturnIndicesLocalFlatten4D@8$MPSGraphPoolingReturnIndicesNone@0$MPSGraphRNNActivationHardSigmoid@4$MPSGraphRNNActivationNone@0$MPSGraphRNNActivationRelu@1$MPSGraphRNNActivationSigmoid@3$MPSGraphRNNActivationTanh@2$MPSGraphRandomDistributionNormal@1$MPSGraphRandomDistributionTruncatedNormal@2$MPSGraphRandomDistributionUniform@0$MPSGraphRandomNormalSamplingBoxMuller@1$MPSGraphRandomNormalSamplingInvCDF@0$MPSGraphReductionModeArgumentMax@5$MPSGraphReductionModeArgumentMin@4$MPSGraphReductionModeMax@1$MPSGraphReductionModeMin@0$MPSGraphReductionModeProduct@3$MPSGraphReductionModeSum@2$MPSGraphResizeBilinear@1$MPSGraphResizeNearest@0$MPSGraphScatterModeAdd@0$MPSGraphScatterModeDiv@3$MPSGraphScatterModeMax@5$MPSGraphScatterModeMin@4$MPSGraphScatterModeMul@2$MPSGraphScatterModeSet@6$MPSGraphScatterModeSub@1$MPSGraphSparseStorageCOO@0$MPSGraphSparseStorageCSC@1$MPSGraphSparseStorageCSR@2$MPSGraphTensorNamedDataLayoutCHW@4$MPSGraphTensorNamedDataLayoutHW@6$MPSGraphTensorNamedDataLayoutHWC@5$MPSGraphTensorNamedDataLayoutHWIO@3$MPSGraphTensorNamedDataLayoutNCHW@0$MPSGraphTensorNamedDataLayoutNHWC@1$MPSGraphTensorNamedDataLayoutOIHW@2$"""
misc.update(
    {
        "MPSGraphOptimizationProfile": NewType("MPSGraphOptimizationProfile", int),
        "MPSGraphReductionMode": NewType("MPSGraphReductionMode", int),
        "MPSGraphPaddingStyle": NewType("MPSGraphPaddingStyle", int),
        "MPSGraphOptimization": NewType("MPSGraphOptimization", int),
        "MPSGraphLossReductionType": NewType("MPSGraphLossReductionType", int),
        "MPSGraphPoolingReturnIndicesMode": NewType(
            "MPSGraphPoolingReturnIndicesMode", int
        ),
        "MPSGraphDeviceType": NewType("MPSGraphDeviceType", int),
        "MPSGraphSparseStorageType": NewType("MPSGraphSparseStorageType", int),
        "MPSGraphOptions": NewType("MPSGraphOptions", int),
        "MPSGraphRandomDistribution": NewType("MPSGraphRandomDistribution", int),
        "MPSGraphResizeMode": NewType("MPSGraphResizeMode", int),
        "MPSGraphPaddingMode": NewType("MPSGraphPaddingMode", int),
        "MPSGraphRandomNormalSamplingMethod": NewType(
            "MPSGraphRandomNormalSamplingMethod", int
        ),
        "MPSGraphScatterMode": NewType("MPSGraphScatterMode", int),
        "MPSGraphTensorNamedDataLayout": NewType("MPSGraphTensorNamedDataLayout", int),
    }
)
misc.update({})
misc.update({})
aliases = {"MPSGraphOptionsDefault": "MPSGraphOptionsSynchronizeResults"}
r = objc.registerMetaDataForSelector
objc._updatingMetadata(True)
try:
    r(
        b"MPSGraph",
        b"controlDependencyWithOperations:dependentBlock:name:",
        {
            "arguments": {
                3: {
                    "callable": {
                        "retval": {"type": b"@"},
                        "arguments": {0: {"type": b"^v"}},
                    }
                }
            }
        },
    )
    r(
        b"MPSGraph",
        b"depthToSpace2DTensor:widthAxis:heightAxis:depthAxis:blockSize:usePixelShuffleOrder:name:",
        {"arguments": {7: {"type": "Z"}}},
    )
    r(
        b"MPSGraph",
        b"depthToSpace2DTensor:widthAxisTensor:heightAxisTensor:depthAxisTensor:blockSize:usePixelShuffleOrder:name:",
        {"arguments": {7: {"type": "Z"}}},
    )
    r(
        b"MPSGraph",
        b"forLoopWithLowerBound:upperBound:step:initialBodyArguments:body:name:",
        {
            "arguments": {
                6: {
                    "callable": {
                        "retval": {"type": b"@"},
                        "arguments": {
                            0: {"type": b"^v"},
                            1: {"type": b"@"},
                            2: {"type": b"@"},
                        },
                    }
                }
            }
        },
    )
    r(
        b"MPSGraph",
        b"forLoopWithNumberOfIterations:initialBodyArguments:body:name:",
        {
            "arguments": {
                4: {
                    "callable": {
                        "retval": {"type": b"@"},
                        "arguments": {
                            0: {"type": b"^v"},
                            1: {"type": b"@"},
                            2: {"type": b"@"},
                        },
                    }
                }
            }
        },
    )
    r(
        b"MPSGraph",
        b"ifWithPredicateTensor:thenBlock:elseBlock:name:",
        {
            "arguments": {
                3: {
                    "callable": {
                        "retval": {"type": b"@"},
                        "arguments": {0: {"type": b"^v"}},
                    }
                },
                4: {
                    "callable": {
                        "retval": {"type": b"@"},
                        "arguments": {0: {"type": b"^v"}},
                    }
                },
            }
        },
    )
    r(
        b"MPSGraph",
        b"resizeTensor:size:mode:centerResult:alignCorners:layout:name:",
        {"arguments": {5: {"type": b"Z"}, 6: {"type": b"Z"}}},
    )
    r(
        b"MPSGraph",
        b"resizeTensor:sizeTensor:mode:centerResult:alignCorners:layout:name:",
        {"arguments": {5: {"type": "Z"}, 6: {"type": "Z"}}},
    )
    r(
        b"MPSGraph",
        b"resizeWithGradientTensor:input:mode:centerResult:alignCorners:layout:name:",
        {"arguments": {5: {"type": b"Z"}, 6: {"type": b"Z"}}},
    )
    r(
        b"MPSGraph",
        b"spaceToDepth2DTensor:widthAxis:heightAxis:depthAxis:blockSize:usePixelShuffleOrder:name:",
        {"arguments": {7: {"type": "Z"}}},
    )
    r(
        b"MPSGraph",
        b"whileWithInitialInputs:before:after:name:",
        {
            "arguments": {
                3: {
                    "callable": {
                        "retval": {"type": b"@"},
                        "arguments": {
                            0: {"type": b"^v"},
                            1: {"type": b"@"},
                            2: {"type": b"@"},
                        },
                    }
                },
                4: {
                    "callable": {
                        "retval": {"type": b"@"},
                        "arguments": {0: {"type": b"^v"}, 1: {"type": b"@"}},
                    }
                },
            }
        },
    )
    r(
        b"MPSGraphExecutableExecutionDescriptor",
        b"completionHandler",
        {
            "retval": {
                "callable": {
                    "retval": {"type": b"v"},
                    "arguments": {
                        0: {"type": b"^v"},
                        1: {"type": b"@"},
                        2: {"type": b"@"},
                    },
                }
            }
        },
    )
    r(
        b"MPSGraphExecutableExecutionDescriptor",
        b"scheduledHandler",
        {
            "retval": {
                "callable": {
                    "retval": {"type": b"v"},
                    "arguments": {
                        0: {"type": b"^v"},
                        1: {"type": b"@"},
                        2: {"type": b"@"},
                    },
                }
            }
        },
    )
    r(
        b"MPSGraphExecutableExecutionDescriptor",
        b"setCompletionHandler:",
        {
            "arguments": {
                2: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {
                            0: {"type": b"^v"},
                            1: {"type": b"@"},
                            2: {"type": b"@"},
                        },
                    }
                }
            }
        },
    )
    r(
        b"MPSGraphExecutableExecutionDescriptor",
        b"setScheduledHandler:",
        {
            "arguments": {
                2: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {
                            0: {"type": b"^v"},
                            1: {"type": b"@"},
                            2: {"type": b"@"},
                        },
                    }
                }
            }
        },
    )
    r(
        b"MPSGraphExecutableExecutionDescriptor",
        b"setWaitUntilCompleted:",
        {"arguments": {2: {"type": b"Z"}}},
    )
    r(
        b"MPSGraphExecutableExecutionDescriptor",
        b"waitUntilCompleted",
        {"retval": {"type": b"Z"}},
    )
    r(
        b"MPSGraphExecutionDescriptor",
        b"setCompletionHandler:",
        {
            "arguments": {
                2: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {0: {"type": b"^v"}},
                    }
                }
            }
        },
    )
    r(
        b"MPSGraphExecutionDescriptor",
        b"setScheduledHandler:",
        {
            "arguments": {
                2: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {0: {"type": b"^v"}},
                    }
                }
            }
        },
    )
    r(
        b"MPSGraphExecutionDescriptor",
        b"setWaitUntilCompleted:",
        {"arguments": {2: {"type": b"Z"}}},
    )
    r(b"MPSGraphExecutionDescriptor", b"waitUntilCompleted", {"retval": {"type": b"Z"}})
    r(b"MPSGraphPooling2DOpDescriptor", b"ceilMode", {"retval": {"type": b"Z"}})
    r(
        b"MPSGraphPooling2DOpDescriptor",
        b"includeZeroPadToAverage",
        {"retval": {"type": b"Z"}},
    )
    r(
        b"MPSGraphPooling2DOpDescriptor",
        b"setCeilMode:",
        {"arguments": {2: {"type": b"Z"}}},
    )
    r(
        b"MPSGraphPooling2DOpDescriptor",
        b"setIncludeZeroPadToAverage:",
        {"arguments": {2: {"type": b"Z"}}},
    )
    r(b"MPSGraphPooling4DOpDescriptor", b"ceilMode", {"retval": {"type": b"Z"}})
    r(
        b"MPSGraphPooling4DOpDescriptor",
        b"includeZeroPadToAverage",
        {"retval": {"type": b"Z"}},
    )
    r(
        b"MPSGraphPooling4DOpDescriptor",
        b"setCeilMode:",
        {"arguments": {2: {"type": b"Z"}}},
    )
    r(
        b"MPSGraphPooling4DOpDescriptor",
        b"setIncludeZeroPadToAverage:",
        {"arguments": {2: {"type": b"Z"}}},
    )
    r(b"MPSGraphShapedType", b"isEqualTo:", {"retval": {"type": b"Z"}})
    r(
        b"null",
        b"concatTensors:dimension:interleave:name:",
        {"arguments": {4: {"type": b"Z"}}},
    )
    r(
        b"null",
        b"controlDependencyWithOperations:dependentBlock:name:",
        {
            "arguments": {
                3: {
                    "callable": {
                        "retval": {"type": b"@?"},
                        "arguments": {0: {"type": b"^v"}},
                    }
                }
            }
        },
    )
    r(
        b"null",
        b"depthToSpace2DTensor:widthAxis:heightAxis:depthAxis:blockSize:usePixelShuffleOrder:name:",
        {"arguments": {7: {"type": b"Z"}}},
    )
    r(
        b"null",
        b"depthToSpace2DTensor:widthAxisTensor:heightAxisTensor:depthAxisTensor:blockSize:usePixelShuffleOrder:name:",
        {"arguments": {7: {"type": b"Z"}}},
    )
    r(
        b"null",
        b"forLoopWithLowerBound:upperBound:step:initialBodyArguments:body:name:",
        {
            "arguments": {
                6: {
                    "callable": {
                        "retval": {"type": b"@?"},
                        "arguments": {0: {"type": b"^v"}},
                    }
                }
            }
        },
    )
    r(
        b"null",
        b"forLoopWithNumberOfIterations:initialBodyArguments:body:name:",
        {
            "arguments": {
                4: {
                    "callable": {
                        "retval": {"type": b"@?"},
                        "arguments": {0: {"type": b"^v"}},
                    }
                }
            }
        },
    )
    r(
        b"null",
        b"ifWithPredicateTensor:thenBlock:elseBlock:name:",
        {
            "arguments": {
                3: {
                    "callable": {
                        "retval": {"type": b"@?"},
                        "arguments": {0: {"type": b"^v"}},
                    }
                },
                4: {
                    "callable": {
                        "retval": {"type": b"@?"},
                        "arguments": {0: {"type": b"^v"}},
                    }
                },
            }
        },
    )
    r(
        b"null",
        b"resizeTensor:size:mode:centerResult:alignCorners:layout:name:",
        {"arguments": {5: {"type": b"Z"}, 6: {"type": b"Z"}}},
    )
    r(
        b"null",
        b"resizeTensor:sizeTensor:mode:centerResult:alignCorners:layout:name:",
        {"arguments": {5: {"type": b"Z"}, 6: {"type": b"Z"}}},
    )
    r(
        b"null",
        b"resizeWithGradientTensor:input:mode:centerResult:alignCorners:layout:name:",
        {"arguments": {5: {"type": b"Z"}, 6: {"type": b"Z"}}},
    )
    r(
        b"null",
        b"spaceToDepth2DTensor:widthAxis:heightAxis:depthAxis:blockSize:usePixelShuffleOrder:name:",
        {"arguments": {7: {"type": b"Z"}}},
    )
    r(
        b"null",
        b"spaceToDepth2DTensor:widthAxisTensor:heightAxisTensor:depthAxisTensor:blockSize:usePixelShuffleOrder:name:",
        {"arguments": {7: {"type": b"Z"}}},
    )
    r(
        b"MPSGraphLSTMDescriptor",
        b"reverse",
        {"retval": {"type": b"Z"}},
    )
    r(
        b"MPSGraphLSTMDescriptor",
        b"setReverse:",
        {"arguments": {2: {"type": b"Z"}}},
    )
    r(
        b"MPSGraphLSTMDescriptor",
        b"produceCell",
        {"retval": {"type": b"Z"}},
    )
    r(
        b"MPSGraphLSTMDescriptor",
        b"setProduceCell:",
        {"arguments": {2: {"type": b"Z"}}},
    )
    r(
        b"MPSGraphLSTMDescriptor",
        b"bidirectional",
        {"retval": {"type": b"Z"}},
    )
    r(
        b"MPSGraphLSTMDescriptor",
        b"setBidirectional:",
        {"arguments": {2: {"type": b"Z"}}},
    )
    r(
        b"MPSGraphLSTMDescriptor",
        b"forgetGateLast",
        {"retval": {"type": b"Z"}},
    )
    r(
        b"MPSGraphLSTMDescriptor",
        b"setForgetGateLast:",
        {"arguments": {2: {"type": b"Z"}}},
    )
    r(
        b"MPSGraphLSTMDescriptor",
        b"training",
        {"retval": {"type": b"Z"}},
    )
    r(
        b"MPSGraphLSTMDescriptor",
        b"setTraining:",
        {"arguments": {2: {"type": b"Z"}}},
    )
    r(
        b"MPSGraphSingleGateRNNDescriptor",
        b"reverse",
        {"retval": {"type": b"Z"}},
    )
    r(
        b"MPSGraphSingleGateRNNDescriptor",
        b"setReverse:",
        {"arguments": {2: {"type": b"Z"}}},
    )
    r(
        b"MPSGraphSingleGateRNNDescriptor",
        b"bidirectional",
        {"retval": {"type": b"Z"}},
    )
    r(
        b"MPSGraphSingleGateRNNDescriptor",
        b"setBidirectional:",
        {"arguments": {2: {"type": b"Z"}}},
    )
    r(
        b"MPSGraphSingleGateRNNDescriptor",
        b"training",
        {"retval": {"type": b"Z"}},
    )
    r(
        b"MPSGraphSingleGateRNNDescriptor",
        b"setTraining:",
        {"arguments": {2: {"type": b"Z"}}},
    )
    r(
        b"MPSGraphSingleGateRNNDescriptor",
        b"reverse",
        {"retval": {"type": b"Z"}},
    )
    r(
        b"MPSGraphSingleGateRNNDescriptor",
        b"setReverse:",
        {"arguments": {2: {"type": b"Z"}}},
    )
    r(
        b"null",
        b"whileWithInitialInputs:before:after:name:",
        {
            "arguments": {
                3: {
                    "callable": {
                        "retval": {"type": b"@?"},
                        "arguments": {0: {"type": b"^v"}},
                    }
                },
                4: {
                    "callable": {
                        "retval": {"type": b"@?"},
                        "arguments": {0: {"type": b"^v"}},
                    }
                },
            }
        },
    )
finally:
    objc._updatingMetadata(False)
expressions = {}

# END OF FILE
