Joseph Redmon
2015-06-11 d41fbf638e070d9fcf26a4c55a58fc1d015179c5
src/cuda.c
@@ -7,6 +7,7 @@
#include "blas.h"
#include "assert.h"
#include <stdlib.h>
#include <time.h>
void check_error(cudaError_t status)
@@ -65,7 +66,8 @@
    static int init = 0;
    if(!init){
        curandCreateGenerator(&gen, CURAND_RNG_PSEUDO_DEFAULT);
        curandSetPseudoRandomGeneratorSeed(gen, 0ULL);
        curandSetPseudoRandomGeneratorSeed(gen, time(0));
        init = 1;
    }
    curandGenerateUniform(gen, x_gpu, n);
    check_error(cudaPeekAtLastError());