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

org.nd4j.linalg.api.ndarray.ShapeInfoProvider Maven / Gradle / Ivy

There is a newer version: 1.0.0-M2.1
Show newest version
package org.nd4j.linalg.api.ndarray;

import org.apache.commons.math3.util.Pair;
import org.nd4j.linalg.api.buffer.DataBuffer;

/**
 * @author [email protected]
 */
public interface ShapeInfoProvider {
    /**
     * This method creates shapeInformation buffer, based on shape being passed in
     * @param shape
     * @return
     */
    Pair createShapeInformation(int[] shape);

    /**
     * This method creates shapeInformation buffer, based on shape & order being passed in
     * @param shape
     * @return
     */
    Pair createShapeInformation(int[] shape, char order);

    /**
     * This method creates shapeInformation buffer, based on detailed shape information being passed in
     * @param shape
     * @return
     */
    Pair createShapeInformation(int[] shape, int[] stride, long offset, int elementWiseStride, char order);

    /**
     * This method forces cache purge, if cache is available for specific implementation
     */
    void purgeCache();

    /**
     * This method returns memory used for cache, in bytes
     * @return
     */
    long getCachedBytes();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy