Skip to content
Snippets Groups Projects
Commit 13873d81 authored by Lukáš Krupčík's avatar Lukáš Krupčík
Browse files

fix

parent 04b52b5f
No related branches found
No related tags found
6 merge requests!368Update prace.md to document the change from qprace to qprod as the default...,!367Update prace.md to document the change from qprace to qprod as the default...,!366Update prace.md to document the change from qprace to qprod as the default...,!323extended-acls-storage-section,!196Master,!174MIC
......@@ -99,6 +99,7 @@ int main(int argc, char* argv[])
std::cout << "Pi ~ " << result << '\n';
}
```
* Compile
```console
......@@ -150,21 +151,21 @@ double reduce(double* values);
int main(int argc, char* argv[])
{
// Generate random input vector of [-1, 1] values.
double values[8] __attribute__((aligned(64)));
for (int i = 0; i < 8; i++)
values[i] = 2 * (0.5 - rand() / (double)RAND_MAX);
// Generate random input vector of [-1, 1] values.
double values[8] __attribute__((aligned(64)));
for (int i = 0; i < 8; i++)
values[i] = 2 * (0.5 - rand() / (double)RAND_MAX);
double vector = reduce(values);
double scalar = values[0];
for (int i = 1; i < 8; i++)
scalar *= values[i];
double vector = reduce(values);
double scalar = values[0];
for (int i = 1; i < 8; i++)
scalar *= values[i];
printf("%f vs %f\n", vector, scalar);
printf("%f vs %f\n", vector, scalar);
fflush(stdout);
fflush(stdout);
return 0;
return 0;
}
```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment