Java Code Examples for org.nd4j.linalg.util.ArrayUtil#toInts()

The following examples show how to use org.nd4j.linalg.util.ArrayUtil#toInts() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CudaHalfDataBuffer.java    From nd4j with Apache License 2.0 4 votes vote down vote up
@Override
public int[] asInt() {
    return ArrayUtil.toInts(asFloat());
}
 
Example 2
Source File: CudaDataBufferFactory.java    From nd4j with Apache License 2.0 4 votes vote down vote up
@Override
public DataBuffer createInt(double[] data) {
    return new CudaIntDataBuffer(ArrayUtil.toInts(data));
}
 
Example 3
Source File: CudaDataBufferFactory.java    From nd4j with Apache License 2.0 4 votes vote down vote up
@Override
public DataBuffer createInt(float[] data) {
    return new CudaIntDataBuffer(ArrayUtil.toInts(data));
}
 
Example 4
Source File: CudaDataBufferFactory.java    From nd4j with Apache License 2.0 4 votes vote down vote up
@Override
public DataBuffer createInt(double[] data, boolean copy) {
    return new CudaIntDataBuffer(ArrayUtil.toInts(data));
}
 
Example 5
Source File: CudaDataBufferFactory.java    From nd4j with Apache License 2.0 4 votes vote down vote up
@Override
public DataBuffer createInt(float[] data, boolean copy) {
    return new CudaIntDataBuffer(ArrayUtil.toInts(data));
}
 
Example 6
Source File: CudaIntDataBuffer.java    From nd4j with Apache License 2.0 4 votes vote down vote up
@Override
public DataBuffer create(double[] data) {
    return new CudaIntDataBuffer(ArrayUtil.toInts(data));
}
 
Example 7
Source File: CudaIntDataBuffer.java    From nd4j with Apache License 2.0 4 votes vote down vote up
@Override
public DataBuffer create(float[] data) {
    return new CudaIntDataBuffer(ArrayUtil.toInts(data));
}
 
Example 8
Source File: CudaFloatDataBuffer.java    From nd4j with Apache License 2.0 4 votes vote down vote up
@Override
public int[] asInt() {
    return ArrayUtil.toInts(asFloat());
}
 
Example 9
Source File: DefaultDataBufferFactory.java    From nd4j with Apache License 2.0 4 votes vote down vote up
@Override
public DataBuffer createInt(long offset, double[] data) {
    return new IntBuffer(ArrayUtil.toInts(data), true, offset);
}
 
Example 10
Source File: DefaultDataBufferFactory.java    From nd4j with Apache License 2.0 4 votes vote down vote up
@Override
public DataBuffer createInt(long offset, float[] data) {
    return new IntBuffer(ArrayUtil.toInts(data), true, offset);
}
 
Example 11
Source File: DefaultDataBufferFactory.java    From nd4j with Apache License 2.0 4 votes vote down vote up
@Override
public DataBuffer createInt(long offset, double[] data, boolean copy) {
    return new IntBuffer(ArrayUtil.toInts(data), copy, offset);
}
 
Example 12
Source File: DefaultDataBufferFactory.java    From nd4j with Apache License 2.0 4 votes vote down vote up
@Override
public DataBuffer createInt(long offset, float[] data, boolean copy) {
    return new IntBuffer(ArrayUtil.toInts(data), copy, offset);
}
 
Example 13
Source File: DefaultDataBufferFactory.java    From nd4j with Apache License 2.0 4 votes vote down vote up
@Override
public DataBuffer createInt(double[] data, boolean copy) {
    return new IntBuffer(ArrayUtil.toInts(data), copy);
}
 
Example 14
Source File: DefaultDataBufferFactory.java    From nd4j with Apache License 2.0 4 votes vote down vote up
@Override
public DataBuffer createInt(float[] data, boolean copy) {
    return new IntBuffer(ArrayUtil.toInts(data), copy);
}