unsafe void IOperatorDescriptionMarshal.__MarshalFree(ref IntPtr pDesc) { var @ref = (__Native *)pDesc; ATensor.__MarshalFree(ref @ref->ATensor); BTensor.__MarshalFree(ref @ref->BTensor); OutputTensor.__MarshalFree(ref @ref->OutputTensor); UnsafeUtilities.Free(@ref); }
unsafe void IOperatorDescriptionMarshal.__MarshalFree(ref IntPtr pDesc) { var @ref = (__Native *)pDesc; InputTensor.__MarshalFree(ref @ref->InputTensor); IndicesTensor.__MarshalFree(ref @ref->IndicesTensor); UpdatesTensor.__MarshalFree(ref @ref->UpdatesTensor); OutputTensor.__MarshalFree(ref @ref->OutputTensor); UnsafeUtilities.Free(@ref); }
unsafe void IOperatorDescriptionMarshal.__MarshalFree(ref IntPtr pDesc) { var @ref = (__Native *)pDesc; InputTensor.__MarshalFree(ref @ref->InputTensor); OutputTensor.__MarshalFree(ref @ref->OutputTensor); OutputScaleTensor.__MarshalFree(ref @ref->OutputScaleTensor); OutputZeroPointTensor.__MarshalFree(ref @ref->OutputZeroPointTensor); UnsafeUtilities.Free(@ref); }
unsafe void IGraphNodeDescriptionMarshal.__MarshalFree(ref IntPtr pDesc) { var @ref = (__Native *)pDesc; if (@ref->Name != IntPtr.Zero) { Marshal.FreeHGlobal(@ref->Name); } UnsafeUtilities.Free(@ref); }
unsafe void IOperatorDescriptionMarshal.__MarshalFree(ref IntPtr pDesc) { var @ref = (__Native *)pDesc; InputTensor.__MarshalFree(ref @ref->InputTensor); OutputTensor.__MarshalFree(ref @ref->OutputTensor); UnsafeUtilities.Free(@ref->StartPadding); UnsafeUtilities.Free(@ref->EndPadding); UnsafeUtilities.Free(@ref); }
unsafe void IOperatorDescriptionMarshal.__MarshalFree(ref IntPtr pDesc) { var @ref = (__Native *)pDesc; InputTensor.__MarshalFree(ref @ref->InputTensor); OutputTensor.__MarshalFree(ref @ref->OutputTensor); UnsafeUtilities.Free(@ref->InputWindowOffsets); UnsafeUtilities.Free(@ref->InputWindowSizes); UnsafeUtilities.Free(@ref->InputWindowStrides); UnsafeUtilities.Free(@ref); }
unsafe void IOperatorDescriptionMarshal.__MarshalFree(ref IntPtr pDesc) { var @ref = (__Native *)pDesc; InputGradientTensor.__MarshalFree(ref @ref->InputGradientTensor); OutputGradientTensor.__MarshalFree(ref @ref->OutputGradientTensor); UnsafeUtilities.Free(@ref->Scales); UnsafeUtilities.Free(@ref->InputPixelOffsets); UnsafeUtilities.Free(@ref->OutputPixelOffsets); UnsafeUtilities.Free(@ref); }
unsafe void IOperatorDescriptionMarshal.__MarshalFree(ref IntPtr pDesc) { var @ref = (__Native *)pDesc; InputStateTensor.__MarshalFree(ref @ref->InputStateTensor); OutputTensor.__MarshalFree(ref @ref->OutputTensor); if (OutputStateTensor != null) { OutputStateTensor.Value.__MarshalFree(ref @ref->OutputStateTensor); } UnsafeUtilities.Free(@ref); }
unsafe void IOperatorDescriptionMarshal.__MarshalFree(ref IntPtr pDesc) { var @ref = (__Native *)pDesc; InputTensor.__MarshalFree(ref @ref->InputTensor); OutputTensor.__MarshalFree(ref @ref->OutputTensor); if (@ref->ScaleBias != IntPtr.Zero) { UnsafeUtilities.Free(@ref->ScaleBias); } UnsafeUtilities.Free(@ref); }
unsafe void IBindingDescriptionMarshal.__MarshalFree(ref IntPtr pDesc) { var @ref = (__Native *)pDesc; var bindings = (BufferBinding.__Native *)@ref->Bindings; for (int i = 0; i < Bindings.Length; i++) { Bindings[i].__MarshalFree(ref bindings[i]); } UnsafeUtilities.Free(@ref->Bindings); UnsafeUtilities.Free(@ref); }
unsafe void IOperatorDescriptionMarshal.__MarshalFree(ref IntPtr pDesc) { var @ref = (__Native *)pDesc; InputParametersTensor.__MarshalFree(ref @ref->InputParametersTensor); InputFirstMomentTensor.__MarshalFree(ref @ref->InputFirstMomentTensor); InputSecondMomentTensor.__MarshalFree(ref @ref->InputSecondMomentTensor); GradientTensor.__MarshalFree(ref @ref->GradientTensor); TrainingStepTensor.__MarshalFree(ref @ref->TrainingStepTensor); OutputParametersTensor.__MarshalFree(ref @ref->OutputParametersTensor); OutputFirstMomentTensor.__MarshalFree(ref @ref->OutputFirstMomentTensor); OutputSecondMomentTensor.__MarshalFree(ref @ref->OutputSecondMomentTensor); UnsafeUtilities.Free(@ref); }
unsafe void IOperatorDescriptionMarshal.__MarshalFree(ref IntPtr pDesc) { var @ref = (__Native *)pDesc; InputTensor.__MarshalFree(ref @ref->InputTensor); InputGradientTensor.__MarshalFree(ref @ref->InputGradientTensor); MeanTensor.__MarshalFree(ref @ref->MeanTensor); VarianceTensor.__MarshalFree(ref @ref->VarianceTensor); ScaleTensor.__MarshalFree(ref @ref->ScaleTensor); OutputGradientTensor.__MarshalFree(ref @ref->OutputGradientTensor); OutputScaleGradientTensor.__MarshalFree(ref @ref->OutputScaleGradientTensor); OutputBiasGradientTensor.__MarshalFree(ref @ref->OutputBiasGradientTensor); UnsafeUtilities.Free(@ref); }
unsafe void IOperatorDescriptionMarshal.__MarshalFree(ref IntPtr pDesc) { var @ref = (__Native *)pDesc; ATensor.__MarshalFree(ref @ref->ATensor); BTensor.__MarshalFree(ref @ref->BTensor); OutputTensor.__MarshalFree(ref @ref->OutputTensor); if (FusedActivation != null) { FusedActivation.Value.__MarshalFree(ref @ref->FusedActivation); } UnsafeUtilities.Free(@ref); }
unsafe void ITensorDescriptionMarshal.__MarshalFree(ref IntPtr pDesc) { var @ref = (__Native *)pDesc; if (@ref->PSizes != IntPtr.Zero) { Marshal.FreeHGlobal(@ref->PSizes); } if (@ref->PStrides != IntPtr.Zero) { Marshal.FreeHGlobal(@ref->PStrides); } UnsafeUtilities.Free(@ref); }
unsafe void IOperatorDescriptionMarshal.__MarshalFree(ref IntPtr pDesc) { var @ref = (__Native *)pDesc; InputTensor.__MarshalFree(ref @ref->InputTensor); WeightTensor.__MarshalFree(ref @ref->WeightTensor); RecurrenceTensor.__MarshalFree(ref @ref->RecurrenceTensor); if (BiasTensor != null) { BiasTensor.Value.__MarshalFree(ref @ref->BiasTensor); } if (HiddenInitializerTensor != null) { HiddenInitializerTensor.Value.__MarshalFree(ref @ref->HiddenInitializerTensor); } if (SequenceLengthsTensor != null) { SequenceLengthsTensor.Value.__MarshalFree(ref @ref->SequenceLengthsTensor); } if (OutputSequenceTensor != null) { OutputSequenceTensor.Value.__MarshalFree(ref @ref->OutputSequenceTensor); } if (OutputSingleTensor != null) { OutputSingleTensor.Value.__MarshalFree(ref @ref->OutputSingleTensor); } if (@ref->Activations != IntPtr.Zero) { var activationDescsPtr = (OperatorDescription.__Native *)@ref->Activations; for (int i = 0; i < Activations.Length; i++) { Activations[i].__MarshalFree(ref activationDescsPtr[i]); } UnsafeUtilities.Free(@ref->Activations); } UnsafeUtilities.Free(@ref); }
unsafe void IOperatorDescriptionMarshal.__MarshalFree(ref IntPtr pDesc) { var @ref = (__Native *)pDesc; InputTensor.__MarshalFree(ref @ref->InputTensor); if (@ref->OutputTensors != IntPtr.Zero) { var outputTensorsPtr = (TensorDescription.__Native *)@ref->OutputTensors; for (int i = 0; i < OutputTensors.Length; i++) { OutputTensors[i].__MarshalFree(ref outputTensorsPtr[i]); } UnsafeUtilities.Free(@ref->OutputTensors); } UnsafeUtilities.Free(@ref); }
unsafe void IOperatorDescriptionMarshal.__MarshalFree(ref IntPtr pDesc) { var @ref = (__Native *)pDesc; InputTensor.__MarshalFree(ref @ref->InputTensor); MeanTensor.__MarshalFree(ref @ref->MeanTensor); VarianceTensor.__MarshalFree(ref @ref->VarianceTensor); ScaleTensor.__MarshalFree(ref @ref->ScaleTensor); BiasTensor.__MarshalFree(ref @ref->BiasTensor); OutputTensor.__MarshalFree(ref @ref->OutputTensor); if (FusedActivation != null) { FusedActivation.Value.__MarshalFree(ref @ref->FusedActivation); } UnsafeUtilities.Free(@ref); }
unsafe void IOperatorDescriptionMarshal.__MarshalFree(ref IntPtr pDesc) { var @ref = (__Native *)pDesc; InputTensor.__MarshalFree(ref @ref->InputTensor); OutputTensor.__MarshalFree(ref @ref->OutputTensor); if (OutputIndicesTensor != null) { OutputIndicesTensor.Value.__MarshalFree(ref @ref->OutputIndicesTensor); } UnsafeUtilities.Free(@ref->Strides); UnsafeUtilities.Free(@ref->WindowSize); UnsafeUtilities.Free(@ref->StartPadding); UnsafeUtilities.Free(@ref->EndPadding); UnsafeUtilities.Free(@ref); }
internal unsafe void __MarshalFree(ref __Native @ref) { if (@ref.Nodes != IntPtr.Zero) { var nodes = (GraphNodeDescription.__Native *)@ref.Nodes; for (int i = 0; i < Nodes.Length; i++) { ((GraphNodeDescription)Nodes[i]).__MarshalFree(ref nodes[i]); } UnsafeUtilities.Free(@ref.Nodes); } if (@ref.InputEdges != IntPtr.Zero) { var inputEdges = (GraphEdgeDescription.__Native *)@ref.InputEdges; for (int i = 0; i < InputEdges !.Length; i++) { ((GraphEdgeDescription)InputEdges[i]).__MarshalFree(ref inputEdges[i]); } UnsafeUtilities.Free(@ref.InputEdges); } if (@ref.OutputEdges != IntPtr.Zero) { var outputEdges = (GraphEdgeDescription.__Native *)@ref.OutputEdges; for (int i = 0; i < OutputEdges.Length; i++) { ((GraphEdgeDescription)OutputEdges[i]).__MarshalFree(ref outputEdges[i]); } UnsafeUtilities.Free(@ref.OutputEdges); } if (@ref.IntermediateEdges != IntPtr.Zero) { var intermediateEdges = (GraphEdgeDescription.__Native *)@ref.IntermediateEdges; for (int i = 0; i < IntermediateEdges !.Length; i++) { ((GraphEdgeDescription)IntermediateEdges[i]).__MarshalFree(ref intermediateEdges[i]); } UnsafeUtilities.Free(@ref.IntermediateEdges); } }
unsafe void IOperatorDescriptionMarshal.__MarshalFree(ref IntPtr pDesc) { var @ref = (__Native*)pDesc; InputTensor.__MarshalFree(ref @ref->InputTensor); InputScaleTensor.__MarshalFree(ref @ref->InputScaleTensor); if (InputZeroPointTensor != null) { InputZeroPointTensor.Value.__MarshalFree(ref @ref->InputZeroPointTensor); } FilterTensor.__MarshalFree(ref @ref->FilterTensor); FilterScaleTensor.__MarshalFree(ref @ref->FilterScaleTensor); if (FilterZeroPointTensor != null) { FilterZeroPointTensor.Value.__MarshalFree(ref @ref->FilterZeroPointTensor); } if (BiasTensor != null) { BiasTensor.Value.__MarshalFree(ref @ref->BiasTensor); } OutputScaleTensor.__MarshalFree(ref @ref->OutputScaleTensor); if (OutputZeroPointTensor != null) { OutputZeroPointTensor.Value.__MarshalFree(ref @ref->OutputZeroPointTensor); } OutputTensor.__MarshalFree(ref @ref->OutputTensor); UnsafeUtilities.Free(@ref->Strides); UnsafeUtilities.Free(@ref->Dilations); UnsafeUtilities.Free(@ref->StartPadding); UnsafeUtilities.Free(@ref->EndPadding); UnsafeUtilities.Free(@ref); }
unsafe void IOperatorDescriptionMarshal.__MarshalFree(ref IntPtr pDesc) { var @ref = (__Native *)pDesc; ATensor.__MarshalFree(ref @ref->ATensor); if (AZeroPointTensor != null) { AZeroPointTensor.Value.__MarshalFree(ref @ref->AZeroPointTensor); } BTensor.__MarshalFree(ref @ref->BTensor); if (BZeroPointTensor != null) { BZeroPointTensor.Value.__MarshalFree(ref @ref->BZeroPointTensor); } OutputTensor.__MarshalFree(ref @ref->OutputTensor); UnsafeUtilities.Free(@ref); }
unsafe void IBindingDescriptionMarshal.__MarshalFree(ref IntPtr pDesc) { UnsafeUtilities.Free(pDesc); }