Fix the CAP model for 'alter' command
This commit is contained in:
parent
977b795515
commit
94d11fc3bd
|
|
@ -80,5 +80,20 @@ CAPparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
|
||||||
default:
|
default:
|
||||||
return(E_BADPARM);
|
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);
|
return(OK);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -204,6 +204,8 @@ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
||||||
status = cuCAPsetup ((GENmodel *)model) ;
|
status = cuCAPsetup ((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