Commit a6b6a0e9 authored by Martin Perdacher's avatar Martin Perdacher

Merge branch 'master' of https://gitlab.cs.univie.ac.at/martinp16cs/BLAS-join

merge blasjoin3
parents 9e448a20 a9f971db
#include "dataIo.h"
void random_init(double *array, const int N, const int D){
short unsigned seed[3];
int i;
#pragma omp parallel
{
int tId = omp_get_thread_num();
short unsigned seed[3];
seed[0]=(((tId*tId + 15) * 3)/7);
seed[1]=(((tId*tId + 13) * 2)/3);
seed[2]=tId;
#pragma omp for
for ( i=0 ; i < N * D ; i++ ){
array[i] = erand48(seed) * 100.0;
#pragma omp for collapse(2)
for (int i = 0; i < N; i++){
for (int j = 0; j < D; j++)
array[i*N+j] = erand48(seed);
}
}
}
......
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