nonsense, Revert "fix omp"
This commit is contained in:
parent
088a13e59f
commit
8094ec4948
|
|
@ -18,6 +18,11 @@ 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;
|
||||
|
|
@ -37,11 +42,6 @@ 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,6 +41,12 @@ 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 )
|
||||
{
|
||||
|
|
@ -1079,24 +1085,34 @@ 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 = (BSIM3model*)inModel; model; model = model->BSIM3nextModel )
|
||||
for( ; model != NULL; model = model->BSIM3nextModel )
|
||||
{
|
||||
BSIM3instance **InstArray;
|
||||
int idx;
|
||||
|
||||
idx = 0;
|
||||
for (here = model->BSIM3instances; here; here = here->BSIM3nextInstance)
|
||||
/* 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;
|
||||
idx++;
|
||||
|
||||
model->BSIM3InstCount = idx;
|
||||
|
||||
InstArray = TMALLOC(BSIM3instance*, idx);
|
||||
|
||||
idx = 0;
|
||||
for (here = model->BSIM3instances; here; here = here->BSIM3nextInstance)
|
||||
InstArray[idx++] = here;
|
||||
|
||||
}
|
||||
/* set the array pointer and instance count into each model */
|
||||
model->BSIM3InstCount = InstCount;
|
||||
model->BSIM3InstanceArray = InstArray;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,11 @@ 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;
|
||||
|
|
@ -35,9 +40,6 @@ BSIM3v32destroy (GENmodel **inModel)
|
|||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->BSIM3v32InstanceArray);
|
||||
#endif
|
||||
FREE(mod->BSIM3v32version);
|
||||
FREE(mod);
|
||||
mod = next_mod;
|
||||
|
|
|
|||
|
|
@ -38,6 +38,11 @@ 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 )
|
||||
{
|
||||
|
|
@ -1091,26 +1096,35 @@ 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 = (BSIM3v32model*)inModel; model; model = model->BSIM3v32nextModel)
|
||||
for (; model != NULL; model = model->BSIM3v32nextModel)
|
||||
{
|
||||
BSIM3v32instance **InstArray;
|
||||
int idx;
|
||||
|
||||
idx = 0;
|
||||
for (here = model->BSIM3v32instances; here; here = here->BSIM3v32nextInstance)
|
||||
/* 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;
|
||||
idx++;
|
||||
|
||||
model->BSIM3v32InstCount = idx;
|
||||
|
||||
InstArray = TMALLOC(BSIM3v32instance*, idx);
|
||||
|
||||
idx = 0;
|
||||
for (here = model->BSIM3v32instances; here; here = here->BSIM3v32nextInstance)
|
||||
InstArray[idx++] = here;
|
||||
|
||||
}
|
||||
/* set the array pointer and instance count into each model */
|
||||
model->BSIM3v32InstCount = InstCount;
|
||||
model->BSIM3v32InstanceArray = InstArray;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,11 @@ 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;
|
||||
|
|
@ -36,9 +41,6 @@ BSIM4destroy(GENmodel **inModel)
|
|||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->BSIM4InstanceArray);
|
||||
#endif
|
||||
FREE(mod->BSIM4version);
|
||||
FREE(mod);
|
||||
mod = next_mod;
|
||||
|
|
|
|||
|
|
@ -60,6 +60,11 @@ 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) {
|
||||
|
|
@ -2652,24 +2657,35 @@ do { if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NUL
|
|||
}
|
||||
|
||||
#ifdef USE_OMP
|
||||
for (model = (BSIM4model*)inModel; model; model = model->BSIM4nextModel)
|
||||
InstCount = 0;
|
||||
model = (BSIM4model*)inModel;
|
||||
/* loop through all the BSIM4 device models
|
||||
to count the number of instances */
|
||||
|
||||
for( ; model != NULL; model = model->BSIM4nextModel )
|
||||
{
|
||||
BSIM4instance **InstArray;
|
||||
int idx;
|
||||
|
||||
idx = 0;
|
||||
for (here = model->BSIM4instances; here; here = here->BSIM4nextInstance)
|
||||
/* 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;
|
||||
idx++;
|
||||
|
||||
model->BSIM4InstCount = idx;
|
||||
|
||||
InstArray = TMALLOC(BSIM4instance*, idx);
|
||||
|
||||
idx = 0;
|
||||
for (here = model->BSIM4instances; here; here = here->BSIM4nextInstance)
|
||||
InstArray[idx++] = here;
|
||||
|
||||
model->BSIM4InstanceArray = InstArray;
|
||||
}
|
||||
/* set the array pointer and instance count into each model */
|
||||
model->BSIM4InstCount = InstCount;
|
||||
model->BSIM4InstanceArray = InstArray;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,11 @@ 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;
|
||||
|
|
@ -34,9 +39,6 @@ BSIM4v5destroy(GENmodel **inModel)
|
|||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->BSIM4v5InstanceArray);
|
||||
#endif
|
||||
FREE(mod->BSIM4v5version);
|
||||
FREE(mod);
|
||||
mod = next_mod;
|
||||
|
|
|
|||
|
|
@ -52,6 +52,11 @@ 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) {
|
||||
|
|
@ -2078,23 +2083,34 @@ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
|||
}
|
||||
|
||||
#ifdef USE_OMP
|
||||
for (model = (BSIM4v5model*)inModel; model; model = model->BSIM4v5nextModel)
|
||||
InstCount = 0;
|
||||
model = (BSIM4v5model*)inModel;
|
||||
/* loop through all the BSIM4v6 device models
|
||||
to count the number of instances */
|
||||
|
||||
for (; model != NULL; model = model->BSIM4v5nextModel)
|
||||
{
|
||||
BSIM4v5instance **InstArray;
|
||||
int idx;
|
||||
|
||||
idx = 0;
|
||||
for (here = model->BSIM4v5instances; here; here = here->BSIM4v5nextInstance)
|
||||
/* 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++;
|
||||
|
||||
model->BSIM4v5InstCount = idx;
|
||||
|
||||
InstArray = TMALLOC(BSIM4v5instance*, idx);
|
||||
|
||||
idx = 0;
|
||||
for (here = model->BSIM4v5instances; here; here = here->BSIM4v5nextInstance)
|
||||
InstArray[idx++] = here;
|
||||
|
||||
}
|
||||
/* set the array pointer and instance count into each model */
|
||||
model->BSIM4v5InstCount = InstCount;
|
||||
model->BSIM4v5InstanceArray = InstArray;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -20,6 +20,11 @@ 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;
|
||||
|
|
@ -36,9 +41,6 @@ BSIM4v6destroy(GENmodel **inModel)
|
|||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->BSIM4v6InstanceArray);
|
||||
#endif
|
||||
FREE(mod->BSIM4v6version);
|
||||
FREE(mod);
|
||||
mod = next_mod;
|
||||
|
|
|
|||
|
|
@ -59,6 +59,11 @@ 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) {
|
||||
|
|
@ -2413,24 +2418,35 @@ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
|||
} /* end of loop through all the BSIM4v6 device models */
|
||||
|
||||
#ifdef USE_OMP
|
||||
for (model = (BSIM4v6model*)inModel; model; model = model->BSIM4v6nextModel)
|
||||
InstCount = 0;
|
||||
model = (BSIM4v6model*)inModel;
|
||||
/* loop through all the BSIM4v6 device models
|
||||
to count the number of instances */
|
||||
|
||||
for( ; model != NULL; model = model->BSIM4v6nextModel )
|
||||
{
|
||||
BSIM4v6instance **InstArray;
|
||||
int idx;
|
||||
|
||||
idx = 0;
|
||||
for (here = model->BSIM4v6instances; here; here = here->BSIM4v6nextInstance)
|
||||
/* 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;
|
||||
idx++;
|
||||
|
||||
model->BSIM4v6InstCount = idx;
|
||||
|
||||
InstArray = TMALLOC(BSIM4v6instance*, idx);
|
||||
|
||||
idx = 0;
|
||||
for (here = model->BSIM4v6instances; here; here = here->BSIM4v6nextInstance)
|
||||
InstArray[idx++] = here;
|
||||
|
||||
model->BSIM4v6InstanceArray = InstArray;
|
||||
}
|
||||
/* set the array pointer and instance count into each model */
|
||||
model->BSIM4v6InstCount = InstCount;
|
||||
model->BSIM4v6InstanceArray = InstArray;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,11 @@ 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;
|
||||
|
|
@ -36,9 +41,6 @@ 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,6 +58,11 @@ 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) {
|
||||
|
|
@ -2568,24 +2573,35 @@ do { if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NUL
|
|||
}
|
||||
|
||||
#ifdef USE_OMP
|
||||
for (model = (BSIM4v7model*)inModel; model; model = model->BSIM4v7nextModel)
|
||||
InstCount = 0;
|
||||
model = (BSIM4v7model*)inModel;
|
||||
/* loop through all the BSIM4v7 device models
|
||||
to count the number of instances */
|
||||
|
||||
for( ; model != NULL; model = model->BSIM4v7nextModel )
|
||||
{
|
||||
BSIM4v7instance **InstArray;
|
||||
int idx;
|
||||
|
||||
idx = 0;
|
||||
for (here = model->BSIM4v7instances; here; here = here->BSIM4v7nextInstance)
|
||||
/* 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;
|
||||
idx++;
|
||||
|
||||
model->BSIM4v7InstCount = idx;
|
||||
|
||||
InstArray = TMALLOC(BSIM4v7instance*, idx);
|
||||
|
||||
idx = 0;
|
||||
for (here = model->BSIM4v7instances; here; here = here->BSIM4v7nextInstance)
|
||||
InstArray[idx++] = here;
|
||||
|
||||
model->BSIM4v7InstanceArray = InstArray;
|
||||
}
|
||||
/* set the array pointer and instance count into each model */
|
||||
model->BSIM4v7InstCount = InstCount;
|
||||
model->BSIM4v7InstanceArray = InstArray;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -32,9 +32,6 @@ B4SOIdestroy(GENmodel **inModel)
|
|||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->B4SOIInstanceArray);
|
||||
#endif
|
||||
FREE(mod);
|
||||
mod = next_mod;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,6 +53,11 @@ 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 )
|
||||
{
|
||||
|
|
@ -2701,24 +2706,35 @@ do { if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NUL
|
|||
}
|
||||
|
||||
#ifdef USE_OMP
|
||||
for (model = (B4SOImodel*)inModel; model; model = model->B4SOInextModel)
|
||||
InstCount = 0;
|
||||
model = (B4SOImodel*)inModel;
|
||||
/* loop through all the B4SOI device models
|
||||
to count the number of instances */
|
||||
|
||||
for( ; model != NULL; model = model->B4SOInextModel )
|
||||
{
|
||||
B4SOIinstance **InstArray;
|
||||
int idx;
|
||||
|
||||
idx = 0;
|
||||
for (here = model->B4SOIinstances; here; here = here->B4SOInextInstance)
|
||||
/* 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;
|
||||
idx++;
|
||||
|
||||
model->B4SOIInstCount = idx;
|
||||
|
||||
InstArray = TMALLOC(B4SOIinstance*, idx);
|
||||
|
||||
idx = 0;
|
||||
for (here = model->B4SOIinstances; here; here = here->B4SOInextInstance)
|
||||
InstArray[idx++] = here;
|
||||
|
||||
model->B4SOIInstanceArray = InstArray;
|
||||
}
|
||||
/* set the array pointer and instance count into each model */
|
||||
model->B4SOIInstCount = InstCount;
|
||||
model->B4SOIInstanceArray = InstArray;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -64,6 +64,11 @@ 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;
|
||||
|
|
@ -72,9 +77,6 @@ HSM2destroy(GENmodel **inModel)
|
|||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->HSM2InstanceArray);
|
||||
#endif
|
||||
FREE(mod);
|
||||
mod = next_mod;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,6 +114,11 @@ 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 */
|
||||
|
|
@ -1252,23 +1257,34 @@ do { if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NUL
|
|||
} /* End of model */
|
||||
|
||||
#ifdef USE_OMP
|
||||
for (model = (HSM2model*)inModel; model; model = model->HSM2nextModel)
|
||||
InstCount = 0;
|
||||
model = (HSM2model*)inModel;
|
||||
/* loop through all the HSM2 device models
|
||||
to count the number of instances */
|
||||
|
||||
for ( ; model != NULL; model = model->HSM2nextModel )
|
||||
{
|
||||
HSM2instance **InstArray;
|
||||
int idx;
|
||||
|
||||
idx = 0;
|
||||
for (here = model->HSM2instances; here; here = here->HSM2nextInstance)
|
||||
/* 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++;
|
||||
|
||||
model->HSM2InstCount = idx;
|
||||
|
||||
InstArray = TMALLOC(HSM2instance*, idx);
|
||||
|
||||
idx = 0;
|
||||
for (here = model->HSM2instances; here; here = here->HSM2nextInstance)
|
||||
InstArray[idx++] = here;
|
||||
|
||||
}
|
||||
/* set the array pointer and instance count into each model */
|
||||
model->HSM2InstCount = InstCount;
|
||||
model->HSM2InstanceArray = InstArray;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue