fix omp
This commit is contained in:
parent
ae857bf967
commit
088a13e59f
|
|
@ -18,11 +18,6 @@ BSIM3destroy(GENmodel **inModel)
|
|||
{
|
||||
BSIM3model *mod = *(BSIM3model**) inModel;
|
||||
|
||||
#ifdef USE_OMP
|
||||
/* free just once for all models */
|
||||
FREE(mod->BSIM3InstanceArray);
|
||||
#endif
|
||||
|
||||
while (mod) {
|
||||
BSIM3model *next_mod = mod->BSIM3nextModel;
|
||||
BSIM3instance *inst = mod->BSIM3instances;
|
||||
|
|
@ -42,6 +37,11 @@ BSIM3destroy(GENmodel **inModel)
|
|||
inst = next_inst;
|
||||
}
|
||||
|
||||
#ifdef USE_OMP
|
||||
/* free just once for all models */
|
||||
FREE(mod->BSIM3InstanceArray);
|
||||
#endif
|
||||
|
||||
/* mod->BSIM3modName to be freed in INPtabEnd() */
|
||||
FREE(mod->BSIM3version);
|
||||
FREE(mod);
|
||||
|
|
|
|||
|
|
@ -41,12 +41,6 @@ CKTnode *tmp;
|
|||
CKTnode *tmpNode;
|
||||
IFuid tmpName;
|
||||
|
||||
#ifdef USE_OMP
|
||||
int idx, InstCount;
|
||||
BSIM3instance **InstArray;
|
||||
#endif
|
||||
|
||||
|
||||
/* loop through all the BSIM3 device models */
|
||||
for( ; model != NULL; model = model->BSIM3nextModel )
|
||||
{
|
||||
|
|
@ -1085,34 +1079,24 @@ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
|||
}
|
||||
}
|
||||
#ifdef USE_OMP
|
||||
InstCount = 0;
|
||||
model = (BSIM3model*)inModel;
|
||||
/* loop through all the BSIM3 device models
|
||||
to count the number of instances */
|
||||
|
||||
for( ; model != NULL; model = model->BSIM3nextModel )
|
||||
for (model = (BSIM3model*)inModel; model; model = model->BSIM3nextModel )
|
||||
{
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BSIM3instances; here != NULL ;
|
||||
here=here->BSIM3nextInstance)
|
||||
{
|
||||
InstCount++;
|
||||
}
|
||||
}
|
||||
InstArray = TMALLOC(BSIM3instance*, InstCount);
|
||||
model = (BSIM3model*)inModel;
|
||||
idx = 0;
|
||||
for( ; model != NULL; model = model->BSIM3nextModel )
|
||||
{
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BSIM3instances; here != NULL ;
|
||||
here=here->BSIM3nextInstance)
|
||||
{
|
||||
InstArray[idx] = here;
|
||||
BSIM3instance **InstArray;
|
||||
int idx;
|
||||
|
||||
idx = 0;
|
||||
for (here = model->BSIM3instances; here; here = here->BSIM3nextInstance)
|
||||
idx++;
|
||||
}
|
||||
/* set the array pointer and instance count into each model */
|
||||
model->BSIM3InstCount = InstCount;
|
||||
|
||||
model->BSIM3InstCount = idx;
|
||||
|
||||
InstArray = TMALLOC(BSIM3instance*, idx);
|
||||
|
||||
idx = 0;
|
||||
for (here = model->BSIM3instances; here; here = here->BSIM3nextInstance)
|
||||
InstArray[idx++] = here;
|
||||
|
||||
model->BSIM3InstanceArray = InstArray;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,11 +19,6 @@ BSIM3v32destroy (GENmodel **inModel)
|
|||
{
|
||||
BSIM3v32model *mod = *(BSIM3v32model**) inModel;
|
||||
|
||||
#ifdef USE_OMP
|
||||
/* free just once for all models */
|
||||
FREE(mod->BSIM3v32InstanceArray);
|
||||
#endif
|
||||
|
||||
while (mod) {
|
||||
BSIM3v32model *next_mod = mod->BSIM3v32nextModel;
|
||||
BSIM3v32instance *inst = mod->BSIM3v32instances;
|
||||
|
|
@ -40,6 +35,9 @@ BSIM3v32destroy (GENmodel **inModel)
|
|||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->BSIM3v32InstanceArray);
|
||||
#endif
|
||||
FREE(mod->BSIM3v32version);
|
||||
FREE(mod);
|
||||
mod = next_mod;
|
||||
|
|
|
|||
|
|
@ -38,11 +38,6 @@ CKTnode *tmp;
|
|||
CKTnode *tmpNode;
|
||||
IFuid tmpName;
|
||||
|
||||
#ifdef USE_OMP
|
||||
int idx, InstCount;
|
||||
BSIM3v32instance **InstArray;
|
||||
#endif
|
||||
|
||||
/* loop through all the BSIM3v32 device models */
|
||||
for( ; model != NULL; model = model->BSIM3v32nextModel )
|
||||
{
|
||||
|
|
@ -1096,35 +1091,26 @@ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
|||
|
||||
}
|
||||
}
|
||||
#ifdef USE_OMP
|
||||
InstCount = 0;
|
||||
model = (BSIM3v32model*)inModel;
|
||||
/* loop through all the BSIM3 device models
|
||||
to count the number of instances */
|
||||
|
||||
for (; model != NULL; model = model->BSIM3v32nextModel)
|
||||
#ifdef USE_OMP
|
||||
|
||||
for (model = (BSIM3v32model*)inModel; model; model = model->BSIM3v32nextModel)
|
||||
{
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BSIM3v32instances; here != NULL;
|
||||
here = here->BSIM3v32nextInstance)
|
||||
{
|
||||
InstCount++;
|
||||
}
|
||||
}
|
||||
InstArray = TMALLOC(BSIM3v32instance*, InstCount);
|
||||
model = (BSIM3v32model*)inModel;
|
||||
idx = 0;
|
||||
for (; model != NULL; model = model->BSIM3v32nextModel)
|
||||
{
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BSIM3v32instances; here != NULL;
|
||||
here = here->BSIM3v32nextInstance)
|
||||
{
|
||||
InstArray[idx] = here;
|
||||
BSIM3v32instance **InstArray;
|
||||
int idx;
|
||||
|
||||
idx = 0;
|
||||
for (here = model->BSIM3v32instances; here; here = here->BSIM3v32nextInstance)
|
||||
idx++;
|
||||
}
|
||||
/* set the array pointer and instance count into each model */
|
||||
model->BSIM3v32InstCount = InstCount;
|
||||
|
||||
model->BSIM3v32InstCount = idx;
|
||||
|
||||
InstArray = TMALLOC(BSIM3v32instance*, idx);
|
||||
|
||||
idx = 0;
|
||||
for (here = model->BSIM3v32instances; here; here = here->BSIM3v32nextInstance)
|
||||
InstArray[idx++] = here;
|
||||
|
||||
model->BSIM3v32InstanceArray = InstArray;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,11 +20,6 @@ BSIM4destroy(GENmodel **inModel)
|
|||
{
|
||||
BSIM4model *mod = *(BSIM4model**) inModel;
|
||||
|
||||
#ifdef USE_OMP
|
||||
/* free just once for all models */
|
||||
FREE(mod->BSIM4InstanceArray);
|
||||
#endif
|
||||
|
||||
while (mod) {
|
||||
BSIM4model *next_mod = mod->BSIM4nextModel;
|
||||
BSIM4instance *inst = mod->BSIM4instances;
|
||||
|
|
@ -41,6 +36,9 @@ BSIM4destroy(GENmodel **inModel)
|
|||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->BSIM4InstanceArray);
|
||||
#endif
|
||||
FREE(mod->BSIM4version);
|
||||
FREE(mod);
|
||||
mod = next_mod;
|
||||
|
|
|
|||
|
|
@ -60,11 +60,6 @@ int noiseAnalGiven = 0, createNode; /* Criteria for new node creation */
|
|||
double Rtot, DMCGeff, DMCIeff, DMDGeff;
|
||||
JOB *job;
|
||||
|
||||
#ifdef USE_OMP
|
||||
int idx, InstCount;
|
||||
BSIM4instance **InstArray;
|
||||
#endif
|
||||
|
||||
/* Search for a noise analysis request */
|
||||
for (job = ((TSKtask *)ft_curckt->ci_curTask)->jobs;job;job = job->JOBnextJob) {
|
||||
if(strcmp(job->JOBname,"Noise Analysis")==0) {
|
||||
|
|
@ -2657,35 +2652,24 @@ do { if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NUL
|
|||
}
|
||||
|
||||
#ifdef USE_OMP
|
||||
InstCount = 0;
|
||||
model = (BSIM4model*)inModel;
|
||||
/* loop through all the BSIM4 device models
|
||||
to count the number of instances */
|
||||
|
||||
for( ; model != NULL; model = model->BSIM4nextModel )
|
||||
for (model = (BSIM4model*)inModel; model; model = model->BSIM4nextModel)
|
||||
{
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BSIM4instances; here != NULL ;
|
||||
here=here->BSIM4nextInstance)
|
||||
{
|
||||
InstCount++;
|
||||
}
|
||||
}
|
||||
InstArray = TMALLOC(BSIM4instance*, InstCount);
|
||||
model = (BSIM4model*)inModel;
|
||||
idx = 0;
|
||||
for( ; model != NULL; model = model->BSIM4nextModel )
|
||||
{
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BSIM4instances; here != NULL ;
|
||||
here=here->BSIM4nextInstance)
|
||||
{
|
||||
InstArray[idx] = here;
|
||||
BSIM4instance **InstArray;
|
||||
int idx;
|
||||
|
||||
idx = 0;
|
||||
for (here = model->BSIM4instances; here; here = here->BSIM4nextInstance)
|
||||
idx++;
|
||||
}
|
||||
/* set the array pointer and instance count into each model */
|
||||
model->BSIM4InstCount = InstCount;
|
||||
model->BSIM4InstanceArray = InstArray;
|
||||
|
||||
model->BSIM4InstCount = idx;
|
||||
|
||||
InstArray = TMALLOC(BSIM4instance*, idx);
|
||||
|
||||
idx = 0;
|
||||
for (here = model->BSIM4instances; here; here = here->BSIM4nextInstance)
|
||||
InstArray[idx++] = here;
|
||||
|
||||
model->BSIM4InstanceArray = InstArray;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -18,11 +18,6 @@ BSIM4v5destroy(GENmodel **inModel)
|
|||
{
|
||||
BSIM4v5model *mod = *(BSIM4v5model**) inModel;
|
||||
|
||||
#ifdef USE_OMP
|
||||
/* free just once for all models */
|
||||
FREE(mod->BSIM4v5InstanceArray);
|
||||
#endif
|
||||
|
||||
while (mod) {
|
||||
BSIM4v5model *next_mod = mod->BSIM4v5nextModel;
|
||||
BSIM4v5instance *inst = mod->BSIM4v5instances;
|
||||
|
|
@ -39,6 +34,9 @@ BSIM4v5destroy(GENmodel **inModel)
|
|||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->BSIM4v5InstanceArray);
|
||||
#endif
|
||||
FREE(mod->BSIM4v5version);
|
||||
FREE(mod);
|
||||
mod = next_mod;
|
||||
|
|
|
|||
|
|
@ -52,11 +52,6 @@ int noiseAnalGiven = 0, createNode; /* Criteria for new node creation */
|
|||
double Rtot, DMCGeff, DMCIeff, DMDGeff;
|
||||
JOB *job;
|
||||
|
||||
#ifdef USE_OMP
|
||||
int idx, InstCount;
|
||||
BSIM4v5instance **InstArray;
|
||||
#endif
|
||||
|
||||
/* Search for a noise analysis request */
|
||||
for (job = ft_curckt->ci_curTask->jobs; job; job = job->JOBnextJob) {
|
||||
if(strcmp(job->JOBname,"Noise Analysis")==0) {
|
||||
|
|
@ -2083,34 +2078,23 @@ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
|||
}
|
||||
|
||||
#ifdef USE_OMP
|
||||
InstCount = 0;
|
||||
model = (BSIM4v5model*)inModel;
|
||||
/* loop through all the BSIM4v6 device models
|
||||
to count the number of instances */
|
||||
for (model = (BSIM4v5model*)inModel; model; model = model->BSIM4v5nextModel)
|
||||
{
|
||||
BSIM4v5instance **InstArray;
|
||||
int idx;
|
||||
|
||||
for (; model != NULL; model = model->BSIM4v5nextModel)
|
||||
{
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BSIM4v5instances; here != NULL;
|
||||
here = here->BSIM4v5nextInstance)
|
||||
{
|
||||
InstCount++;
|
||||
}
|
||||
}
|
||||
InstArray = TMALLOC(BSIM4v5instance*, InstCount);
|
||||
model = (BSIM4v5model*)inModel;
|
||||
idx = 0;
|
||||
for (; model != NULL; model = model->BSIM4v5nextModel)
|
||||
{
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BSIM4v5instances; here != NULL;
|
||||
here = here->BSIM4v5nextInstance)
|
||||
{
|
||||
InstArray[idx] = here;
|
||||
idx = 0;
|
||||
for (here = model->BSIM4v5instances; here; here = here->BSIM4v5nextInstance)
|
||||
idx++;
|
||||
}
|
||||
/* set the array pointer and instance count into each model */
|
||||
model->BSIM4v5InstCount = InstCount;
|
||||
|
||||
model->BSIM4v5InstCount = idx;
|
||||
|
||||
InstArray = TMALLOC(BSIM4v5instance*, idx);
|
||||
|
||||
idx = 0;
|
||||
for (here = model->BSIM4v5instances; here; here = here->BSIM4v5nextInstance)
|
||||
InstArray[idx++] = here;
|
||||
|
||||
model->BSIM4v5InstanceArray = InstArray;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -20,11 +20,6 @@ BSIM4v6destroy(GENmodel **inModel)
|
|||
{
|
||||
BSIM4v6model *mod = *(BSIM4v6model**) inModel;
|
||||
|
||||
#ifdef USE_OMP
|
||||
/* free just once for all models */
|
||||
FREE(mod->BSIM4v6InstanceArray);
|
||||
#endif
|
||||
|
||||
while (mod) {
|
||||
BSIM4v6model *next_mod = mod->BSIM4v6nextModel;
|
||||
BSIM4v6instance *inst = mod->BSIM4v6instances;
|
||||
|
|
@ -41,6 +36,9 @@ BSIM4v6destroy(GENmodel **inModel)
|
|||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->BSIM4v6InstanceArray);
|
||||
#endif
|
||||
FREE(mod->BSIM4v6version);
|
||||
FREE(mod);
|
||||
mod = next_mod;
|
||||
|
|
|
|||
|
|
@ -59,11 +59,6 @@ double Rtot, DMCGeff, DMCIeff, DMDGeff;
|
|||
JOB *job;
|
||||
|
||||
|
||||
#ifdef USE_OMP
|
||||
int idx, InstCount;
|
||||
BSIM4v6instance **InstArray;
|
||||
#endif
|
||||
|
||||
/* Search for a noise analysis request */
|
||||
for (job = ft_curckt->ci_curTask->jobs; job; job = job->JOBnextJob) {
|
||||
if(strcmp(job->JOBname,"Noise Analysis")==0) {
|
||||
|
|
@ -2418,35 +2413,24 @@ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
|||
} /* end of loop through all the BSIM4v6 device models */
|
||||
|
||||
#ifdef USE_OMP
|
||||
InstCount = 0;
|
||||
model = (BSIM4v6model*)inModel;
|
||||
/* loop through all the BSIM4v6 device models
|
||||
to count the number of instances */
|
||||
|
||||
for( ; model != NULL; model = model->BSIM4v6nextModel )
|
||||
for (model = (BSIM4v6model*)inModel; model; model = model->BSIM4v6nextModel)
|
||||
{
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BSIM4v6instances; here != NULL ;
|
||||
here=here->BSIM4v6nextInstance)
|
||||
{
|
||||
InstCount++;
|
||||
}
|
||||
}
|
||||
InstArray = TMALLOC(BSIM4v6instance*, InstCount);
|
||||
model = (BSIM4v6model*)inModel;
|
||||
idx = 0;
|
||||
for( ; model != NULL; model = model->BSIM4v6nextModel )
|
||||
{
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BSIM4v6instances; here != NULL ;
|
||||
here=here->BSIM4v6nextInstance)
|
||||
{
|
||||
InstArray[idx] = here;
|
||||
BSIM4v6instance **InstArray;
|
||||
int idx;
|
||||
|
||||
idx = 0;
|
||||
for (here = model->BSIM4v6instances; here; here = here->BSIM4v6nextInstance)
|
||||
idx++;
|
||||
}
|
||||
/* set the array pointer and instance count into each model */
|
||||
model->BSIM4v6InstCount = InstCount;
|
||||
model->BSIM4v6InstanceArray = InstArray;
|
||||
|
||||
model->BSIM4v6InstCount = idx;
|
||||
|
||||
InstArray = TMALLOC(BSIM4v6instance*, idx);
|
||||
|
||||
idx = 0;
|
||||
for (here = model->BSIM4v6instances; here; here = here->BSIM4v6nextInstance)
|
||||
InstArray[idx++] = here;
|
||||
|
||||
model->BSIM4v6InstanceArray = InstArray;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -20,11 +20,6 @@ BSIM4v7destroy(GENmodel **inModel)
|
|||
{
|
||||
BSIM4v7model *mod = *(BSIM4v7model**) inModel;
|
||||
|
||||
#ifdef USE_OMP
|
||||
/* free just once for all models */
|
||||
FREE(mod->BSIM4v7InstanceArray);
|
||||
#endif
|
||||
|
||||
while (mod) {
|
||||
BSIM4v7model *next_mod = mod->BSIM4v7nextModel;
|
||||
BSIM4v7instance *inst = mod->BSIM4v7instances;
|
||||
|
|
@ -41,6 +36,9 @@ BSIM4v7destroy(GENmodel **inModel)
|
|||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->BSIM4v7InstanceArray);
|
||||
#endif
|
||||
/* mod->BSIM4v7modName to be freed in INPtabEnd() */
|
||||
FREE(mod->BSIM4v7version);
|
||||
FREE(mod);
|
||||
|
|
|
|||
|
|
@ -58,11 +58,6 @@ int noiseAnalGiven = 0, createNode; /* Criteria for new node creation */
|
|||
double Rtot, DMCGeff, DMCIeff, DMDGeff;
|
||||
JOB *job;
|
||||
|
||||
#ifdef USE_OMP
|
||||
int idx, InstCount;
|
||||
BSIM4v7instance **InstArray;
|
||||
#endif
|
||||
|
||||
/* Search for a noise analysis request */
|
||||
for (job = ((TSKtask *)ft_curckt->ci_curTask)->jobs;job;job = job->JOBnextJob) {
|
||||
if(strcmp(job->JOBname,"Noise Analysis")==0) {
|
||||
|
|
@ -2573,35 +2568,24 @@ do { if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NUL
|
|||
}
|
||||
|
||||
#ifdef USE_OMP
|
||||
InstCount = 0;
|
||||
model = (BSIM4v7model*)inModel;
|
||||
/* loop through all the BSIM4v7 device models
|
||||
to count the number of instances */
|
||||
|
||||
for( ; model != NULL; model = model->BSIM4v7nextModel )
|
||||
for (model = (BSIM4v7model*)inModel; model; model = model->BSIM4v7nextModel)
|
||||
{
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BSIM4v7instances; here != NULL ;
|
||||
here=here->BSIM4v7nextInstance)
|
||||
{
|
||||
InstCount++;
|
||||
}
|
||||
}
|
||||
InstArray = TMALLOC(BSIM4v7instance*, InstCount);
|
||||
model = (BSIM4v7model*)inModel;
|
||||
idx = 0;
|
||||
for( ; model != NULL; model = model->BSIM4v7nextModel )
|
||||
{
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BSIM4v7instances; here != NULL ;
|
||||
here=here->BSIM4v7nextInstance)
|
||||
{
|
||||
InstArray[idx] = here;
|
||||
BSIM4v7instance **InstArray;
|
||||
int idx;
|
||||
|
||||
idx = 0;
|
||||
for (here = model->BSIM4v7instances; here; here = here->BSIM4v7nextInstance)
|
||||
idx++;
|
||||
}
|
||||
/* set the array pointer and instance count into each model */
|
||||
model->BSIM4v7InstCount = InstCount;
|
||||
model->BSIM4v7InstanceArray = InstArray;
|
||||
|
||||
model->BSIM4v7InstCount = idx;
|
||||
|
||||
InstArray = TMALLOC(BSIM4v7instance*, idx);
|
||||
|
||||
idx = 0;
|
||||
for (here = model->BSIM4v7instances; here; here = here->BSIM4v7nextInstance)
|
||||
InstArray[idx++] = here;
|
||||
|
||||
model->BSIM4v7InstanceArray = InstArray;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,9 @@ B4SOIdestroy(GENmodel **inModel)
|
|||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->B4SOIInstanceArray);
|
||||
#endif
|
||||
FREE(mod);
|
||||
mod = next_mod;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,11 +53,6 @@ double Cboxt;
|
|||
/* v3.2 */
|
||||
double Vbs0t, Qsi;
|
||||
|
||||
#ifdef USE_OMP
|
||||
int idx, InstCount;
|
||||
B4SOIinstance **InstArray;
|
||||
#endif
|
||||
|
||||
/* loop through all the B4SOI device models */
|
||||
for( ; model != NULL; model = model->B4SOInextModel )
|
||||
{
|
||||
|
|
@ -2706,35 +2701,24 @@ do { if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NUL
|
|||
}
|
||||
|
||||
#ifdef USE_OMP
|
||||
InstCount = 0;
|
||||
model = (B4SOImodel*)inModel;
|
||||
/* loop through all the B4SOI device models
|
||||
to count the number of instances */
|
||||
|
||||
for( ; model != NULL; model = model->B4SOInextModel )
|
||||
for (model = (B4SOImodel*)inModel; model; model = model->B4SOInextModel)
|
||||
{
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->B4SOIinstances; here != NULL ;
|
||||
here=here->B4SOInextInstance)
|
||||
{
|
||||
InstCount++;
|
||||
}
|
||||
}
|
||||
InstArray = TMALLOC(B4SOIinstance*, InstCount);
|
||||
model = (B4SOImodel*)inModel;
|
||||
idx = 0;
|
||||
for( ; model != NULL; model = model->B4SOInextModel )
|
||||
{
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->B4SOIinstances; here != NULL ;
|
||||
here=here->B4SOInextInstance)
|
||||
{
|
||||
InstArray[idx] = here;
|
||||
B4SOIinstance **InstArray;
|
||||
int idx;
|
||||
|
||||
idx = 0;
|
||||
for (here = model->B4SOIinstances; here; here = here->B4SOInextInstance)
|
||||
idx++;
|
||||
}
|
||||
/* set the array pointer and instance count into each model */
|
||||
model->B4SOIInstCount = InstCount;
|
||||
model->B4SOIInstanceArray = InstArray;
|
||||
|
||||
model->B4SOIInstCount = idx;
|
||||
|
||||
InstArray = TMALLOC(B4SOIinstance*, idx);
|
||||
|
||||
idx = 0;
|
||||
for (here = model->B4SOIinstances; here; here = here->B4SOInextInstance)
|
||||
InstArray[idx++] = here;
|
||||
|
||||
model->B4SOIInstanceArray = InstArray;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -64,11 +64,6 @@ HSM2destroy(GENmodel **inModel)
|
|||
{
|
||||
HSM2model *mod = *(HSM2model**) inModel;
|
||||
|
||||
#ifdef USE_OMP
|
||||
/* free just once for all models */
|
||||
FREE(mod->HSM2InstanceArray);
|
||||
#endif
|
||||
|
||||
while (mod) {
|
||||
HSM2model *next_mod = mod->HSM2nextModel;
|
||||
HSM2instance *inst = mod->HSM2instances;
|
||||
|
|
@ -77,6 +72,9 @@ HSM2destroy(GENmodel **inModel)
|
|||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->HSM2InstanceArray);
|
||||
#endif
|
||||
FREE(mod);
|
||||
mod = next_mod;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,11 +114,6 @@ int HSM2setup(
|
|||
double Lgate =0.0, LG =0.0, Wgate =0.0, WG=0.0 ;
|
||||
double Lbin=0.0, Wbin=0.0, LWbin =0.0; /* binning */
|
||||
|
||||
#ifdef USE_OMP
|
||||
int idx, InstCount;
|
||||
HSM2instance **InstArray;
|
||||
#endif
|
||||
|
||||
/* loop through all the HSM2 device models */
|
||||
for ( ;model != NULL ;model = model->HSM2nextModel ) {
|
||||
/* Default value Processing for HSM2 MOSFET Models */
|
||||
|
|
@ -1257,34 +1252,23 @@ do { if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NUL
|
|||
} /* End of model */
|
||||
|
||||
#ifdef USE_OMP
|
||||
InstCount = 0;
|
||||
model = (HSM2model*)inModel;
|
||||
/* loop through all the HSM2 device models
|
||||
to count the number of instances */
|
||||
for (model = (HSM2model*)inModel; model; model = model->HSM2nextModel)
|
||||
{
|
||||
HSM2instance **InstArray;
|
||||
int idx;
|
||||
|
||||
for ( ; model != NULL; model = model->HSM2nextModel )
|
||||
{
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->HSM2instances; here != NULL ;
|
||||
here = here->HSM2nextInstance)
|
||||
{
|
||||
InstCount++;
|
||||
}
|
||||
}
|
||||
InstArray = TMALLOC(HSM2instance*, InstCount);
|
||||
model = (HSM2model*)inModel;
|
||||
idx = 0;
|
||||
for ( ; model != NULL; model = model->HSM2nextModel )
|
||||
{
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->HSM2instances; here != NULL ;
|
||||
here = here->HSM2nextInstance)
|
||||
{
|
||||
InstArray[idx] = here;
|
||||
idx = 0;
|
||||
for (here = model->HSM2instances; here; here = here->HSM2nextInstance)
|
||||
idx++;
|
||||
}
|
||||
/* set the array pointer and instance count into each model */
|
||||
model->HSM2InstCount = InstCount;
|
||||
|
||||
model->HSM2InstCount = idx;
|
||||
|
||||
InstArray = TMALLOC(HSM2instance*, idx);
|
||||
|
||||
idx = 0;
|
||||
for (here = model->HSM2instances; here; here = here->HSM2nextInstance)
|
||||
InstArray[idx++] = here;
|
||||
|
||||
model->HSM2InstanceArray = InstArray;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue