Skip to content
Snippets Groups Projects
Verified Commit 0f013a72 authored by raphael.bach's avatar raphael.bach
Browse files

Update `rule-110` example

parent ebf10570
Branches
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@
#include "r110.h"
#define T u8
#define STEP_CNT 2
#define STEP_CNT 20
FMPI_TASK_FUTHARK(rule_110, 1)
......@@ -38,10 +38,20 @@ int main(int argc, char * argv[])
printf("Error rank=%d: fmpi_task_finalize()\n", fmpi_world_rank(ctx));
}
if(fmpi_is_root(ctx)) {
T result[] = {1,1,1,0,1,1,1,0,0,1,1,0,0,1,0,0,1,1,0,1,1,1};
size_t correct_cnt = 0;
printf("Expected: 1110111001100100110111\n");
printf("Actual : ");
for(size_t i = 0; i < in_size; i++) {
if(out[i] == result[i]) {
correct_cnt++;
}
printf("%hhd", out[i]);
}
printf("\n");
if(correct_cnt == in_size) {
printf("OK!\n");
}
}
fmpi_exit(&ctx);
return EXIT_SUCCESS;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment