⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pgoexample.c

📁 ADI Blackfin DSP BF535 简单范例程序
💻 C
字号:
/****************************************************************************
 *
 *	       File: PgoExample.c
 *
 *	Description: Used to demonstrate the basic operation of Profile 
 *               Guided Optimization.  
 *
 *               Read incoming data from address 0xFFD00000 and count the 
 *               number of even values and odd values.  Supplying data files 
 *               with varying numbers of odd values vs. even values will 
 *               direct the compiler to optimize the conditional statement 
 *               with a bias for the branch most likely to be taken.
 *
 ****************************************************************************/

unsigned int odds  = 0;
unsigned int evens = 0;
volatile int* data = (volatile int*)0xFFD00000;

int main( int argc, char* argv[] )
{
	int i;

	for( i=0; i<256; i++ )
	{
		if( (*data & 0xff) % 2 != 0 )
		{
			odds++;
		}
		else
		{
			evens++;
		}
	}
	
	return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -