MCPcopy Create free account
hub / github.com/OSGeo/gdal / ThreadFuncDedicatedDataset

Function ThreadFuncDedicatedDataset

autotest/cpp/testblockcache.cpp:198–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196}
197
198static void ThreadFuncDedicatedDataset(void *_psThreadDescription)
199{
200 ThreadDescription *psThreadDescription =
201 (ThreadDescription *)_psThreadDescription;
202 int nXSize = psThreadDescription->poDS->GetRasterXSize();
203 int nYSize = psThreadDescription->poDS->GetRasterYSize();
204 void *pBuffer = CPLMalloc(psThreadDescription->nBufferSize);
205 while (psThreadDescription->psRequestList != nullptr)
206 {
207 Request *psRequest = GetNextRequest(psThreadDescription->psRequestList);
208 ReadRaster(psThreadDescription->poDS, nXSize, nYSize, psRequest->nBands,
209 (GByte *)pBuffer, psRequest->nXOff, psRequest->nYOff,
210 psRequest->nXWin, psRequest->nYWin);
211 CPLFree(psRequest);
212 }
213 CPLFree(pBuffer);
214}
215
216static void ThreadFuncWithMigration(void * /* _unused */)
217{

Callers

nothing calls this directly

Calls 5

CPLMallocFunction · 0.85
GetNextRequestFunction · 0.85
ReadRasterFunction · 0.70
GetRasterXSizeMethod · 0.45
GetRasterYSizeMethod · 0.45

Tested by

no test coverage detected