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

Function TEST

autotest/cpp/testblockcache.cpp:326–599  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324}
325
326TEST(testblockcache, test)
327{
328 int i;
329 int nThreads = CPLGetNumCPUs();
330 std::vector<CPLJoinableThread *> apsThreads;
331 Strategy eStrategy = STRATEGY_RANDOM;
332 int bNewDatasetOption = FALSE;
333 int nXSize = 5000;
334 int nYSize = 5000;
335 int nBands = 4;
336 char **papszOptions = nullptr;
337 int bOnDisk = FALSE;
338 std::vector<ThreadDescription> asThreadDescription;
339 int bMemDriver = FALSE;
340 GDALDataset *poMEMDS = nullptr;
341 int bMigrate = FALSE;
342 int nMaxRequests = -1;
343
344 GDALAllRegister();
345
346 int argc = global_argc;
347 char **argv = global_argv;
348 for (i = 1; i < argc; i++)
349 {
350 if (EQUAL(argv[i], "-threads") && i + 1 < argc)
351 {
352 i++;
353 nThreads = atoi(argv[i]);
354 }
355 else if (EQUAL(argv[i], "-loops") && i + 1 < argc)
356 {
357 i++;
358 nLoops = atoi(argv[i]);
359 if (nLoops <= 0)
360 nLoops = INT_MAX;
361 }
362 else if (EQUAL(argv[i], "-max_requests") && i + 1 < argc)
363 {
364 i++;
365 nMaxRequests = atoi(argv[i]);
366 }
367 else if (EQUAL(argv[i], "-strategy") && i + 1 < argc)
368 {
369 i++;
370 if (EQUAL(argv[i], "random"))
371 eStrategy = STRATEGY_RANDOM;
372 else if (EQUAL(argv[i], "line"))
373 eStrategy = STRATEGY_LINE;
374 else if (EQUAL(argv[i], "block"))
375 eStrategy = STRATEGY_BLOCK;
376 else
377 Usage();
378 }
379 else if (EQUAL(argv[i], "-xsize") && i + 1 < argc)
380 {
381 i++;
382 nXSize = atoi(argv[i]);
383 bNewDatasetOption = TRUE;

Callers

nothing calls this directly

Calls 15

CPLGetNumCPUsFunction · 0.85
CSLAddStringFunction · 0.85
CPLDebugFunction · 0.85
VSIMallocFunction · 0.85
myrand_rFunction · 0.85
VSIFreeFunction · 0.85
GDALCloseClass · 0.85
CPLMallocFunction · 0.85
PutResourceAtEndFunction · 0.85

Tested by

no test coverage detected