decrease loop iterations in sum sample
This commit is contained in:
BIN
ggplot2_a.png
(Stored with Git LFS)
Normal file
BIN
ggplot2_a.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ggplot2_b.png
(Stored with Git LFS)
Normal file
BIN
ggplot2_b.png
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -8,7 +8,7 @@ static plain_t sum_out[REPLICA_COUNT];
|
|||||||
|
|
||||||
template <const unsigned int N> static INLINE void sum(void) {
|
template <const unsigned int N> static INLINE void sum(void) {
|
||||||
int sum = 0;
|
int sum = 0;
|
||||||
for (int i = 0; i < 100; ++i) {
|
for (int i = 0; i < 5; ++i) {
|
||||||
sum += 1;
|
sum += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ extern "C" EXPORT("wasm_module") int wasm_module(void) {
|
|||||||
|
|
||||||
fail_stop_trace();
|
fail_stop_trace();
|
||||||
|
|
||||||
if (X == 100) {
|
if (X == 5) {
|
||||||
HOST_PRINT("result correct.\n");
|
HOST_PRINT("result correct.\n");
|
||||||
fail_marker_positive();
|
fail_marker_positive();
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -24,7 +24,7 @@ static void naive_vote(void) {
|
|||||||
|
|
||||||
template <const unsigned int N> static INLINE void sum(void) {
|
template <const unsigned int N> static INLINE void sum(void) {
|
||||||
int sum = 0;
|
int sum = 0;
|
||||||
for (int i = 0; i < 100; ++i) {
|
for (int i = 0; i < 5; ++i) {
|
||||||
sum += 1;
|
sum += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ extern "C" EXPORT("wasm_module") int wasm_module(void) {
|
|||||||
|
|
||||||
fail_stop_trace();
|
fail_stop_trace();
|
||||||
|
|
||||||
if (vote_res == 100) {
|
if (vote_res == 5) {
|
||||||
HOST_PRINT("vote success.\n");
|
HOST_PRINT("vote success.\n");
|
||||||
fail_marker_positive();
|
fail_marker_positive();
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -57,7 +57,7 @@ static sign_t cored_vote(void) {
|
|||||||
|
|
||||||
template <const unsigned int N, const sign_t S> static INLINE void sum(void) {
|
template <const unsigned int N, const sign_t S> static INLINE void sum(void) {
|
||||||
int sum = 0;
|
int sum = 0;
|
||||||
for (int i = 0; i < 100; ++i) {
|
for (int i = 0; i < 5; ++i) {
|
||||||
sum += 1;
|
sum += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ extern "C" EXPORT("wasm_module") int wasm_module(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
plain_t res = decode(cored_res, THE_A, vote_result_sig);
|
plain_t res = decode(cored_res, THE_A, vote_result_sig);
|
||||||
if (res == 100) {
|
if (res == 5) {
|
||||||
HOST_PRINT("cored success.\n");
|
HOST_PRINT("cored success.\n");
|
||||||
fail_marker_positive();
|
fail_marker_positive();
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -24,7 +24,7 @@ static void naive_vote(void) {
|
|||||||
|
|
||||||
template <const unsigned int N> static INLINE void sum(void) {
|
template <const unsigned int N> static INLINE void sum(void) {
|
||||||
int sum = 0;
|
int sum = 0;
|
||||||
for (int i = 0; i < 100; ++i) {
|
for (int i = 0; i < 5; ++i) {
|
||||||
sum += 1;
|
sum += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ extern "C" EXPORT("wasm_module") int wasm_module(void) {
|
|||||||
|
|
||||||
fail_stop_trace();
|
fail_stop_trace();
|
||||||
|
|
||||||
if (vote_res == 100) {
|
if (vote_res == 5) {
|
||||||
HOST_PRINT("vote success.\n");
|
HOST_PRINT("vote success.\n");
|
||||||
fail_marker_positive();
|
fail_marker_positive();
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -57,7 +57,7 @@ static sign_t cored_vote(void) {
|
|||||||
|
|
||||||
template <const unsigned int N, const sign_t S> static INLINE void sum(void) {
|
template <const unsigned int N, const sign_t S> static INLINE void sum(void) {
|
||||||
int sum = 0;
|
int sum = 0;
|
||||||
for (int i = 0; i < 100; ++i) {
|
for (int i = 0; i < 5; ++i) {
|
||||||
sum += 1;
|
sum += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ extern "C" EXPORT("wasm_module") int wasm_module(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
plain_t res = decode(cored_res, THE_A, vote_result_sig);
|
plain_t res = decode(cored_res, THE_A, vote_result_sig);
|
||||||
if (res == 100) {
|
if (res == 5) {
|
||||||
HOST_PRINT("cored success.\n");
|
HOST_PRINT("cored success.\n");
|
||||||
fail_marker_positive();
|
fail_marker_positive();
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user