Fix IND model to work with 'alter' command in CUSPICE
This commit is contained in:
parent
ac1e2b660a
commit
4ea0e8b86d
|
|
@ -11,6 +11,9 @@ Author: 1985 Thomas L. Quarles
|
||||||
#include "ngspice/sperror.h"
|
#include "ngspice/sperror.h"
|
||||||
#include "ngspice/suffix.h"
|
#include "ngspice/suffix.h"
|
||||||
|
|
||||||
|
#ifdef USE_CUSPICE
|
||||||
|
#include "ngspice/CUSPICE/CUSPICE.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ARGSUSED */
|
/* ARGSUSED */
|
||||||
int
|
int
|
||||||
|
|
@ -65,5 +68,20 @@ INDparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
|
||||||
default:
|
default:
|
||||||
return(E_BADPARM);
|
return(E_BADPARM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef USE_CUSPICE
|
||||||
|
int status ;
|
||||||
|
INDmodel *model ;
|
||||||
|
|
||||||
|
model = INDmodPtr(here) ;
|
||||||
|
if (model->gen.GENinitCUDA) {
|
||||||
|
model->INDparamCPU.INDinductArray[here->gen.GENcudaIndex] = here->INDinduct;
|
||||||
|
model->INDparamCPU.INDinitCondArray[here->gen.GENcudaIndex] = here->INDinitCond;
|
||||||
|
status = cuINDtemp ((GENmodel *)model);
|
||||||
|
if (status != 0)
|
||||||
|
return E_NOMEM;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return(OK);
|
return(OK);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -196,6 +196,8 @@ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
||||||
status = cuINDsetup ((GENmodel *)model) ;
|
status = cuINDsetup ((GENmodel *)model) ;
|
||||||
if (status != 0)
|
if (status != 0)
|
||||||
return (E_NOMEM) ;
|
return (E_NOMEM) ;
|
||||||
|
|
||||||
|
model->gen.GENinitCUDA = 1 ;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue