Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BLAS-join
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Google-TPU
BLAS-join
Commits
3b3ea787
Commit
3b3ea787
authored
Jul 19, 2017
by
Martin Perdacher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
corrected randomgenerator
parent
d4fa2b90
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
cmake/util/arguments.cpp
cmake/util/arguments.cpp
+2
-2
cmake/util/dataIo.cpp
cmake/util/dataIo.cpp
+11
-5
No files found.
cmake/util/arguments.cpp
View file @
3b3ea787
...
...
@@ -60,7 +60,7 @@ void parsing_args(int argc, char* argv[], size_t *n, double *epsilon, size_t *d,
}
else
{
switch
(
c
){
case
'b'
:
*
isBinary
=
true
;
*
isBinary
=
true
;
break
;
case
'?'
:
fprintf
(
stderr
,
"Unknown option `-%c'.
\n
"
,
optopt
);
...
...
@@ -72,7 +72,7 @@ void parsing_args(int argc, char* argv[], size_t *n, double *epsilon, size_t *d,
}
}
if
(
*
blocksize
>
*
n
/* * 1000 */
||
*
blocksize
<=
1
){
if
(
*
blocksize
>
*
n
*
1000
||
*
blocksize
<=
1
){
fprintf
(
stderr
,
"Blocksize has to be greater than 1 and smaller or equal to N
\n
"
);
printf
(
"n:%d, blocksize: %d
\n
"
,
*
n
*
1000
,
*
blocksize
);
exit
(
1
);
...
...
cmake/util/dataIo.cpp
View file @
3b3ea787
...
...
@@ -5,11 +5,17 @@ void random_init(double *array, const int N, const int D){
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
)
*
100.0
;
#pragma omp parallel
{
int
tId
=
omp_get_thread_num
();
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
;
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment