?? dvscale.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: Dvscale.c
* DATE: Nov 1, 1989
* RELATED FILES:
* AUTHOR: Mark Schrank
* DESCRIPTION: "c" Dvscale function
* NOTES/WARNINGS:
* REVISION HISTORY:
* Release Who Date Comments
* 2.6 John Lundell 02/23/90 Changed Macro calls to register pointers.
*/
#include "cgs.h"
/*
*---------------------------------------------------------------
* FUNCTION: Dvscale(d_scalar,sp_src,sp_dst)
* DESCRIPTION:
* Multiplies src Ovector by scalar and puts the result
* back into dst.
*
* RETURN VALUE: dst Ovector
* NOTES/WARNINGS:
* REVISION HISTORY:
* Release Who Date Comments
* 2.6 John Lundell 02/23/90 Changed Macro calls to register pointers.
*/
Ovector Dvscale(d_scalar, sp_src, sp_dst)
register double d_scalar;
Ovector sp_src;
Ovector sp_dst;
{
register long n = sp_src->length;
register char *sp = sp_src->virtstart;
register char *dp = sp_dst->virtstart;
register long stps = sp_src->stepsize;
register long stpd = sp_dst->stepsize;
while (n-- > 0) {
*(double *) dp = d_scalar * *(double *) sp;
dp += stpd;
sp += stps;
}
return sp_dst;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -