Пример #1
0
    unsafe void IOperatorDescriptionMarshal.__MarshalFree(ref IntPtr pDesc)
    {
        var @ref = (__Native *)pDesc;

        InputTensor.__MarshalFree(ref @ref->InputTensor);
        OutputCountTensor.__MarshalFree(ref @ref->OutputCountTensor);
        OutputCoordinatesTensor.__MarshalFree(ref @ref->OutputCoordinatesTensor);

        UnsafeUtilities.Free(@ref);
    }
Пример #2
0
    unsafe IntPtr IOperatorDescriptionMarshal.__MarshalAlloc()
    {
        __Native * @ref = UnsafeUtilities.Alloc <__Native>();

        @ref->InputTensor             = InputTensor.__MarshalAlloc();
        @ref->OutputCountTensor       = OutputCountTensor.__MarshalAlloc();
        @ref->OutputCoordinatesTensor = OutputCoordinatesTensor.__MarshalAlloc();

        return(new(@ref));
    }