Skip to content
Snippets Groups Projects
Commit f8c88733 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Align the memory allocation in the cbrt() unit test to prevent FPEs in the...

Align the memory allocation in the cbrt() unit test to prevent FPEs in the peel and remainder loops.
parent c174fbfa
No related branches found
No related tags found
1 merge request!997Fixes for checks on optimized AXV2 architectures
......@@ -50,7 +50,8 @@ int main(int argc, char *argv[]) {
message("executing %i runs of each command.", num_vals);
/* Create and fill an array of floats. */
float *volatile data = (float *)malloc(sizeof(float) * num_vals);
float *data;
posix_memalign((void **)&data, 64, num_vals*sizeof(float));
for (int k = 0; k < num_vals; k++) {
data[k] = (float)rand() / RAND_MAX;
data[k] = (1.0f - data[k]) * range_min + data[k] * range_max;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment