示例#1
0
    unsafe IntPtr IOperatorDescriptionMarshal.__MarshalAlloc()
    {
        __Native * @ref = UnsafeUtilities.Alloc <__Native>();

        @ref->ATensor               = ATensor.__MarshalAlloc();
        @ref->AScaleTensor          = AScaleTensor.__MarshalAlloc();
        @ref->AZeroPointTensor      = (AZeroPointTensor != null) ? AZeroPointTensor.Value.__MarshalAlloc() : IntPtr.Zero;
        @ref->BTensor               = BTensor.__MarshalAlloc();
        @ref->BScaleTensor          = BScaleTensor.__MarshalAlloc();
        @ref->BZeroPointTensor      = (BZeroPointTensor != null) ? BZeroPointTensor.Value.__MarshalAlloc() : IntPtr.Zero;
        @ref->OutputScaleTensor     = OutputScaleTensor.__MarshalAlloc();
        @ref->OutputZeroPointTensor = (OutputZeroPointTensor != null) ? OutputZeroPointTensor.Value.__MarshalAlloc() : IntPtr.Zero;
        @ref->OutputTensor          = OutputTensor.__MarshalAlloc();

        return(new(@ref));
    }