Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
b989eb1c
Commit
b989eb1c
authored
Jan 18, 2020
by
Matthieu Schaller
Browse files
Fix 'unused variable' warning in testCbrt.c
parent
5dc33287
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/testCbrt.c
View file @
b989eb1c
...
...
@@ -50,8 +50,9 @@ int main(int argc, char *argv[]) {
message
(
"executing %i runs of each command."
,
num_vals
);
/* Create and fill an array of floats. */
float
*
data
;
posix_memalign
((
void
**
)
&
data
,
64
,
num_vals
*
sizeof
(
float
));
float
*
data
=
NULL
;
if
(
posix_memalign
((
void
**
)
&
data
,
64
,
num_vals
*
sizeof
(
float
))
!=
0
)
error
(
"Failed to allocted memory for the test"
);
for
(
int
k
=
0
;
k
<
num_vals
;
k
++
)
{
data
[
k
]
=
(
float
)
rand
()
/
RAND_MAX
;
data
[
k
]
=
(
1
.
0
f
-
data
[
k
])
*
range_min
+
data
[
k
]
*
range_max
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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