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

📄 dotpv2_timer2.c

📁 ccs3.3下带的基于dm642开发例程
💻 C
字号:
/*
 * Copyright (C) 2003 Texas Instruments Incorporated
 * All Rights Reserved
 */
/*
 *---------dotpV2_timer2.c---------
 * This file contains 'dot product version 2' routine, which is raw C
 * with some optimization by giving more information to compiler
 * in order to unroll the loop and reduce the cycle count.
 */

int dotprod_ver2 (const short *restrict x, const short *restrict h, int nx)
{
	int i, sum = 0;
   
	//Assumption: Vectors x and h are double-word aligned
	_nassert((int)x % 8 == 0);
	_nassert((int)h % 8 == 0);
   
    //Assumption: Counter nx (vector length) is atleast 36 and multiple of 4
	#pragma MUST_ITERATE(36,,4)
	for (i=0; i<nx; i++)
		sum += x[i] * h[i];

	return sum;
}

⌨️ 快捷键说明

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