|
PAPI
5.0.1.0
|
00001 #include "papi_test.h" 00002 00003 void 00004 dummy( void *array ) 00005 { 00006 /* Confuse the compiler so as not to optimize 00007 away the flops in the calling routine */ 00008 /* Cast the array as a void to eliminate unused argument warning */ 00009 ( void ) array; 00010 } 00011 00012 void 00013 dummy_( void *array ) 00014 { 00015 ( void ) array; 00016 } 00017 00018 void 00019 dummy__( void *array ) 00020 { 00021 ( void ) array; 00022 } 00023 00024 void 00025 DUMMY( void *array ) 00026 { 00027 ( void ) array; 00028 } 00029 00030 void 00031 _DUMMY( void *array ) 00032 { 00033 ( void ) array; 00034 } 00035 00036 /* We have to actually touch the memory to confuse some 00037 * systems, so they actually allocate the memory. 00038 * -KSL 00039 */ 00040 void 00041 touch_dummy( double *array, int size ) 00042 { 00043 int i; 00044 double *tmp = array; 00045 for ( i = 0; i < size; i++, tmp++ ) 00046 *tmp = ( double ) rand( ); 00047 }