io.deephaven.engine.table.impl.util.reverse.ByteReverseKernel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of deephaven-engine-table Show documentation
Show all versions of deephaven-engine-table Show documentation
Engine Table: Implementation and closely-coupled utilities
/**
* Copyright (c) 2016-2022 Deephaven Data Labs and Patent Pending
*/
/*
* ---------------------------------------------------------------------------------------------------------------------
* AUTO-GENERATED CLASS - DO NOT EDIT MANUALLY - for any changes edit CharReverseKernel and regenerate
* ---------------------------------------------------------------------------------------------------------------------
*/
package io.deephaven.engine.table.impl.util.reverse;
import io.deephaven.chunk.*;
import io.deephaven.chunk.attributes.Any;
public class ByteReverseKernel {
public static void reverse(WritableByteChunk chunkToReverse) {
for (int ii = 0; ii < chunkToReverse.size() / 2; ++ii) {
final int jj = chunkToReverse.size() - ii - 1;
final byte t = chunkToReverse.get(jj);
chunkToReverse.set(jj, chunkToReverse.get(ii));
chunkToReverse.set(ii, t);
}
}
private static class ByteReverseKernelContext implements ReverseKernel {
@Override
public void reverse(WritableChunk chunkToReverse) {
ByteReverseKernel.reverse(chunkToReverse.asWritableByteChunk());
}
}
public final static ReverseKernel INSTANCE = new ByteReverseKernelContext();
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy