realtime: fix min and max calculations in matrix multiplication test
PATCH 1/1 realtime: fix min and max calculations in matrix multiplication test
From: gowrishankar <[email protected]>
In matrix multiplication test, the min and max calculations are done on stats_container_t data with its index field never set to the last element position. Due to this min and max are always shown with the first record value (as index was initiated with -1).
--- testcases/realtime/func/matrix_mult/matrix_mult.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
testcases/realtime/func/matrix_mult/matrix_mult.c +2 -0
@@ -222,6 +222,7 @@ void main_thread(void)/* run matrix mult operation sequentially */ curdat = &sdat; + curdat->index = iterations-1 ;printf ("\nRunning sequential operations\n" ); start =rt_gettime ();for (i =0 ; i < iterations; i++)
@@ -252,6 +253,7 @@ void main_thread(void)pthread_barrier_init (&mult_start,NULL , numcpus+1 );set_priority (PRIO ); curdat = &cdat; + curdat->index = iterations-1 ; online_cpu_id =-1 ;/* Redispatch cpus */ /* Create numcpus-1 concurrent threads */ for (j =0 ; j < numcpus; j++) {
Signature · 11 lines
1.7.1 ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 8 lines · Gowrishankar
From: gowrishankar <[email protected]>
In matrix multiplication test, the min and max calculations are done on
stats_container_tdata with its index field never set to the last element position. Due to this min and max are always shown with the first record value (as index was initiated with -1).Signed-off-by Gowrishankar <[email protected]>
Thanks.
Regards--
Subrata
Quoted 20 lines
Tested-by Gowrishankar <[email protected]>Acked-by Will Schmidt <[email protected]>Acked-by Darren Hart <[email protected]>--- testcases/realtime/func/matrix_mult/matrix_mult.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)testcases/realtime/func/matrix_mult/matrix_mult.c +1
-0@@ -222,6 +222,7 @@ void main_thread(void)/* run matrix mult operation sequentially */ curdat = &sdat; + curdat->index = iterations-1 ;printf ("\nRunning sequential operations\n" ); start =rt_gettime ();for (i =0 ; i < iterations; i++)
testcases/realtime/func/matrix_mult/matrix_mult.c void main_thread(void) · line 259
Quoted 7 lines
testcases/realtime/func/matrix_mult/matrix_mult.c +1
-0@@ -252,6 +253,7 @@ void main_thread(void)pthread_barrier_init (&mult_start,NULL , numcpus+1 );set_priority (PRIO ); curdat = &cdat; + curdat->index = iterations-1 ; online_cpu_id =-1 ;/* Redispatch cpus */ /* Create numcpus-1 concurrent threads */ for (j =0 ; j < numcpus; j++) {
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list