您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ tests_quiet函数代码示例

51自学网 2021-06-03 08:46:33
  C++
这篇教程C++ tests_quiet函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中tests_quiet函数的典型用法代码示例。如果您正苦于以下问题:C++ tests_quiet函数的具体用法?C++ tests_quiet怎么用?C++ tests_quiet使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了tests_quiet函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: main

intmain( int argc, char **argv ){	int i;	tests_quiet( argc, argv );	/* Set TESTS_QUIET variable */// 	if ( ( retval =// 		   PAPI_library_init( PAPI_VER_CURRENT ) ) != PAPI_VER_CURRENT )// 		test_fail( __FILE__, __LINE__, "PAPI_library_init", retval );	printf( "/n----------------------------------/n" );	printf( "For PAPI Version: %d.%d.%d.%d/n", 			PAPI_VERSION_MAJOR( PAPI_VERSION ),			PAPI_VERSION_MINOR( PAPI_VERSION ),			PAPI_VERSION_REVISION( PAPI_VERSION ),			PAPI_VERSION_INCREMENT( PAPI_VERSION ) );	printf( "There are %d error codes defined/n", PAPI_NUM_ERRORS );	printf( "----------------------------------/n" );	for (i = 0; i < PAPI_NUM_ERRORS; i++) {		char *errstr, *errdescr;		errstr = PAPI_strerror( -i );		errdescr = PAPI_descr_error( -i );		printf( "Error code %4d: %-15s | %s/n", -i, errstr, errdescr );	}	printf( "----------------------------------/n/n" );	exit( 1 );}
开发者ID:pyrovski,项目名称:papi-rapl,代码行数:29,


示例2: main

int main(int argc, char **argv){   int retval;   long long elapsed_us, elapsed_cyc;   const PAPI_hw_info_t *hw_info;   tests_quiet(argc, argv);     /* Set TESTS_QUIET variable */   retval = PAPI_library_init(PAPI_VER_CURRENT);   if (retval != PAPI_VER_CURRENT)      test_fail(__FILE__, __LINE__, "PAPI_library_init", retval);   hw_info = PAPI_get_hardware_info();   if (hw_info == NULL)     test_fail(__FILE__, __LINE__, "PAPI_get_hardware_info", 2);   elapsed_us = PAPI_get_real_usec();   elapsed_cyc = PAPI_get_real_cyc();   printf("Testing real time clock. (CLOCK %d MHz, CPU %f MHz)/n",hw_info->clock_mhz,hw_info->mhz);   printf("Sleeping for 10 seconds./n");   sleep(10);   elapsed_us = PAPI_get_real_usec() - elapsed_us;   elapsed_cyc = PAPI_get_real_cyc() - elapsed_cyc;   printf("%lld us. %lld cyc./n",elapsed_us,elapsed_cyc);   printf("%f Computed MHz./n",(float)elapsed_cyc/(float)elapsed_us);/* Elapsed microseconds and elapsed cycles are not as unambiguous as they appear.   On Pentium III and 4, for example, cycles is a measured value, while useconds    is computed from cycles and mhz. MHz is read from /proc/cpuinfo (on linux).   Thus, any error in MHz is propagated to useconds.   Conversely, on ultrasparc useconds are extracted from a system call (gethrtime())   and cycles are computed from useconds. Also, MHz comes from a scan of system info,   Thus any error in gethrtime() propagates to both cycles and useconds, and cycles   can be further impacted by errors in reported MHz.   Without knowing the error bars on these system values, we can't really specify   error ranges for our reported values, but we *DO* know that errors for at least   one instance of Pentium 4 ([email
C++ tests_start_mpfr函数代码示例
C++ tests_end_mpfr函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。