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

📄 osizeof.c

📁 ofdm的完整系统模型,包含信道参数,多径模型,doppler频移等都可以自由修改!是您做仿真的有力帮助.c语言运行速度快!
💻 C
字号:
/*
 *	*************************************************************************
 *	*									*
 *	*	This confidential and proprietary software may be used only	*
 *	*  as authorized by a licensing agreement from the Alta Group of	*
 *	*  Cadence Design Systems, Inc.  In the event of publication, the	*
 *	*  following notice is applicable:					*
 *	*									*
 *	*    (c) COPYRIGHT 1995 ALTA GROUP OF CADENCE DESIGN SYSTEMS, INC.	*
 *	*			ALL RIGHTS RESERVED				*
 *	*									*
 *	*	The entire notice above must be reproduced on all authorized	*
 *	*  copies.								*
 *	*									*
 *	*************************************************************************
 *
 */
/*
 * FILE:  Osizeof
 * DATE:  July 20, 1989
 * RELATED FILES:  Oalloc, OvAlloc
 * AUTHOR:  John Lundell
 * DESCRIPTION:  get size of object
 * NOTES/WARNINGS:  
 * REVISION HISTORY:
 *	Release		Who	Date	Comments
 */
#include "cgs.h"

/*---------------------------------------------------------------
 * FUNCTION:  Osizeof
 * DESCRIPTION:  Get size of passed object
 * RETURN VALUE:  object size
 * NOTES/WARNINGS: 
 * REVISION HISTORY:
 *	Release		Who	Date	Comments
 */
int Osizeof(sp_props)
Objprops	sp_props;
{
/*
 *  Switch on type
 */
	switch(sp_props->type) {
	      case TYPE_SRD:
	      case TYPE_VRD:
		return sizeof(double);
	      case TYPE_SRI:
	      case TYPE_VRI:
		return sizeof(long);
	      case TYPE_SRF:
	      case TYPE_VRF:
		return sizeof(float);
	      case TYPE_SRL:
	      case TYPE_VRL:
		return sizeof(Logical);
	      case TYPE_SCD:
	      case TYPE_VCD:
		return sizeof(Complex);
	      case TYPE_SCI:
	      case TYPE_VCI:
		return sizeof(IntCmplx);
	      case TYPE_SCF:
	      case TYPE_VCF:
		return sizeof(FltCmplx);
	      case TYPE_SRX:
	      case TYPE_VRX:
		return FIXBYTESIZE(sp_props->fix_format.numbits);
	      case TYPE_SCX:
	      case TYPE_VCX:
		return 2*FIXBYTESIZE(sp_props->fix_format.numbits);
	      case TYPE_SRS:
		return sizeof(char);
	}

	printf("Unknown data type in Osizeof: %d\n", sp_props->type);
	exit(1);
}

⌨️ 快捷键说明

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