moved hardware info to the place where it is needed.
This commit is contained in:
@ -219,6 +219,29 @@ void PFitterFcnDKS::CalcExpectedChiSquare(const std::vector<Double_t> &par, Doub
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// GetDeviceName (public)
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p> get from DKS the device name used.
|
||||
*
|
||||
* \param devName deivce name, if status == 0
|
||||
*
|
||||
* \return 0 if OK, 1 otherwise
|
||||
*/
|
||||
int PFitterFcnDKS::GetDeviceName(string &devName)
|
||||
{
|
||||
int status = 1;
|
||||
|
||||
devName = "??";
|
||||
if (!fValid)
|
||||
return status;
|
||||
|
||||
status = fDKS.getDeviceName(devName);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// InitDKS (private)
|
||||
//--------------------------------------------------------------------------
|
||||
@ -251,7 +274,7 @@ void PFitterFcnDKS::InitDKS(const UInt_t dksTag)
|
||||
|
||||
// init chisq buffer on the GPU
|
||||
|
||||
// 1) calculated the maximum size for the data needed.
|
||||
// 1) calculate the maximum size for the data needed.
|
||||
Int_t parSize = -1, mapSize = -1, funSize = -1;
|
||||
Int_t maxSize = 0, size = -1;
|
||||
for (UInt_t i=0; i<fRunListCollection->GetNoOfSingleHisto(); i++) {
|
||||
@ -296,7 +319,7 @@ void PFitterFcnDKS::InitDKS(const UInt_t dksTag)
|
||||
}
|
||||
|
||||
// now ready to init the chisq buffer on the GPU
|
||||
cout << "debug> maximal packed histo size=" << maxSize << ", parSize=" << parSize << ", funSize=" << funSize << ", mapSize=" << mapSize << endl;
|
||||
// cout << "debug> maximal packed histo size=" << maxSize << ", parSize=" << parSize << ", funSize=" << funSize << ", mapSize=" << mapSize << endl;
|
||||
ierr = fDKS.initChiSquare(maxSize, parSize, funSize, mapSize);
|
||||
if (ierr != 0) {
|
||||
cerr << ">> PFitterFcnDKS::InitDKS: **ERROR** failed to allocate the necessary chisq buffer on the GPU." << endl;
|
||||
|
Reference in New Issue
Block a user