88 void invalidateData();
95 static void setMultiIO(
SbBool on);
100 static SbBool getMultiIO();
102 static void setMonitoringAmount(
int);
103 static int getMonitoringAmount();
118 void setTexelSize(
int texelSize );
133 void setTex3LoadRate(
int loadRate );
136 int getTex3LoadRate();
139 void setTex2LoadRate(
int loadRate );
142 int getTex2LoadRate();
145 void setMinResolutionThreshold(
int threshold = MIN_RES_THRESHOLD );
148 int getMinResolutionThreshold();
151 void setMaxResolutionThreshold(
int threshold );
154 int getMaxResolutionThreshold();
162 int getTileDimension();
172 void setMaxMainMemory(
int maxMainMemory );
178 int getMaxMainMemory();
181 void setMaxTexMemory(
int maxTexMemoryMB );
184 int getMaxTexMemory();
190 int getMaxTilesInMainMem();
193 int getMaxTilesInTexMem();
206 void setTileHalfLife(
float timeInSec );
212 float getTileHalfLife();
224 void setLoadPolicy( LoadPolicy loadPolicy );SoDEPRECATED
229 LoadPolicy getLoadPolicy();
238 void setMovingTimeOut(
float );
245 float getMovingTimeOut();
252 static void setTex2VVizLoadRate(
int loadRate );
259 static int getTex2VVizLoadRate();
266 static void setTex3VVizLoadRate(
int loadRate );
273 static int getTex3VVizLoadRate();
281 static void setMaxVVizMainMemory(
int maxMainMemoryMB );
289 static void setMaxVVizTexMemory(
int maxTexMemoryMB );
295 static int getMaxVVizMainMemory();
301 static int getMaxVVizTexMemory();
308 static void setNumIO(
unsigned int numIO );
315 static unsigned int getNumIO();
323 static void setLoadNotificationRate(
int rate );
329 static int getLoadNotificationRate();
334 float m_decreaseWeightFactor;
335 float getDecreaseWeightFactor() {
return m_decreaseWeightFactor;};
345 void setDataSize(
int dataSize );
350 void setVolumeDim(
const SbVec3i32& dim );
352 int getNumTileToTime();
362 CPU_MEM_UPDATED = 0x01,
363 GPU_MEM_UPDATED = 0x02,
364 GPU_2D_UPDATED = 0x04,
365 LOADRATE_2D_UPDATED = 0x08,
366 LOADRATE_3D_UPDATED = 0x10,
367 LOAD_RATE_UPDATED = 0x20,
372 virtual void updateResources(
unsigned short resourceState);
375 int getMaxMainMemoryInKB()
const;
376 int getMaxTexMemoryInKB()
const;
377 int getMax2DTexMemoryInKB()
const;
382 int getSumOfMaxTilesInTexMem();
383 int getSumOfTex3LoadRate();
384 int getSumOfMax2DTextures();
385 int getSumOfTex2LoadRate();
386 void getSumOfMemAndTileSize(uint64_t &memByte,
int& tileSize);
387 void getSumOfNumTileInMem( uint64_t &maxTileInMem );
389 static void computeInternalCounters(
const std::vector<SoLDMResourceManager*>& rsToUpdate);
390 static void shareSpareResources(
const std::vector<SoLDMResourceManager*>& rsToUpdate,
391 size_t spareAmount, SoLDMResourceManager::State resourceType);
399 void allocateGPUResources(
const std::vector<SoLDMResourceManager*>& rsToUpdate);
400 void allocateCPUResources(
const std::vector<SoLDMResourceManager*>& rsToUpdate);
401 void allocateGPU2DResources(
const std::vector<SoLDMResourceManager*>& rsToUpdate);
402 void allocateTex2LoadRate(
const std::vector<SoLDMResourceManager*>& rsToUpdate);
403 void allocateTex3LoadRate(
const std::vector<SoLDMResourceManager*>& rsToUpdate);
405 void setIdealTextFrontCb(
SoLDMTexFrontCB *func,
void* userData = NULL);
406 void idealTexFrontReached();
409 SoDataSet* getDataSet() {
return m_ds; };
414 static uint64_t getMaxVViz2DTexMemory();
419 static void setMaxVViz2DTexMemory(uint64_t maxMemory);
424 void setMax2DTexMemory(
int max2DTexMemory);
429 int getMax2DTexMemory();
432 void enableTileBorders(
bool enableTileBorders );
435 bool areTileBordersEnabled()
const;
438 void setMinTilesToLoad(
int minTilesToLoad );
441 int getMinTilesToLoad()
const
443 return m_minTilesToLoad;
450 bool getViewpointRefinement()
const;
456 bool getScreenResolutionCulling()
const;
459 uint64_t getDataTileSizeInBytes()
const;
462 uint64_t getTexTileSizeInBytes(
bool is3DTile =
false)
const;
466 int m_minResThreshold;
467 int m_maxResThreshold;
469 bool m_tileBordersEnabled;
470 int m_minTilesToLoad;
479 static void updateNumTilesInMainMem();
482 static void updateMaxMainMem();
485 static void updateSumMax2DTextures();
491 static const std::vector<SoLDMResourceManager*>& getRSToUpdate();
495 static int s_maxVVizTexMemoryKB;
497 int m_maxTexMemoryKB;
498 int m_max2DTexMemoryKB;
500 int m_numTilesInTexMem;
502 static void updateNumTilesInTexMem();
505 static void updateMaxTexMem();
510 static void checkParametersConsistency(
const std::vector<SoLDMResourceManager*>& rsToUpdate);
514 static int s_tex3VVizLoadRate;
519 static uint64_t s_maxVViz2DTexMemory;
522 static int s_tex2VVizLoadRate;
527 static int s_maxVVizMainMemoryKB;
528 int m_maxMainMemoryKB;
530 int m_numTilesInMainMem;
532 static int s_loadNotificationRate;
533 static int s_memToLoad;
536 static unsigned int s_numIO;
537 static SbBool s_isMultiIO;
551 static std::vector<SoLDMResourceManager*> s_resourceManagers;
559 void adjustMemPerDataset(
const std::vector<SoLDMResourceManager*>& rsToUpdate);
564 int m_getSumOfMaxTilesInTexMemAdjusted;
565 int m_getSumOfMaxTilesInTexMem;
571 size_t m_maxNeededMemKB;
575 static std::vector<SoLDMResourceManager*> s_rsToUpdate;
578 static std::map<SoLDMMediator*, int> s_maskPerMediator;
584 static size_t s_nbVolumeData;
588 static size_t s_gpuMemPerDataSetKB;
592 static size_t s_cpuMemPerDataSetKB;
596 static uint64_t s_2DGpuTexMemoryPerDataSetMB;
600 static size_t s_tex2LoadRatePerDataSet;
604 static size_t s_tex3LoadRatePerDataSet;
607 static size_t s_spareGpuMemoryKB;
610 static size_t s_spareCpuMemoryKB;
613 static size_t s_spareTex2LoadRate;
616 static size_t s_spareTex3LoadRate;
619 static bool s_debugResourceValues;