cavis/libnd4j/include/graph/generated/nd4j/graph/UIVariable.cs

137 lines
11 KiB
C#

// <auto-generated>
// automatically generated by the FlatBuffers compiler, do not modify
// </auto-generated>
namespace sd.graph
{
using global::System;
using global::FlatBuffers;
public struct UIVariable : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static UIVariable GetRootAsUIVariable(ByteBuffer _bb) { return GetRootAsUIVariable(_bb, new UIVariable()); }
public static UIVariable GetRootAsUIVariable(ByteBuffer _bb, UIVariable obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; }
public UIVariable __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
public IntPair? Id { get { int o = __p.__offset(4); return o != 0 ? (IntPair?)(new IntPair()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } }
public string Name { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetNameBytes() { return __p.__vector_as_span(6); }
#else
public ArraySegment<byte>? GetNameBytes() { return __p.__vector_as_arraysegment(6); }
#endif
public byte[] GetNameArray() { return __p.__vector_as_array<byte>(6); }
public VarType Type { get { int o = __p.__offset(8); return o != 0 ? (VarType)__p.bb.GetSbyte(o + __p.bb_pos) : VarType.VARIABLE; } }
public DType Datatype { get { int o = __p.__offset(10); return o != 0 ? (DType)__p.bb.GetSbyte(o + __p.bb_pos) : DType.INHERIT; } }
public long Shape(int j) { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
public int ShapeLength { get { int o = __p.__offset(12); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span<byte> GetShapeBytes() { return __p.__vector_as_span(12); }
#else
public ArraySegment<byte>? GetShapeBytes() { return __p.__vector_as_arraysegment(12); }
#endif
public long[] GetShapeArray() { return __p.__vector_as_array<long>(12); }
public string ControlDeps(int j) { int o = __p.__offset(14); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; }
public int ControlDepsLength { get { int o = __p.__offset(14); return o != 0 ? __p.__vector_len(o) : 0; } }
public string OutputOfOp { get { int o = __p.__offset(16); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetOutputOfOpBytes() { return __p.__vector_as_span(16); }
#else
public ArraySegment<byte>? GetOutputOfOpBytes() { return __p.__vector_as_arraysegment(16); }
#endif
public byte[] GetOutputOfOpArray() { return __p.__vector_as_array<byte>(16); }
public string InputsForOp(int j) { int o = __p.__offset(18); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; }
public int InputsForOpLength { get { int o = __p.__offset(18); return o != 0 ? __p.__vector_len(o) : 0; } }
public string ControlDepsForOp(int j) { int o = __p.__offset(20); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; }
public int ControlDepsForOpLength { get { int o = __p.__offset(20); return o != 0 ? __p.__vector_len(o) : 0; } }
public string ControlDepsForVar(int j) { int o = __p.__offset(22); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; }
public int ControlDepsForVarLength { get { int o = __p.__offset(22); return o != 0 ? __p.__vector_len(o) : 0; } }
public string GradientVariable { get { int o = __p.__offset(24); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetGradientVariableBytes() { return __p.__vector_as_span(24); }
#else
public ArraySegment<byte>? GetGradientVariableBytes() { return __p.__vector_as_arraysegment(24); }
#endif
public byte[] GetGradientVariableArray() { return __p.__vector_as_array<byte>(24); }
public string UiLabelExtra { get { int o = __p.__offset(26); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetUiLabelExtraBytes() { return __p.__vector_as_span(26); }
#else
public ArraySegment<byte>? GetUiLabelExtraBytes() { return __p.__vector_as_arraysegment(26); }
#endif
public byte[] GetUiLabelExtraArray() { return __p.__vector_as_array<byte>(26); }
public FlatArray? ConstantValue { get { int o = __p.__offset(28); return o != 0 ? (FlatArray?)(new FlatArray()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } }
public static Offset<UIVariable> CreateUIVariable(FlatBufferBuilder builder,
Offset<IntPair> idOffset = default(Offset<IntPair>),
StringOffset nameOffset = default(StringOffset),
VarType type = VarType.VARIABLE,
DType datatype = DType.INHERIT,
VectorOffset shapeOffset = default(VectorOffset),
VectorOffset controlDepsOffset = default(VectorOffset),
StringOffset outputOfOpOffset = default(StringOffset),
VectorOffset inputsForOpOffset = default(VectorOffset),
VectorOffset controlDepsForOpOffset = default(VectorOffset),
VectorOffset controlDepsForVarOffset = default(VectorOffset),
StringOffset gradientVariableOffset = default(StringOffset),
StringOffset uiLabelExtraOffset = default(StringOffset),
Offset<FlatArray> constantValueOffset = default(Offset<FlatArray>)) {
builder.StartObject(13);
UIVariable.AddConstantValue(builder, constantValueOffset);
UIVariable.AddUiLabelExtra(builder, uiLabelExtraOffset);
UIVariable.AddGradientVariable(builder, gradientVariableOffset);
UIVariable.AddControlDepsForVar(builder, controlDepsForVarOffset);
UIVariable.AddControlDepsForOp(builder, controlDepsForOpOffset);
UIVariable.AddInputsForOp(builder, inputsForOpOffset);
UIVariable.AddOutputOfOp(builder, outputOfOpOffset);
UIVariable.AddControlDeps(builder, controlDepsOffset);
UIVariable.AddShape(builder, shapeOffset);
UIVariable.AddName(builder, nameOffset);
UIVariable.AddId(builder, idOffset);
UIVariable.AddDatatype(builder, datatype);
UIVariable.AddType(builder, type);
return UIVariable.EndUIVariable(builder);
}
public static void StartUIVariable(FlatBufferBuilder builder) { builder.StartObject(13); }
public static void AddId(FlatBufferBuilder builder, Offset<IntPair> idOffset) { builder.AddOffset(0, idOffset.Value, 0); }
public static void AddName(FlatBufferBuilder builder, StringOffset nameOffset) { builder.AddOffset(1, nameOffset.Value, 0); }
public static void AddType(FlatBufferBuilder builder, VarType type) { builder.AddSbyte(2, (sbyte)type, 0); }
public static void AddDatatype(FlatBufferBuilder builder, DType datatype) { builder.AddSbyte(3, (sbyte)datatype, 0); }
public static void AddShape(FlatBufferBuilder builder, VectorOffset shapeOffset) { builder.AddOffset(4, shapeOffset.Value, 0); }
public static VectorOffset CreateShapeVector(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddLong(data[i]); return builder.EndVector(); }
public static VectorOffset CreateShapeVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
public static void StartShapeVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
public static void AddControlDeps(FlatBufferBuilder builder, VectorOffset controlDepsOffset) { builder.AddOffset(5, controlDepsOffset.Value, 0); }
public static VectorOffset CreateControlDepsVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); }
public static VectorOffset CreateControlDepsVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
public static void StartControlDepsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
public static void AddOutputOfOp(FlatBufferBuilder builder, StringOffset outputOfOpOffset) { builder.AddOffset(6, outputOfOpOffset.Value, 0); }
public static void AddInputsForOp(FlatBufferBuilder builder, VectorOffset inputsForOpOffset) { builder.AddOffset(7, inputsForOpOffset.Value, 0); }
public static VectorOffset CreateInputsForOpVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); }
public static VectorOffset CreateInputsForOpVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
public static void StartInputsForOpVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
public static void AddControlDepsForOp(FlatBufferBuilder builder, VectorOffset controlDepsForOpOffset) { builder.AddOffset(8, controlDepsForOpOffset.Value, 0); }
public static VectorOffset CreateControlDepsForOpVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); }
public static VectorOffset CreateControlDepsForOpVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
public static void StartControlDepsForOpVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
public static void AddControlDepsForVar(FlatBufferBuilder builder, VectorOffset controlDepsForVarOffset) { builder.AddOffset(9, controlDepsForVarOffset.Value, 0); }
public static VectorOffset CreateControlDepsForVarVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); }
public static VectorOffset CreateControlDepsForVarVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
public static void StartControlDepsForVarVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
public static void AddGradientVariable(FlatBufferBuilder builder, StringOffset gradientVariableOffset) { builder.AddOffset(10, gradientVariableOffset.Value, 0); }
public static void AddUiLabelExtra(FlatBufferBuilder builder, StringOffset uiLabelExtraOffset) { builder.AddOffset(11, uiLabelExtraOffset.Value, 0); }
public static void AddConstantValue(FlatBufferBuilder builder, Offset<FlatArray> constantValueOffset) { builder.AddOffset(12, constantValueOffset.Value, 0); }
public static Offset<UIVariable> EndUIVariable(FlatBufferBuilder builder) {
int o = builder.EndObject();
return new Offset<UIVariable>(o);
}
};
}