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

org.nd4j.linalg.cpu.nativecpu.rng.CpuNativeRandom Maven / Gradle / Ivy

There is a newer version: 1.0.0-M2.1
Show newest version
package org.nd4j.linalg.cpu.nativecpu.rng;

import org.bytedeco.javacpp.PointerPointer;
import org.nd4j.rng.NativeRandom;

/**
 * CPU implementation for NativeRandom
 *
 * @author [email protected]
 */
public class CpuNativeRandom extends NativeRandom {

    public CpuNativeRandom() {
        super();
    }

    public CpuNativeRandom(long seed) {
        super(seed);
    }

    public CpuNativeRandom(long seed, long numberOfElements) {
        super(seed, numberOfElements);
    }

    @Override
    public void init() {
        statePointer = nativeOps.initRandom(getExtraPointers(), seed, numberOfElements, stateBuffer.addressPointer());
    }

    @Override
    public PointerPointer getExtraPointers() {
        return null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy