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

io.deephaven.engine.table.impl.util.reverse.ReverseKernel Maven / Gradle / Ivy

There is a newer version: 0.37.1
Show newest version
/**
 * Copyright (c) 2016-2022 Deephaven Data Labs and Patent Pending
 */
package io.deephaven.engine.table.impl.util.reverse;

import io.deephaven.chunk.*;
import io.deephaven.chunk.attributes.Any;

public interface ReverseKernel {
    static ReverseKernel makeReverseKernel(ChunkType chunkType) {
        switch (chunkType) {
            case Char:
                return CharReverseKernel.INSTANCE;
            case Byte:
                return ByteReverseKernel.INSTANCE;
            case Short:
                return ShortReverseKernel.INSTANCE;
            case Int:
                return IntReverseKernel.INSTANCE;
            case Long:
                return LongReverseKernel.INSTANCE;
            case Float:
                return FloatReverseKernel.INSTANCE;
            case Double:
                return DoubleReverseKernel.INSTANCE;
            default:
                return ObjectReverseKernel.INSTANCE;
        }
    }

    /**
     * Reverse chunk values in place.
     *
     * @param chunkToReverse the chunk to reverse
     */
     void reverse(WritableChunk chunkToReverse);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy