Browse Source
removed ancient PARALLEL_ARCH feature
removed ancient PARALLEL_ARCH feature
removed variables ARCHme ARCHsize removed functions SMPcombine() SMPcCombine() CKTpartition() removed files spcombin.c cktpartn.c removed struct slots STATcombineTime STATtranCombTime STATacCombTime GENowner <MODEL>owner
504 changed files with 3 additions and 1417 deletions
-
20src/frontend/outitf.c
-
8src/frontend/runcoms.c
-
8src/frontend/runcoms2.c
-
1src/include/ngspice/cktdefs.h
-
1src/include/ngspice/gendefs.h
-
3src/include/ngspice/ngspice.h
-
6src/include/ngspice/optdefs.h
-
5src/include/ngspice/smpdefs.h
-
3src/include/ngspice/sperror.h
-
28src/main.c
-
1src/maths/sparse/Makefile.am
-
4src/maths/sparse/spalloc.c
-
300src/maths/sparse/spcombin.c
-
25src/maths/sparse/spsmp.c
-
4src/misc/misc_time.c
-
1src/spicelib/analysis/Makefile.am
-
28src/spicelib/analysis/acan.c
-
9src/spicelib/analysis/cktacct.c
-
31src/spicelib/analysis/cktload.c
-
23src/spicelib/analysis/cktop.c
-
46src/spicelib/analysis/cktpartn.c
-
18src/spicelib/analysis/cktpzld.c
-
2src/spicelib/analysis/cktsetup.c
-
3src/spicelib/analysis/cktsopt.c
-
10src/spicelib/analysis/ckttrunc.c
-
12src/spicelib/analysis/dcpss.c
-
12src/spicelib/analysis/dctran.c
-
1src/spicelib/devices/adms/admst/ngspice.xml
-
1src/spicelib/devices/adms/admst/ngspiceMODULEdefs.h.xml
-
1src/spicelib/devices/adms/admst/ngspiceMODULEnoise.c.xml
-
3src/spicelib/devices/asrc/asrcacld.c
-
1src/spicelib/devices/asrc/asrcconv.c
-
1src/spicelib/devices/asrc/asrcdefs.h
-
3src/spicelib/devices/asrc/asrcload.c
-
3src/spicelib/devices/asrc/asrcpzld.c
-
2src/spicelib/devices/asrc/asrctemp.c
-
1src/spicelib/devices/bjt/bjtacld.c
-
1src/spicelib/devices/bjt/bjtconv.c
-
1src/spicelib/devices/bjt/bjtdefs.h
-
1src/spicelib/devices/bjt/bjtdisto.c
-
1src/spicelib/devices/bjt/bjtgetic.c
-
1src/spicelib/devices/bjt/bjtload.c
-
1src/spicelib/devices/bjt/bjtnoise.c
-
1src/spicelib/devices/bjt/bjtpzld.c
-
4src/spicelib/devices/bjt/bjtsetup.c
-
1src/spicelib/devices/bjt/bjtsload.c
-
2src/spicelib/devices/bjt/bjtsprt.c
-
2src/spicelib/devices/bjt/bjtsset.c
-
1src/spicelib/devices/bjt/bjtsupd.c
-
1src/spicelib/devices/bjt/bjttemp.c
-
1src/spicelib/devices/bjt/bjttrunc.c
-
1src/spicelib/devices/bsim1/b1acld.c
-
1src/spicelib/devices/bsim1/b1cvtest.c
-
1src/spicelib/devices/bsim1/b1disto.c
-
2src/spicelib/devices/bsim1/b1dset.c
-
1src/spicelib/devices/bsim1/b1getic.c
-
1src/spicelib/devices/bsim1/b1ld.c
-
1src/spicelib/devices/bsim1/b1noi.c
-
1src/spicelib/devices/bsim1/b1pzld.c
-
2src/spicelib/devices/bsim1/b1set.c
-
2src/spicelib/devices/bsim1/b1temp.c
-
1src/spicelib/devices/bsim1/b1trunc.c
-
1src/spicelib/devices/bsim1/bsim1def.h
-
1src/spicelib/devices/bsim2/b2acld.c
-
1src/spicelib/devices/bsim2/b2cvtest.c
-
1src/spicelib/devices/bsim2/b2getic.c
-
1src/spicelib/devices/bsim2/b2ld.c
-
1src/spicelib/devices/bsim2/b2noi.c
-
1src/spicelib/devices/bsim2/b2pzld.c
-
2src/spicelib/devices/bsim2/b2set.c
-
1src/spicelib/devices/bsim2/b2temp.c
-
1src/spicelib/devices/bsim2/b2trunc.c
-
1src/spicelib/devices/bsim2/bsim2def.h
-
3src/spicelib/devices/bsim3/b3acld.c
-
3src/spicelib/devices/bsim3/b3cvtest.c
-
3src/spicelib/devices/bsim3/b3getic.c
-
2src/spicelib/devices/bsim3/b3ld.c
-
2src/spicelib/devices/bsim3/b3pzld.c
-
3src/spicelib/devices/bsim3/b3set.c
-
1src/spicelib/devices/bsim3/b3temp.c
-
2src/spicelib/devices/bsim3/b3trunc.c
-
1src/spicelib/devices/bsim3/bsim3def.h
-
1src/spicelib/devices/bsim3soi/b4soiacld.c
-
1src/spicelib/devices/bsim3soi/b4soicvtest.c
-
1src/spicelib/devices/bsim3soi/b4soidef.h
-
1src/spicelib/devices/bsim3soi/b4soidest.c
-
1src/spicelib/devices/bsim3soi/b4soigetic.c
-
1src/spicelib/devices/bsim3soi/b4soild.c
-
1src/spicelib/devices/bsim3soi/b4soimdel.c
-
2src/spicelib/devices/bsim3soi/b4soinoi.c
-
1src/spicelib/devices/bsim3soi/b4soipzld.c
-
1src/spicelib/devices/bsim3soi/b4soitemp.c
-
1src/spicelib/devices/bsim3soi/b4soitrunc.c
-
4src/spicelib/devices/bsim3soi_dd/b3soiddacld.c
-
4src/spicelib/devices/bsim3soi_dd/b3soiddcvtest.c
-
1src/spicelib/devices/bsim3soi_dd/b3soidddef.h
-
4src/spicelib/devices/bsim3soi_dd/b3soiddgetic.c
-
4src/spicelib/devices/bsim3soi_dd/b3soiddld.c
-
4src/spicelib/devices/bsim3soi_dd/b3soiddnoi.c
-
4src/spicelib/devices/bsim3soi_dd/b3soiddpzld.c
@ -1,300 +0,0 @@ |
|||||
/* |
|
||||
* MATRIX UTILITY MODULE |
|
||||
* |
|
||||
* Author: Advising professor: |
|
||||
* Kenneth S. Kundert Alberto Sangiovanni-Vincentelli |
|
||||
* UC Berkeley |
|
||||
* |
|
||||
* This file contains various optional utility routines. |
|
||||
* |
|
||||
* >>> User accessible functions contained in this file: |
|
||||
* spCombine |
|
||||
* |
|
||||
* >>> Other functions contained in this file: |
|
||||
*/ |
|
||||
|
|
||||
|
|
||||
/* |
|
||||
* Revision and copyright information. |
|
||||
* |
|
||||
* Copyright (c) 1985,86,87,88,89,90 |
|
||||
* by Kenneth S. Kundert and the University of California. |
|
||||
* |
|
||||
* Permission to use, copy, modify, and distribute this software and |
|
||||
* its documentation for any purpose and without fee is hereby granted, |
|
||||
* provided that the copyright notices appear in all copies and |
|
||||
* supporting documentation and that the authors and the University of |
|
||||
* California are properly credited. The authors and the University of |
|
||||
* California make no representations as to the suitability of this |
|
||||
* software for any purpose. It is provided `as is', without express |
|
||||
* or implied warranty. |
|
||||
*/ |
|
||||
|
|
||||
/* |
|
||||
* IMPORTS |
|
||||
* |
|
||||
* >>> Import descriptions: |
|
||||
* spConfig.h |
|
||||
* Macros that customize the sparse matrix routines. |
|
||||
* spMatrix.h |
|
||||
* Macros and declarations to be imported by the user. |
|
||||
* spDefs.h |
|
||||
* Matrix type and macro definitions for the sparse matrix routines. |
|
||||
*/ |
|
||||
|
|
||||
#define spINSIDE_SPARSE |
|
||||
#include "spconfig.h" |
|
||||
#include "ngspice/spmatrix.h" |
|
||||
#include "spdefs.h" |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
#ifdef PARALLEL_ARCH |
|
||||
#define COMBINE 1 |
|
||||
#endif /* PARALLEL_ARCH */ |
|
||||
|
|
||||
|
|
||||
#if COMBINE |
|
||||
static void CombineComplexMatrix( MatrixPtr, |
|
||||
RealVector, RealVector, RealVector, RealVector ); |
|
||||
static void ClearBuffer( MatrixPtr, int, int, ElementPtr ); |
|
||||
static void ClearComplexBuffer( MatrixPtr, int, int, ElementPtr ); |
|
||||
|
|
||||
/* |
|
||||
* COMBINE MATRICES ON A MULTIPROCESSOR |
|
||||
* |
|
||||
* >>> Arguments: |
|
||||
* eMatrix <input> (char *) |
|
||||
* Pointer to the matrix to be combined. |
|
||||
* |
|
||||
* >>> Local variables: |
|
||||
* Size (int) |
|
||||
* Local version of the size of the matrix. |
|
||||
* pElement (ElementPtr) |
|
||||
* Pointer to an element in the matrix. |
|
||||
*/ |
|
||||
|
|
||||
#define SPBSIZE 256*1024 |
|
||||
static double Buffer[SPBSIZE]; |
|
||||
|
|
||||
void |
|
||||
spCombine( eMatrix, RHS, Spare, iRHS, iSolution ) |
|
||||
|
|
||||
char *eMatrix; |
|
||||
RealVector RHS, Spare, iRHS, iSolution; |
|
||||
{ |
|
||||
MatrixPtr Matrix = (MatrixPtr)eMatrix; |
|
||||
register ElementPtr pElement; |
|
||||
register int I, Size; |
|
||||
ElementPtr FirstBufElement, pLastElement; |
|
||||
int FirstBufCol, BufIndex; |
|
||||
struct ElementListNodeStruct *pListNode; |
|
||||
long type = MT_COMBINE, length = Matrix->Size + 1; |
|
||||
|
|
||||
/* Begin `spCombine'. */ |
|
||||
assert( IS_VALID(Matrix) && !Matrix->Factored ); |
|
||||
if (!Matrix->InternalVectorsAllocated) |
|
||||
spcCreateInternalVectors( Matrix ); |
|
||||
|
|
||||
if (Matrix->Complex) { |
|
||||
CombineComplexMatrix( Matrix, RHS, Spare, iRHS, iSolution ); |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
Size = Matrix->Size; |
|
||||
|
|
||||
/* Mark original non-zeroes. */ |
|
||||
pListNode = Matrix->FirstElementListNode; |
|
||||
while (pListNode != NULL) |
|
||||
{ pElement = pListNode->pElementList; |
|
||||
if (pListNode == Matrix->LastElementListNode) { |
|
||||
pLastElement = Matrix->NextAvailElement - 1; |
|
||||
} else { |
|
||||
pLastElement = &(pElement[ pListNode->NumberOfElementsInList - 1 ]); |
|
||||
} |
|
||||
while (pElement <= pLastElement) |
|
||||
{ |
|
||||
(pElement++)->Col = -1; |
|
||||
} |
|
||||
pListNode = pListNode->Next; |
|
||||
} |
|
||||
|
|
||||
/* Stripmine the communication to reduce overhead */ |
|
||||
BufIndex = 0; |
|
||||
FirstBufCol = 1; |
|
||||
FirstBufElement = Matrix->FirstInCol[ FirstBufCol ]; |
|
||||
for (I = 1; I <= Size; I++) |
|
||||
{ |
|
||||
pElement = Matrix->FirstInCol[I]; |
|
||||
while (pElement != NULL) |
|
||||
{ |
|
||||
if ( BufIndex >= SPBSIZE ) |
|
||||
{ /* Buffer is Full. */ |
|
||||
ClearBuffer( Matrix, BufIndex, FirstBufCol, FirstBufElement ); |
|
||||
BufIndex = 0; |
|
||||
FirstBufCol = I; |
|
||||
FirstBufElement = pElement; |
|
||||
} |
|
||||
if ( pElement->Col == -1 ) { |
|
||||
Buffer[ BufIndex++ ] = pElement->Real; |
|
||||
} |
|
||||
pElement = pElement->NextInCol; |
|
||||
} |
|
||||
} |
|
||||
/* Clean out the last, partially full buffer. */ |
|
||||
if ( BufIndex != 0 ) |
|
||||
{ |
|
||||
ClearBuffer( Matrix, BufIndex, FirstBufCol, FirstBufElement ); |
|
||||
} |
|
||||
|
|
||||
/* Sum all RHS's together */ |
|
||||
DGOP_( &type, RHS, &length, "+" ); |
|
||||
|
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
static void |
|
||||
CombineComplexMatrix( Matrix, RHS, Spare, iRHS, iSolution ) |
|
||||
|
|
||||
MatrixPtr Matrix; |
|
||||
RealVector RHS, Spare, iRHS, iSolution; |
|
||||
{ |
|
||||
register ElementPtr pElement; |
|
||||
register int I, Size; |
|
||||
ElementPtr FirstBufElement, pLastElement; |
|
||||
int FirstBufCol, BufIndex; |
|
||||
struct ElementListNodeStruct *pListNode; |
|
||||
long type = MT_COMBINE, length = Matrix->Size + 1; |
|
||||
|
|
||||
/* Begin `CombineComplexMatrix'. */ |
|
||||
assert(Matrix->Complex); |
|
||||
Size = Matrix->Size; |
|
||||
|
|
||||
/* Mark original non-zeroes. */ |
|
||||
pListNode = Matrix->FirstElementListNode; |
|
||||
while (pListNode != NULL) |
|
||||
{ pElement = pListNode->pElementList; |
|
||||
if (pListNode == Matrix->LastElementListNode) { |
|
||||
pLastElement = Matrix->NextAvailElement - 1; |
|
||||
} else { |
|
||||
pLastElement = &(pElement[ pListNode->NumberOfElementsInList - 1 ]); |
|
||||
} |
|
||||
while (pElement <= pLastElement) |
|
||||
{ |
|
||||
(pElement++)->Col = -1; |
|
||||
} |
|
||||
pListNode = pListNode->Next; |
|
||||
} |
|
||||
|
|
||||
/* Stripmine the communication to reduce overhead */ |
|
||||
BufIndex = 0; |
|
||||
FirstBufCol = 1; |
|
||||
FirstBufElement = Matrix->FirstInCol[ FirstBufCol ]; |
|
||||
for (I = 1; I <= Size; I++) |
|
||||
{ |
|
||||
pElement = Matrix->FirstInCol[I]; |
|
||||
while (pElement != NULL) |
|
||||
{ |
|
||||
if ( BufIndex >= SPBSIZE/2 ) |
|
||||
{ /* Buffer is Full. */ |
|
||||
ClearComplexBuffer( Matrix, BufIndex, FirstBufCol, |
|
||||
FirstBufElement ); |
|
||||
BufIndex = 0; |
|
||||
FirstBufCol = I; |
|
||||
FirstBufElement = pElement; |
|
||||
} |
|
||||
if ( pElement->Col == -1 ) { |
|
||||
Buffer[ BufIndex++ ] = pElement->Real; |
|
||||
Buffer[ BufIndex++ ] = pElement->Imag; |
|
||||
} |
|
||||
pElement = pElement->NextInCol; |
|
||||
} |
|
||||
} |
|
||||
/* Clean out the last, partially full buffer. */ |
|
||||
if ( BufIndex != 0 ) |
|
||||
{ |
|
||||
ClearComplexBuffer( Matrix, BufIndex, FirstBufCol, FirstBufElement ); |
|
||||
} |
|
||||
|
|
||||
/* Sum all RHS's together */ |
|
||||
DGOP_( &type, RHS, &length, "+" ); |
|
||||
DGOP_( &type, iRHS, &length, "+" ); |
|
||||
|
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
static void |
|
||||
ClearBuffer( Matrix, NumElems, StartCol, StartElement ) |
|
||||
|
|
||||
MatrixPtr Matrix; |
|
||||
int NumElems, StartCol; |
|
||||
ElementPtr StartElement; |
|
||||
{ |
|
||||
register ElementPtr pElement = StartElement; |
|
||||
register int Index, Col = StartCol; |
|
||||
long type = MT_COMBINE; |
|
||||
|
|
||||
/* First globalize the buffer. */ |
|
||||
DGOP_( &type, Buffer, &NumElems, "+" ); |
|
||||
|
|
||||
/* Now, copy all of the data back into the matrix. */ |
|
||||
for ( Index = 0; Index < NumElems; Index++ ) |
|
||||
{ |
|
||||
if ( pElement == NULL ) |
|
||||
{ |
|
||||
pElement = Matrix->FirstInCol[ ++Col ]; |
|
||||
} |
|
||||
while ( pElement->Col != -1 ) { |
|
||||
pElement = pElement->NextInCol; |
|
||||
if ( pElement == NULL ) |
|
||||
{ |
|
||||
pElement = Matrix->FirstInCol[ ++Col ]; |
|
||||
} |
|
||||
} |
|
||||
pElement->Real = Buffer[ Index ]; |
|
||||
pElement->Col = Col; |
|
||||
pElement = pElement->NextInCol; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
|
|
||||
static void |
|
||||
ClearComplexBuffer( Matrix, DataCount, StartCol, StartElement ) |
|
||||
|
|
||||
MatrixPtr Matrix; |
|
||||
int DataCount, StartCol; |
|
||||
ElementPtr StartElement; |
|
||||
{ |
|
||||
register ElementPtr pElement = StartElement; |
|
||||
register int Index, Col = StartCol; |
|
||||
long type = MT_COMBINE; |
|
||||
|
|
||||
/* First globalize the buffer. */ |
|
||||
DGOP_( &type, Buffer, &DataCount, "+" ); |
|
||||
|
|
||||
/* Now, copy all of the data back into the matrix. */ |
|
||||
for ( Index = 0; Index < DataCount; ) |
|
||||
{ |
|
||||
if ( pElement == NULL ) |
|
||||
{ |
|
||||
pElement = Matrix->FirstInCol[ ++Col ]; |
|
||||
} |
|
||||
while ( pElement->Col != -1 ) { |
|
||||
pElement = pElement->NextInCol; |
|
||||
if ( pElement == NULL ) |
|
||||
{ |
|
||||
pElement = Matrix->FirstInCol[ ++Col ]; |
|
||||
} |
|
||||
} |
|
||||
pElement->Real = Buffer[ Index++ ]; |
|
||||
pElement->Imag = Buffer[ Index++ ]; |
|
||||
pElement->Col = Col; |
|
||||
pElement = pElement->NextInCol; |
|
||||
} |
|
||||
} |
|
||||
#endif /* COMBINE */ |
|
||||
@ -1,46 +0,0 @@ |
|||||
/********** |
|
||||
Copyright 1990 Regents of the University of California. All rights reserved. |
|
||||
Author: 1992 David A. Gates, UC Berkeley CADgroup |
|
||||
**********/ |
|
||||
|
|
||||
/* CKTpartition(ckt) |
|
||||
* this labels each instance of a circuit as belonging to a |
|
||||
* particular processor in a multiprocessor computer. |
|
||||
*/ |
|
||||
|
|
||||
#include "ngspice/ngspice.h" |
|
||||
#include "ngspice/smpdefs.h" |
|
||||
#include "ngspice/cktdefs.h" |
|
||||
#include "ngspice/const.h" |
|
||||
#include "ngspice/devdefs.h" |
|
||||
#include "ngspice/sperror.h" |
|
||||
|
|
||||
|
|
||||
#ifdef XSPICE |
|
||||
extern int *DEVicesfl; |
|
||||
#endif |
|
||||
|
|
||||
int |
|
||||
CKTpartition(CKTcircuit *ckt) |
|
||||
{ |
|
||||
int i, instNum = 0; |
|
||||
GENmodel *model; |
|
||||
GENinstance *inst; |
|
||||
|
|
||||
for (i=0;i<DEVmaxnum;i++) { |
|
||||
if ( (ckt->CKThead[i] != NULL) |
|
||||
#ifdef XSPICE |
|
||||
&& DEVicesfl[i] == 0 |
|
||||
#endif |
|
||||
){ |
|
||||
for (model = ckt->CKThead[i]; model; model = model->GENnextModel) { |
|
||||
for (inst = model->GENinstances; inst; |
|
||||
inst = inst->GENnextInstance) { |
|
||||
inst->GENowner = instNum % ARCHsize; |
|
||||
instNum++; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
return(OK); |
|
||||
} |
|
||||
Some files were not shown because too many files changed in this diff
Write
Preview
Loading…
Cancel
Save
Reference in new issue