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

📄 getmem.c

📁 spice中支持多层次元件模型仿真的可单独运行的插件源码
💻 C
字号:
extern char * memalign();#if (defined(AIX) || defined(NEXT) || defined(HPUX)) && !defined(EXTNAME)#define getmem_ getmem#endif#if defined(CRAY) || defined(ARDENT)#define getmem_ GETMEM#endif/* getmem gets n real*8 storage locations and returns its   address (iaddr) and offset (ioff) within the real*8 array work   so that the usable memory is (work(i+ioff),i=1,n).   e.g.         call getmem(n,work,iaddr,ioff)        if (iaddr.eq.0) call error   Mods are needed to release this later. */void getmem_(pn,pwork,paddr,pioff)     unsigned int *pn,*paddr,*pioff;     double *pwork;{  double *ptemp;  unsigned int size = 8;  ptemp = (double *) memalign(size, (unsigned) size* *pn);  *paddr = (unsigned) ptemp;  *pioff = ptemp - pwork;}

⌨️ 快捷键说明

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