bkloppenborg / simtoi

The SImulation and Modeling Tool for Optical Interferometry
GNU General Public License v3.0
7 stars 6 forks source link

OpenCL datamember access in CCL_GLThread is not thread safe #52

Closed bkloppenborg closed 11 years ago

bkloppenborg commented 11 years ago

There is no serialization method to access the following datamembers:

    int mCLDataSet;
    double mCLValue;
    float * mCLArrayValue;
    unsigned int mCLArrayN;
    string mCLString;
    OIDataList mCLDataList;

in the following functions:

CCL_GLThread::GetChi
CCL_GLThread::GetChi2
CCL_GLThread::GetData
CCL_GLThread::GetDataAveJD
CCL_GLThread::GetFlux
CCL_GLThread::GetImage
CCL_GLThread::GetLogLike
CCL_GLThread::GetNData
CCL_GLThread::GetNDataAllocated
CCL_GLThread::GetNDataSets
CCL_GLThread::GetNT3
CCL_GLThread::GetNV2
CCL_GLThread::LoadData
CCL_GLThread::RemoveData
CCL_GLThread::ReplaceData
CCL_GLThread::SaveImage

Within SIMTOI this appears to be ok (as we only send commands from one thread). Perhaps we should ensure seralization to liboi within liboi itself?

bkloppenborg commented 11 years ago

Alleviated when CGL_CLThread was replaced by new CWorkerThread. Closed prior to bf007d44e3c7408ddfd5d367e8a28dc53a550fee.