Add Benchmark Sequential
This commit is contained in:
parent
54a1125583
commit
499808390c
|
@ -135,7 +135,6 @@ void *run_benchmark_parallel(void *args) {
|
||||||
done_cnt = 0;
|
done_cnt = 0;
|
||||||
volatile int result;
|
volatile int result;
|
||||||
int correct;
|
int correct;
|
||||||
// CPU_MHZ = *(int *)args;
|
|
||||||
|
|
||||||
benchmark_handle head = {
|
benchmark_handle head = {
|
||||||
.handle.magic_number = MAGIC_NUMBER,
|
.handle.magic_number = MAGIC_NUMBER,
|
||||||
|
@ -200,7 +199,7 @@ void *run_benchmark_sequential(void *args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
pthread_t main_thread;
|
pthread_t main_thread;
|
||||||
static int embenchmark_parallel(int argc, char *argv[]) {
|
static int embenchmark_parallel() {
|
||||||
case_attr.schedparam.sched_priority = 30;
|
case_attr.schedparam.sched_priority = 30;
|
||||||
case_attr.stacksize = 4096;
|
case_attr.stacksize = 4096;
|
||||||
PrivTaskCreate(&main_thread, &case_attr, run_benchmark_parallel, NULL);
|
PrivTaskCreate(&main_thread, &case_attr, run_benchmark_parallel, NULL);
|
||||||
|
@ -210,7 +209,6 @@ static int embenchmark_sequential(void) {
|
||||||
case_attr.schedparam.sched_priority = 30;
|
case_attr.schedparam.sched_priority = 30;
|
||||||
case_attr.stacksize = 16384;
|
case_attr.stacksize = 16384;
|
||||||
PrivTaskCreate(&main_thread, &case_attr, run_benchmark_sequential, NULL);
|
PrivTaskCreate(&main_thread, &case_attr, run_benchmark_sequential, NULL);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
PRIV_SHELL_CMD_FUNCTION(embenchmark_parallel, run benchmark in parallel,
|
PRIV_SHELL_CMD_FUNCTION(embenchmark_parallel, run benchmark in parallel,
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <transform.h>
|
#include <transform.h>
|
||||||
|
|
||||||
#define CPU_MHZ 150
|
#define CPU_MHZ 20
|
||||||
// int CPU_MHZ = 500;
|
// int CPU_MHZ = 500;
|
||||||
|
|
||||||
/* Benchmarks must implement verify_benchmark, which must return -1 if no
|
/* Benchmarks must implement verify_benchmark, which must return -1 if no
|
||||||
|
|
Loading…
Reference in New Issue