Пример #1
0
    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);
    }
Пример #2
0
    unsafe IntPtr IOperatorDescriptionMarshal.__MarshalAlloc()
    {
        __Native * @ref = UnsafeUtilities.Alloc <__Native>();

        @ref->InputTensor   = InputTensor.__MarshalAlloc();
        @ref->IndicesTensor = IndicesTensor.__MarshalAlloc();
        @ref->UpdatesTensor = UpdatesTensor.__MarshalAlloc();
        @ref->OutputTensor  = OutputTensor.__MarshalAlloc();
        @ref->Axis          = Axis;

        return(new(@ref));
    }