com.nvidia.spark.rapids.format.TransferRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rapids-4-spark_2.13 Show documentation
Show all versions of rapids-4-spark_2.13 Show documentation
Creates the distribution package of the RAPIDS plugin for Apache Spark
// automatically generated by the FlatBuffers compiler, do not modify
package com.nvidia.spark.rapids.format;
import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;
@SuppressWarnings("unused")
/**
* Flat buffer for Rapids UCX Shuffle Transfer Request.
*/
public final class TransferRequest extends Table {
public static TransferRequest getRootAsTransferRequest(ByteBuffer _bb) { return getRootAsTransferRequest(_bb, new TransferRequest()); }
public static TransferRequest getRootAsTransferRequest(ByteBuffer _bb, TransferRequest obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public TransferRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
/**
* ID used to disambiguate Active Message receives
*/
public long id() { int o = __offset(4); return o != 0 ? bb.getLong(o + bb_pos) : 0L; }
public boolean mutateId(long id) { int o = __offset(4); if (o != 0) { bb.putLong(o + bb_pos, id); return true; } else { return false; } }
/**
* array of table requests to transfer
*/
public BufferTransferRequest requests(int j) { return requests(new BufferTransferRequest(), j); }
public BufferTransferRequest requests(BufferTransferRequest obj, int j) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; }
public int requestsLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; }
public static int createTransferRequest(FlatBufferBuilder builder,
long id,
int requestsOffset) {
builder.startObject(2);
TransferRequest.addId(builder, id);
TransferRequest.addRequests(builder, requestsOffset);
return TransferRequest.endTransferRequest(builder);
}
public static void startTransferRequest(FlatBufferBuilder builder) { builder.startObject(2); }
public static void addId(FlatBufferBuilder builder, long id) { builder.addLong(0, id, 0L); }
public static void addRequests(FlatBufferBuilder builder, int requestsOffset) { builder.addOffset(1, requestsOffset, 0); }
public static int createRequestsVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); }
public static void startRequestsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); }
public static int endTransferRequest(FlatBufferBuilder builder) {
int o = builder.endObject();
return o;
}
public static void finishTransferRequestBuffer(FlatBufferBuilder builder, int offset) { builder.finish(offset); }
public static void finishSizePrefixedTransferRequestBuffer(FlatBufferBuilder builder, int offset) { builder.finishSizePrefixed(offset); }
}