zpmem.h

来自「 离散余弦变换对图象信号有近似最优的去相关能力, 但多维的变换公式一直没有给出.」· C头文件 代码 · 共 68 行

H
68
字号
/*
///////////////////////////////////////////////////////////////////////////////
//                                                                           //
//   Copyright (C) 2006-2008  Beijing,  pengzhen (pengzhenxp@yahoo.com.cn)   //
//                                                                           //
///////////////////////////////////////////////////////////////////////////////
*/

#ifndef __ZP_MEM_H__
#define __ZP_MEM_H__

//#undef M_ALLOC
//#undef M_FREE 
//#undef M_RE_ALLOC

#ifdef WIN32 /* windows */
#define M_ALLOC(a)        malloc(a) 
#define M_FREE(a)         free(a) 
#define M_RE_ALLOC(a,b)   realloc(a,b) 
#define restrict
//#define inline __inline
#endif /*WIN32*/ 


#ifdef __TCS__ /*PHILIPS*/

#if (TMFL_PNX_ID != 1300) /* PNX1500/PNX1700 */
void* Alloc_Buffer(int) ;
void  Free_Buffer(void*) ;
void* ReAlloc_Buffer(void*,int) ;
#define M_ALLOC(a)        Alloc_Buffer(a) 
#define M_FREE(a)         Free_Buffer(a)
#define M_RE_ALLOC(a,b)   ReAlloc_Buffer(a,b) 
#else /* PNX1300/TM1300 */
#define M_ALLOC(a)        _cache_malloc(a,-1) 
#define M_FREE(a)         _cache_free(a)
#define M_RE_ALLOC(a,b)   realloc(a,b) 
#endif /* (TMFL_PNX_ID != 1300) */

//#define restrict
//#define __inline inline
#endif /*__TCS__*/


#ifdef __MAPCA__ /* bsp15 mapca */
#define M_ALLOC(a)   memalign( 64 , (a) ) 
#define M_FREE(a)    free(a) 
//#define restrict
//#define __inline inline
#endif /*__MAPCA__*/


#if defined (_TMS320C6X) /*TI*/ /*Texas Instruments Incorporated*/

extern int extHeap;
#define M_ALLOC(a)   MEM_alloc(extHeap, a, 8) 
#define M_FREE(a)    MEM_free(extHeap, a, -1) 
//#define M_RE_ALLOC(a,b)   realloc(a,b) 
//#define restrict
//#define inline __inline
#endif /*_TMS320C6X*/


#endif /*__ZP_MEM_H__*/



⌨️ 快捷键说明

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