Commit 56d965e9 authored by perdacherMartin's avatar perdacherMartin

fixed erand48 seed

parent 9f0a4bf4
cmake_minimum_required(VERSION 3.6)
project(blasMeans)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(SOURCE_FILES main.cpp util/allocation.cpp util/arguments.cpp util/timer.cpp util/dataIo.cpp bmeans/blasmeans.cpp)
SET(CMAKE_C_COMPILER gcc)
......
......@@ -2,12 +2,14 @@
#include "dataIo.h"
void random_init(double *array, const int N, const int D){
short unsigned int seed = 3;
short unsigned seed[3];
int i;
seed[0]=1; seed[1]=1; seed[2]=2;
#pragma omp parallel for firstprivate(seed)
for ( i=0 ; i < N * D ; i++ ){
array[i] = erand48(&seed);
array[i] = erand48(seed);
}
}
......
......@@ -6,6 +6,8 @@
#include <string.h>
#include <stdio.h>
#include <omp.h>
#define MAX_LINE_LENGTH 2049
void random_init(double *array, const int N, const int D);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment