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

📄 auxmath.h

📁 这是在PCA下的基于IPP库示例代码例子,在网上下了IPP的库之后,设置相关参数就可以编译该代码.
💻 H
字号:
/* ////////////////////////////////////////////////////////////////////////////                  INTEL CORPORATION PROPRIETARY INFORMATION//     This software is supplied under the terms of a license agreement or//     nondisclosure agreement with Intel Corporation and may not be copied//     or disclosed except in accordance with the terms of that agreement.//          Copyright(c) 2003-2005 Intel Corporation. All Rights Reserved.//////*/#ifndef __AUXMATH_H__#define __AUXMATH_H__inline unsigned int Log2(unsigned int value){    int i = 31;    for(; i >= 0; i--)    {        if(value&0x80000000) break;        value = value << 1;    }    return i;}// for zero value this function returns 0,// for value == 1 this function returns 1,// for value == 3 this function returns 2,// and so oninline unsigned int MSBitPos(unsigned int value){    unsigned int i = 0;    for(; value > 0; i++) value >>= 1;    return i;}// for value == 0, 1 this function returns 0,// for value == 2, 3 this function returns 1,// for value == 4 - 7 this function returns 2,// and so oninline unsigned int BitDepth(unsigned int maxValue){    unsigned int bitDepth = MSBitPos(maxValue);    if(bitDepth) bitDepth--;    return bitDepth;}inline unsigned int Mod2(unsigned int value, unsigned int order){    return value - ((value >> order) << order);}inline unsigned int RShiftCeil(unsigned int value, unsigned int order){    return ( value + ( (1u << order) - 1u ) ) >> order;}inline unsigned int RShiftFloor(unsigned int value, unsigned int order){    return value  >> order;}inline unsigned int DivCeil(unsigned int value, unsigned int divizor){    return ( (value + divizor - 1u) / divizor );}inline unsigned int RoundCenterU(double value){    return (unsigned int)(value + 0.5);}#endif // __AUXMATH_H__

⌨️ 快捷键说明

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