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

61 lines
4.1 KiB
C#

// <auto-generated>
// automatically generated by the FlatBuffers compiler, do not modify
// </auto-generated>
namespace nd4j.graph
{
using global::System;
using global::FlatBuffers;
public struct UpdaterState : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static UpdaterState GetRootAsUpdaterState(ByteBuffer _bb) { return GetRootAsUpdaterState(_bb, new UpdaterState()); }
public static UpdaterState GetRootAsUpdaterState(ByteBuffer _bb, UpdaterState 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 UpdaterState __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
public string ParamName { get { int o = __p.__offset(4); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetParamNameBytes() { return __p.__vector_as_span(4); }
#else
public ArraySegment<byte>? GetParamNameBytes() { return __p.__vector_as_arraysegment(4); }
#endif
public byte[] GetParamNameArray() { return __p.__vector_as_array<byte>(4); }
public string UpdaterStateKeys(int j) { int o = __p.__offset(6); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; }
public int UpdaterStateKeysLength { get { int o = __p.__offset(6); return o != 0 ? __p.__vector_len(o) : 0; } }
public FlatArray? UpdaterStateValues(int j) { int o = __p.__offset(8); return o != 0 ? (FlatArray?)(new FlatArray()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
public int UpdaterStateValuesLength { get { int o = __p.__offset(8); return o != 0 ? __p.__vector_len(o) : 0; } }
public static Offset<UpdaterState> CreateUpdaterState(FlatBufferBuilder builder,
StringOffset paramNameOffset = default(StringOffset),
VectorOffset updaterStateKeysOffset = default(VectorOffset),
VectorOffset updaterStateValuesOffset = default(VectorOffset)) {
builder.StartObject(3);
UpdaterState.AddUpdaterStateValues(builder, updaterStateValuesOffset);
UpdaterState.AddUpdaterStateKeys(builder, updaterStateKeysOffset);
UpdaterState.AddParamName(builder, paramNameOffset);
return UpdaterState.EndUpdaterState(builder);
}
public static void StartUpdaterState(FlatBufferBuilder builder) { builder.StartObject(3); }
public static void AddParamName(FlatBufferBuilder builder, StringOffset paramNameOffset) { builder.AddOffset(0, paramNameOffset.Value, 0); }
public static void AddUpdaterStateKeys(FlatBufferBuilder builder, VectorOffset updaterStateKeysOffset) { builder.AddOffset(1, updaterStateKeysOffset.Value, 0); }
public static VectorOffset CreateUpdaterStateKeysVector(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 CreateUpdaterStateKeysVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
public static void StartUpdaterStateKeysVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
public static void AddUpdaterStateValues(FlatBufferBuilder builder, VectorOffset updaterStateValuesOffset) { builder.AddOffset(2, updaterStateValuesOffset.Value, 0); }
public static VectorOffset CreateUpdaterStateValuesVector(FlatBufferBuilder builder, Offset<FlatArray>[] 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 CreateUpdaterStateValuesVectorBlock(FlatBufferBuilder builder, Offset<FlatArray>[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
public static void StartUpdaterStateValuesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
public static Offset<UpdaterState> EndUpdaterState(FlatBufferBuilder builder) {
int o = builder.EndObject();
return new Offset<UpdaterState>(o);
}
};
}