All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.deeplearning4j.ui.stats.sbe.InitFieldsPresentEncoder Maven / Gradle / Ivy

There is a newer version: 1.0.0-M2.1
Show newest version
/*- Generated SBE (Simple Binary Encoding) message codec */
package org.deeplearning4j.ui.stats.sbe;

import org.agrona.MutableDirectBuffer;

@javax.annotation.Generated(value = {"org.deeplearning4j.ui.stats.sbe.InitFieldsPresentEncoder"})
@SuppressWarnings("all")
public class InitFieldsPresentEncoder {
    public static final int ENCODED_LENGTH = 1;
    private MutableDirectBuffer buffer;
    private int offset;

    public InitFieldsPresentEncoder wrap(final MutableDirectBuffer buffer, final int offset) {
        this.buffer = buffer;
        this.offset = offset;

        return this;
    }

    public int encodedLength() {
        return ENCODED_LENGTH;
    }

    public InitFieldsPresentEncoder clear() {
        buffer.putByte(offset, (byte) (short) 0);
        return this;
    }

    public InitFieldsPresentEncoder softwareInfo(final boolean value) {
        byte bits = buffer.getByte(offset);
        bits = (byte) (value ? bits | (1 << 0) : bits & ~(1 << 0));
        buffer.putByte(offset, bits);
        return this;
    }

    public InitFieldsPresentEncoder hardwareInfo(final boolean value) {
        byte bits = buffer.getByte(offset);
        bits = (byte) (value ? bits | (1 << 1) : bits & ~(1 << 1));
        buffer.putByte(offset, bits);
        return this;
    }

    public InitFieldsPresentEncoder modelInfo(final boolean value) {
        byte bits = buffer.getByte(offset);
        bits = (byte) (value ? bits | (1 << 2) : bits & ~(1 << 2));
        buffer.putByte(offset, bits);
        return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy