cavis/libnd4j/include/graph/generated/request_generated.js

156 lines
4.0 KiB
JavaScript
Raw Normal View History

2019-06-06 14:21:15 +02:00
// automatically generated by the FlatBuffers compiler, do not modify
/**
* @const
* @namespace
*/
var nd4j = nd4j || {};
/**
* @const
* @namespace
*/
nd4j.graph = nd4j.graph || {};
/**
* @constructor
*/
nd4j.graph.FlatInferenceRequest = function() {
/**
* @type {flatbuffers.ByteBuffer}
*/
this.bb = null;
/**
* @type {number}
*/
this.bb_pos = 0;
};
/**
* @param {number} i
* @param {flatbuffers.ByteBuffer} bb
* @returns {nd4j.graph.FlatInferenceRequest}
*/
nd4j.graph.FlatInferenceRequest.prototype.__init = function(i, bb) {
this.bb_pos = i;
this.bb = bb;
return this;
};
/**
* @param {flatbuffers.ByteBuffer} bb
* @param {nd4j.graph.FlatInferenceRequest=} obj
* @returns {nd4j.graph.FlatInferenceRequest}
*/
nd4j.graph.FlatInferenceRequest.getRootAsFlatInferenceRequest = function(bb, obj) {
return (obj || new nd4j.graph.FlatInferenceRequest).__init(bb.readInt32(bb.position()) + bb.position(), bb);
};
/**
* @returns {flatbuffers.Long}
*/
nd4j.graph.FlatInferenceRequest.prototype.id = function() {
var offset = this.bb.__offset(this.bb_pos, 4);
return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0);
};
/**
* @param {number} index
* @param {nd4j.graph.FlatVariable=} obj
* @returns {nd4j.graph.FlatVariable}
*/
nd4j.graph.FlatInferenceRequest.prototype.variables = function(index, obj) {
var offset = this.bb.__offset(this.bb_pos, 6);
return offset ? (obj || new nd4j.graph.FlatVariable).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
};
/**
* @returns {number}
*/
nd4j.graph.FlatInferenceRequest.prototype.variablesLength = function() {
var offset = this.bb.__offset(this.bb_pos, 6);
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
};
/**
* @param {nd4j.graph.FlatConfiguration=} obj
* @returns {nd4j.graph.FlatConfiguration|null}
*/
nd4j.graph.FlatInferenceRequest.prototype.configuration = function(obj) {
var offset = this.bb.__offset(this.bb_pos, 8);
return offset ? (obj || new nd4j.graph.FlatConfiguration).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
};
/**
* @param {flatbuffers.Builder} builder
*/
nd4j.graph.FlatInferenceRequest.startFlatInferenceRequest = function(builder) {
builder.startObject(3);
};
/**
* @param {flatbuffers.Builder} builder
* @param {flatbuffers.Long} id
*/
nd4j.graph.FlatInferenceRequest.addId = function(builder, id) {
builder.addFieldInt64(0, id, builder.createLong(0, 0));
};
/**
* @param {flatbuffers.Builder} builder
* @param {flatbuffers.Offset} variablesOffset
*/
nd4j.graph.FlatInferenceRequest.addVariables = function(builder, variablesOffset) {
builder.addFieldOffset(1, variablesOffset, 0);
};
/**
* @param {flatbuffers.Builder} builder
* @param {Array.<flatbuffers.Offset>} data
* @returns {flatbuffers.Offset}
*/
nd4j.graph.FlatInferenceRequest.createVariablesVector = function(builder, data) {
builder.startVector(4, data.length, 4);
for (var i = data.length - 1; i >= 0; i--) {
builder.addOffset(data[i]);
}
return builder.endVector();
};
/**
* @param {flatbuffers.Builder} builder
* @param {number} numElems
*/
nd4j.graph.FlatInferenceRequest.startVariablesVector = function(builder, numElems) {
builder.startVector(4, numElems, 4);
};
/**
* @param {flatbuffers.Builder} builder
* @param {flatbuffers.Offset} configurationOffset
*/
nd4j.graph.FlatInferenceRequest.addConfiguration = function(builder, configurationOffset) {
builder.addFieldOffset(2, configurationOffset, 0);
};
/**
* @param {flatbuffers.Builder} builder
* @returns {flatbuffers.Offset}
*/
nd4j.graph.FlatInferenceRequest.endFlatInferenceRequest = function(builder) {
var offset = builder.endObject();
return offset;
};
/**
* @param {flatbuffers.Builder} builder
* @param {flatbuffers.Offset} offset
*/
nd4j.graph.FlatInferenceRequest.finishFlatInferenceRequestBuffer = function(builder, offset) {
builder.finish(offset);
};
// Exports for Node.js and RequireJS
this.nd4j = nd4j;