Benchmarks now run in user-mode.
[riscv-tests.git] / benchmarks / spmv / spmv_main.c
index afb1cf176858ba4d754c80ee9d2d34b246db7f08..d765ca2bbdae90c8c6e21d9dd97d613489837666 100644 (file)
@@ -2,6 +2,9 @@
 // Double-precision general matrix multiplication benchmark
 //--------------------------------------------------------------------------
 
+int ncores = 1;
+#include "util.h"
+
 //--------------------------------------------------------------------------
 // Macros
 
@@ -61,20 +64,6 @@ void printArray( char name[], long n, const double arr[] )
 }
 #endif
 
-void finishTest( int toHostValue )
-{
-#if HOST_DEBUG
-  if ( toHostValue == 1 )
-    printf( "*** PASSED ***\n" );
-  else
-    printf( "*** FAILED *** (tohost = %d)\n", toHostValue );
-  exit(0);
-#else
-  asm( "mtpcr %0, tohost" : : "r" (toHostValue) );
-  while ( 1 ) { }
-#endif
-}
-
 void setStats( int enable )
 {
 #if ( !HOST_DEBUG && SET_STATS )