Fix the CAP model for 'alter' command

This commit is contained in:
Francesco Lannutti 2018-05-02 23:13:03 +02:00
parent 977b795515
commit 94d11fc3bd
2 changed files with 17 additions and 0 deletions

View File

@ -80,5 +80,20 @@ CAPparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
default:
return(E_BADPARM);
}
#ifdef USE_CUSPICE
int status ;
CAPmodel *model ;
model = CAPmodPtr(here) ;
if (model->gen.GENinitCUDA) {
model->CAPparamCPU.CAPcapacArray[here->gen.GENcudaIndex] = here->CAPcapac;
model->CAPparamCPU.CAPmArray[here->gen.GENcudaIndex] = here->CAPm;
status = cuCAPtemp ((GENmodel *)model);
if (status != 0)
return E_NOMEM;
}
#endif
return(OK);
}

View File

@ -204,6 +204,8 @@ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
status = cuCAPsetup ((GENmodel *)model) ;
if (status != 0)
return (E_NOMEM) ;
model->gen.GENinitCUDA = 1 ;
}
#endif